1829767 Members
5882 Online
109992 Solutions
New Discussion

aCC 64-bit link problem

 
SOLVED
Go to solution
Ed Day
Advisor

aCC 64-bit link problem

Hi,

I recently purchased an HP Visualize 64-bit workstation in order to troubleshoot a problem concerning running our product on an HP 64-bit machine. I installed aCC and built the libraries with the +DA2.0W option. But when I went to link my test program against the libraries, I got the following error:

bash-2.05$ make
aCC writer.o Employee.o -o writer +DA2.0W -L../../lib -lasn1ber
/usr/ccs/bin/ld: Can't find library for -lstd
*** Error exit code 1

Is there anything else I need to specify to tell it where to find the standard libraries for 64-bit mode?

Any help would be most appreciated.
10 REPLIES 10
Deepak Extross
Honored Contributor

Re: aCC 64-bit link problem

Where is the library 'libstd' located on your machine?
You can search with:
find / -name libstd* 2>/dev/null

Once you locate it, explicitly tell the compiler to look into that directory with the -L flag. For example, if libstd is in /usr/lib, add a "-L/usr/lib" just after the "-L../../lib" that you already have.

Hope this helps.
Steve Steel
Honored Contributor

Re: aCC 64-bit link problem

Hi

Try adding
Patch Name: PHSS_24627

Patch Description: s700_800 11.X HP aC++ -AA runtime libraries (aCC A.03.33)

Creation Date: 01/09/06

Post Date: 01/10/18

Hardware Platforms - OS Releases:
s700: 11.00 11.10
s800: 11.00 11.10

To your system

Steve steel
If you want truly to understand something, try to change it. (Kurt Lewin)
Ed Day
Advisor

Re: aCC 64-bit link problem

Thank you for the suggestions. I first applied the patch and tried as before and got the same result. I then added -L/usr/lib to the command line and this produced a new error. It is as follows:

bash-2.05$ make
aCC writer.o Employee.o -o writer +DA2.0W -L/usr/lib -L../../lib -lasn1ber
/usr/ccs/bin/ld: Can't open /opt/langtools/lib/pa20_64/crt0.o
/usr/ccs/bin/ld: No such file or directory
*** Error exit code 1

Stop.

I looked in /opt/langtools/lib/pa20_64 and the crt0.o file was there, so I don't know what the linker is complaining about. Does anyone have any ideas on this?

Thanks,

Ed Day
Steven Gillard_2
Honored Contributor

Re: aCC 64-bit link problem

A couple more suggestions:

- Make sure the LPATH environment variable is not set. This variable overrides the linkers standard search path list which should include /usr/lib and /usr/ccs/lib (for 64 bit it will include the pa20_64 directories). Having this variable set incorrectly could cause these types of problems.

- Try compiling with the -v flag, this will give more information on where things may be going wrong.

Regards,
Steve
Ed Day
Advisor

Re: aCC 64-bit link problem

Hi Steve,

Thanks for this response. I did what you suggested. LPATH was not set. Compiling with -v produced a lot of verbose output (included below) and the same error. Upon closer examination, I found the crt0.o file in /opt/langtools/.. was actually a link to another area (usr/ccs/lib/pa20_64) and the file was in fact not there. The uname -m command indicates this machine is a 9000/780 which was sold to me as supporting the PA RISC 2.0 64-bit architecture. Is this not the case?

Thanks again,

Ed


Output from aCC -v:



