dbTalk Databases Forums  

i4gl problem in HP getting a library

comp.databases.informix comp.databases.informix


Discuss i4gl problem in HP getting a library in the comp.databases.informix forum.



Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old   
ian
 
Posts: n/a

Default i4gl problem in HP getting a library - 11-21-2007 , 12:41 PM






Hi all;

system is uname -a
HP-UX crux B.11.00 U 9000/800 12345678 unlimited-user license
and
i4gl -V IBM INFORMIX-4GL Version 7.32.FC2 Software Serial Number
RDS#0000000

I have a library :-
/home/it/user_dev/Lib/liba.a :-
-rw-r----- 1 user_dev cssprd 175032 Nov 15 13:45 liba.a

My program:-
MODIFY PROGRAM: 4GL Other Libraries Compile_Options Rename Exit
----------------------- syspgm4gl -------------- Press CTRL-W for Help
--------
Program [sdna ]
4gl Source 4gl Source Path
[sp_dsc_na ] [ ]
Other Source Ext Other Source Path
[ ] [ ] [ ]
Libraries [a ] Compile Options [ ]

Compiling returns:-
The following errors were discovered during compilation.
ld: Can't find library or mismatched ABI for -la
Fatal error.

Yup - I know this is probably an `ld` problem and have the environment
set to:-
LDPATH=/home/it/user_dev/Lib/:/opt_local/infx/current/lib:/opt_local/
infx/current/lib/esql:/opt_local/infx/current/lib/tools:/usr/lib
LD_LIBRARY_PATH=same
LPATH=same
SHRPATH=same
LIB_PATH=same - all I can work out.

So command line, `ld sp_dsc_na.o -la`
ld: Can't find library or mismatched ABI for -la
Fatal error.

Its years since I did any `ar` stuff, so I was wandering what the ABI
means !
Or am I not making the library correctly:-
ar -tv /home/it/user_dev/Lib/a.a
rw-r----- 1376/ 1000 3488 Nov 8 12:45 2007 fgiuser.o
rw-r----- 1376/ 1000 2248 Nov 8 12:45 2007 fgiusr.o
.. . . . .
which seems OK to me !!

I note the c4gl defaults to "shared", so perhaps my library IS wrong
Also the file generated using all .0 files rather than the libarary
turns out to be:-
sdna.4ge: ELF-64 executable object file - PA-RISC 2.0 (LP64)
So !!

Any Ideas please.

Regards
Ian

Reply With Quote
  #2  
Old   
Richard Harnden
 
Posts: n/a

Default Re: i4gl problem in HP getting a library - 11-21-2007 , 01:20 PM






ian wrote:
Quote:
Hi all;

system is uname -a
HP-UX crux B.11.00 U 9000/800 12345678 unlimited-user license
and
i4gl -V IBM INFORMIX-4GL Version 7.32.FC2 Software Serial Number
RDS#0000000

I have a library :-
/home/it/user_dev/Lib/liba.a :-
-rw-r----- 1 user_dev cssprd 175032 Nov 15 13:45 liba.a

My program:-
MODIFY PROGRAM: 4GL Other Libraries Compile_Options Rename Exit
----------------------- syspgm4gl -------------- Press CTRL-W for Help
--------
Program [sdna ]
4gl Source 4gl Source Path
[sp_dsc_na ] [ ]
Other Source Ext Other Source Path
[ ] [ ] [ ]
Libraries [a ] Compile Options [ ]

Compiling returns:-
The following errors were discovered during compilation.
ld: Can't find library or mismatched ABI for -la
Fatal error.

Yup - I know this is probably an `ld` problem and have the environment
set to:-
LDPATH=/home/it/user_dev/Lib/:/opt_local/infx/current/lib:/opt_local/
infx/current/lib/esql:/opt_local/infx/current/lib/tools:/usr/lib
LD_LIBRARY_PATH=same
LPATH=same
SHRPATH=same
Isn't it SHLIB_PATH on HP ?

Quote:
LIB_PATH=same - all I can work out.

So command line, `ld sp_dsc_na.o -la`
ld: Can't find library or mismatched ABI for -la
Fatal error.
-la would be looking for a file called "liba.sl"

..a files are archives, of many .o files, not a librarys.

You should be able to just: c4gl foo.4gl bar.a -o foo

The ABI mismatch could be to do with trying to mix 32 and 64 bit objects.

Quote:
Its years since I did any `ar` stuff, so I was wandering what the ABI
means !
Or am I not making the library correctly:-
ar -tv /home/it/user_dev/Lib/a.a
rw-r----- 1376/ 1000 3488 Nov 8 12:45 2007 fgiuser.o
rw-r----- 1376/ 1000 2248 Nov 8 12:45 2007 fgiusr.o
. . . . .
which seems OK to me !!

