Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[SOLVED] gcc doesn't want to recompile
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Portage & Programming
View previous topic :: View next topic  
Author Message
dolohow
Tux's lil' helper
Tux's lil' helper


Joined: 17 Jan 2010
Posts: 98
Location: Poland

PostPosted: Sun Aug 28, 2011 8:43 am    Post subject: [SOLVED] gcc doesn't want to recompile Reply with quote

I removed the /usr/lib64/libgmp.so.3 before starting recompile gcc. Now I can't do this, becouse there is no the old library:
Code:
 * ERROR: sys-devel/gcc-4.4.5 failed (compile phase):
 *   failed to run configure
 *
 * Call stack:
 *     ebuild.sh, line   56:  Called src_compile
 *   environment, line 4910:  Called toolchain_src_compile
 *   environment, line 5507:  Called gcc_src_compile
 *   environment, line 3116:  Called gcc_do_configure
 *   environment, line 2848:  Called die
 * The specific snippet of code:
 *       "${S}"/configure "$@" || die "failed to run configure";
 *
 * If you need support, post the output of 'emerge --info =sys-devel/gcc-4.4.5',
 * the complete build log and the output of 'emerge -pqv =sys-devel/gcc-4.4.5'.
 * The complete build log is located at '/var/tmp/portage/sys-devel/gcc-4.4.5/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/sys-devel/gcc-4.4.5/temp/environment'.
 * S: '/var/tmp/portage/sys-devel/gcc-4.4.5/work/gcc-4.4.5'


The new version of gmp was released, that's why I want to recompile it


Last edited by dolohow on Mon Aug 29, 2011 8:50 am; edited 1 time in total
Back to top
View user's profile Send private message
destroyedlolo
l33t
l33t


Joined: 17 Jun 2011
Posts: 713
Location: Close to Annecy (France)

PostPosted: Sun Aug 28, 2011 8:51 am    Post subject: Re: gcc doesn't want to recompile Reply with quote

What is the content of
Code:
/var/tmp/portage/sys-devel/gcc-4.4.5/temp/build.log
as suggested in the message you've got ?

dolohow wrote:
I removed the /usr/lib64/libgmp.so.3 before starting recompile gcc. Now I can't do this, becouse there is no the old library:
[...]
The new version of gmp was released, that's why I want to recompile it


Why did you removed the old one ? Why not simply let emerge to update your system for U ?

Anyway, if the problem is really here, I suggest to re-emerge libgmp and then reinstall GCC.
Back to top
View user's profile Send private message
dolohow
Tux's lil' helper
Tux's lil' helper


Joined: 17 Jan 2010
Posts: 98
Location: Poland

PostPosted: Sun Aug 28, 2011 8:57 am    Post subject: Reply with quote

Code:
 * Package:    sys-devel/gcc-4.4.5
 * Repository: gentoo
 * Maintainer: toolchain@gentoo.org
 * USE:        amd64 elibc_glibc fortran kernel_linux mudflap multilib nls nptl openmp userland_GNU
 * FEATURES:   ccache sandbox