aCC -o writer.o +DA2.0W -v -c -I. -I../../src -I../../../rtsrc writer.cpp
/opt/aCC/lbin/ctcom.pa20 -architecture 2.0W -I. -I../../src -I../../../rtsrc -piccode long -inst compiletime -diags 523 -D__HP_CXD_SPP=1 -D__hpux -D__unix -D__hppa -D__hp9000s800 -D__parisc -D__STDCPP__ -D_LP64 -D__HP_aCC=33300 -D__hp9000s700 -D_PA_RISC2_0 -D__LP64__ -I/opt/aCC/include -I/opt/aCC/include/iostream -I/usr/include -I/usr -inline_power 1 -longbranch 0 -unique_strings on -o writer.o -cachesize 256 writer.cpp
Warning (anachronism) 600: "writer.cpp", line 12 # Type specifier is omitted;
"int" is no longer assumed.
main (int argc, char** argv)
^^^^
aCC -o Employee.o +DA2.0W -v -c -I. -I../../src -I../../../rtsrc Employee.cpp
/opt/aCC/lbin/ctcom.pa20 -architecture 2.0W -I. -I../../src -I../../../rtsrc -piccode long -inst compiletime -diags 523 -D__HP_CXD_SPP=1 -D__hpux -D__unix -D__hppa -D__hp9000s800 -D__parisc -D__STDCPP__ -D_LP64 -D__HP_aCC=33300 -D__hp9000s700 -D_PA_RISC2_0 -D__LP64__ -I/opt/aCC/include -I/opt/aCC/include/iostream -I/usr/include -I/usr -inline_power 1 -longbranch 0 -unique_strings on -o Employee.o -cachesize 256 Employee.cpp
aCC writer.o Employee.o -o writer +DA2.0W -v -L/usr/lib -L../../lib -lasn1ber
LPATH=/usr/lib/pa20_64:/opt/langtools/lib/pa20_64
/usr/ccs/bin/ld -o writer /opt/langtools/lib/pa20_64/crt0.o -u___exit -umain -L/opt/aCC/lib/pa20_64 writer.o Employee.o -L /usr/lib -L ../../lib -lasn1ber -lstd -lstream -lCsup -lm -lcl -lc /usr/lib/pa20_64/libdld.sl >/var/tmp/AAAa02092 2>&1
/opt/aCC/bin/c++filt &2
/usr/ccs/bin/ld: Can't open /opt/langtools/lib/pa20_64/crt0.o
/usr/ccs/bin/ld: No such file or directory
removing /var/tmp/AAAa02092
*** Error exit code 1

Stop.
bash-2.05$ ls -l /opt/langtools/lib/pa20_64/crt0.o
lrwxr-xr-x 1 root sys 27 Mar 15 17:11 /opt/langtools/lib/pa20_64/crt0.o -> /usr/ccs/lib/pa20_64/crt0.o
bash-2.05$ ls -l /usr/ccs/lib/pa20_64
total 2
-r-xr-xr-x 1 bin bin 84 Sep 24 1999 plug-ins
bash-2.05$ uname -m
9000/780


Ed Day
Advisor

Re: aCC 64-bit link problem

P.S. I'm not quite sure how to read sched.models, but I see a 780 in the left column and 2.0 in the center (as well as PA8000 on the right). Is this the model I have and would I be correct in interpreting this as that it support the 2.0 architecture?

Steven Gillard_2
Honored Contributor
Solution

Re: aCC 64-bit link problem

All makes sense now - you must be running 32bit HPUX which means the 64bit libraries won't be installed. What does the following command return:

# getconf KERNEL_BITS

Your system does support 64bit HPUX, but it was probably just installed with the 32bit version. You're going to need to upgrade to the 64bit OS, which will probably involve a reinstall (it may be possible without but I've never done it this way - reinstall will be the cleanest method).

Regards,
Steve
Ed Day
Advisor

Re: aCC 64-bit link problem

Hi Steve,

It does in fact say 32. What do I need to do to update to the 64-bit O/S?

Thanks,

Ed

H.Merijn Brand (procura
Honored Contributor

Re: aCC 64-bit link problem

a5:/var/adm/sw 110 # swlist -l bundle | grep 64
HPUXEng64RT B.11.00 English HP-UX 64-bit Runtime Environment
a5:/var/adm/sw 111 #

Enjoy, Have FUN! H.Merijn
Steven Gillard_2
Honored Contributor

Re: aCC 64-bit link problem

The clean way is a complete re-install - you'll need to have a set of the 11.x CD's, copies of your codewords for any applications that you bought, and 2 good backups of your data. I would also recommend an ignite recovery tape so you can go back just in case, and its a good idea to take copies of your configuration files on to another system or PC where you have easy access (everything under /etc, LVM details, kernel parms). Then take a look at the installation guide:

http://docs.hp.com/hpux/onlinedocs/5971-0642/5971-0642.html

Having said this, there may be a procedure to upgrade to the 32bit version without a complete re-install. I've never done it but someone else on the forums may be able to help. You might want to try a search of the forums too.

Regards,
Steve