public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
* g++ refuses linking on HPUX with HP ld(32bit)
@ 2006-02-10  7:13 ritesh bahuguna
  0 siblings, 0 replies; 3+ messages in thread
From: ritesh bahuguna @ 2006-02-10  7:13 UTC (permalink / raw)
  To: gcc-help

hi
 
i hav some problems while linking with HP ld. I use
the following configuration:
gcc version 3.3.2
configured with: ./configure --prefix=/gis/lincvs

now i tried 2 compile then the errors comes:

Creating qmake. Please wait...
        g++ -o
/space/lincvs/qt-x11-opensource-src-4.1.0/bin/qmake
project.o prperty.o main.o makefile.o unixmake2.o
unixmake.o   mingw_make.o option.o winmakfile.o
projectgenerator.o  meta.o qtmd5.o makefiledeps.o
metamakefile.o xmloutpt.o pbuilder_pbx.o   qchar.o
qstring.o qstringmatcher.o qtextstream.o qiodeviceo
qglobal.o  qbytearray.o qbytearraymatcher.o
qdatastream.o qbuffer.o qlistdatao qfile.o 
qfsfileengine_unix.o qfsfileengine.o qregexp.o
qvector.o qbitarray.oqdir.o quuid.o qhash.o 
qfileinfo.o qdatetime.o qstringlist.o
qabstractfileengie.o qtemporaryfile.o  qmap.o
qunicodetables.o qmetatype.o qsettings.o qvariant.
qvsnprintf.o  qlocale.o qlinkedlist.o qurl.o  -Wl,+s
/usr/ccs/bin/ld: Unrecognized argument: +init
/usr/ccs/bin/ld: Usage:  /usr/ccs/bin/ld flags...
files...
collect2: ld returned 1 exit status
*** Error exit code 1

Stop.


how i debug this error?

__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: g++ refuses linking on HPUX with HP ld (32bit)
@ 2004-04-07  3:52 John David Anglin
  0 siblings, 0 replies; 3+ messages in thread
From: John David Anglin @ 2004-04-07  3:52 UTC (permalink / raw)
  To: gcc-help, reto.strahl

> $ g++ -fPIC -shared -fno-gnu-linker  -o libtrbg.sl trbg.o
> /usr/ccs/bin/ld: Unrecognized argument: +init

Suggest that you apply the latest HP linker patch.  +init is definitely
a supported linker option under HP-UX 11.  As well as +init/+fini,
there are other reasons to update your linker.  This is documented
in the installation notes for HP-UX 11.

You can't turn off +init/+fini except by hacking the pa backend.
If you do, constructors/destructors won't work.  If you go back
to the old technique used with HP-UX 10, you will find that constructors
and destructors for dynamically loaded libraries don't run.

Dave
-- 
J. David Anglin                                  dave.anglin@nrc-cnrc.gc.ca
National Research Council of Canada              (613) 990-0752 (FAX: 952-6602)

^ permalink raw reply	[flat|nested] 3+ messages in thread

* g++ refuses linking on HPUX with HP ld (32bit)
@ 2004-03-04  9:55 reto strahl
  0 siblings, 0 replies; 3+ messages in thread
From: reto strahl @ 2004-03-04  9:55 UTC (permalink / raw)
  To: gcc-help

Hi
 
I have some problems while linking with HP ld. I use the follwoing g++ configuration:
 
Reading specs from /usr/local/lib/gcc-lib/hppa2.0w-hp-hpux11.11/3.3.2/specs
Configured with: /scratch/root/gcc-pkg/3.3.1/hpux-11/gcc-3.3.2/configure --enable-languages=c,c++ --enable-threads=posix --disable-nls --with-gnu-as --without-gnu-ld --with-as=/usr/local/bin/as --prefix=/usr/local
Thread model: posix
gcc version 3.3.2

 
Now I tried to compile and link a shared lib:
 
        $ g++ -fPIC -c -D _INCLUDE_HPUX_SOURCE -I. -I../../include -fno-gnu-linker  trbg.cpp
In file included from trbg.cpp:1:
trbg.h:72: warning: all member functions in class `CTRbg' are private
        $ g++ -fPIC -shared -fno-gnu-linker  -o libtrbg.sl trbg.o
/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.

Collect2 is producing some extra code and generates +init linker args. +init is not supported by the 32 bit HP linker. Why is collect2 producing extra code? Can I turn the +init arg off? How can I turn it off?
 
Mit freundlichen Grüßen
Reto Strahl


____________________________________________________________
This message may contain legally privileged or confidential 
information and is therefore addressed to the named persons only. 
The recipient should inform the sender and delete this message, 
if he/she is not named as addressee. 
The sender disclaims any and all liability for the integrity 
and punctuality of this message. 
The sender has activated an automatic virus scanning by 
Messagelabs, but does not guarantee the virus free 
transmission of this message.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2006-02-10  7:13 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-02-10  7:13 g++ refuses linking on HPUX with HP ld(32bit) ritesh bahuguna
  -- strict thread matches above, loose matches on Subject: below --
2004-04-07  3:52 g++ refuses linking on HPUX with HP ld (32bit) John David Anglin
2004-03-04  9:55 reto strahl

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).