public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/32830]  New: shared library create by hppa64-hp11.11 can't run.
@ 2007-07-20  1:30 cnstar9988 at gmail dot com
  2007-07-20  4:24 ` [Bug target/32830] " pinskia at gcc dot gnu dot org
                   ` (9 more replies)
  0 siblings, 10 replies; 11+ messages in thread
From: cnstar9988 at gmail dot com @ 2007-07-20  1:30 UTC (permalink / raw)
  To: gcc-bugs

shared library create by hppa64-hp11.11 can't run.

work ok on gcc-3.4.6,buit failed on gcc4.1.2/4.2.1.

some symbol required by the shared library could not be found.


-- 
           Summary: shared library create by hppa64-hp11.11 can't run.
           Product: gcc
           Version: 4.2.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: cnstar9988 at gmail dot com
 GCC build triplet: hppa64-hp-hpux11.11
  GCC host triplet: hppa64-hp-hpux11.11
GCC target triplet: hppa64-hp-hpux11.11


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32830


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

* [Bug target/32830] shared library create by hppa64-hp11.11 can't run.
  2007-07-20  1:30 [Bug c/32830] New: shared library create by hppa64-hp11.11 can't run cnstar9988 at gmail dot com
@ 2007-07-20  4:24 ` pinskia at gcc dot gnu dot org
  2007-07-20  5:26 ` cnstar9988 at gmail dot com
                   ` (8 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2007-07-20  4:24 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from pinskia at gcc dot gnu dot org  2007-07-20 04:24 -------
Can you describe more of the problem?
Also how about a testcase.


-- 

pinskia at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |WAITING
          Component|c                           |target


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32830


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

* [Bug target/32830] shared library create by hppa64-hp11.11 can't run.
  2007-07-20  1:30 [Bug c/32830] New: shared library create by hppa64-hp11.11 can't run cnstar9988 at gmail dot com
  2007-07-20  4:24 ` [Bug target/32830] " pinskia at gcc dot gnu dot org
