By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,335 Members | 2,313 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,335 IT Pros & Developers. It's quick & easy.

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

P: n/a
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

Sep 14 '06 #1
Share this Question
Share on Google+
8 Replies


P: n/a
flyingleon wrote:
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.
Sep 14 '06 #2

P: n/a
In comp.lang.fortran flyingleon <ad**************@gmail.comwrote:
(snip)
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
Sep 14 '06 #3

P: n/a
flyingleon wrote:
/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.
Sep 14 '06 #4

P: n/a
Skarmander wrote:
flyingleon wrote:
>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.

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

P: n/a
lurker wrote:
Skarmander wrote:
flyingleon wrote:
>
>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.


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.

:-)

Sep 15 '06 #6

P: n/a
lurker wrote:
Skarmander wrote:
flyingleon wrote:
>
>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.)

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.
Sep 15 '06 #7

P: n/a
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.

Sep 15 '06 #8

P: n/a
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.

Sep 15 '06 #9

This discussion thread is closed

Replies have been disabled for this discussion.