This is the mail archive of the crossgcc@sourceware.org mailing list for the crossgcc project.

See the CrossGCC FAQ for lots more information.


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

unable to build gcc with mpfr for avr on osx


Dear people, 

I am trying to build a toolchain installer for avr including a
cross-compiler. The script should automatically install everything
you need. It will be GPL available and should work for linux, 
osx and cygwin alike. And it should be possible to select any 
of the more recent gcc versions (4.2, 4.3, 4.4, 4.5). However it has 
become increasing difficult to keep up with all version pecularities,
because of the libraries. I was able to make it run for all situations 
for linux. However, whatever i try i cannot make it run on a mac. 

Versions to install (i.e. the cross compiler)
  gcc = 4.4.3
  gmp = 5.0.1
  mpc = 0.9
  mpfr = 3.0.0

Versions on the system:
 macosx = 10.6.7
 gcc = darwin10-gcc-4.2.1

My setup is so that gmp, mpfr and mpc are inside the gcc tree, so that
gcc should automatically pick up the dependencies.  As said,
this works under linux (after some patching). On the mac however i get:
  .........
  checking for recent GMP... yes
  checking for __gmpz_init in -lgmp... no
  configure: error: libgmp not found or uses a different ABI.
  Please read the INSTALL file -- see "In case of problem".
  make[1]: *** [configure-mpfr] Error 1

I run (from the build directory)
  ../gcc-4.4.3/configure --prefix=$PREFIX --target=avr --with-gnu-ld 
  --with-gnu-as --enable-languages=c,c++ --disable-nls --disable-libssp 
  --with-dwarf2

  make

It looks like the basic problem is that the configure program is 
not looking at the place where the precompiler libs are
(gcc-4.4.3-build/gmp/.libs, i verified, they are there:

drwxr-xr-x   5 ruud  staff      170 Apr  3 21:03 .
drwxr-xr-x  91 ruud  staff     3094 Apr  3 21:03 ..
-rw-r--r--   1 ruud  staff  3037056 Apr  3 21:03 libgmp.a
lrwxr-xr-x   1 ruud  staff       12 Apr  3 21:03 libgmp.la -> ../libgmp.la
-rw-r--r--   1 ruud  staff      898 Apr  3 21:03 libgmp.lai

but is looking at the system gmp (which is 64 bit and thus bound 
to fail). I have tried to convince the system otherwise by using:

  --with-gmp-lib=[full path]/gcc-4.4.3-build/gmp/.libs

and with by adding the path into PATH, LIBRARY_PATH or LD_LIBRARY_PATH 
(and of course exported those) and i also tried flags for the linker like:
LDFLAGS="-Wl,-search_paths_first".

I have ran out of idea's. In the config.log i see error's on the ppl 
and cloog libs, but i see those errors in the linux build (which does
succeed) also, so those do seem to be the problem. Besides, adding 
them does not make the problem any different.

On request i can send the different config logs and the resulting output. 
I have already discussed the problem on a mpfr list, but they said the
configs looked good and where not able to be of further assistance.

Help would be appreciated.

Kind regards,
Ruud Vlaming.



--
For unsubscribe information see http://sourceware.org/lists.html#faq


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