X-Authentication-Warning: delorie.com: mail set sender to djgpp-bounces using -f From: Bob Tanner Organization: Real Time Enterprises, Inc. Newsgroups: comp.os.msdos.djgpp Date: Wed, 2 May 2012 22:08:12 -0500 Message-ID: <4fa1f69c$0$17213$892e0abb@auth.newsreader.octanews.com> References: <4f9ff733$0$2610$892e0abb AT auth DOT newsreader DOT octanews DOT com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1; format=flowed Content-Transfer-Encoding: 8bit Subject: Re: Building DJGPP cross-compiler from Andris' SRPMS on x86_64 User-Agent: Unison/2.1.7 Lines: 155 NNTP-Posting-Date: 02 May 2012 22:08:12 CDT X-Complaints-To: abuse AT octanews DOT net Bytes: 6386 To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com On 2012-05-01 14:46:11 +0000, Bob Tanner said: > Attempting to compile the src.rpm on CentOS 6.2 x86_64. So, I grabbed this src.rpm http://ap1.pp.fi/djgpp/djdev/rpms/old/djcrx-2.04pre-5.src.rpm And tried to rpmbuild --rebuild it, got this error: error: Arch dependent binaries in noarch package BUILDROOT/ `-- djcrx-2.04pre-5.x86_64 `-- usr |-- i586-pc-msdosdjgpp | |-- bin | |-- lib | `-- sys-include | |-- debug | |-- inlines | |-- libc | |-- libm | |-- machine | |-- netinet | `-- sys `-- share `-- doc `-- djcrx-2.04pre Sure enough arch dependent binaries $ file BUILDROOT/djcrx-2.04pre-5.x86_64/usr/i586-pc-msdosdjgpp/bin/stubify djcrx-2.04pre-5.x86_64/usr/i586-pc-msdosdjgpp/bin/stubify: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.18, not stripped Patched .spec file --- djcrx.spec.old 2012-05-01 10:03:07.843676690 -0500 +++ djcrx.spec 2012-05-01 10:03:33.223714626 -0500 @@ -10,7 +10,7 @@ #Requires: anything #Prereq: something #BuildPrereq: something-else -BuildArch: noarch +#BuildArch: noarch %description DJGPP C library and some tools (stubify and stubedit) Rebuilt djcross-gcc $ rpmbuild --rebuild djcross-gcc-4.7.0-1ap.src.rpm Fails to build because it cannot find the stubs-32.h, looking around I find /usr/include/gnu/stubs.h /usr/include/gnu/stubs-64.h /usr/i586-pc-msdosdjgpp/sys-include/libc/stubs.h Here's the error message make[5]: Entering directory `/home/tanner/rpmbuild/BUILD/djcross-gcc-4.7.0/tmpbuild/x86_64-unknown-linux-gnu/32/libgcc' # If this is the top-level multilib, build all the other # multilibs. DEFINES='' HEADERS='../../../../gnu/gcc-4.70/libgcc/config/i386/value-unwind.h' \ ../../../../gnu/gcc-4.70/libgcc/mkheader.sh > tmp-libgcc_tm.h /bin/sh ../../../../gnu/gcc-4.70/libgcc/../move-if-change tmp-libgcc_tm.h libgcc_tm.h echo timestamp > libgcc_tm.stamp /home/tanner/rpmbuild/BUILD/djcross-gcc-4.7.0/tmpbuild/./gcc/xgcc -B/home/tanner/rpmbuild/BUILD/djcross-gcc-4.7.0/tmpbuild/./gcc/ -B/home/tanner/rpmbuild/BUILD/djcross-gcc-4.7.0/tmpinst/x86_64-unknown-linux-gnu/bin/ -B/home/tanner/rpmbuild/BUILD/djcross-gcc-4.7.0/tmpinst/x86_64-unknown-linux-gnu/lib/ -isystem /home/tanner/rpmbuild/BUILD/djcross-gcc-4.7.0/tmpinst/x86_64-unknown-linux-gnu/include -isystem /home/tanner/rpmbuild/BUILD/djcross-gcc-4.7.0/tmpinst/x86_64-unknown-linux-gnu/sys-include -g -O2 -m32 -O2 -g -O2 -DIN_GCC -W -Wall -Wwrite-strings -Wcast-qual -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition -isystem ./include -fpic -g -DIN_LIBGCC2 -fbuilding-libgcc -fno-stack-protector -fpic -I. -I. -I../../.././gcc -I../../../../gnu/gcc-4.70/libgcc -I../../../../gnu/gcc-4.70/libgcc/. -I../../../../gnu/gcc-4.70/libgcc/../gcc -I../../../../gnu/gcc-4.70/libgcc/../include -I../../../../gnu/gcc-4.70/libgcc/config/libbid -DENABLE_DECIMAL_BID_FORMAT -DHAVE_CC_TLS -DUSE_TLS -o _muldi3.o -MT _muldi3.o -MD -MP -MF _muldi3.dep -DL_muldi3 -c ../../../../gnu/gcc-4.70/libgcc/libgcc2.c -fvisibility=hidden -DHIDE_EXPORTS In file included from /usr/include/features.h:385:0, from /usr/include/stdio.h:28, from ../../../../gnu/gcc-4.70/libgcc/../gcc/tsystem.h:88, from ../../../../gnu/gcc-4.70/libgcc/libgcc2.c:29: /usr/include/gnu/stubs.h:7:27: fatal error: gnu/stubs-32.h: No such file or directory compilation terminated. make[5]: *** [_muldi3.o] Error 1 make[5]: Leaving directory `/home/tanner/rpmbuild/BUILD/djcross-gcc-4.7.0/tmpbuild/x86_64-unknown-linux-gnu/32/libgcc' make[4]: *** [multi-do] Error 1 make[4]: Leaving directory `/home/tanner/rpmbuild/BUILD/djcross-gcc-4.7.0/tmpbuild/x86_64-unknown-linux-gnu/libgcc' make[3]: *** [all-multi] Error 2 make[3]: Leaving directory `/home/tanner/rpmbuild/BUILD/djcross-gcc-4.7.0/tmpbuild/x86_64-unknown-linux-gnu/libgcc' make[2]: *** [all-stage1-target-libgcc] Error 2 make[2]: Leaving directory `/home/tanner/rpmbuild/BUILD/djcross-gcc-4.7.0/tmpbuild' make[1]: *** [stage1-bubble] Error 2 make[1]: Leaving directory `/home/tanner/rpmbuild/BUILD/djcross-gcc-4.7.0/tmpbuild' make: *** [bootstrap] Error 2 error: Bad exit status from /var/tmp/rpm-tmp.DHt6MZ (%build) So I installed glibc-devel.i686 $ sudo yum install glibc-devel.i686 Not sure if installing glibc-devel.i686 is the right thing todo but seems to work. $ rpmbuild --rebuild djcross-gcc-4.7.0-1ap.src.rpm Several missing BuildRequirements, here's a patch to fix it. --- djcross-gcc-4.7.spec.old 2012-05-01 10:09:25.987679166 -0500 +++ djcross-gcc-4.7.spec 2012-05-02 21:48:40.229797722 -0500 @@ -44,7 +44,7 @@ BuildArch: i686 x86_64 Requires: djcrx djcross-binutils >= 2.17 BuildRequires: gcc gcc-gnat djcrx djcross-binutils >= 2.17 -BuildRequires: zlib-devel +BuildRequires: zlib-devel autoconf zip texinfo-tex %define shortver %(echo %{gcc_version} | sed -e 's:\\.::2g') %define shortver2 %(echo %{gcc_version} | sed -e 's:\\.::g') Ok, got binutils and gcc built. Gonna try to build djcrx-2.04pre_20111027-14ap.src.rpm (but I'll put that into a new post) -- Bob Tanner | Phone : (952 943-8700 http://www.real-time.com, Linux, OSX, VMware | Fax : (952)943-8500 Key fingerprint = F785 DDFC CF94 7CE8 AA87 3A9D 3895 26F1 0DDB E378