This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

gcc-4.7.2 bug in Makefile.in and configure.ac


Hello:

Building gcc-4.7.2 on Darwin 9.8.0 i386 with the options

Macintosh-85:gcc-build regular$ /usr/local/gcc-4.7.2/bin/gcc -v
Using built-in specs.
COLLECT_GCC=/usr/local/gcc-4.7.2/bin/gcc
COLLECT_LTO_WRAPPER=/usr/local/gcc-4.7.2/libexec/gcc/i386-apple-darwin9.8.0/4.7.2/lto-wrapper
Target: i386-apple-darwin9.8.0
Configured with: ../gcc-4.7.2/configure --prefix=/usr/local/gcc-4.7.2 --enable-languages=c,c++
Thread model: posix
gcc version 4.7.2 (GCC)


AND including mpc-1.0, gmp-5.0.5, mpfr-3.1.1 in the subdirectories mpc, gmp, mpfr, respectively, of the gcc source tree leads to the following error when the build reaches the mpc library:

checking for __gmpz_init in -lgmp... yes
checking for MPFR... no
configure: error: libmpfr not found or uses a different ABI (including static vs shared).
make[2]: *** [configure-stage1-mpc] Error 1
make[1]: *** [stage1-bubble] Error 2
make: *** [bootstrap] Error 2


The error is caused by the fact that the configure and Makefile don't properly point to the mpfr/src/.libs and mpfr/src directories for linking and includes (ditto mpc/src/.libs and mpc/src/). The following changes fix the problem, permitting the compilation to correctly go through to completion (all three stages, and install):

Macintosh-85:gcc-4.7.2 regular$ diff Makefile.def.org Makefile.def
58c58
< host_modules= { module= mpfr; lib_path=.libs; bootstrap=true;
---
> host_modules= { module= mpfr; lib_path=src/.libs; bootstrap=true;
61c61
< host_modules= { module= mpc; lib_path=.libs; bootstrap=true;
---
> host_modules= { module= mpc; lib_path=src/.libs; bootstrap=true;
Macintosh-85:gcc-4.7.2 regular$ diff Makefile.in.org Makefile.in
653c653
< $$r/$(HOST_SUBDIR)/mpfr/.libs:$$r/$(HOST_SUBDIR)/prev-mpfr/.libs:
---
> $$r/$(HOST_SUBDIR)/mpfr/src/.libs:$$r/$(HOST_SUBDIR)/prev-mpfr/src/.libs:
658c658
< $$r/$(HOST_SUBDIR)/mpc/.libs:$$r/$(HOST_SUBDIR)/prev-mpc/.libs:
---
> $$r/$(HOST_SUBDIR)/mpc/src/.libs:$$r/$(HOST_SUBDIR)/prev-mpc/src/.libs:
Macintosh-85:gcc-4.7.2 regular$ diff configure.ac.org configure.ac
1251c1251
< gmpinc='-I$$s/mpc/src '"$gmpinc"
---
> gmpinc='-I$$r/$(HOST_SUBDIR)/mpc/src -I$$s/mpc/src '"$gmpinc"
1289,1291c1289,1291
< gmplibs='-L$$r/$(HOST_SUBDIR)/mpfr/'"$lt_cv_objdir $gmplibs"
< gmpinc='-I$$r/$(HOST_SUBDIR)/mpfr -I$$s/mpfr '"$gmpinc"
< extra_mpc_mpfr_configure_flags='--with-mpfr-include=$$s/mpfr --with-mpfr-lib=$$r/$(HOST_SUBDIR)/mpfr/'"$lt_cv_objdir"
---
> gmplibs='-L$$r/$(HOST_SUBDIR)/mpfr/src/'"$lt_cv_objdir $gmplibs"
> gmpinc='-I$$r/$(HOST_SUBDIR)/mpfr/src -I$$s/mpfr/src '"$gmpinc"
> extra_mpc_mpfr_configure_flags='--with-mpfr-include=$$s/mpfr/src --with-mpfr-lib=$$r/$(HOST_SUBDIR)/mpfr/src/'"$lt_cv_objdir"
Macintosh-85:gcc-4.7.2 regular$ diff configure.org configure
5153c5153
< gmpinc='-I$$s/mpc/src '"$gmpinc"
---
> gmpinc='-I$$r/$(HOST_SUBDIR)/mpc/src -I$$s/mpc/src '"$gmpinc"
5201,5203c5201,5203
< gmplibs='-L$$r/$(HOST_SUBDIR)/mpfr/'"$lt_cv_objdir $gmplibs"
< gmpinc='-I$$r/$(HOST_SUBDIR)/mpfr -I$$s/mpfr '"$gmpinc"
< extra_mpc_mpfr_configure_flags='--with-mpfr-include=$$s/mpfr --with-mpfr-lib=$$r/$(HOST_SUBDIR)/mpfr/'"$lt_cv_objdir"
---
> gmplibs='-L$$r/$(HOST_SUBDIR)/mpfr/src/'"$lt_cv_objdir $gmplibs"
> gmpinc='-I$$r/$(HOST_SUBDIR)/mpfr/src -I$$s/mpfr/src '"$gmpinc"
> extra_mpc_mpfr_configure_flags='--with-mpfr-include=$$s/mpfr/src --with-mpfr-lib=$$r/$(HOST_SUBDIR)/mpfr/src/'"$lt_cv_objdir"
Macintosh-85:gcc-4.7.2 regular$



Regards, -ernesto


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]