* Re: Linking fortran code - lg2c library
@ 2007-10-22 6:58 Johann Rost
2007-10-22 15:34 ` Dima Sorkin
0 siblings, 1 reply; 6+ messages in thread
From: Johann Rost @ 2007-10-22 6:58 UTC (permalink / raw)
To: gcc-help
Dima:
Thanks for your answer. How can I create the "true"
library file "/usr/lib/libg2c.so" ?
Johann
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Linking fortran code - lg2c library
2007-10-22 6:58 Linking fortran code - lg2c library Johann Rost
@ 2007-10-22 15:34 ` Dima Sorkin
0 siblings, 0 replies; 6+ messages in thread
From: Dima Sorkin @ 2007-10-22 15:34 UTC (permalink / raw)
To: Johann Rost; +Cc: gcc-help
On 10/22/07, Johann Rost wrote:
> Thanks for your answer. How can I create the "true"
> library file "/usr/lib/libg2c.so" ?
I assume you have a root permission for 'root' on your machine.
Do a following sequence of commands:
--> su -
Now insert root's password
--> cd /usr/lib/
--> ln -s /usr/lib/libg2c.so.0.0 libg2c.so
This creates a soft link to a library.
--> exit
Then try to compile your code. If does not help - you will have to do
a small intervention into makefiles, be prepared :)
By the way, does somebody in this list know what may cause gcc to find
shared libraries supplied with "-l" option during linking ?
Thanks, regards,
Dima.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Linking fortran code - lg2c library
@ 2007-10-19 19:06 Johann Rost
2007-10-20 18:16 ` Dima Sorkin
0 siblings, 1 reply; 6+ messages in thread
From: Johann Rost @ 2007-10-19 19:06 UTC (permalink / raw)
To: gcc-help
I'm trying to install the open source project TAUCS
from Tel Aviv University. Most of the project is in C
with a few files in Fortran. It seems that gcc does
not find the Fortran library lg2c. I get the following
error message:
mkdir obj/linux/
echo exists > obj/linux/exists.log
cc -c -O3 -Wall -Werror -std=c99 -DMACHTYPE_ -I
src/ -I build/linux/ -I
external/src/ \
progs/taucs_blas_underscore_test.c \
-oobj/linux/taucs_blas_underscore_test.o
cc \
-oobj/linux/taucs_blas_underscore_test \
obj/linux/taucs_blas_underscore_test.o -L
external/lib/linux -llapack -L
external/lib/linux -lf77blas -lcblas -latlas -L
external/lib/linux -lmetis -lg2c -lm
/usr/bin/ld: cannot find -lg2c
collect2: ld returned 1 exit status
make: [build/linux/taucs_config_tests.h] Error 1
(ignored)
I checked if the library exists - and it seems to
exist:
[apuseni] ~ > locate libg2c.so
/usr/lib/libg2c.so.0
/usr/lib/libg2c.so.0.0.0
/usr/lib/scilab-4.0/bin/libg2c.so.0
/usr/local/gcc3/lib/libg2c.so
/usr/local/gcc3/lib/libg2c.so.0
/usr/local/gcc3/lib/libg2c.so.0.0.0
[apuseni] ~ > /sbin/ldconfig -p | grep g2c
libg2c.so.0 (libc6) => /usr/lib/libg2c.so.0
[apuseni] ~ >
Does anybody know what I could do to make the code
compile? Help is greately appreciated.
Johann
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Linking fortran code - lg2c library
2007-10-19 19:06 Johann Rost
@ 2007-10-20 18:16 ` Dima Sorkin
2007-10-20 18:23 ` Dima Sorkin
[not found] ` <152823.98287.qm@web53807.mail.re2.yahoo.com>
0 siblings, 2 replies; 6+ messages in thread
From: Dima Sorkin @ 2007-10-20 18:16 UTC (permalink / raw)
To: Johann Rost; +Cc: gcc-help
Hi.
Two suggestions for your question:
1) I see a problem in a fact that a there is no soft link named
"/usr/lib/libg2c.so" to a "true" library file
(I think it is "/usr/local/gcc3/lib/libg2c.so.0.0.0" in a case you described).
Please create it.
2) Try to supply the full name of that library instead of using "-l"
option, i.e. write "/usr/lib/libg2c.so" instead of "-lg2c". I am not
sure the option "-l" works for shared libraries, at least not by default.
2a) You have more than one libg2c on a system. Do you know which
of them you want to use ?
Regards,
Dima.
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2007-10-22 15:34 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-10-22 6:58 Linking fortran code - lg2c library Johann Rost
2007-10-22 15:34 ` Dima Sorkin
-- strict thread matches above, loose matches on Subject: below --
2007-10-19 19:06 Johann Rost
2007-10-20 18:16 ` Dima Sorkin
2007-10-20 18:23 ` Dima Sorkin
[not found] ` <152823.98287.qm@web53807.mail.re2.yahoo.com>
2007-10-22 16:42 ` Dima Sorkin
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).