LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 06-16-2010, 02:24 PM   #1
Astrodude
LQ Newbie
 
Registered: Jun 2010
Posts: 15

Rep: Reputation: 0
GNU C Library


Hello.

I'm modifying a bunch of C and FORTRAN programs that were written in the 90's on HP architecture. When I try to compile them using my makefile which calls for -lcl, I receive the error:

Code:
cannot find -lcl
I tried taking lcl out of the makefile, but received a ton of undefined reference errors.

Based on a little googling, Im guessing that the library I'm missing was specific to the HP architecture. It appears that some standard math functions were found in the libcl library on the HP architecture

However, on Linux, libcl probably does not exist. Does anyone know where to look for the missing symbols and figure out where to get those in the Linux environment??
 
Old 06-16-2010, 02:36 PM   #2
alunduil
Member
 
Registered: Feb 2005
Location: San Antonio, TX
Distribution: Gentoo
Posts: 684

Rep: Reputation: 62
If you paste the missing symbols here we can start seeing what you're trying to do and suggest a better way of finding the symbols or tell you what libraries those symbols are in. Some might not be portable and require some code rewriting just as a forewarning.

Regards,

Alunduil
 
Old 06-16-2010, 03:00 PM   #3
Astrodude
LQ Newbie
 
Registered: Jun 2010
Posts: 15