>>> Unpacking source...
>>> Unpacking gcc-4.4.5.tar.bz2 to /var/tmp/portage/sys-devel/gcc-4.4.5/work
>>> Unpacking gcc-4.4.5-patches-1.3.tar.bz2 to /var/tmp/portage/sys-devel/gcc-4.4.5/work
>>> Unpacking gcc-4.4.5-uclibc-patches-1.0.tar.bz2 to /var/tmp/portage/sys-devel/gcc-4.4.5/work
>>> Unpacking gcc-4.4.5-piepatches-v0.4.5.tar.bz2 to /var/tmp/portage/sys-devel/gcc-4.4.5/work
>>> Unpacking gcc-4.4.3-specs-0.2.0.tar.bz2 to /var/tmp/portage/sys-devel/gcc-4.4.5/work
 * Applying Gentoo patches ...
 *   00_all_gcc-4.1-alpha-mieee-default.patch ...                                                                                                                  [ ok ]
 *   00_all_gcc-trampolinewarn.patch ...                                                                                                                           [ ok ]
 *   01_all_gcc-4.1-alpha-asm-mcpu.patch ...                                                                                                                       [ ok ]
 *   02_all_gcc-4.4-libgcj-as-needed-PR38298.patch ...                                                                                                             [ ok ]
 *   03_all_gcc43-java-nomulti.patch ...                                                                                                                           [ ok ]
 *   05_all_gcc44-pr46173-all-tree.patch ...                                                                                                                       [ ok ]
 *   08_all_gcc-4.1-cross-compile.patch ...                                                                                                                        [ ok ]
 *   10_all_gcc-default-format-security.patch ...                                                                                                                  [ ok ]
 *   10_all_gcc-default-fortify-source.patch ...                                                                                                                   [ ok ]
 *   11_all_gcc-netbsd-symbolic.patch ...                                                                                                                          [ ok ]
 *   14_all_gcc-sparc64-bsd.patch ...                                                                                                                              [ ok ]
 *   15_all_gcc-libgomp-no-werror.patch ...                                                                                                                        [ ok ]
 *   16_all_gcc-sparc-fbsd-c++-exceptions.patch ...                                                                                                                [ ok ]
 *   18_all_904-flatten-switch-stmt-00.patch ...                                                                                                                   [ ok ]
 *   20_all_mudflap-setuid-env.patch ...                                                                                                                           [ ok ]
 *   30_all_gcc-4.4-ppc-msingle-pic-base.patch ...                                                                                                                 [ ok ]
 *   31_all_gcc-4.4-ppc-fpic-mrelocatable.patch ...                                                                                                                [ ok ]
 *   40_all_gcc-4.4-libiberty.h-asprintf.patch ...                                                                                                                 [ ok ]
 *   41_all_4.4.5-msabi.patch ...                                                                                                                                  [ ok ]
 *   47_all_arm-unbreak-armv4t.patch ...                                                                                                                           [ ok ]
 *   51_all_gcc-3.4-libiberty-pic.patch ...                                                                                                                        [ ok ]
 *   53_all_gcc4-superh-default-multilib.patch ...                                                                                                                 [ ok ]
 *   60_all_4.4.5_hppa-wrong-code.patch ...                                                                                                                        [ ok ]
 *   61_all_gcc4-ia64-noteGNUstack.patch ...                                                                                                                       [ ok ]
 *   62_all_gcc-4.4-ia64-pr43603.patch ...                                                                                                                         [ ok ]
 *   73_all_sh-libgcc-stacks.patch ...                                                                                                                             [ ok ]
 *   74_all_sh-pr24836.patch ...                                                                                                                                   [ ok ]
 *   90_all_gcc-freebsd.patch ...                                                                                                                                  [ ok ]
 *   91_all_gcc-freebsd.patch ...                                                                                                                                  [ ok ]
 *   93_all_gcc-4.4-cloog-dl.patch ...                                                                                                                             [ ok ]
 *   96_all_arm-pr43440.patch ...                                                                                                                                  [ ok ]
 * Done with patching
 * Applying uClibc patches ...
 *   90_all_100-uclibc-conf.patch ...                                                                                                                              [ ok ]
 *   90_all_301-missing-execinfo_h.patch ...                                                                                                                       [ ok ]
 *   90_all_302-c99-snprintf.patch ...                                                                                                                             [ ok ]
 *   90_all_305-libmudflap-susv3-legacy.patch ...                                                                                                                  [ ok ]
 * Done with patching
 * Applying pie patches ...
 *   10_all_gcc444_configure.patch ...                                                                                                                             [ ok ]
 *   11_all_gcc44_config.in.patch ...                                                                                                                              [ ok ]
 *   12_all_gcc44_Makefile.in.patch ...                                                                                                                            [ ok ]
 *   20_all_gcc44_gcc.c.patch ...                                                                                                                                  [ ok ]
 *   21_all_gcc44_decl-tls-model.patch ...                                                                                                                         [ ok ]
 *   30_all_gcc44_esp.h.patch ...                                                                                                                                  [ ok ]
 *   33_all_gcc44_config_rs6000_linux64.h.patch ...                                                                                                                [ ok ]
 *   35_all_gcc44_config_crtbegints.patch ...                                                                                                                      [ ok ]
 *   40_all_gcc44_cp_lang-specs.h.patch ...                                                                                                                        [ ok ]
 *   41_all_gcc44_objc_lang-specs.h.patch ...                                                                                                                      [ ok ]
 *   42_all_gcc44_objcp_lang-specs.h.patch ...                                                                                                                     [ ok ]
 *   60_all_gcc44_invoke.texi.patch ...                                                                                                                            [ ok ]
 * Done with patching
 * updating multilib directories to be: ../lib64 ../lib32
 * Running elibtoolize in: gcc-4.4.5/
 *   Applying install-sh-1.5.4.patch ...
 *   Applying portage-2.2.patch ...
 *   Applying sed-1.5.6.patch ...
 *   Applying as-needed-2.2.6.patch ...
 * Using GNU config files from /usr/share/gnuconfig
 *   Updating libjava/libltdl/config.sub                                                                                                                           [ ok ]
 *   Updating libjava/classpath/config.sub                                                                                                                         [ ok ]
 *   Updating config.sub                                                                                                                                           [ ok ]
 *   Updating libjava/libltdl/config.guess                                                                                                                         [ ok ]
 *   Updating libjava/classpath/config.guess                                                                                                                       [ ok ]
 *   Updating config.guess                                                                                                                                         [ ok ]
 * Fixing misc issues in configure files
 * Applying gcc-configure-texinfo.patch ...                                                                                                                        [ ok ]
 * Touching generated files
 *   Touching gcc/cstamp-h.in
 *   Touching gcc/config.in
 *   Touching libjava/aclocal.m4
 *   Touching libjava/Makefile.in
 *   Touching libjava/configure
 * Applying gcc-spec-env.patch ...                                                                                                                                 [ ok ]
