public inbox for gcc-prs@sourceware.org help / color / mirror / Atom feed
From: dave.anglin@nrc.ca To: gcc-gnats@gcc.gnu.org Subject: objc/2902: collect2 doesn't find ctors/dtors in shared libraries under hpux10.20 Date: Tue, 22 May 2001 11:46:00 -0000 [thread overview] Message-ID: <20010522184444.25021.qmail@sourceware.cygnus.com> (raw) >Number: 2902 >Category: objc >Synopsis: collect2 doesn't find ctors/dtors in shared libraries under hpux10.20 >Confidential: no >Severity: serious >Priority: medium >Responsible: unassigned >State: open >Class: sw-bug >Submitter-Id: net >Arrival-Date: Tue May 22 11:46:00 PDT 2001 >Closed-Date: >Last-Modified: >Originator: Dave Anglin >Release: gcc version 3.0 20010518 (prerelease) >Organization: >Environment: # ../../gcc/configure --host=hppa1.1-hp-hpux10.20 --target=hppa1.1-hp-hpux10.20 --srcdir=../../gcc --with-gcc-version-trigger=/xxx/gnu/gcc-3.0/gcc/version.c --with-gnu-as --enable-shared --enable-threads --enable-debug=no >Description: The symptom is a large number of failures in the testsuite with the following error: Executing on host: /xxx/gnu/gcc-3.0/objdir/gcc/xgcc -B/xxx/gnu/gcc-3.0/objdir/gcc/ /xxx/gnu/gcc-3.0/gcc/testsuite/objc/execute/_cmd.m -w -O -I/xxx/gnu/gcc-3.0/gcc/testsuite/../../libobjc -L/xxx/gnu/gcc-3.0/objdir/hppa1.1-hp-hpux10.20/libobjc/.libs -lobjc -lm -fPIC -o /xxx/gnu/gcc-3.0/objdir/gcc/testsuite/_cmd.x (timeout = 300) PASS: objc/execute/_cmd.m compilation, -O objc runtime: cannot find class Object FAIL: objc/execute/_cmd.m execution, -O In debugging this, I found that the constructors to build the classes Object and NXConstantString don't run when the application is linked with a shared libobjc. This is apparently because collect2 can't determine that these constructors are needed. Here is part of the output generated by collect2 with `-debug' linking _cmd.x: /usr/ccs/bin/ld -L/lib/pa1.1 -L/usr/lib/pa1.1 -z -u main -o /xxx/gnu/gcc-3.0/objdir/gcc/testsuite/_cmd.x /usr/ccs/lib/crt0.o -L/xxx/gnu/gcc-3.0/objdir/hppa1.1-hp-hpux10.20/libobjc/.libs -L/xxx/gnu/gcc-3.0/objdir/gcc -L/usr/local/lib/gcc-lib/hppa1.1-hp-hpux10.20/3.0 -L/usr/ccs/bin -L/usr/ccs/lib -L/opt/langtools/lib -L/usr/local/lib/gcc-lib/hppa1.1-hp-hpux10.20/3.0/../../.. /var/tmp/ccapeMug.o -lobjc -lm -lgcc -lc -lgcc /usr/local/lib/gcc-lib/hppa1.1-hp-hpux10.20/3.0/../../../../hppa1.1-hp-hpux10.20/bin/nm -n /xxx/gnu/gcc-3.0/objdir/gcc/testsuite/_cmd.x nm output with constructors/destructors. 000025e8 T _GLOBAL__I_main /usr/ccs/bin/chatr /xxx/gnu/gcc-3.0/objdir/gcc/testsuite/_cmd.x ldd output with constructors/destructors. dynamic /xxx/gnu/gcc-3.0/objdir/hppa1.1-hp-hpux10.20/libobjc/.libs/libobjc.sl.1 dynamic /usr/lib/libc.1 /usr/local/lib/gcc-lib/hppa1.1-hp-hpux10.20/3.0/../../../../hppa1.1-hp-hpux10.20/bin/nm -n /xxx/gnu/gcc-3.0/objdir/hppa1.1-hp-hpux10.20/libobjc/.libs/libobjc.sl.1 nm output with constructors/destructors. 00017aa0 T _GLOBAL__I___objc_linking 00017ad0 T _GLOBAL__I___objc_linking 00018210 T _GLOBAL__I_.._.._.._libobjc_NXConstStr.mSFndDa 00018228 T _GLOBAL__I_.._.._.._libobjc_NXConstStr.mSFndDa 0001a1e0 T _GLOBAL__I_.._.._.._libobjc_Object.mOXKa8a 0001a1f8 T _GLOBAL__I_.._.._.._libobjc_Object.mOXKa8a 0001b058 T _GLOBAL__I_.._.._.._libobjc_Protocol.mxvicuc 0001b070 T _GLOBAL__I_.._.._.._libobjc_Protocol.mxvicuc /usr/local/lib/gcc-lib/hppa1.1-hp-hpux10.20/3.0/../../../../hppa1.1-hp-hpux10.2 0/bin/nm -n /usr/lib/libc.1 nm output with constructors/destructors. 1 constructor(s) found 0 destructor(s) found 0 frame table(s) found [Leaving /xxx/gnu/gcc-3.0/objdir/gcc/testsuite/_cmd.x] >How-To-Repeat: Configure with `--enable-shared'. >Fix: >Release-Note: >Audit-Trail: >Unformatted:
next reply other threads:[~2001-05-22 11:46 UTC|newest] Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top 2001-05-22 11:46 dave.anglin [this message] 2001-06-13 8:46 law 2002-01-04 22:33 rodrigc 2002-01-04 22:46 John David Anglin 2002-01-04 22:51 rodrigc
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20010522184444.25021.qmail@sourceware.cygnus.com \ --to=dave.anglin@nrc.ca \ --cc=gcc-gnats@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
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).