Operating System - Linux
1829887 Members
2402 Online
109993 Solutions
New Discussion

ld doesn't work with 64bit support in aCC 3.30 when SDKROOT set

 
SOLVED
Go to solution
Chanthu Nair
Occasional Advisor

ld doesn't work with 64bit support in aCC 3.30 when SDKROOT set

ld command exit with status 1 when SDKROOT set for 64 bit support in aCC 3.30 and not display any error message.

env | grep SDKROOT
SDKROOT=/opt/aCC.03.30
[77] % ld -b +s -o libicui18n.sl.18.1 ucnv_cnv.o
[78] % echo $status
1
Any idea about this kind of issue ?
16 REPLIES 16
Dennis Handly
Acclaimed Contributor

Re: ld doesn't work with 64bit support in aCC 3.30 when SDKROOT set

To set up a SDK you must have ALL of the tools under /opt/aCC.03.30/:
http://h21007.www2.hp.com/dspp/tech/tech_TechDocumentDetailPage_IDX/1,1701,2548,00.html

If you just want to use floating installation for aC++, you can just invoke:
/opt/aCC.03.30/opt/aCC/bin/aCC
Chanthu Nair
Occasional Advisor

Re: ld doesn't work with 64bit support in aCC 3.30 when SDKROOT set

All tools present under /opt/aCC.03.30

# cd /opt/aCC.03.30
# ls
opt usr
# cd opt
# ls
aCC ansic langtools
# cd a
# cd aCC
# ls
bin include include_std lbin lib
# pwd
/opt/aCC.03.30/opt/aCC
# cd /opt/aCC.03.30/usr
# ls
ccs include lib
# cd ccs
# ls
bin lbin lbin_bak lib

Is it correct or not ?
Dennis Handly
Acclaimed Contributor

Re: ld doesn't work with 64bit support in aCC 3.30 when SDKROOT set

>All tools present under /opt/aCC.03.30

I take it you have the WHOLE directory tree (or symlinks) for /usr/include/, /usr/lib/ and /usr/ccs/ under /opt/aCC.03.30/usr/?

You'll also have to have your libs and includes there and set TARGETROOT.

You should add -v to ld to see where it goes wrong. (Any reason you are using ld directly to build a shlib, instead of a driver?)
Chanthu Nair
Occasional Advisor

Re: ld doesn't work with 64bit support in aCC 3.30 when SDKROOT set

TARGETROOT is already set.
I tried with ld -a option, but no luck.
I think it cannot invoke the ld command itself.
The same sttings works fine for 32 bit.

The problem is that the ld cannot redirect to
/opt/aCC.03.30/usr/ccs/lbin/ld64.

Any Idea about how can I explicitly call ld64 through ld coomand.


Dennis Handly
Acclaimed Contributor

Re: ld doesn't work with 64bit support in aCC 3.30 when SDKROOT set

>I tried with ld -a option, but no luck.

Why -a? What happens with -v or -t?

>The problem is that the ld cannot redirect to /opt/aCC.03.30/usr/ccs/lbin/ld64.

That should happen automatically if ucnv_cnv.o is a 64 bit ELF file.

>Any idea about how can I explicitly call ld64 through ld command.

That is a contradiction in term. :-) To explicitly invoke ld64, you must do it yourself. As I said before try invoking the driver to create your shlib:
$ cc +DD64 -b -Wl,+s -o libicui18n.sl.18.1 ucnv_cnv.o

Have you set NLSPATH, to the wrong place?
Chanthu Nair
Occasional Advisor

Re: ld doesn't work with 64bit support in aCC 3.30 when SDKROOT set

[56] % cc +DD64 -b -Wl,+s -o libicui18n.sl.18.1 ucnv_cnv.o
[57] % echo $status
1

this driver usage is also not working.

[54] % ld -v -b +s -o libicuuc.sl.18.1 ucnv_cnv.o
[55] % echo $status
1

even -v option doesn,t give any message

The foolowing is the exicution of a 32 bit objct file

