gcc 4.1.1 with gfortran will not build on 64 bit Linux platform

F

flyingleon

I have today downloaded gcc-4.1.1 and tried to configure and build it.
I have successfully done this before with gcc-3.4.2. The gcc-4.1.1
includes gfortran which is a language that I need. The native build
platform is Linux AMD 64bit Opteron. I have previous built
libgmp.so.3.4.1 and libmpfr.so.1.0.0 and installed them in
/usr/local/lib which I understand are needed by gfortran.

My build directory on a local disk is:

/ldata1/downloads/gcc/gcc/gcc-4.1.1_objdir

and the gcc-4.1.1 sources were unpacked in:

/ldata1/downloads/gcc/gcc/gcc-4.1.1

In my build directory I ran the following commands (not login as root):

setenv LD_LIBRARY_PATH /usr/local/lib
.../gcc-4.1.1/configure --with-drawf2
make bootstrap

My build failed with the following:


make[2]: Entering directory
`/ldata1/downloads/gcc/gcc-4.1.1_objdir/gcc'
stage1/xgcc -Bstage1/ -B/usr/local/x86_64-unknown-linux-gnu/bin/ -g
-O2 -DIN_GCC -W -Wall -Wwrite-strings -Wstrict-prototypes
-Wmissing-prototypes -pedantic -Wno-long-long -Wno-variadic-macros
-Wold-style-definition -Wmissing-format-attribute -DHAVE_CONFIG_H
-o f951 \
fortran/arith.o fortran/array.o fortran/bbt.o fortran/check.o
fortran/data.o fortran/decl.o fortran/dump-parse-tree.o fortran/error.o
fortran/expr.o fortran/interface.o fortran/intrinsic.o fortran/io.o
fortran/iresolve.o fortran/match.o fortran/matchexp.o fortran/misc.o
fortran/module.o fortran/options.o fortran/parse.o fortran/primary.o
fortran/resolve.o fortran/scanner.o fortran/simplify.o fortran/st.o
fortran/symbol.o fortran/convert.o fortran/dependency.o
fortran/f95-lang.o fortran/trans.o fortran/trans-array.o
fortran/trans-common.o fortran/trans-const.o fortran/trans-decl.o
fortran/trans-expr.o fortran/trans-intrinsic.o fortran/trans-io.o
fortran/trans-stmt.o fortran/trans-types.o main.o libbackend.a
.../libcpp/libcpp.a -lmpfr -lgmp ../libcpp/libcpp.a
.../libiberty/libiberty.a
/usr/local/lib/libmpfr.so: undefined reference to
`__gmp_randinit_mt_noseed'
collect2: ld returned 1 exit status
make[2]: *** [f951] Error 1
make[2]: Leaving directory `/ldata1/downloads/gcc/gcc-4.1.1_objdir/gcc'
make[1]: *** [stage2_build] Error 2
make[1]: Leaving directory `/ldata1/downloads/gcc/gcc-4.1.1_objdir/gcc'
make: *** [bootstrap] Error 2


Now I have checked in /usr/local/lib/libgmp.so.3.4.1 library and the
__gmp_randinit_mt_noseed symbol appears to be there. Can anyone throw
any light on what might be happening.

Any suggestions on how to resolve the problem would be appreciated.

Best regards,

Adrian
 
S

Skarmander

flyingleon said:
I have today downloaded gcc-4.1.1 and tried to configure and build it.
<snip>

Responders, please remove the crossposts to comp.lang.c; the question is not
relevant to this ng. (The same applies for comp.lang.fortran, I'd wager.)

S.
 
G

glen herrmannsfeldt

I have previous built
libgmp.so.3.4.1 and libmpfr.so.1.0.0 and installed them in
/usr/local/lib which I understand are needed by gfortran.
(snip)
My build failed with the following: (snip)

/usr/local/lib/libmpfr.so: undefined reference to
`__gmp_randinit_mt_noseed'

As you say, it looks like it needs gmp, but it doesn't
seem to be finding it. There is no -L/usr/local/lib
in your command, which would tell it to look there for
libraries. Otherwise, make sure that they are there.

-- glen
 
C

Craig Powers

flyingleon said:
/usr/local/lib/libmpfr.so: undefined reference to
`__gmp_randinit_mt_noseed'
[...]

Now I have checked in /usr/local/lib/libgmp.so.3.4.1 library and the
__gmp_randinit_mt_noseed symbol appears to be there. Can anyone throw
any light on what might be happening.

It looks like MPFR doesn't know where to find the symbol. You may want
to verify your MPFR configuration.
 
L

lurker

Skarmander said:
> flyingleon wrote:
>
>
> <snip>
>
> Responders, please remove the crossposts to comp.lang.c; the question is
> not relevant to this ng. (The same applies for comp.lang.fortran, I'd
> wager.)
>
> S.


I'd at least remove comp.lang.c , they seem to worry more about
controlling content than helping people. sorry, off-topic.
 
J

jacob navia

lurker said:
I'd at least remove comp.lang.c , they seem to worry more about
controlling content than helping people. sorry, off-topic.

Excuse me but not all comp.lang.c, just the traffic cops.

:)
 
S

Skarmander

lurker said:
I'd at least remove comp.lang.c , they seem to worry more about
controlling content than helping people. sorry, off-topic.

I don't know about "them", but as far as I'm concerned, you're very right. I
could help people with a great many things, but they can't expect help on
questions that don't have anything to do with C by posting to comp.lang.c.
The reason I read comp.lang.c in the first place is because it's about C and
nothing else. Questions about your GCC installation, Fortran compilation or
bonsai trees shouldn't be here, and the most help I'll give to such posts is
a pointer to a more appropriate newsgroup, or a polite request to remove
crossposts.

If that's not good enough for you, too bad. You get what you pay for.

S.
 
F

flyingleon

Many thanks for your comments which were very helpful as they gave me
some clues as to what might be happening. I have now successfully built
and installed gcc 4.1.1 with gfortran.
 
F

flyingleon

Many thanks for your comments which were also very helpful as they gave
me
some clues as to what might be happening. I have now successfully built

and installed gcc 4.1.1 with gfortran.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,534
Members
45,008
Latest member
Rahul737

Latest Threads

Top