- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Problem when compiling PA-RISC code on Itanium
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО12-12-2010 10:01 AM
тАО12-12-2010 10:01 AM
HPUX11.31 is supplied with PA-RISC libraries, so I assumed it would be simple.
hptest> gcc -v
Using built-in specs.
Target: hppa1.1-hp-hpux11.11
Configured with: /tmp/gcc-4.4.3.tar.gz/gcc-4.4.3/configure --host=hppa1.1-hp-hpux11.11 --target=hppa1.1-hp-hpux11.11 --build=hppa1.1-hp-hpux11.11 --prefix=/opt/hp-gcc-4.4.3 --with-gnu-as --without-gnu-ld --enable-threads=posix --enable-languages=c,c++ --with-gmp=/proj/opensrc/be/hppa1.1-hp-hpux11.11 --with-mpfr=/proj/opensrc/be/hppa1.1-hp-hpux11.11 SED=/usr/bin/sed
Thread model: posix
gcc version 4.4.3 (GCC)
My first attempt gave this (some paths shortened)
export LDOPTS="-v"
gcc -v -march=1.1 -I/myinc -L/mylibs mylib1.a prog.c
Using built-in specs.
Target: hppa1.1-hp-hpux11.11
Configured with: /tmp/gcc-4.4.3.tar.gz/gcc-4.4.3/configure --host=hppa1.1-hp-hpux11.11 --target=hppa1.1-hp-hpux11.11 --build=hppa1.1-hp-hpux11.11 --prefix=/opt/hp-gcc-4.4.3 --with-gnu-as --without-gnu-ld --enable-threads=posix --enable-languages=c,c++ --with-gmp=/proj/opensrc/be/hppa1.1-hp-hpux11.11 --with-mpfr=/proj/opensrc/be/hppa1.1-hp-hpux11.11 SED=/usr/bin/sed
Thread model: posix
gcc version 4.4.3 (GCC)
COLLECT_GCC_OPTIONS='-v' '-march=1.1' '-I/myinc' '-L/mylibs' '-mschedule=7100LC'
/opt/hp-gcc-4.4.3/libexec/gcc/hppa1.1-hp-hpux11.11/4.4.3/cc1 -quiet -v -I/myinc prog.c -quiet -dumpbase prog.c -march=1.1 -mschedule=7100LC -auxbase ex3 -version -o /var/tmp//ccFG1Yla.s
ignoring nonexistent directory "/opt/hp-gcc-4.4.3/hppa1.1-hp-hpux11.11/include"
#include "..." search starts here:
#include <...> search starts here:
/myinc
/usr/local/include
/opt/hp-gcc-4.4.3/include
/opt/hp-gcc-4.4.3/lib/gcc/hppa1.1-hp-hpux11.11/4.4.3/include
/opt/hp-gcc-4.4.3/lib/gcc/hppa1.1-hp-hpux11.11/4.4.3/include-fixed
/usr/include
End of search list.
GNU C (GCC) version 4.4.3 (hppa1.1-hp-hpux11.11)
compiled by GNU C version 4.4.3, GMP version 4.2.4, MPFR version 2.4.1.
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
Compiler executable checksum: cf6b82a9c6a4c8b4c5c83f9910f85797
COLLECT_GCC_OPTIONS='-v' '-march=1.1' '-I/myinc' '-mschedule=7100LC'
/opt/hp-gcc-4.4.3/hppa1.1-hp-hpux11.11/bin/as -v -I/myinc -o /var/tmp//cceSogXF.o /var/tmp//ccFG1Yla.s
GNU assembler version 2.20 (hppa1.1-hp-hpux11.11) using BFD version (GNU Binutils) 2.20
COMPILER_PATH=/opt/hp-gcc-4.4.3/libexec/gcc/hppa1.1-hp-hpux11.11/4.4.3/:/opt/hp-gcc-4.4.3/libexec/gcc/hppa1.1-hp-hpux11.11/4.4.3/:/opt/hp-gcc-4.4.3/libexec/gcc/hppa1.1-hp-hpux11.11/:/opt/hp-gcc-4.4.3/lib/gcc/hppa1.1-hp-hpux11.11/4.4.3/:/opt/hp-gcc-4.4.3/lib/gcc/hppa1.1-hp-hpux11.11/:/opt/hp-gcc-4.4.3/hppa1.1-hp-hpux11.11/bin/:/usr/ccs/bin/
LIBRARY_PATH=/opt/hp-gcc-4.4.3/lib/gcc/hppa1.1-hp-hpux11.11/4.4.3/:/usr/ccs/lib/:/opt/langtools/lib/:/opt/hp-gcc-4.4.3/lib/:/lib/:/usr/lib/
COLLECT_GCC_OPTIONS='-v' '-march=1.1' '-I/myinc' '-L/mylibs' '-mschedule=7100LC'
/opt/hp-gcc-4.4.3/libexec/gcc/hppa1.1-hp-hpux11.11/4.4.3/collect2 -z -u main -u __gcc_plt_call crt0.o unix98.o -L/mylibs -L/opt/hp-gcc-4.4.3/lib/gcc/hppa1.1-hp-hpux11.11/4.4.3 -L/usr/ccs/lib -L/opt/langtools/lib -L/opt/hp-gcc-4.4.3/lib mylib1.a /var/tmp//cceSogXF.o -lgcc -lgcc_eh -lc -lgcc -lgcc_eh
ld: Mismatched ABI (not an ELF file) for -lgcc, found /opt/hp-gcc-4.4.3/lib/gcc/hppa1.1-hp-hpux11.11/4.4.3/libgcc.a
Fatal error.
collect2: ld returned 1 exit status
Obviously ctr0.o (the first object file) force the linker to use ELF (Itanium format). Second attempt to use ctr0.o from a different directory. I used SDKROOT (thanks to Dennis).
Here's the result (shortened):
export LDOPTS="-v"
export SDKROOT=/usr/ccs/pa
gcc -v -march=1.1 -I/myinc -L/mylibs mylib1.a prog.c
/usr/ccs/pa/usr/ccs/lbin/ld32 -v -z -u main -u __gcc_plt_call crt0.o unix98.o -Lmylibs -L/opt/hp-gcc-4.4.3/lib/gcc/hppa1.1-hp-hpux11.11/4.4.3 -L/usr/ccs/lib -L/opt/langtools/lib -L/opt/hp-gcc-4.4.3/lib lib1.a /var/tmp//ccQfvieL.o -lgcc -lgcc_eh -lc -lgcc -lgcc_eh
LPATH is : /usr/lib:/opt/langtools/lib
/usr/ccs/pa/usr/ccs/lbin/ld32: Can't open crt0.o
/usr/ccs/pa/usr/ccs/lbin/ld32: No such file or directory
collect2: ld returned 1 exit status
Here's the result of next attempt:
export LPATH=/usr/ccs/pa/usr/ccs/lib:/usr/lib:/opt/langtools/lib
export LDOPTS="-v"
export SDKROOT=/usr/ccs/pa
gcc -v -march=1.1 -I/myinc -L/mylibs mylib1.a prog.c
/usr/ccs/pa/usr/ccs/lbin/ld32 -v -z -u main -u __gcc_plt_call /usr/ccs/pa/usr/ccs/lib/crt0.o unix98.o -L/mylibs -L/usr/ccs/pa/usr/ccs/lib -L/opt/langtools/lib -L/opt/hp-gcc-4.4.3/lib/gcc/hppa1.1-hp-hpux11.11/4.4.3 -L/usr/ccs/lib -L/opt/langtools/lib -L/opt/hp-gcc-4.4.3/lib mylib1.a /var/tmp//cconAqDU.o -lgcc -lgcc_eh -lc -lgcc -lgcc_eh
LPATH is : /usr/ccs/pa/usr/ccs/lib:/usr/lib:/opt/langtools/lib
Loading /usr/ccs/pa/usr/ccs/lib/crt0.o:
/usr/ccs/pa/usr/ccs/lbin/ld32: Can't open unix98.o
/usr/ccs/pa/usr/ccs/lbin/ld32: No such file or directory
collect2: ld returned 1 exit status
ctr0.o is now OK but unix98.o is not and there is no unix98 file for PA-RISC.
Any suggestion will be appreciated.
Sorry for the long post.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО12-12-2010 11:28 AM
тАО12-12-2010 11:28 AM
SolutionThis is only supported using HP's compilers and only if you are running on Integrity.
http://www.hp.com/go/xpade
>is supplied with PA-RISC libraries, so I assumed it would be simple.
No, these shlibs are there only for running applications, not development.
>crt0.o unix98.o
These would need to be absolute paths.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО12-12-2010 12:55 PM
тАО12-12-2010 12:55 PM
Re: Problem when compiling PA-RISC code on Itanium
>This is only supported using HP's compilers and only if you are running on Integrity.
>http://www.hp.com/go/xpade
If you look at my original post, gcc worked fine and gcc is using the HP linker.
>>crt0.o unix98.o
>These would need to be absolute paths.
There is no PA-RISC version of unix98.o
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО12-12-2010 08:03 PM
тАО12-12-2010 08:03 PM
Re: Problem when compiling PA-RISC code on Itanium
As Dennis suggested, what you are trying to accomplish is supported using HP XPADE (PA-RISC cross development environment for Integrity). XPADE provides PA-RISC header files, libraries and special object files e.g. crt0.o, unix*.o suitable for PA-RISC code compilation and linking on Integrity.
unix95.o is present in XPADE (/opt/XPADE/v3/usr/lib/unix95.o)
Regards
-Rajesh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО12-13-2010 06:22 PM
тАО12-13-2010 06:22 PM
Re: Problem when compiling PA-RISC code on Itanium
gcc didn't work fine because you have linker errors. gcc includes the link step.
>There is no PA-RISC version of unix98.o
That's correct. An absolute path to where you copied them.
>Rajesh: The compiled code would have used Integrity native header files from /usr/include. Even if the code compiles, it may not work fine depending on structure layout and size differences between PA-RISC and Integrity HP-UX.
Ideally the headers are the same between the two but with #if.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-03-2011 07:44 AM
тАО01-03-2011 07:44 AM
Re: Problem when compiling PA-RISC code on Itanium
XPADE is the solution and it works fine.