Original Poster
Rep: Reputation: 0
Code:
cusp.o: In function `main':
cusp.c:(.text+0xc4a): undefined reference to `recalc'
cusp.c:(.text+0xd4c): undefined reference to `sphcar'
cusp.c:(.text+0xdb5): undefined reference to `geogsm'
cusp.c:(.text+0xe1e): undefined reference to `sphcar'
cusp.c:(.text+0xf82): undefined reference to `sphcar'
cusp.c:(.text+0xfeb): undefined reference to `geogsm'
cusp.c:(.text+0x1846): undefined reference to `trline'
btilt.o: In function `B_total':
/homes/colsoad1/new_o_model/btilt.c:83: undefined reference to `get_geopack'
/homes/colsoad1/new_o_model/btilt.c:86: undefined reference to `t96_01'
/homes/colsoad1/new_o_model/btilt.c:96: undefined reference to `geogsm'
/homes/colsoad1/new_o_model/btilt.c:98: undefined reference to `sphcar'
/homes/colsoad1/new_o_model/btilt.c:107: undefined reference to `igrf'
/homes/colsoad1/new_o_model/btilt.c:108: undefined reference to `bspcar'
/homes/colsoad1/new_o_model/btilt.c:110: undefined reference to `geogsm'
/homes/colsoad1/new_o_model/btilt.c:132: undefined reference to `locate'
get_status.o: In function `get_status':
/homes/colsoad1/new_o_model/get_status.c:43: undefined reference to `locate'
trl.o: In function `step_trace__':
trl.f:(.text+0x48): undefined reference to `a_para__'
trl.f:(.text+0x12d): undefined reference to `a_para__'
trl.f:(.text+0x23d): undefined reference to `a_para__'
trl.f:(.text+0x370): undefined reference to `a_para__'
trl.f:(.text+0x4c6): undefined reference to `a_para__'
trl.o:trl.f:(.text+0x63f): more undefined references to `a_para__' follow
trl.o: In function `trline_':
trl.f:(.text+0x1152): undefined reference to `get_status__'
short_trl.o: In function `short_trline__':
short_trl.f:(.text+0x62b): undefined reference to `_g95_get_ioparm'
short_trl.f:(.text+0x632): undefined reference to `_g95_filename'
short_trl.f:(.text+0x63c): undefined reference to `_g95_line'
short_trl.f:(.text+0x64e): undefined reference to `_g95_ioparm'
short_trl.f:(.text+0x65c): undefined reference to `_g95_ioparm'
short_trl.f:(.text+0x66a): undefined reference to `_g95_ioparm'
short_trl.f:(.text+0x676): undefined reference to `_g95_st_write'
short_trl.f:(.text+0x685): undefined reference to `_g95_transfer_character'
short_trl.f:(.text+0x694): undefined reference to `_g95_transfer_integer'
short_trl.f:(.text+0x6a3): undefined reference to `_g95_transfer_real'
short_trl.f:(.text+0x6b6): undefined reference to `_g95_transfer_real'
short_trl.f:(.text+0x6c9): undefined reference to `_g95_transfer_real'
short_trl.f:(.text+0x6d8): undefined reference to `_g95_transfer_real'
short_trl.f:(.text+0x6dd): undefined reference to `_g95_st_write_done'
/homes/colsoad1/new_o_model/geopack.o: In function `igrf_':
geopack.f:(.text+0x201): undefined reference to `_g95_get_ioparm'
geopack.f:(.text+0x208): undefined reference to `_g95_filename'
geopack.f:(.text+0x212): undefined reference to `_g95_line'
geopack.f:(.text+0x224): undefined reference to `_g95_ioparm'
geopack.f:(.text+0x232): undefined reference to `_g95_ioparm'
geopack.f:(.text+0x240): undefined reference to `_g95_ioparm'
geopack.f:(.text+0x252): undefined reference to `_g95_ioparm'
geopack.f:(.text+0x261): undefined reference to `_g95_st_write'
geopack.f:(.text+0x26f): undefined reference to `_g95_transfer_integer'
geopack.f:(.text+0x27e): undefined reference to `_g95_transfer_integer'
geopack.f:(.text+0x283): undefined reference to `_g95_st_write_done'
/homes/colsoad1/new_o_model/geopack.o: In function `sun_':
geopack.f:(.text+0x19dc): undefined reference to `_g95_mod_r8'
geopack.f:(.text+0x1a6b): undefined reference to `_g95_mod_r8'
geopack.f:(.text+0x1ae6): undefined reference to `_g95_mod_r8'
geopack.f:(.text+0x1e83): undefined reference to `_g95_atan2_r4'
/homes/colsoad1/new_o_model/geopack.o: In function `sphcar_':
geopack.f:(.text+0x1fbc): undefined reference to `_g95_atan2_r4'
geopack.f:(.text+0x1fdf): undefined reference to `_g95_atan2_r4'
/homes/colsoad1/new_o_model/geopack.o: In function `recalc_':
geopack.f:(.text+0x23a5): undefined reference to `_g95_get_ioparm'
geopack.f:(.text+0x23ac): undefined reference to `_g95_filename'
geopack.f:(.text+0x23b6): undefined reference to `_g95_line'
geopack.f:(.text+0x23c8): undefined reference to `_g95_ioparm'
geopack.f:(.text+0x23d6): undefined reference to `_g95_ioparm'
geopack.f:(.text+0x23e4): undefined reference to `_g95_ioparm'
geopack.f:(.text+0x23f6): undefined reference to `_g95_ioparm'
geopack.f:(.text+0x2405): undefined reference to `_g95_st_write'
geopack.f:(.text+0x2413): undefined reference to `_g95_transfer_integer'
geopack.f:(.text+0x2426): undefined reference to `_g95_transfer_integer'
geopack.f:(.text+0x242b): undefined reference to `_g95_st_write_done'
geopack.f:(.text+0x3551): undefined reference to `_g95_asin_r4'
geopack.f:(.text+0x3602): undefined reference to `_g95_asin_r4'
geopack.f:(.text+0x384d): undefined reference to `_g95_atan2_r4'
/homes/colsoad1/new_o_model/geopack.o: In function `trace_':
geopack.f:(.text+0x50fe): undefined reference to `_g95_sign_r4'
geopack.f:(.text+0x55a9): undefined reference to `_g95_get_ioparm'
geopack.f:(.text+0x55b0): undefined reference to `_g95_filename'
geopack.f:(.text+0x55ba): undefined reference to `_g95_line'
geopack.f:(.text+0x55cc): undefined reference to `_g95_ioparm'
geopack.f:(.text+0x55da): undefined reference to `_g95_ioparm'
geopack.f:(.text+0x55e8): undefined reference to `_g95_ioparm'
geopack.f:(.text+0x55fa): undefined reference to `_g95_ioparm'
geopack.f:(.text+0x5609): undefined reference to `_g95_st_write'
geopack.f:(.text+0x560e): undefined reference to `_g95_st_write_done'
/homes/colsoad1/new_o_model/locate.o: In function `locate_':
locate.f:(.text+0x18a): undefined reference to `_g95_atan2_r4'
/homes/colsoad1/new_o_model/t96_01.o: In function `t96_01__':
t96_01.f:(.text+0x182): undefined reference to `_g95_atan2_r4'
/homes/colsoad1/new_o_model/t96_01.o: In function `ringcurr96_':
t96_01.f:(.text+0x38f6): undefined reference to `_g95_sign_r8'
/homes/colsoad1/new_o_model/t96_01.o: In function `taildisk_':
t96_01.f:(.text+0x4321): undefined reference to `_g95_sign_r8'
/homes/colsoad1/new_o_model/t96_01.o: In function `tail87_':
t96_01.f:(.text+0x50e1): undefined reference to `_g95_log'
t96_01.f:(.text+0x5117): undefined reference to `_g95_log'
t96_01.f:(.text+0x514d): undefined reference to `_g95_log'
/homes/colsoad1/new_o_model/t96_01.o: In function `birk1tot_02__':
t96_01.f:(.text+0x67a8): undefined reference to `_g95_atan2_r8'
t96_01.f:(.text+0x6816): undefined reference to `_g95_atan2_r8'
t96_01.f:(.text+0x692a): undefined reference to `_g95_asin_r8'
/homes/colsoad1/new_o_model/t96_01.o: In function `circle_':
t96_01.f:(.text+0x9436): undefined reference to `_g95_log'
/homes/colsoad1/new_o_model/t96_01.o: In function `condip1_':
t96_01.f:(.text+0xa25a): undefined reference to `_g95_power_r8_i4'
t96_01.f:(.text+0xa291): undefined reference to `_g95_power_r8_i4'
t96_01.f:(.text+0xa330): undefined reference to `_g95_power_r8_i4'
t96_01.f:(.text+0xa38e): undefined reference to `_g95_power_r8_i4'
/homes/colsoad1/new_o_model/get_geopack.o: In function `get_geopack_
 
Old 06-16-2010, 05:07 PM   #4
alunduil
Member
 
Registered: Feb 2005
Location: San Antonio, TX
Distribution: Gentoo
Posts: 684

Rep: Reputation: 62
Can you also paste the command being used for the compilation? For example, what compiler and what flags you are using?

Regards,

Alunduil
 
Old 06-16-2010, 06:49 PM   #5
Andrew Benton
Senior Member
 
Registered: Aug 2003
Location: Birkenhead/Britain
Distribution: Linux From Scratch
Posts: 2,073

Rep: Reputation: 64
Google seems to think libcl has got something to do with lisp
 
Old 06-16-2010, 07:42 PM   #6
alunduil
Member
 
Registered: Feb 2005
Location: San Antonio, TX
Distribution: Gentoo
Posts: 684

Rep: Reputation: 62
Andrew,

It would because it would be a library attached to clisp.

Astrodude,

What is the name of the header file that is trying to include those symbols? I would venture a guess that you need to include -lm as part of your LFLAGS.

Regards,

Alunduil
 
Old 06-17-2010, 09:12 AM   #7
Astrodude
LQ Newbie
 
Registered: Jun 2010
Posts: 15

Original Poster
Rep: Reputation: 0
I'm using gcc 4.3.4

Here's my makefile:

Code:
CC = gcc -O -g

OBJS = cusp.o r_step.o r_rzextr.o a_para.o r_mmid.o \
         btilt.o get_status.o  \
         trl.o short_trl.o \
         /homes/colsoad1/new_o_model/geopack.o \
         /homes/colsoad1/new_o_model/locate.o \
         /homes/colsoad1/new_o_model/t96_01.o \
         /homes/wingsp1/solwind/compu_pres.o \
         /homes/colsoad1/new_o_model/get_geopack.o \
         /homes/colsoad1/sd_model/read_pot.o \
         /homes/colsoad1/sd_model/get_E.o \
         /homes/colsoad1/sd_model/interp_pot.o \
         /homes/colsoad1/sd_model/median_pot.o

LIB = -lm -lcl

cusp:   $(OBJS)
        $(CC) $(OBJS) $(LIB) -o cusp
 
Old 06-17-2010, 09:41 AM   #8
alunduil
Member
 
Registered: Feb 2005
Location: San Antonio, TX
Distribution: Gentoo
Posts: 684

Rep: Reputation: 62
Does the directory that is hardcoded in that Makefile actually exist? The /homes/colsoad1/ and /homes/wingsp1? It looks like you may just be running against bad programming practices.

Regards,

Alunduil
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Plz Help me to find GNU C++ Runtime Library smartgupta Linux - Software 1 09-22-2008 10:32 AM
Stream buffer size of open file in GNU c library rajesh_b Programming 1 01-11-2007 03:06 AM
How to tell compiler to not to use GNU library (glibc) P.S.R.K.S.PRASAD Linux - Kernel 1 12-27-2006 03:58 AM
Problems using the GNU Scientific Library Alkibiades Programming 2 11-04-2006 02:43 PM
GNU Library Archives wood@addanc Programming 1 06-28-2005 05:05 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 10:46 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration