Ankit Mahanot wrote:
I added GMP & MPFR folders into GCC source code folder ....... configured GCC ... into different directory named objdir which is outside gcc source code folder. Now I am doing make .... but it gives the following error: . . . "_mpfr_tan", referenced from: _mpfr_tan$non_lazy_ptr in libbackend.a(builtins.o) "_mpfr_sin", referenced from: _mpfr_sin$non_lazy_ptr in libbackend.a(builtins.o) ld: symbol(s) not found collect2: ld returned 1 exit status make[3]: *** [cc1-dummy] Error 1 make[2]: *** [all-stage1-gcc] Error 2 make[1]: *** [stage1-bubble] Error 2 make: *** [all] Error 2 I am on MAC OS X 10.5.7. GCC I am trynig to compile is 4.4.1 & GMP i am using is gmp-4.2.4 & mpfr-2.4.1
I still suspect you to have some earlier mpfr installed in your system and its (shared) library being searched instead of the just built one :( The mpfr INSTALL says : ------------------------ clip ------------------------------- Under Mac OS X, if the shared library was not installed and you use Apple's linker (this is the default), you will also need to provide the -search_paths_first linker flag ("-Wl,-search_paths_first" when you link via gcc) to make sure that the right library is selected, as by default, Apple's linker selects a shared library preferably, even when it is farther in the library paths. We recall that if a wrong library is selected due to this behavior, unexpected results may occur. ------------------------ clip ------------------------------- The CFLAGS_FOR_HOST or something could be the right place to add this "-Wl,-search_paths_first" option. Please search with Google etc. with this, it seems to be a quite Apple-specific issue. The obvious workaround would be to find the existing 'libmpfr*' library and disable it being found via temporalily renaming it to '.backup' or something.