>>> Source unpacked in /var/tmp/portage/sys-devel/gcc-4.4.5/work
>>> Compiling source in /var/tmp/portage/sys-devel/gcc-4.4.5/work/gcc-4.4.5 ...
 * CFLAGS=""
 * CXXFLAGS=""
 * Configuring gcc ...
 * running gcc-compiler-configure
 * configuring for GCC_LANG: c,c++,fortran

 * PREFIX:                      /usr
 * BINPATH:                     /usr/x86_64-pc-linux-gnu/gcc-bin/4.4.5
 * LIBPATH:                     /usr/lib/gcc/x86_64-pc-linux-gnu/4.4.5
 * DATAPATH:            /usr/share/gcc-data/x86_64-pc-linux-gnu/4.4.5
 * STDCXX_INCDIR:       /usr/lib/gcc/x86_64-pc-linux-gnu/4.4.5/include/g++-v4

 * Configuring GCC with:
 *      --prefix=/usr
 *      --bindir=/usr/x86_64-pc-linux-gnu/gcc-bin/4.4.5
 *      --includedir=/usr/lib/gcc/x86_64-pc-linux-gnu/4.4.5/include
 *      --datadir=/usr/share/gcc-data/x86_64-pc-linux-gnu/4.4.5
 *      --mandir=/usr/share/gcc-data/x86_64-pc-linux-gnu/4.4.5/man
 *      --infodir=/usr/share/gcc-data/x86_64-pc-linux-gnu/4.4.5/info
 *      --with-gxx-include-dir=/usr/lib/gcc/x86_64-pc-linux-gnu/4.4.5/include/g++-v4
 *      --host=x86_64-pc-linux-gnu
 *      --build=x86_64-pc-linux-gnu
 *      --disable-altivec
 *      --disable-fixed-point
 *      --without-ppl
 *      --without-cloog
 *      --enable-nls
 *      --without-included-gettext
 *      --with-system-zlib
 *      --disable-werror
 *      --enable-secureplt
 *      --enable-multilib
 *      --enable-libmudflap
 *      --disable-libssp
 *      --enable-libgomp
 *      --with-python-dir=/share/gcc-data/x86_64-pc-linux-gnu/4.4.5/python
 *      --enable-checking=release
 *      --disable-libgcj
 *      --enable-languages=c,c++,fortran
 *      --enable-shared
 *      --enable-threads=posix
 *      --enable-__cxa_atexit
 *      --enable-clocale=gnu
 *      --with-bugurl=http://bugs.gentoo.org/
 *      --with-pkgversion=Gentoo 4.4.5 p1.3, pie-0.4.5

