Operating System - HP-UX
1748074 Members
5342 Online
108758 Solutions
New Discussion юеВ

Re: file "unix98.o": No such file or directory - 64 bit ld error

 
jay11
Occasional Advisor

file "unix98.o": No such file or directory - 64 bit ld error

I have a 64 bit HP-UX B11.31 PA-RISC system. I am trying to build following sample code:-

#include
#include
int main(int argc, char ** argv)
{
return 1;
}

Compile:- g++ -I/usr/include -I/usr/local/include -Wall -DHPUX_64 -DOS_HPUX -D_PSTAT64 -D_V2 -c -fvisibility=default -fPIC try.cpp

Link:- g++ -fPIC -DHPUX_64 -D_PSTAT64 -DOS_HPUX -D_V2 -o try try.o -L/usr/lib -L/usr/lib/pa20_64 -L/opt/hp-gcc64/lib -lstdc++ -lm -lnsl

Error:-
ld: I/O error, file "unix98.o": No such file or directory
Fatal error.
collect2: ld returned 1 exit status

I tried different permutations, like not explicitly linking to libs in pa20_64 and/or opt/hp-gcc64/lib. It made no difference.

Some more investigation. I found unix95.o and unix98.o in /usr/lib. But:-

file /usr/lib/unix98.o gives "PA-RISC1.1 relocatable object". Looks like it is 32 bit. When is this file built and how do I get 64 bit verison of unix98.o - if that is the issue.

file try.o gives:-
ELF-64 relocatable object file - PA-RISC 2.0 (LP64)

End goal is to build 64 bit application. It failed because of same ld error. Hence, I tried a short snippet pasted above. Am looking for helpful tips to resolve this issue.

# g++ -v
Using built-in specs.
Target: hppa64-hp-hpux11.11
Configured with: /tmp/gcc-4.4.3.tar.gz/gcc-4.4.3/configure --host=hppa64-hp-hpux11.11 --target=hppa64-hp-hpux11.11 --build=hppa64-hp-hpux11.11 --prefix=/opt/hp-gcc64-4.4.3 --with-gnu-as --without-gnu-ld --enable-threads=posix --enable-languages=c,c++ --with-gmp=/proj/opensrc/be/hppa64-hp-hpux11.11 --with-mpfr=/proj/opensrc/be/hppa64-hp-hpux11.11 SED=/usr/bin/sed
Thread model: posix
gcc version 4.4.3 (GCC)
3 REPLIES 3
Dennis Handly
Acclaimed Contributor

Re: file "unix98.o": No such file or directory - 64 bit ld error

>I found unix95.o and unix98.o in /usr/lib.

The +DD64 version is in: /usr/lib/pa20_64/unix98.o
Do you have OS-Core.C-MIN-64ALIB installed?
jay11
Occasional Advisor

Re: file "unix98.o": No such file or directory - 64 bit ld error

"The +DD64 version is in: /usr/lib/pa20_64/unix98.o
Do you have OS-Core.C-MIN-64ALIB installed?"

Dennis - Thanks for the reply. I checked in /usr/lib/pa20_64. I don't see unix98.o. Can you pl elaborate slightly on OS-Core.C-MIN-64ALIB? My understanding is that as 32 bit unix98.o is part of standard installation - same would apply to 64 bit OS-Core.C-MIN-64ALIB. I had installed 64 bit HP gcc 4.4.3 successfully - which I assume would happen only if 64 bit OS-Core.C-MIN-64ALIB is installed.
Dennis Handly
Acclaimed Contributor

Re: file "unix98.o": No such file or directory - 64 bit ld error

>Can you elaborate slightly on OS-Core.C-MIN-64ALIB?

swlist OS-Core.C-MIN-64ALIB
(You don't have this optional product installed?)

>My understanding is that as 32 bit unix98.o is part of standard installation - same would apply to 64 bit OS-Core.C-MIN-64ALIB.

I doubt it. Perhaps the default is geared to deploy applications, not develop them. Though being in C-MIN is more apt to be installed.

>I had installed 64 bit HP gcc 4.4.3 successfully - which I assume would happen only if 64 bit OS-Core.C-MIN-64ALIB is installed.

I doubt there is any dependency between the two. aC++ doesn't know about that needed fileset. (Of course if it isn't there, we don't try to use it. :-)