Solved: Symbol referencing errors building hello world, sparc-sun-solaris2.11, gfortran-4.1.0
John Wiggins
jwiggins@rutgers.edu
Wed Mar 8 15:13:00 GMT 2006
FX Coudert wrote:
>> Thank you Tobi, HAVE_GFC_COMPLEX was not in kinds.h, and that was my
>> fault.
>> I was playing around with mk-kinds-h.sh to try to solve a build problem
>> earlier and I forgot to back out my changes.
>
> As I've been taking care of mk-kinds-h.sh for some time, and as an
> occasional sparc-sun-solaris and i386-solaris user, I'm interested:
> was your build problem related to gfortran configury itself, and if
> so, what was it and did you solve it?
>
> FX
>
The problem was a result of configure not finding libgmp and libmpfr.
When I
tried my initial config, I set LDFLAGS and CPPFLAGS in my environment
so that configure could find libgmp and libmpfr.
My problem manifested itself when I did the make and mk-kinds-h.sh got to
if $compile -c tmp$$.f90 > /dev/null 2>&1
The compiler couldn't find libgmp.so, but stderror was redirected to
/dev/null.
So what happened was that $largest wound up getting set to "".
After playing around with the script for a little while, I finally
removed the
stderr redirection in the if $compile statement, and saw that ld.so couldn't
find libgmp.
That led me to try setting LD_LIBRARY_PATH (which didn't work so well)
and then finally to RTFM where I found the --with-gmp and --with-mpfr config
options.
It would be nice to see the configure script prompt the builder for
--with-[gmp,mpfr] options when it can't find these libraries, but I should
have just run configure --help.
More information about the Fortran
mailing list