/var/tmp/portage/sys-devel/gcc-4.4.5/work/gcc-4.4.5/configure --prefix=/usr --bindir=/usr/x86_64-pc-linux-gnu/gcc-bin/4.4.5 --includedir=/usr/lib/gcc/x86_64-pc-linux-gnu/4.4.5/include --datadir=/usr/share/gcc-data/x86_64-pc-linux-gnu/4.4.5 --mandir=/usr/share/gcc-data/x86_64-pc-linux-gnu/4.4.5/man --infodir=/usr/share/gcc-data/x86_64-pc-linux-gnu/4.4.5/info --with-gxx-include-dir=/usr/lib/gcc/x86_64-pc-linux-gnu/4.4.5/include/g++-v4 --host=x86_64-pc-linux-gnu --build=x86_64-pc-linux-gnu --disable-altivec --disable-fixed-point --without-ppl --without-cloog --enable-nls --without-included-gettext --with-system-zlib --disable-werror --enable-secureplt --enable-multilib --enable-libmudflap --disable-libssp --enable-libgomp --with-python-dir=/share/gcc-data/x86_64-pc-linux-gnu/4.4.5/python --enable-checking=release --disable-libgcj --enable-languages=c,c++,fortran --enable-shared --enable-threads=posix --enable-__cxa_atexit --enable-clocale=gnu --with-bugurl=http://bugs.gentoo.org/ --with-pkgversion=Gentoo 4.4.5 p1.3, pie-0.4.5
checking build system type... x86_64-pc-linux-gnu
checking host system type... x86_64-pc-linux-gnu
checking target system type... x86_64-pc-linux-gnu
checking for a BSD-compatible install... /usr/bin/install -c
checking whether ln works... yes
checking whether ln -s works... yes
checking for x86_64-pc-linux-gnu-gcc... x86_64-pc-linux-gnu-gcc
checking for C compiler default output file name... configure: error: in `/var/tmp/portage/sys-devel/gcc-4.4.5/work/build':
configure: error: C compiler cannot create executables
See `config.log' for more details.
 * ERROR: sys-devel/gcc-4.4.5 failed (compile phase):
 *   failed to run configure
 *
 * Call stack:
 *     ebuild.sh, line   56:  Called src_compile
 *   environment, line 4910:  Called toolchain_src_compile
 *   environment, line 5507:  Called gcc_src_compile
 *   environment, line 3116:  Called gcc_do_configure
 *   environment, line 2848:  Called die
 * The specific snippet of code:
 *       "${S}"/configure "$@" || die "failed to run configure";
 *
 * If you need support, post the output of 'emerge --info =sys-devel/gcc-4.4.5',
 * the complete build log and the output of 'emerge -pqv =sys-devel/gcc-4.4.5'.
 * The complete build log is located at '/var/tmp/portage/sys-devel/gcc-4.4.5/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/sys-devel/gcc-4.4.5/temp/environment'.
 * S: '/var/tmp/portage/sys-devel/gcc-4.4.5/work/gcc-4.4.5'


I can't compile anything, becouse gcc doesn't work without the old gmp library.

If you have the old version of this library you can upload it and I will put into my library dir.
Back to top
View user's profile Send private message
Hu
Moderator
Moderator


Joined: 06 Mar 2007
Posts: 14972

