Created attachment 25682 [details] build log With both 4.6.3 and trunk, I'm seeing problems with libquad, which is completely baffling me. The 'gmake bootstrap' completes as expected, but 'gmake install' dies with gfortran.so.3.0 -o .libs/libgfortran.so.3.0 /usr/bin/ld: /home/sgk/work/46/lib/libquadmath.a(fmodq.o): relocation R_X86_64_32S against `a local symbol' can not be used when making a shared object; recompile with -fPIC /home/sgk/work/46/lib/libquadmath.a: could not read symbols: Bad value collect2: ld returned 1 exit status libtool: install: error: relink `libgfortran.la' with the above command before installing it gmake[4]: *** [install-toolexeclibLTLIBRARIES] Error 1 gmake[4]: Leaving directory `/usr/home/sgk/gcc/obj46/x86_64-unknown-freebsd10.0/libgfortran' gmake[3]: *** [install-am] Error 2 gmake[3]: Leaving directory `/usr/home/sgk/gcc/obj46/x86_64-unknown-freebsd10.0/libgfortran' gmake[2]: *** [install] Error 2 gmake[2]: Leaving directory `/usr/home/sgk/gcc/obj46/x86_64-unknown-freebsd10.0/libgfortran' gmake[1]: *** [install-target-libgfortran] Error 2 gmake[1]: Leaving directory `/usr/home/sgk/gcc/obj46' gmake: *** [install] Error 2 I've redirected the the output to files and the -fPIC is already on the command line. What seems odd to me is that the 'gmake install' is relinking the libquadmath.so shared library. I've attached 'gmake |& build.log' and 'gmake install |& install.log'
Created attachment 25683 [details] install log
I shoudl note that the shared libraries for libgfortran are properly build and installed. This seems to be a libquadmath issue.
It looks like a problem with libquadmath/configure. I recently updated by bleeding edge freebsd system to FreeBSD 10.0, and it looks like configure can't handle the new version number. troutmask:sgk[222] pwd /usr/home/sgk/gcc/gcc4x/libquadmath troutmask:sgk[223] grep -i freebsd * | more aclocal.m4:# (eg FreeBSD returns the mod time of the symlink's containing configure:# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug. configure:# (eg FreeBSD returns the mod time of the symlink's containing configure: netbsd* | freebsd* | openbsd* | darwin* | dragonfly*) configure:freebsd* | dragonfly*) configure: lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[3-9]86 (compact )?demand paged shared library' configure:/* This works around a problem in FreeBSD linker */ configure:#ifdef FREEBSD_WORKAROUND configure:x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \ configure: x86_64-*kfreebsd*-gnu) configure: x86_64-*kfreebsd*-gnu) configure: # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor configure: freebsd2.2*) configure: # Unfortunately, older versions of FreeBSD 2 do not have this feature. configure: freebsd2*) configure: # FreeBSD 3 and greater uses gcc -shared to do shared libraries. configure: freebsd* | dragonfly*) configure:freebsd* | dragonfly*) configure: freebsd[123]*) objformat=aout ;; configure: version_type=freebsd-$objformat configure: freebsd-elf*) configure: freebsd-*) configure: freebsd2*) configure: freebsd3.[01]* | freebsdelf3.[01]*) configure: freebsd3.[2-9]* | freebsdelf3.[2-9]* | \ configure: freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1) configure: version_type=freebsd-elf I'm suspicious that the 'freebsd[123]*) objformat=aout ;;' is now bogus.
(In reply to comment #3) > It looks like a problem with libquadmath/configure. I recently > updated by bleeding edge freebsd system to FreeBSD 10.0, and > it looks like configure can't handle the new version number. > > configure: freebsd[123]*) objformat=aout ;; > configure: version_type=freebsd-$objformat > configure: freebsd-elf*) > configure: freebsd-*) > configure: freebsd2*) > configure: freebsd3.[01]* | freebsdelf3.[01]*) > configure: freebsd3.[2-9]* | freebsdelf3.[2-9]* | \ > configure: freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | > freebsdelf4.1.1) > configure: version_type=freebsd-elf > > I'm suspicious that the 'freebsd[123]*) objformat=aout ;;' is now bogus. A quick hack to remove the 1 in the above line allows me to configure, build, and install gcc/gfortran. Anyone know how to fix this issue properly?
(In reply to comment #4) > (In reply to comment #3) > > It looks like a problem with libquadmath/configure. I recently > > updated by bleeding edge freebsd system to FreeBSD 10.0, and > > it looks like configure can't handle the new version number. > > > > > configure: freebsd[123]*) objformat=aout ;; > > configure: version_type=freebsd-$objformat > > configure: freebsd-elf*) > > configure: freebsd-*) > > configure: freebsd2*) > > configure: freebsd3.[01]* | freebsdelf3.[01]*) > > configure: freebsd3.[2-9]* | freebsdelf3.[2-9]* | \ > > configure: freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | > > freebsdelf4.1.1) > > configure: version_type=freebsd-elf > > > > I'm suspicious that the 'freebsd[123]*) objformat=aout ;;' is now bogus. > > A quick hack to remove the 1 in the above line allows me > to configure, build, and install gcc/gfortran. > > Anyone know how to fix this issue properly? Yes, just update in-tree libtool: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50952
Created attachment 25725 [details] conf46.diff (In reply to comment #5) > (In reply to comment #4) > > (In reply to comment #3) > > > > Anyone know how to fix this issue properly? > > Yes, just update in-tree libtool: Sorry, I meant to paste this link: http://thread.gmane.org/gmane.comp.gcc.patches/250006
On Wed, Nov 02, 2011 at 05:57:15AM +0000, markus at trippelsdorf dot de wrote: > > > > Anyone know how to fix this issue properly? > > > > Yes, just update in-tree libtool: > Sorry, I meant to paste this link: > http://thread.gmane.org/gmane.comp.gcc.patches/250006 > The attach diff is sufficient to get the 4.6 branch of gcc building on FreeBSD 10.0. It's 9K, so does not cause the churn of your patch. I'm still building trunk with a similar patch. Also, I don't know if it is sufficient complete to allow everything to build.
Has this been fixed now?
On Thu, Dec 15, 2011 at 12:10:05AM +0000, pinskia at gcc dot gnu.org wrote: > > --- Comment #8 from Andrew Pinski <pinskia at gcc dot gnu.org> 2011-12-15 00:10:05 UTC --- > Has this been fixed now? > Yes, I believe its been fixed.
So let's close this as fixed then.
I think that this was fixed by 2011-11-21 Andreas Tobler <andreast@fgznet.ch> * libtool.m4: dditional FreeBSD 10 fixes.