Operating System - HP-UX
1748199 Members
2567 Online
108759 Solutions
New Discussion юеВ

Re: collect2: ld returned 1 exit status

 
cool dude_1
New Member

collect2: ld returned 1 exit status

hi all,

we have a itanium processer and i have installed the gcc 3.3.2 for pa-risc processor. I have installed the gcc into a temp folder. Now i want to compile a sample c program

#include
main ()
{
printf ("Test prog C");
}

When i do that i am getting the following error.

collect2: ld returned 1 exit status

any help is appreciated.
8 REPLIES 8
Dennis Handly
Acclaimed Contributor

Re: collect2: ld returned 1 exit status

>we have a Itanium processor and I have installed the gcc 3.3.2 for PA-RISC processor.

Why? You should be using the gcc for Itanium.
Pnaidu
Frequent Advisor

Re: collect2: ld returned 1 exit status

Hi,

Please download and install gcc binaries for itanium architecture.

I doubt if gcc for PA-RISC will on itanium machine.

Thanks,
cool dude_1
New Member

Re: collect2: ld returned 1 exit status

its something like this, we are going to support our product for pa-risc. But we have a itanium processor. so is the reason i have installed the gcc for pa-risc. When i used the ld file that is present with the itanium the actual error was

ld: Mismatched ABI (not an ELF file) for -lgcc, found /pa-risc-gcc332/usr/local/lib/gcc-lib/hppa2.0n-hp-hpux11.00/3.3.2/libgcc.a
Fatal error.
collect2: ld returned 1 exit status

then i have replace the ld file with that of the pa-risc ld file. then i am facing the mentioned problem. The thing is it doesnt give any clue other than "collect2: ld returned 1 exit status".

thanks in advance
inukoti
Frequent Advisor

Re: collect2: ld returned 1 exit status

Install the ACXX from HPUX CD if you wan to use gcc for IA please only use itanium specific . if you want to run PA RISC executables in Itanium , use Aries .
cool dude_1
New Member

Re: collect2: ld returned 1 exit status

Thanks for the quick reply inukoti, but i have some doubts

"Install the ACXX from HPUX CD if you wan to use gcc for IA please only use itanium specific . if you want to run PA RISC executables in Itanium , use Aries"

what do you mean by "IA" and can you please give some more information about this Aries like where can i get that and what actually does that do (i mean just a bit more information).

Does that mean i can use the gcc for the pa-risc on itanium also? if not what can i do further?
Andre-Marcel Hellmund
Frequent Advisor

Re: collect2: ld returned 1 exit status

Hey,

Aries is a binary translator for PA-RISC applications on Itanium. Detailed information about ARIES: http://h21007.www2.hp.com/portal/site/dspp/menuitem.863c3e4cbcdc3f3515b49c108973a801/?ciid=0208713ba4f02110713ba4f02110275d6e10RCRD

In the context of Aries, you could also have a look at XPADE which allows you to cross-develop PA-RISC applications on Itanium: http://h21007.www2.hp.com/portal/site/dspp/menuitem.863c3e4cbcdc3f3515b49c108973a801?ciid=babe0bfb7d779110VgnVCM100000275d6e10RCRD

Best regards,
Andi
Dennis Handly
Acclaimed Contributor

Re: collect2: ld returned 1 exit status

>we are going to support our product for PA. When I used the ld file that is present with the Integrity the actual error was
ld: Mismatched ABI (not an ELF file) for -lgcc

>then I replaced the ld file with that of the PA ld file.
>it doesn't give any clue other than "collect2: ld returned 1 exit status".

You can't just do that. You must use:
SDKROOT=/usr/ccs/bin gcc ...

Or tell gcc to replace your IPF ld by a wrapper ld that does:
#!/usr/bin/ksh
export SDKROOT=/usr/ccs/bin
exec $SDKROOT/usr/ccs/bin/ld "$@"

>inukoti: Install the ACXX from HP-UX CD if you wan to use gcc for IA

I'm not sure of the connection? GNU isn't aC++.

>Andi: you could also have a look at XPADE

This requires a aC++ license and isn't GNU.
Dennis Handly
Acclaimed Contributor

Re: collect2: ld returned 1 exit status

Oops typos above:
You can't just do that. You must use:
SDKROOT=/usr/ccs/pa gcc ...

Or tell gcc to replace your IPF ld by a wrapper ld that does:
#!/usr/bin/ksh
export SDKROOT=/usr/ccs/pa
exec $SDKROOT/usr/ccs/bin/ld "$@"