PostPosted: Sun Aug 28, 2011 5:33 pm    Post subject: Reply with quote

Rather than rely on some forum user who may not even be on the same architecture, why not grab a replacement from the tinderbox?
Back to top
View user's profile Send private message
wrc1944
Advocate
Advocate


Joined: 15 Aug 2002
Posts: 3345
Location: Gainesville, Florida

PostPosted: Sun Aug 28, 2011 6:05 pm    Post subject: Reply with quote

I'm having similar problems, however I tried the version on tinderbox, and for me it didn't work. Please check my post on this here:

My main problem seems to be :
Code:
 /usr/libexec/gcc/i686-pc-linux-gnu/4.5.3/cc1:  error while loading shared libraries: libgmp.so.3: cannot open shared object file: No such file or directory


Big mpfr/gcc/gmp-5.0.2_p1 MESS Breaks gcc
https://forums.gentoo.org/viewtopic-t-892264.html

I do have another almost identical ~x86 Gentoo install on this box (except it uses gcc-4.6.1 instead of 4.5.3 on the messed up partition), which I did quickpkgs today (gcc, mpfr, and gmp) on right before trying and emerge -uD @world, which did fine, including the mpfr and gmp updates, and did npot break gcc-4.6.1.

I'm now going back to the messed up Gentoo install and try the known working gcc,mpfr, and gmp packages I just created and copied over, and see if I can sort this out with emerge -K. I did suspect a link problem, as mention on other threads and bugzilla. Here's what's on the working system, with my link comments.

Notice there is no libgmp.so.3 on this working installation, but IIRC, there is on the messed up box- gcc just cant find it (linkage problem?) (needs gcc-4.6.x and not gcc-4.5.x ???) :roll:
Code:
gentoo-audio wrc # locate libgmp  (After successful 5.0.2_p1 update, and gcc still works correctly).   
/usr/lib/libgmp.a

/usr/lib/libgmp.la

/usr/lib/libgmp.so     this is link to     /usr/lib/libgmp.so.10.0.2

/usr/lib/libgmp.so.10    this is link to     /usr/lib/libgmp.so.10.0.2

/usr/lib/libgmp.so.10.0.2

/usr/lib/libgmpxx.a

/usr/lib/libgmpxx.la

/usr/lib/libgmpxx.so   this is a link to    /usr/lib/libgmpxx.so.4.2.2

/usr/lib/libgmpxx.so.4    this is a link to    /usr/lib/libgmpxx.so.4.2.2

/usr/lib/libgmpxx.so.4.2.2

/usr/lib/engines/libgmp.so



Any other thoughts or fixes in case this one fails? :roll:
_________________
Main box- AsRock x370 Gaming K4
Ryzen 7 3700x, 3.6GHz, 16GB GSkill Flare DDR4 3200mhz
Samsung SATA 1000GB, Radeon HD R7 350 2GB DDR5
Gentoo ~amd64 plasma, glibc-2.30-r6, gcc-9.3.0 kernel-5.5.11-gentoo USE=experimental
Back to top
View user's profile Send private message
wrc1944
Advocate
Advocate


Joined: 15 Aug 2002
Posts: 3345
Location: Gainesville, Florida

PostPosted: Sun Aug 28, 2011 8:24 pm    Post subject: Reply with quote

Still no luck. Tried replacing gcc with 4.4.5. 4.5.2. 4.5.3, and 4.6.1 and gmp,mpfr, mpc from known good packages with emerge -K, and making sure gcc-config changed versions, but still nothing will emerge and no version change seems to do anything- get the same errors.

Tried some stuff from this thread like copying over libgmp files from the latest stage3 tarball- didn't work.
https://forums.gentoo.org/viewtopic-p-6343751.html?sid=7f80a2fe2ecb684bfdfc7804cb586632

Tried stuff from 4-5 other threads on the Gentoo forum, an still nothing helps. It must be something simple I'm missing, as this system works fine otherwise- just gcc can't emerge anything. I feel sure it's this libgmp and/or mpfr/mpc problems, but haven't discovered what they are.

I'm almost ready to make backups and do a complete Gentoo reinstall.. What a PITA, as this is only a 6 month old install which I just did to renew my 8 year old install on another hard drive.

Any ideas to save me all that trouble?
_________________
Main box- AsRock x370 Gaming K4
Ryzen 7 3700x, 3.6GHz, 16GB GSkill Flare DDR4 3200mhz
Samsung SATA 1000GB, Radeon HD R7 350 2GB DDR5
Gentoo ~amd64 plasma, glibc-2.30-r6, gcc-9.3.0 kernel-5.5.11-gentoo USE=experimental
Back to top
View user's profile Send private message
Hu
Moderator
Moderator


Joined: 06 Mar 2007
Posts: 14972

PostPosted: Sun Aug 28, 2011 9:19 pm    Post subject: Reply with quote

Your marked up locate output showed you are missing the key file libgmp.so.3. Have any of your attempts placed that file on the system?
Back to top
View user's profile Send private message
wrc1944
Advocate
Advocate


Joined: 15 Aug 2002
Posts: 3345
Location: Gainesville, Florida

PostPosted: Sun Aug 28, 2011 9:28 pm    Post subject: Reply with quote

Seems like it's fixed with a simple symlink I read about for lib64 systems (I adapted it for ~x86 and different versions). :o
Code:
localhost wrc # cd /usr/lib
localhost lib # ln -s libgmpxx.so.4.2.2 libgmp.so.3

After doing this (and unmasking/keywording gcc), I was able to re-emerge gcc-4.6.1-r1 normally (using the gcc-4.6.1-r1 from /packages I installed with emerge -K)

Currenty making it through my delayed emerge -uD @world smoothly. Thinking of doing an emerge -e @system next, just to be sure things are sorted out.

What about that hacked in libgmp symlink? Can I get rid of it, or leave it there? Any future problems with that?

Hu- yes,
I did the basic copy libgmp.so.3 thing, but it didn't work, unless it was a symlink specifically linked to libgmpxx.so.4.2.2.
_________________
Main box- AsRock x370 Gaming K4
Ryzen 7 3700x, 3.6GHz, 16GB GSkill Flare DDR4 3200mhz
Samsung SATA 1000GB, Radeon HD R7 350 2GB DDR5
Gentoo ~amd64 plasma, glibc-2.30-r6, gcc-9.3.0 kernel-5.5.11-gentoo USE=experimental
Back to top
View user's profile Send private message
Hu
Moderator
Moderator


Joined: 06 Mar 2007
Posts: 14972

PostPosted: Sun Aug 28, 2011 11:35 pm    Post subject: Reply with quote

Library SONAME changes are usually for a good reason. You may have a working system, but I would remove that link and replace it with a proper library of the correct version as soon as possible.
Back to top
View user's profile Send private message
dolohow
Tux's lil' helper
Tux's lil' helper


Joined: 17 Jan 2010
Posts: 98
Location: Poland

PostPosted: Mon Aug 29, 2011 8:49 am    Post subject: Reply with quote

Solved, thanks a lot
Back to top
View user's profile Send private message
laurelin
Tux's lil' helper
Tux's lil' helper


Joined: 16 May 2005
Posts: 84
Location: Germany, Old Europe

PostPosted: Tue Aug 30, 2011 5:57 pm    Post subject: Reply with quote

Hu wrote:
Library SONAME changes are usually for a good reason. You may have a working system, but I would remove that link and replace it with a proper library of the correct version as soon as possible.

I may sound unbeknownesd, but how do you do that? (since I had the same stupid error occuring to me, since revdep-rebuild without any --library given didn't cover libgmp.so.3).
How do you replace the hack with the right library of the correct version? emerge gmp and doing a specific revdep-rebuild with:

Code:
emerge -av gmp
[...]
revdep-rebuild --library '/usr/lib64/libgmp.so.3' -- -av


Is that sufficient?
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Portage & Programming All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum