This is a discussion on Problems with compiling a program on HPUX 11.11 within the HP-UX Operating System forums, part of the Unix Operating Systems category; --> Hi out there, I've got a problem. I'm trying to compile a C-programm on HPUX 11.11. The compilin runs ...
| |||||||
| Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| ||||
| Hi out there, I've got a problem. I'm trying to compile a C-programm on HPUX 11.11. The compilin runs well but when the linker starts I've got following message: Not a valid library (invalid magic number). Possibly a 64-bit PA archive library (Mismatched ABI). The program is trying to link the SAP-RFCSDK to my prog. the gcc compilter is conifgured with following value: Using built-in specs. Target: hppa2.0w-hp-hpux11.11 Configured with: ../gcc/configure Thread model: single gcc version 4.0.2 I tried a few compinations of flags but nothing I tried yet was working. At the moment I'm trying to compile with the flag -mpa-risc-2-0 and linking with the flag -mlp64. Does anyone here knows where my problem could be? Thanks in advance Markus P.S. If you need further information just ask. |
| |||
| nil.heid@gmx.de schrieb: > Not a valid library (invalid magic number). Possibly a 64-bit PA > archive library (Mismatched ABI). > The program is trying to link the SAP-RFCSDK to my prog. > the gcc compilter is conifgured with following value: > Using built-in specs. > Target: hppa2.0w-hp-hpux11.11 > Configured with: ../gcc/configure > Thread model: single > gcc version 4.0.2 You cannot mix 32 and 64bit objects in a single program. The compiler is configured for 64bit, so it will try linking it's 64bit libgcc. The PA-RISC 2.0 32bit targets of gcc are hppa2.0n-... or hppa1.1... Figure out what type the SAP-RFCSDK libs are, and then adjust build accordingly. Or select the correct libs of the SDK. -- Uli |
| |||
| Uli Link <VonRechts.NachLinks@usenet.arcornews.de> wrote: > nil.heid@gmx.de schrieb: >> Not a valid library (invalid magic number). Possibly a 64-bit PA >> archive library (Mismatched ABI). >> The program is trying to link the SAP-RFCSDK to my prog. >> the gcc compilter is conifgured with following value: >> Using built-in specs. >> Target: hppa2.0w-hp-hpux11.11 >> Configured with: ../gcc/configure >> Thread model: single >> gcc version 4.0.2 > You cannot mix 32 and 64bit objects in a single program. > The compiler is configured for 64bit, so it will try linking it's > 64bit libgcc. > The PA-RISC 2.0 32bit targets of gcc are hppa2.0n-... or hppa1.1... Where likely as not for 2.0 the 'n' is the key bit - standing for Narrow. As opposed to (w)ide. > Figure out what type the SAP-RFCSDK libs are, and then adjust build > accordingly. Or select the correct libs of the SDK. The file command may be sufficient to identify them. FWIW, In HP compiler speak, 64-bit compilation is requested via +DD64 and 32-bit via +DD32. Might help if you need to do future searches for HP compiler/gcc rosetta stones. rick jones -- Wisdom Teeth are impacted, people are affected by the effects of events. these opinions are mine, all mine; HP might not want them anyway... feel free to post, OR email to rick.jones2 in hp.com but NOT BOTH... |
| |||
| In article <YWjmf.411$9n.353@news.cpqcorp.net>, Rick Jones <rick.jones2@hp.com> wrote: >Uli Link <VonRechts.NachLinks@usenet.arcornews.de> wrote: >> nil.heid@gmx.de schrieb: > >>> Using built-in specs. >>> Target: hppa2.0w-hp-hpux11.11 > >> You cannot mix 32 and 64bit objects in a single program. >> The compiler is configured for 64bit, so it will try linking it's >> 64bit libgcc. > >> The PA-RISC 2.0 32bit targets of gcc are hppa2.0n-... or hppa1.1... Actually, this GCC compiler is a 32 bit compiler. In GCC terminology, hppa2.0w is a 32 bit target on 64 bit capable hardware. If this were the 64 bit PA GCC it would have a target of hppa64-hp-hpux11.11. So the problem is that he has a 32 bit compiler but a 64 bit library somewhere. Steve Ellcey sje <AT> cup . hp . com |
| |||
| [...] > Figure out what type the SAP-RFCSDK libs are, and then adjust build > accordingly. Or select the correct libs of the SDK. > SAP RFC-SDK is compiled and linked with HPs aCC compiler, no chance to use gcc. Quote from note 11682: [...] * HP-UX 11.0 cc -DSAPonUNIX -z +DD64 -Ae +w1 -DSAPwithTHREADS -D_REENTRANT -D_POSIX_C_SOURCE=199506L -DSAPonHPPA -c sapinfo.c /opt/aCC/bin/aCC +DD64 -Wl,+n -lnsl -Wl,-a,default -lpthread -ldld -lsec -L. -LRFCSDK/lib -o sapinfo sapinfo.o librfccm.sl On HP 32-bit platform, the option +DD64 must not be transferred to the Compile. or for Unicode mode: * HP-UX 64 * HP-UX Itanium 64 cc +DD64 -c -IRFCSDK/include -DSAPwithUNICODE sapinfo.c /opt/aCC/bin/aCC +DD64 -LRFCSDK/lib -l:librfcum.sl -l:libsapucum.sl -o sapinfo sapinfo.o Run (environment) LD_LIBRARY_PATH=RFCSDK/lib [...] -- Markus |
| ||||
| Markus schrieb: > [...] > >> Figure out what type the SAP-RFCSDK libs are, and then adjust build >> accordingly. Or select the correct libs of the SDK. >> > > SAP RFC-SDK is compiled and linked with HPs aCC compiler, no chance to > use gcc. As long as SAP's RFC libs not include C++ it should be possible with GCC too. What SAP will support is a completely different story. You can mix *C only* libs between Vendor and GCC compiler. > cc -DSAPonUNIX -z +DD64 -Ae +w1 -DSAPwithTHREADS -D_REENTRANT > -D_POSIX_C_SOURCE=199506L -DSAPonHPPA -c sapinfo.c I can see that the program wants the "-Ae -D_REENTRANT" flags. So the GCC should be configured and working for Posix threads before. -- Uli |
| Thread Tools | |
| Display Modes | |
|
|