I note the c4gl defaults to "shared", so perhaps my library IS wrong
Also the file generated using all .0 files rather than the libarary
turns out to be:-
sdna.4ge: ELF-64 executable object file - PA-RISC 2.0 (LP64)
So !!

Any Ideas please.

Regards
Ian

Reply With Quote
  #3  
Old   
Jonathan Leffler
 
Posts: n/a

Default Re: i4gl problem in HP getting a library - 11-22-2007 , 12:35 AM



ian wrote:
Quote:
system is uname -a
HP-UX crux B.11.00 U 9000/800 12345678 unlimited-user license
and
i4gl -V IBM INFORMIX-4GL Version 7.32.FC2 Software Serial Number
RDS#0000000

I have a library :-
/home/it/user_dev/Lib/liba.a :-
-rw-r----- 1 user_dev cssprd 175032 Nov 15 13:45 liba.a

My program:-
MODIFY PROGRAM: 4GL Other Libraries Compile_Options Rename Exit
----------------------- syspgm4gl -------------- Press CTRL-W for Help
--------
Program [sdna ]
4gl Source 4gl Source Path
[sp_dsc_na ] [ ]
Other Source Ext Other Source Path
[ ] [ ] [ ]
Libraries [a ] Compile Options [ ]

Compiling returns:-
The following errors were discovered during compilation.
ld: Can't find library or mismatched ABI for -la
Fatal error.

Yup - I know this is probably an `ld` problem and have the environment
set to:-
LDPATH=/home/it/user_dev/Lib/:/opt_local/infx/current/lib:/opt_local/
infx/current/lib/esql:/opt_local/infx/current/lib/tools:/usr/lib
LD_LIBRARY_PATH=same
LPATH=same
SHRPATH=same
LIB_PATH=same - all I can work out.

So command line, `ld sp_dsc_na.o -la`
ld: Can't find library or mismatched ABI for -la
Fatal error.

Its years since I did any `ar` stuff, so I was wandering what the ABI
means !
Or am I not making the library correctly:-
ar -tv /home/it/user_dev/Lib/a.a
rw-r----- 1376/ 1000 3488 Nov 8 12:45 2007 fgiuser.o
rw-r----- 1376/ 1000 2248 Nov 8 12:45 2007 fgiusr.o
. . . . .
which seems OK to me !!

I note the c4gl defaults to "shared", so perhaps my library IS wrong
Also the file generated using all .0 files rather than the libarary
turns out to be:-
sdna.4ge: ELF-64 executable object file - PA-RISC 2.0 (LP64)
So !!

Any Ideas please.
I dislike 'either/or' errors - it is so much better to have separate
messages for the separate alternatives.

If the problem is the ld can't find the library, maybe you need to add
'-L.' as an extra option, to pick up the library from the current
directory. Or replace '.' with the absolute name of the directory
containing liba.a.

If the problem is mismatched API, it means that your C compiler is
exepcting to find 64-bit object files but the library contains 32-bit
object files - or possibly vice versa. You can start diagnosing this by
running 'file ...' on various object files - those extracted from (or
built into) liba.a, those built by c4gl, and those in the I4GL libraries.

If your library file is actually named a.a, then that will not be found
by the -la option; when you specify -la, the linker/loader will look for
files liba.sl and liba.a (and not a.a). That's why the file for the GCC
bootstrap library is called libiberty.a -- it is linked using '-liberty'.

--
Jonathan Leffler #include <disclaimer.h>
Email: jleffler (AT) earthlink (DOT) net, jleffler (AT) us (DOT) ibm.com
Guardian of DBD::Informix v2007.0914 -- http://dbi.perl.org/

publictimestamp.org/ptb/PTB-1845 ripemd320 2007-11-22 03:00:04
BCDDFB83E477DE6214CE763864724C65AAB086FE59F252713E F33CC08DDE800C023D68
23079166F


Reply With Quote
  #4  
Old   
Gerardo Santana
 
Posts: n/a

Default Re: i4gl problem in HP getting a library - 11-22-2007 , 11:32 AM



On Nov 21, 11:35 pm, Jonathan Leffler <jleff... (AT) earthlink (DOT) net> wrote:
Quote:
I dislike 'either/or' errors - it is so much better to have separate
messages for the separate alternatives.
I'm going a bit offtopic here but, I'd like to manifest how much I
dislike those kinds of errors too, and sadly Informix seems to have
its share of them.

It's difficult to me to understand that a more precise diagnostic
cannot be made.

I hope that could be fixed.
--
Gerardo Santana


Reply With Quote
Reply




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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

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



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.