@ 2007-07-20  5:26 ` cnstar9988 at gmail dot com
  2007-07-20  5:28 ` cnstar9988 at gmail dot com
                   ` (7 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: cnstar9988 at gmail dot com @ 2007-07-20  5:26 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #2 from cnstar9988 at gmail dot com  2007-07-20 05:25 -------
My library is a java native library.

It's was build by hp cc.
I have patch all as/ld patchs from hp site.

I read http://gcc.gnu.org/install/specific.html#hppa-hp-hpux11.
It's no doubt that I can build gcc myself.
I can build gcc 4.1.2 on AIX5.1/Solaris10/Linux26.

I use hpcc/gcc3.4.5 to build gcc-3.4.6, gcc 3.4.6 works ok to buid my
library.(Use Tomcat/hppa64 JDK)

Now I want to build it with gcc 4.1.2 or gcc 4.2.1.
I use gcc-3.4.6 or hpcc to build gcc 4.1.2 or gcc 4.2.1, --with-bootstrap.
the gcc builds my library ok.
But it can't work.
"some symbol required by the shared library could not be found"

I use nm -g to display the symbols, it's ok.

Mybe HPPA64 doesn't support weak symbols.


-- 

cnstar9988 at gmail dot com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
      Known to fail|                            |4.2.1
      Known to work|                            |3.4.6


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32830


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

* [Bug target/32830] shared library create by hppa64-hp11.11 can't run.
  2007-07-20  1:30 [Bug c/32830] New: shared library create by hppa64-hp11.11 can't run cnstar9988 at gmail dot com
  2007-07-20  4:24 ` [Bug target/32830] " pinskia at gcc dot gnu dot org
  2007-07-20  5:26 ` cnstar9988 at gmail dot com
@ 2007-07-20  5:28 ` cnstar9988 at gmail dot com
  2007-07-20  7:31 ` cnstar9988 at gmail dot com
                   ` (6 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: cnstar9988 at gmail dot com @ 2007-07-20  5:28 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #3 from cnstar9988 at gmail dot com  2007-07-20 05:28 -------
(In reply to comment #2)
> My library is a java native library.
> It's was build by hp cc.
> I have patch all as/ld patchs from hp site.
> I read http://gcc.gnu.org/install/specific.html#hppa-hp-hpux11.
> It's no doubt that I can build gcc myself.
> I can build gcc 4.1.2 on AIX5.1/Solaris10/Linux26.
> I use hpcc/gcc3.4.5 to build gcc-3.4.6, gcc 3.4.6 works ok to buid my
> library.(Use Tomcat/hppa64 JDK)
> Now I want to build it with gcc 4.1.2 or gcc 4.2.1.
> I use gcc-3.4.6 or hpcc to build gcc 4.1.2 or gcc 4.2.1, --with-bootstrap.
> the gcc builds my library ok.
> But it can't work.
> "some symbol required by the shared library could not be found"
> I use nm -g to display the symbols, it's ok.
> Mybe HPPA64 doesn't support weak symbols.

I download gcc-4.1.2/4.2.0 from hp-gcc, it works failed too.
http://h21007.www2.hp.com/portal/site/dspp/menuitem.863c3e4cbcdc3f3515b49c108973a801/?ciid=2a08725cc2f02110725cc2f02110275d6e10RCRD


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32830


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

* [Bug target/32830] shared library create by hppa64-hp11.11 can't run.
  2007-07-20  1:30 [Bug c/32830] New: shared library create by hppa64-hp11.11 can't run cnstar9988 at gmail dot com
                   ` (2 preceding siblings ...)
  2007-07-20  5:28 ` cnstar9988 at gmail dot com
@ 2007-07-20  7:31 ` cnstar9988 at gmail dot com
  2007-07-23  6:09 ` cnstar9988 at gmail dot com
                   ` (5 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: cnstar9988 at gmail dot com @ 2007-07-20  7:31 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #4 from cnstar9988 at gmail dot com  2007-07-20 07:31 -------
On HPPA64, there are some warning.....

/home/beans/gcc-build/build/./gcc/xgcc -B/home/beans/gcc-build/build/./gcc/
-B/opt/gcc-4.2.1/lp64/hppa64-hp-hpux11.11/bin/
-B/opt/gcc-4.2.1/lp64/hppa64-hp-hpux11.11/lib/ -isystem
/opt/gcc-4.2.1/lp64/hppa64-hp-hpux11.11/include -isystem
/opt/gcc-4.2.1/lp64/hppa64-hp-hpux11.11/sys-include -O2 -g -O2  -DIN_GCC    -W
-Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes
-Wold-style-definition  -isystem ./include  -I. -I. -I../../src/gcc
-I../../src/gcc/. -I../../src/gcc/../include -I../../src/gcc/../libcpp/include 
-I../../src/gcc/../libdecnumber -I../libdecnumber  -g0 -finhibit-size-directive
-fno-inline-functions -fno-exceptions -fno-zero-initialized-in-bss
-fno-toplevel-reorder   \
          -c ../../src/gcc/crtstuff.c -DCRT_BEGIN \
          -o crtbegin.o
../../src/gcc/crtstuff.c: In function '__do_global_dtors_aux':
../../src/gcc/crtstuff.c:298: warning: the address of '__deregister_frame_info'
will always evaluate as 'true'
../../src/gcc/crtstuff.c: In function 'frame_dummy':
../../src/gcc/crtstuff.c:332: warning: the address of '__register_frame_info'
will always evaluate as 'true'
/home/beans/gcc-build/build/./gcc/xgcc -B/home/beans/gcc-build/build/./gcc/
-B/opt/gcc-4.2.1/lp64/hppa64-hp-hpux11.11/bin/
-B/opt/gcc-4.2.1/lp64/hppa64-hp-hpux11.11/lib/ -isystem
/opt/gcc-4.2.1/lp64/hppa64-hp-hpux11.11/include -isystem
/opt/gcc-4.2.1/lp64/hppa64-hp-hpux11.11/sys-include -O2 -g -O2  -DIN_GCC    -W
-Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes
-Wold-style-definition  -isystem ./include  -I. -I. -I../../src/gcc
-I../../src/gcc/. -I../../src/gcc/../include -I../../src/gcc/../libcpp/include 
-I../../src/gcc/../libdecnumber -I../libdecnumber  -g0 -finhibit-size-directive
-fno-inline-functions -fno-exceptions -fno-zero-initialized-in-bss
-fno-toplevel-reorder   \
          -c ../../src/gcc/crtstuff.c -DCRT_END \
          -o crtend.o
/home/beans/gcc-build/build/./gcc/xgcc -B/home/beans/gcc-build/build/./gcc/
-B/opt/gcc-4.2.1/lp64/hppa64-hp-hpux11.11/bin/
-B/opt/gcc-4.2.1/lp64/hppa64-hp-hpux11.11/lib/ -isystem
/opt/gcc-4.2.1/lp64/hppa64-hp-hpux11.11/include -isystem
/opt/gcc-4.2.1/lp64/hppa64-hp-hpux11.11/sys-include -O2 -g -O2  -DIN_GCC    -W
-Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes
-Wold-style-definition  -isystem ./include  -I. -I. -I../../src/gcc
-I../../src/gcc/. -I../../src/gcc/../include -I../../src/gcc/../libcpp/include 
-I../../src/gcc/../libdecnumber -I../libdecnumber  -g0 -finhibit-size-directive
-fno-inline-functions -fno-exceptions -fno-zero-initialized-in-bss
-fno-toplevel-reorder   \
          -c ../../src/gcc/crtstuff.c -DCRT_BEGIN -DCRTSTUFFS_O \
          -o crtbeginS.o
../../src/gcc/crtstuff.c: In function '__do_global_dtors_aux':
../../src/gcc/crtstuff.c:276: warning: the address of '__cxa_finalize' will
always evaluate as 'true'
../../src/gcc/crtstuff.c:298: warning: the address of '__deregister_frame_info'
will always evaluate as 'true'
../../src/gcc/crtstuff.c: In function 'frame_dummy':
../../src/gcc/crtstuff.c:332: warning: the address of '__register_frame_info'
will always evaluate as 'true'
/home/beans/gcc-build/build/./gcc/xgcc -B/home/beans/gcc-build/build/./gcc/
-B/opt/gcc-4.2.1/lp64/hppa64-hp-hpux11.11/bin/
-B/opt/gcc-4.2.1/lp64/hppa64-hp-hpux11.11/lib/ -isystem
/opt/gcc-4.2.1/lp64/hppa64-hp-hpux11.11/include -isystem
/opt/gcc-4.2.1/lp64/hppa64-hp-hpux11.11/sys-include -O2 -g -O2  -DIN_GCC    -W
-Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes
-Wold-style-definition  -isystem ./include  -I. -I. -I../../src/gcc
-I../../src/gcc/. -I../../src/gcc/../include -I../../src/gcc/../libcpp/include 
-I../../src/gcc/../libdecnumber -I../libdecnumber  -g0 -finhibit-size-directive
-fno-inline-functions -fno-exceptions -fno-zero-initialized-in-bss
-fno-toplevel-reorder   \
          -c ../../src/gcc/crtstuff.c -DCRT_END -DCRTSTUFFS_O \
          -o crtendS.o
/home/beans/gcc-build/build/./gcc/xgcc -B/home/beans/gcc-build/build/./gcc/
-B/opt/gcc-4.2.1/lp64/hppa64-hp-hpux11.11/bin/
-B/opt/gcc-4.2.1/lp64/hppa64-hp-hpux11.11/lib/ -isystem
/opt/gcc-4.2.1/lp64/hppa64-hp-hpux11.11/include -isystem
/opt/gcc-4.2.1/lp64/hppa64-hp-hpux11.11/sys-include -O2 -g -O2  -DIN_GCC    -W
-Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes
-Wold-style-definition  -isystem ./include  -I. -I. -I../../src/gcc
-I../../src/gcc/. -I../../src/gcc/../include -I../../src/gcc/../libcpp/include 
-I../../src/gcc/../libdecnumber -I../libdecnumber  -g0 -finhibit-size-directive
-fno-inline-functions -fno-exceptions -fno-zero-initialized-in-bss
-fno-toplevel-reorder   \
          -c ../../src/gcc/crtstuff.c -DCRT_BEGIN -DCRTSTUFFT_O \
          -o crtbeginT.o
../../src/gcc/crtstuff.c: In function '__do_global_dtors_aux':
../../src/gcc/crtstuff.c:298: warning: the address of '__deregister_frame_info'
will always evaluate as 'true'
../../src/gcc/crtstuff.c: In function 'frame_dummy':
../../src/gcc/crtstuff.c:332: warning: the address of '__register_frame_info'
will always evaluate as 'true'
rm -f stublib.c


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32830


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

* [Bug target/32830] shared library create by hppa64-hp11.11 can't run.
  2007-07-20  1:30 [Bug c/32830] New: shared library create by hppa64-hp11.11 can't run cnstar9988 at gmail dot com
                   ` (3 preceding siblings ...)
  2007-07-20  7:31 ` cnstar9988 at gmail dot com
@ 2007-07-23  6:09 ` cnstar9988 at gmail dot com
  2007-07-23  6:22 ` cnstar9988 at gmail dot com
                   ` (4 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: cnstar9988 at gmail dot com @ 2007-07-23  6:09 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #5 from cnstar9988 at gmail dot com  2007-07-23 06:08 -------
I found the problem.
But I don't know how to resolved.

$ gcc -Wl,+noallowunsats -m64 -fPIC -static-libgcc -Wl,-chpexport.sym -shared
-o libtrsbean.sl MafBean.o Function.o api/lib/trsapi.a -lc -lpthread
ld: Unsatisfied symbol "_Jv_RegisterClasses" in file
/home/gcc-4.2.1/lp64/bin/../lib/gcc/hppa64-hp-hpux11.11/4.2.1/crtbeginS.o
ld: Unsatisfied symbol "_end" in file /lib/pa20_64/libc.sl
ld: Unsatisfied symbol "__cxa_finalize" in file
/home/gcc-4.2.1/lp64/bin/../lib/gcc/hppa64-hp-hpux11.11/4.2.1/crtbeginS.o
ld: Unsatisfied symbol "main" in file /lib/pa20_64/libc.sl
4 errors.
collect2: ld returned 1 exit status


-- 

cnstar9988 at gmail dot com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Severity|normal                      |critical


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32830


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

* [Bug target/32830] shared library create by hppa64-hp11.11 can't run.
  2007-07-20  1:30 [Bug c/32830] New: shared library create by hppa64-hp11.11 can't run cnstar9988 at gmail dot com
                   ` (4 preceding siblings ...)
  2007-07-23  6:09 ` cnstar9988 at gmail dot com
@ 2007-07-23  6:22 ` cnstar9988 at gmail dot com
  2007-07-23  7:15 ` cnstar9988 at gmail dot com
                   ` (3 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: cnstar9988 at gmail dot com @ 2007-07-23  6:22 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #6 from cnstar9988 at gmail dot com  2007-07-23 06:22 -------
Similar to this patch.
How to resolved?

http://gcc.gnu.org/ml/gcc-patches/2006-04/msg00327.html


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32830


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

* [Bug target/32830] shared library create by hppa64-hp11.11 can't run.
  2007-07-20  1:30 [Bug c/32830] New: shared library create by hppa64-hp11.11 can't run cnstar9988 at gmail dot com
                   ` (5 preceding siblings ...)
  2007-07-23  6:22 ` cnstar9988 at gmail dot com
@ 2007-07-23  7:15 ` cnstar9988 at gmail dot com
  2007-07-23  9:20 ` pinskia at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: cnstar9988 at gmail dot com @ 2007-07-23  7:15 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #7 from cnstar9988 at gmail dot com  2007-07-23 07:15 -------
I build with -lgcc_stub, So works ok.

I think "_Jv_RegisterClasses" for GCJ.
        "__cxa_finalize" for G++.

My Library only use C language, so works ok.

:)


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32830


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

* [Bug target/32830] shared library create by hppa64-hp11.11 can't run.
  2007-07-20  1:30 [Bug c/32830] New: shared library create by hppa64-hp11.11 can't run cnstar9988 at gmail dot com
                   ` (6 preceding siblings ...)
  2007-07-23  7:15 ` cnstar9988 at gmail dot com
@ 2007-07-23  9:20 ` pinskia at gcc dot gnu dot org
  2007-10-14 16:23 ` danglin at gcc dot gnu dot org
  2007-10-15  0:43 ` cnstar9988 at gmail dot com
  9 siblings, 0 replies; 11+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2007-07-23  9:20 UTC (permalink / raw)
  To: gcc-bugs



-- 

pinskia at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Severity|critical                    |normal


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32830


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

* [Bug target/32830] shared library create by hppa64-hp11.11 can't run.
  2007-07-20  1:30 [Bug c/32830] New: shared library create by hppa64-hp11.11 can't run cnstar9988 at gmail dot com
                   ` (7 preceding siblings ...)
  2007-07-23  9:20 ` pinskia at gcc dot gnu dot org
@ 2007-10-14 16:23 ` danglin at gcc dot gnu dot org
  2007-10-15  0:43 ` cnstar9988 at gmail dot com
  9 siblings, 0 replies; 11+ messages in thread
From: danglin at gcc dot gnu dot org @ 2007-10-14 16:23 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #8 from danglin at gcc dot gnu dot org  2007-10-14 16:23 -------
Regarding comment #4, I don't believe the warnings are a problem.  hppa64-hpux
does not support undefined weak.

Regarding comment #6, '-m64' is not a valid gcc option for the hppa64-hpux
target.  Thus, it appears littlestar is using a wrapper around 32 and 64 bit
gcc builds.  This is likely the cause of the problem.

I linked a simple test program with the command options given in comment #6
and didn't see the problem (i.e., -lgcc_stub is added to the link command).
You can see this by adding '-Wl,-debug' to the gcc command.

Regarding '_Jv_RegisterClasses' and '__cxa_finalize', these currently don't
do anything.  The stubs in libgcc_stub.a simply are there to satisfy references
to these routines generated in crtbegin.o.  These result from using the
generic crt code in crtstuff.c.  This could be avoided if we provided our
own crt code. 

'__cxa_finalize' probably will never be used.  However, '_Jv_RegisterClasses'
will be used when we complete porting libffi and libjava.  Since you are
porting a native java library, you may want to look at your own implementation
of '_Jv_RegisterClasses'.


-- 

danglin at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|WAITING                     |RESOLVED
         Resolution|                            |WORKSFORME


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32830


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

* [Bug target/32830] shared library create by hppa64-hp11.11 can't run.
  2007-07-20  1:30 [Bug c/32830] New: shared library create by hppa64-hp11.11 can't run cnstar9988 at gmail dot com
                   ` (8 preceding siblings ...)
  2007-10-14 16:23 ` danglin at gcc dot gnu dot org
@ 2007-10-15  0:43 ` cnstar9988 at gmail dot com
  9 siblings, 0 replies; 11+ messages in thread
From: cnstar9988 at gmail dot com @ 2007-10-15  0:43 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #9 from cnstar9988 at gmail dot com  2007-10-15 00:43 -------
$ cat /usr/bin/gcc
#!/bin/sh

mode=ilp32
first=yes
for arg in "$@"; do
    case $arg in
        -milp32|-m32)
            mode=ilp32
            ;;
        -mlp64|-m64)
            mode=lp64
            ;;
        *)
            if test $first = yes; then
                set -- "$arg"
                first=no
            else
                set -- "$@" "$arg"
            fi
            ;;
    esac
done
if test $first = yes; then
    set --
fi
base=`basename $0`
case $base in
    cc|cc-4.2.2)
        base=gcc
        ;;
    c++|c++-4.2.2)
        base=g++
        ;;
esac
prog=/opt/gcc-4.2.2/$mode/bin/$base
exec $prog "$@"

======================================================

if not add libgcc_stub.a with shared library, my so can't work well.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32830


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

end of thread, other threads:[~2007-10-15  0:43 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-07-20  1:30 [Bug c/32830] New: shared library create by hppa64-hp11.11 can't run cnstar9988 at gmail dot com
2007-07-20  4:24 ` [Bug target/32830] " pinskia at gcc dot gnu dot org
2007-07-20  5:26 ` cnstar9988 at gmail dot com
2007-07-20  5:28 ` cnstar9988 at gmail dot com
2007-07-20  7:31 ` cnstar9988 at gmail dot com
2007-07-23  6:09 ` cnstar9988 at gmail dot com
2007-07-23  6:22 ` cnstar9988 at gmail dot com
2007-07-23  7:15 ` cnstar9988 at gmail dot com
2007-07-23  9:20 ` pinskia at gcc dot gnu dot org
2007-10-14 16:23 ` danglin at gcc dot gnu dot org
2007-10-15  0:43 ` cnstar9988 at gmail dot com

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).