Results 1 to 6 of 6
Hi,
I have a problem that occurs when linking C-ISAM lib (libisam.a) using "gcc 4.1.2" and "glibc 2.5".
The project I'm currently working on involves porting an old application that ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
- 09-13-2011 #1Just Joined!
- Join Date
- Sep 2011
- Posts
- 3
C-ISAM 7.2 undefined reference error at link
Hi,
I have a problem that occurs when linking C-ISAM lib (libisam.a) using "gcc 4.1.2" and "glibc 2.5".
The project I'm currently working on involves porting an old application that uses C-ISAM, from a 32-bit to a 64-bit RHEL.
The build script runs the following line:
The errors i get when trying to link are the following:Code:cc -m32 lilog.o read_ll_text.o \ .... (application specific libs) \ -lisam \ -o ../bin/lilog
I have tried several different approaches but none that worked (Using gcc 3.4.6, including libc(-lc)).Code:/usr/lib/gcc/x86_64-redhat-linux/4.1.2/../../../../lib/libisam.a(osctype.o): In function `ldctypearr': osctype.c:(.text+0x129): undefined reference to `__ctype_b' osctype.c:(.text+0x1c3): undefined reference to `__ctype_tolower' osctype.c:(.text+0x1ea): undefined reference to `__ctype_toupper' /usr/lib/gcc/x86_64-redhat-linux/4.1.2/../../../../lib/libisam.a(glsutill.o): In function `_gl_skip_whitespace': glsutils.c:(.text+0xe0c): undefined reference to `__ctype_b' /usr/lib/gcc/x86_64-redhat-linux/4.1.2/../../../../lib/libisam.a(glsutill.o): In function `_gl_get_int': glsutils.c:(.text+0xf0c): undefined reference to `__ctype_b' glsutils.c:(.text+0xf71): undefined reference to `__ctype_b' glsutils.c:(.text+0xfcc): undefined reference to `__ctype_b' /usr/lib/gcc/x86_64-redhat-linux/4.1.2/../../../../lib/libisam.a(glsutill.o): In function `_gl_get_dbl': glsutils.c:(.text+0x103f): undefined reference to `__ctype_b' /usr/lib/gcc/x86_64-redhat-linux/4.1.2/../../../../lib/libisam.a(glsutill.o):glsutils.c:(.text+0x10a9): more undefined references to `__ctype_b' follow collect2: ld returned 1 exit status
Everything compiles and links on the old system (32-bit and gcc 2.96).
Apparently the __ctype_b, __ctype_tolower and __ctype_toupper are no longer available in glibc 2.5.
Is there anyone who can come up with a solution to get this through the link process?
Regards / Stefan
- 09-13-2011 #2Linux Guru
- Join Date
- Apr 2009
- Location
- I can be found either 40 miles west of Chicago, or in a galaxy far, far away.
- Posts
- 10,144
1) Make sure you have the 32-bit isam libraries installed.
2) Make sure you have the 32-bit standard libraries installed.
3) Add -L /usr/lib32 to your link lineSometimes, real fast is almost as good as real time.
Just remember, Semper Gumbi - always be flexible!
- 09-14-2011 #3Just Joined!
- Join Date
- Sep 2011
- Posts
- 3
Thanks for the reply.
All required libs are 32-bit and I have also compiled and linked several projects before this without errors.
C-ISAM is quite aged IBM software and is compiled/linked using an older version of glibc that still uses the "ctypes" above, and as it's not open source I can't do much to change the code.
I've tried to contact IBM for help, but they are not very interested in supporting this old and "small" application...
What I need is some way to "bypass" the ctypes above, perhaps?
- 09-14-2011 #4Linux Guru
- Join Date
- Apr 2009
- Location
- I can be found either 40 miles west of Chicago, or in a galaxy far, far away.
- Posts
- 10,144
Well, C-ISAM was the original indexing technology used by Informix (purchased by IBM) for their earlier databases. Later, they switched from C-ISAM to an integrated indexing tool in their enterprise class database. I've used it (c-isam) and others (c-tree, et al) in the past, but never on Linux. Since these are unresolved references, if you can figure out what they are, you might be able to create your own wrapper code that defines the symbols and subsequently calls the appropriate code in the newer C libraries.
Sometimes, real fast is almost as good as real time.
Just remember, Semper Gumbi - always be flexible!
- 09-15-2011 #5Just Joined!
- Join Date
- Sep 2011
- Posts
- 3
I've found a solution, not exactly sure if this solution is going to work when it comes to using the binary though... (I have more compile errors on other modules that needs to be solved before I can test it).
What I did was to make a copy of libc.a from the old 32-bit machine and put a renamed copy (libc.old.a) in my compile directory and included this when I linked the program.
This step made the code link without errors but I will need to get back to you about if it worked or not...
Thanks Rubberman for your input!
- 09-15-2011 #6Linux Guru
- Join Date
- Apr 2009
- Location
- I can be found either 40 miles west of Chicago, or in a galaxy far, far away.
- Posts
- 10,144
If you get it working, please post details about your solution here before you close the thread so others with similar problems can look it up. In any case, do a lot of testing before you go live should this work for you. You also may want to do a completely static link of the application so it does not rely upon any shared libraries which may be missing on target machines.
Sometimes, real fast is almost as good as real time.
Just remember, Semper Gumbi - always be flexible!


Reply With Quote
