Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

Rebuilding GCC 4.8 from source on Jessie.

Programming languages, Coding, Executables, Package Creation, and Scripting.
Post Reply
Message
Author
wpostma
Posts: 6
Joined: 2016-02-22 12:12

Rebuilding GCC 4.8 from source on Jessie.

#1 Post by wpostma »

I am trying to rebuild GCC-4.8 from source, so far I:

- did apt-get source gcc-4.8
- fetch deps with sudo mk-build-deps -i -r gcc-4.8
- run fakeroot debian/rules binary

It dies at this error, which appears to be in the gccgo component. I understand that there is one big source tarball for most of the various binary packages in the GCC which is why the GCC earns its name "gnu compiler Collection". The well known C/C++ compiler, fortran, go, it's all in here....

Anyways it's dying with this error:

dpkg-deb: building package `gccgo-4.8-multilib' in `../gccgo-4.8-multilib_4.8.4-1_amd64.deb'.
trap '' 1 2 3 15; touch stamps/08-binary-stamp-gccgo-multi; mv stamps/07-install-stamp-tmp stamps/07-install-stamp
dh_testdir
dh_testroot
mv stamps/07-install-stamp stamps/07-install-stamp-tmp
dh_installdirs -pgcj-4.8-jre-headless usr/share/doc/gcc-4.8-base usr/bin usr/share/man/man1 /usr/lib/jvm/java-1.5.0-gcj-4.8-amd64/bin /usr/lib/jvm/java-1.5.0-gcj-4.8-amd64/jre/lib /usr/lib/jvm/java-1.5.0-gcj-4.8-amd64/lib var/lib/gcj-4.8
dh_installdirs -plibgcj14 usr/share/doc/gcc-4.8-base usr/lib/x86_64-linux-gnu/gcj-4.8-14 usr/lib/x86_64-linux-gnu /usr/lib/jvm/java-1.5.0-gcj-4.8-amd64/jre/lib
dh_installdirs -plibgcj14-awt usr/lib/x86_64-linux-gnu usr/lib/x86_64-linux-gnu/gcj-4.8-14 usr/share/java
DH_COMPAT=2 dh_movefiles -pgcj-4.8-jre-headless usr/bin/{gij,gcj-dbtool,gorbd,grmid,grmiregistry,gkeytool,gtnameserv}-4.8 usr/share/man/man1/{gorbd,grmid,grmiregistry,gkeytool,gtnameserv}-4.8.1 /usr/lib/jvm/java-1.5.0-gcj-4.8-amd64/jre/bin /usr/lib/jvm/java-1.5.0-gcj-4.8-amd64/bin/{java,keytool,orbd,rmid,rmiregistry,tnameserv} /usr/lib/jvm/java-1.5.0-gcj-4.8-amd64/jre/lib/rt.jar /usr/lib/jvm/java-1.5.0-gcj-4.8-amd64/jre/lib/amd64/{client,server} /usr/lib/jvm/java-1.5.0-gcj-4.8-amd64/lib/tools.jar
dh_movefiles: Compatibility levels before 5 are deprecated (level 2 in use)
DH_COMPAT=2 dh_movefiles -plibgcj14 usr/lib/x86_64-linux-gnu/libgij.so.* usr/lib/x86_64-linux-gnu/libgcj-tools.so.* usr/lib/x86_64-linux-gnu/libgcj.so.* usr/lib/x86_64-linux-gnu/gcj-4.8-14/libjvm.so usr/lib/x86_64-linux-gnu/gcj-4.8-14/libjavamath.so /usr/lib/jvm/java-1.5.0-gcj-4.8-amd64/jre/lib/security usr/lib/x86_64-linux-gnu/gcj-4.8-14/libgjsmalsa.so
dh_movefiles: Compatibility levels before 5 are deprecated (level 2 in use)
dh_movefiles: debian/tmp/usr/lib/x86_64-linux-gnu/gcj-4.8-14/libjvm.so not found (supposed to put it in libgcj14)
dh_movefiles: debian/tmp/usr/lib/x86_64-linux-gnu/gcj-4.8-14/libjavamath.so not found (supposed to put it in libgcj14)
dh_movefiles: debian/tmp/usr/lib/x86_64-linux-gnu/gcj-4.8-14/libgjsmalsa.so not found (supposed to put it in libgcj14)
debian/rules.d/binary-java.mk:410: recipe for target 'stamps/08-binary-stamp-java' failed
make[1]: *** [stamps/08-binary-stamp-java] Error 1
make[1]: Leaving directory '/home/wpostma/src/gcc-4.8-4.8.4'
debian/rules:94: recipe for target 'binary' failed
make: *** [binary] Error 2

I was wondering if I do have a libjvm.so anywhere. I don't understand what the (supposed to put it in libgcj14) message means.

I ran locate libjvm.so and I see:

/usr/lib/jvm/java-7-openjdk-amd64/jre/lib/amd64/server/libjvm.so
/usr/lib/jvm/java-8-oracle/jre/lib/amd64/server/libjvm.so

Any ideas what special steps GCC 4.8 takes to rebuild from source on jessie?

As an aside, I find it sad that when libtool was split into libtool and libtool-bin on Jessie, but when I fetch dependencies for gcc, it doesn't fetch libtool-bin. GCC builds DEFINITELY require the actual libtool binary. If it was me renaming these packages, the package named libtool would contain the binary and the packages that don't need libtool's executable binary commandline application would have been renamed to get libtool-misc, and libtool would have depended on libtool-misc, so that we don't end up in situation where I'm missing the binary X and I apt-get install X and I still don't have X, which is annoying to normal human beings using Linux.

Maybe I'll start a project on github called "buildgcc_debian" that contains scripts to fetch everything and build a set of compiler sources for testing and experimentation.

Warren

User avatar
stevepusser
Posts: 12930
Joined: 2009-10-06 05:53
Has thanked: 41 times
Been thanked: 71 times

Re: Rebuilding GCC 4.8 from source on Jessie.

#2 Post by stevepusser »

What happens if you install devscripts and use the standard build command?

Code: Select all

debuild -uc -us
MX Linux packager and developer

wpostma
Posts: 6
Joined: 2016-02-22 12:12

Re: Rebuilding GCC 4.8 from source on Jessie.

#3 Post by wpostma »

That's the standard way? I guess I need to read along farther in tutorials!

It worked! It took a righteous long amount of time. I should have recorded it with "script" for educational porpoises.

W

Post Reply