Operating System - HP-UX
1833043 Members
2851 Online
110049 Solutions
New Discussion

Re: buggy linker /usr/ccs/bin/ld ?!!?

 
SOLVED
Go to solution
ivan petkov
Occasional Advisor

buggy linker /usr/ccs/bin/ld ?!!?

When I tried to compile something ot the last final stage it fails. (openssl in this case)
/usr/ccs/bin/ld: (Warning) At least one PA 2.0 object file (openssl.o) was detected. The linked output may not run on a PA 1.x system.
/usr/ccs/bin/ld: Unrecognized argument: +init
/usr/ccs/bin/ld: Usage: /usr/ccs/bin/ld [options] [flags] files
collect2: ld returned 1 exit status

bash-3.2# uname -mrsv
HP-UX B.11.11 U 9000/785
bash-3.2#


bash-3.2# gcc --version
gcc (GCC) 4.1.1



I tried some patches released by HP , but there are so many and each time I applied the patch I recieved Abort trap(core dump) when trying to compile something.
May be I'm not using the correct patch or something like this.
Thank you in advance!
7 REPLIES 7
Peter Nikitka
Honored Contributor

Re: buggy linker /usr/ccs/bin/ld ?!!?

Hi,

please provide the command line that produces this message.

BTW, the warning about PA2.0 and PA1.1 is neary self explanatory: one single object file in PA2.0 format will disable the runnability of the final executable on a PA1.1 box.

mfG Peter
The Universe is a pretty big place, it's bigger than anything anyone has ever dreamed of before. So if it's just us, seems like an awful waste of space, right? Jodie Foster in "Contact"
ivan petkov
Occasional Advisor

Re: buggy linker /usr/ccs/bin/ld ?!!?

Here is the example with compiling tiff:

gcc -g -O2 -Wall -o .libs/raw2tiff raw2tiff.o ../libtiff/.libs/libtiff.sl ../port/.libs/libport.a -lz -lm -lc -Wl,+b -Wl,/usr/install/tiff-3.7.4/libtiff/.libs:/usr/local/lib
/usr/ccs/bin/ld: (Warning) At least one PA 2.0 object file (raw2tiff.o) was detected. The linked output may not run on a PA 1.x system.
/usr/ccs/bin/ld: Unrecognized argument: +init
/usr/ccs/bin/ld: Usage: /usr/ccs/bin/ld [options] [flags] files
collect2: ld returned 1 exit status
*** Error exit code 1

Stop.
*** Error exit code 1
D Block 2
Respected Contributor

Re: buggy linker /usr/ccs/bin/ld ?!!?

The +init flag is not valid to the "ld" command:
/usr/ccs/bin/ld +init


Also, change the "." for the output to a valid path full path file name:

-o .libs/raw2tiff

change this to:

-o ./libs/raw2tiff

do you really want this raw2tiff file to be the -o [output file] ?
Golf is a Good Walk Spoiled, Mark Twain.
Dennis Handly
Acclaimed Contributor

Re: buggy linker /usr/ccs/bin/ld ?!!?

/usr/ccs/bin/ld: Unrecognized argument: +init

This means you are using an obsolete linker, what version of ld do you have? The patch PHSS_33035 should have that old feature. PHSS_35379 is the latest patch.

ivan petkov
Occasional Advisor

Re: buggy linker /usr/ccs/bin/ld ?!!?

After installing the latest or any earlier patch... the gcc return core dump when I'm trying to compile something.
======= 11/15/06 01:29:10 EET BEGIN swinstall SESSION
(non-interactive) (jobid=hpux-0037)

* Session started for user "root@hpux".

* Beginning Selection
* Target connection succeeded for "hpux:/".
NOTE: One or more patch filesets were automatically selected or
deselected to maintain patch integrity. Please refer to the
swinstall.log logfile for details.
* Source: /tmp/PHSS_35379.depot
* Targets: hpux:/
* Software selections:
+ PHSS_35379.C-ENG-A-MAN,l=/,r=1.0,a=HP-UX_B.11.11_32/64,v=HP,fr=1.0, fa=HP-UX_B.11.11_32/64
+ PHSS_35379.C-INC,l=/,r=1.0,a=HP-UX_B.11.11_32/64,v=HP,fr=1.0,fa=HP- UX_B.11.11_32/64
PHSS_35379.C-KRN,l=/,r=1.0,a=HP-UX_B.11.11_32/64,v=HP,fr=1.0,fa=HP- UX_B.11.11_32/64
+ PHSS_35379.C-MIN,l=/,r=1.0,a=HP-UX_B.11.11_32/64,v=HP,fr=1.0,fa=HP- UX_B.11.11_32/64
+ PHSS_35379.C-MIN-64ALIB,l=/,r=1.0,a=HP-UX_B.11.11_32/64,v=HP,fr=1.0 ,fa=HP-UX_B.11.11_32/64
+ PHSS_35379.CAUX-ENG-A-MAN,l=/,r=1.0,a=HP-UX_B.11.11_32/64,v=HP,fr=1 .0,fa=HP-UX_B.11.11_32/64
+ PHSS_35379.CMDS-AUX,l=/,r=1.0,a=HP-UX_B.11.11_32/64,v=HP,fr=1.0,f
+ PHSS_35379.CORE-64SLIB,l=/,r=1.0,a=HP-UX_B.11.11_32/64,v=HP,fr=1.0, fa=HP-UX_B.11.11_32/64
+ PHSS_35379.CORE-SHLIBS,l=/,r=1.0,a=HP-UX_B.11.11_32/64,v=HP,fr=1.0, fa=HP-UX_B.11.11_32/64
+ PHSS_35379.LANG-MIN,l=/,r=1.0,a=HP-UX_B.11.11_32/64,v=HP,fr=1.0,fa= HP-UX_B.11.11_32/64
+ PHSS_35379.LINKER-HELP,l=/,r=1.0,a=HP-UX_B.11.11_32/64,v=HP,fr=1.0, fa=HP-UX_B.11.11_32/64
+ PHSS_35379.PAUX-ENG-A-MAN,l=/,r=1.0,a=HP-UX_B.11.11_32/64,v=HP,fr=1 .0,fa=HP-UX_B.11.11_32/64
+ PHSS_35379.PROG-AUX,l=/,r=1.0,a=HP-UX_B.11.11_32/64,v=HP,fr=1.0,fa= HP-UX_B.11.11_32/64
+ PHSS_35379.PROG-AX-64ALIB,l=/,r=1.0,a=HP-UX_B.11.11_32/64,v=HP,fr=1 .0,fa=HP-UX_B.11.11_32/64
+ PHSS_35379.UX-FRE-I-MSG,l=/,r=1.0,a=HP-UX_B.11.11_32/64,v=HP,fr=1.0 ,fa=HP-UX_B.11.11_32/64
+ PHSS_35379.UX-FRE-U-MSG,l=/,r=1.0,a=HP-UX_B.11.11_32/64,v=HP,fr=1.0 ,fa=HP-UX_B.11.11_32/64
+ PHSS_35379.UX-GER-I-MSG,l=/,r=1.0,a=HP-UX_B.11.11_32/64,v=HP,fr=1.0 ,fa=HP-UX_B.11.11_32/64
+ PHSS_35379.UX-GER-U-MSG,l=/,r=1.0,a=HP-UX_B.11.11_32/64,v=HP,fr=1.0 ,fa=HP-UX_B.11.11_32/64
+ PHSS_35379.UX-ITA-I-MSG,l=/,r=1.0,a=HP-UX_B.11.11_32/64,v=HP,fr=1.0 ,fa=HP-UX_B.11.11_32/64
+ PHSS_35379.UX-ITA-U-MSG,l=/,r=1.0,a=HP-UX_B.11.11_32/64,v=HP,fr=1.0 ,fa=HP-UX_B.11.11_32/64
+ PHSS_35379.UX-JPN-E-MSG,l=/,r=1.0,a=HP-UX_B.11.11_32/64,v=HP,fr=1.0 ,fa=HP-UX_B.11.11_32/64
+ PHSS_35379.UX-JPN-S-MSG,l=/,r=1.0,a=HP-UX_B.11.11_32/64,v=HP,fr=1.0 ,fa=HP-UX_B.11.11_32/64
+ PHSS_35379.UX-JPN-U-MSG,l=/,r=1.0,a=HP-UX_B.11.11_32/64,v=HP,fr=1.0 ,fa=HP-UX_B.11.11_32/64
+ PHSS_35379.UX-KOR-E-MSG,l=/,r=1.0,a=HP-UX_B.11.11_32/64,v=HP,fr=1.0 ,fa=HP-UX_B.11.11_32/64
+ PHSS_35379.UX-KOR-U-MSG,l=/,r=1.0,a=HP-UX_B.11.11_32/64,v=HP,fr=1.0 ,fa=HP-UX_B.11.11_32/64
+ PHSS_35379.UX-SCH-H-MSG,l=/,r=1.0,a=HP-UX_B.11.11_32/64,v=HP,fr=1.0 ,fa=HP-UX_B.11.11_32/64
+ PHSS_35379.UX-SCH-U-MSG,l=/,r=1.0,a=HP-UX_B.11.11_32/64,v=HP,fr=1.0 ,fa=HP-UX_B.11.11_32/64
+ PHSS_35379.UX-SPA-I-MSG,l=/,r=1.0,a=HP-UX_B.11.11_32/64,v=HP,fr=1.0 ,fa=HP-UX_B.11.11_32/64
+ PHSS_35379.UX-SPA-U-MSG,l=/,r=1.0,a=HP-UX_B.11.11_32/64,v=HP,fr=1.0 ,fa=HP-UX_B.11.11_32/64
+ PHSS_35379.UX-TCH-B-MSG,l=/,r=1.0,a=HP-UX_B.11.11_32/64,v=HP,fr=1.0 ,fa=HP-UX_B.11.11_32/64
+ PHSS_35379.UX-TCH-E-MSG,l=/,r=1.0,a=HP-UX_B.11.11_32/64,v=HP,fr=1.0 ,fa=HP-UX_B.11.11_32/64
+ PHSS_35379.UX-TCH-U-MSG,l=/,r=1.0,a=HP-UX_B.11.11_32/64,v=HP,fr=1.0 ,fa=HP-UX_B.11.11_32/64
* A "+" indicates an automatic selection due to dependency or
the automatic selection of a patch or reference bundle.
* Selection succeeded.