[64] % ld -v -b +s -o libicuuc.sl.18.1 ucnvscsu.o
/opt/aCC.03.30/usr/ccs/lbin/ld32 -v -b +s -o libicuuc.sl.18.1 ucnvscsu.o
LPATH is : /opt/aCC.03.30/opt/langtools/lib:/opt/aCC.03.30/usr/lib:/opt/aCC.03.30/usr/ccs/lib
Loading ucnvscsu.o:
/opt/aCC.03.30/usr/ccs/lbin/ld32: (Warning) At least one PA 2.0 object file (ucnvscsu.o) was detected. The linked output may not run on a PA 1.x system.
Searching library /usr/lib/milli.a:
Selecting dyncallU.o to resolve $$dyncall
referenced from ucnvscsu.o
Loading /usr/lib/milli.a(dyncallU.o):
Searching library /usr/lib/milli.a:
/opt/aCC.03.30/usr/ccs/lbin/ld32: Unsatisfied symbols:
memcpy (first referenced in ) (code)
free (first referenced in ) (code)
ucnv_updateCallbackOffsets (first referenced in ) (code)
ucnv_getNextUCharFromToUImpl (first referenced in ) (code)
malloc (first referenced in ) (code)
ucnv_cbFromUWriteBytes (first referenced in ) (code)
[65] % echo $status
0
Dennis Handly
Acclaimed Contributor

Re: ld doesn't work with 64bit support in aCC 3.30 when SDKROOT set

I see no evidence of SDK support until A.03.37.
Chanthu Nair
Occasional Advisor

Re: ld doesn't work with 64bit support in aCC 3.30 when SDKROOT set

Thank you very much for your valid informations

Chanthu Nair
Occasional Advisor

Re: ld doesn't work with 64bit support in aCC 3.30 when SDKROOT set

I have three installation of aCC. aCC 3.70, aCC 3.57 and aCC 3.30.

aCC 3.70 as my default installation.

If SDKROOT doesn't support, then how can I use aCC 3.30 installation.



Dennis Handly
Acclaimed Contributor
Solution

Re: ld doesn't work with 64bit support in aCC 3.30 when SDKROOT set

>If SDKROOT doesn't support, then how can I use aCC 3.30 installation?

The problem is in ld, not the compiler. You simply use the latest linker in all cases. Or a new enough ld that supports SDKROOT.

And A.03.30 does support floating installation.

You might want to use "tusc -fp -o tusc.out ld ..." to help you figure out why ld is getting an error but not printing any messages.
Chanthu Nair
Occasional Advisor

Re: ld doesn't work with 64bit support in aCC 3.30 when SDKROOT set

Attached here with the output of 'tusc -fp -o tusc.out ld -b +s -o libicuuc.sl.18.1 uresdata.o' for both aCC 3.30 64 bit and aCC 3.57 64 bit.

In aCC 3.57 it works fine, but in aCC 3.30 it recursivly call some commands and exit.

Could you please compare this two outputs ?
Dennis Handly
Acclaimed Contributor

Re: ld doesn't work with 64bit support in aCC 3.30 when SDKROOT set

>but in aCC 3.30 it recursively call some commands and exit.

As I said, the ld you have in /opt/aCC.03.30 doesn't support SDKROOT. You'll have to stop using SDKROOT with that version. Or you'll have to copy a newer ld into that path.

After all, ld should be upward compatible.

Looking at tusc shows it going from /usr/ccs/bin/ld to /opt/aCC.03.30/usr/ccs/bin/ld to /usr/ccs/lbin/ld64 to /opt/aCC.03.30/usr/ccs/bin/ld ...
Dennis Handly
Acclaimed Contributor

Re: ld doesn't work with 64bit support in aCC 3.30 when SDKROOT set

You haven't assigned any points yet. Please read the following:
http://forums1.itrc.hp.com/service/forums/helptips.do?#33

You should also close this thread if you don't have any more questions.
Dennis Handly
Acclaimed Contributor

Re: ld doesn't work with 64bit support in aCC 3.30 when SDKROOT set

None of my answers were useful to you? You don't want to be struck off do you? ;-)

You can always reopen it to assign points:
http://forums1.itrc.hp.com/service/forums/helptips.do?#41
Chanthu Nair
Occasional Advisor

Re: ld doesn't work with 64bit support in aCC 3.30 when SDKROOT set

Sorry ! Actually your informations are truely valid for me.

I assigned the points also.
Dennis Handly
Acclaimed Contributor

Re: ld doesn't work with 64bit support in aCC 3.30 when SDKROOT set

Thanks!
If you want to reach a perfect assignment score you can assign 0 points for the two responses telling you how the forums work.