* Beginning Analysis and Execution
* Session selections have been saved in the file
"/.sw/sessions/swinstall.last".
* The analysis phase succeeded for "hpux:/".
* The execution phase succeeded for "hpux:/".
* Analysis and Execution succeeded.


NOTE: More information may be found in the agent logfile using the
command "swjob -a log hpux-0037 @ hpux:/".

======= 11/15/06 01:30:13 EET END swinstall SESSION (non-interactive)
(jobid=hpux-0037)

bash-3.2# /usr/local/bin/gcc -o asd a.c
/usr/lib/dld.sl: Unresolved symbol: pthread_mutex_lock (code) from /usr/local/libexec/gcc/hppa2.0w-hp-hpux11.11/4.1.1/cc1
gcc: Internal error: Aborted (program cc1)
Please submit a full bug report.
See <> for instructions.
bash-3.2#

Dennis Handly
Acclaimed Contributor
Solution

Re: buggy linker /usr/ccs/bin/ld ?!!?

>the gcc return core dump
/usr/lib/dld.sl: Unresolved symbol: pthread_mutex_lock .../hppa2.0w-hp-hpux11.11/4.1.1/cc1

(I swear I answered that this week. It must have been in some news group.)

The short answer is I don't know why cc1 needs threading but one solution is to get the latest libc patch that contains pthread_* stubs:
PHCO_34275
ivan petkov
Occasional Advisor

Re: buggy linker /usr/ccs/bin/ld ?!!?

Denis thank you very much , this patch just fix all my problems!