/test/gnu/gcc/objdir/./gcc/xgcc -shared-libgcc -B/test/gnu/gcc/objdir/./gcc -nos tdinc++ -L/test/gnu/gcc/objdir/hppa2.0w-hp-hpux11.11/libstdc++-v3/src -L/test/gn u/gcc/objdir/hppa2.0w-hp-hpux11.11/libstdc++-v3/src/.libs -B/opt/gnu/gcc/gcc-4.3 .0/hppa2.0w-hp-hpux11.11/bin/ -B/opt/gnu/gcc/gcc-4.3.0/hppa2.0w-hp-hpux11.11/lib / -isystem /opt/gnu/gcc/gcc-4.3.0/hppa2.0w-hp-hpux11.11/include -isystem /opt/gn u/gcc/gcc-4.3.0/hppa2.0w-hp-hpux11.11/sys-include -DHAVE_CONFIG_H -I. -I../../.. /gcc/libjava -I./include -I./gcj -I../../../gcc/libjava -Iinclude -I../../../gcc /libjava/include -I../../../gcc/libjava/classpath/include -Iclasspath/include -I ../../../gcc/libjava/classpath/native/fdlibm -I../../../gcc/libjava/../boehm-gc/ include -I../boehm-gc/include -I../../../gcc/libjava/libltdl -I../../../gcc/libj ava/libltdl -I../../../gcc/libjava/.././libjava/../gcc -I../../../gcc/libjava/.. /zlib -I../../../gcc/libjava/../libffi/include -I../libffi/include -fno-rtti -fn on-call-exceptions -pthread -fdollars-in-identifiers -Wswitch-enum -D_FILE_OFFSE T_BITS=64 -Wextra -Wall -D_GNU_SOURCE -DPREFIX=\"/opt/gnu/gcc/gcc-4.3.0\" -DTOOL EXECLIBDIR=\"/opt/gnu/gcc/gcc-4.3.0/lib\" -DJAVA_HOME=\"/opt/gnu/gcc/gcc-4.3.0\" -DBOOT_CLASS_PATH=\"/opt/gnu/gcc/gcc-4.3.0/share/java/libgcj-4.3.0.jar\" -DJAVA _EXT_DIRS=\"/opt/gnu/gcc/gcc-4.3.0/share/java/ext\" -DGCJ_ENDORSED_DIRS=\"/opt/g nu/gcc/gcc-4.3.0/share/java/gcj-endorsed\" -DGCJ_VERSIONED_LIBDIR=\"/opt/gnu/gcc /gcc-4.3.0/lib/gcj-4.3.0\" -DPATH_SEPARATOR=\":\" -DLIBGCJ_DEFAULT_DATABASE=\"/o pt/gnu/gcc/gcc-4.3.0/lib/gcj-4.3.0/classmap.db\" -DLIBGCJ_DEFAULT_DATABASE_PATH_ TAIL=\"gcj-4.3.0/classmap.db\" -g -O2 -MT java/net/natVMURLConnection.lo -MD -MP -MF java/net/.deps/natVMURLConnection.Tpo -c ../../../gcc/libjava/java/net/natV MURLConnection.cc -fPIC -DPIC -o java/net/.libs/natVMURLConnection.o ../../../gcc/libjava/java/net/natVMURLConnection.cc:21: error: 'magic_t' does no t name a type ../../../gcc/libjava/java/net/natVMURLConnection.cc:23: error: ISO C++ forbids d eclaration of 'magic_t' with no type ../../../gcc/libjava/java/net/natVMURLConnection.cc:23: error: 'p_magic_open' wa s not declared in this scope ../../../gcc/libjava/java/net/natVMURLConnection.cc:23: error: expected ',' or ' ;' before '(' token ../../../gcc/libjava/java/net/natVMURLConnection.cc:24: error: expected `)' befo re 'cookie' ../../../gcc/libjava/java/net/natVMURLConnection.cc:24: error: expected primary- expression before 'const' ../../../gcc/libjava/java/net/natVMURLConnection.cc:24: error: initializer expre ssion list treated as compound expression ../../../gcc/libjava/java/net/natVMURLConnection.cc:25: error: expected `)' befo re 'cookie' ../../../gcc/libjava/java/net/natVMURLConnection.cc:25: error: invalid conversio n from 'int' to 'void*' ../../../gcc/libjava/java/net/natVMURLConnection.cc:26: error: expected `)' befo re 'cookie' ../../../gcc/libjava/java/net/natVMURLConnection.cc:26: error: expected primary- expression before 'const' ../../../gcc/libjava/java/net/natVMURLConnection.cc:27: error: expected primary- expression before 'length' ../../../gcc/libjava/java/net/natVMURLConnection.cc:27: error: initializer expre ssion list treated as compound expression ../../../gcc/libjava/java/net/natVMURLConnection.cc: In static member function ' static void java::net::VMURLConnection::init()': ../../../gcc/libjava/java/net/natVMURLConnection.cc:39: error: 'p_magic_open' wa s not declared in this scope ../../../gcc/libjava/java/net/natVMURLConnection.cc:52: error: 'cookie' was not declared in this scope ../../../gcc/libjava/java/net/natVMURLConnection.cc:52: error: 'MAGIC_MIME' was not declared in this scope ../../../gcc/libjava/java/net/natVMURLConnection.cc:53: error: expected `)' befo re '__null' ../../../gcc/libjava/java/net/natVMURLConnection.cc:55: error: 'p_magic_load' ca nnot be used as a function ../../../gcc/libjava/java/net/natVMURLConnection.cc:57: error: 'p_magic_close' c annot be used as a function ../../../gcc/libjava/java/net/natVMURLConnection.cc:58: error: expected `;' befo re '__null' ../../../gcc/libjava/java/net/natVMURLConnection.cc: In static member function ' static java::lang::String* java::net::VMURLConnection::guessContentTypeFromBuffe r(JArray<__java_byte>*, jint)': ../../../gcc/libjava/java/net/natVMURLConnection.cc:70: error: 'cookie' was not declared in this scope ../../../gcc/libjava/java/net/natVMURLConnection.cc:70: error: expected `)' befo re '__null' ../../../gcc/libjava/java/net/natVMURLConnection.cc:73: error: 'cookie' was not declared in this scope ../../../gcc/libjava/java/net/natVMURLConnection.cc:73: error: 'p_magic_buffer' cannot be used as a function make[3]: *** [java/net/natVMURLConnection.lo] Error 1 On HP-UX 11.11, magic.h doesn't define magic_t, etc.
Created attachment 12977 [details] proposed patch Please try this patch. Now we look for magic_t and, if not found, we disable the code.
Subject: Re: [4.3 Regression] natVMURLConnection.cc:21: error: 'magic_t' does not name a type > Please try this patch. Now we look for magic_t and, if not found, > we disable the code. The patch is probably ok. However, I've hit another problem linking libgcj.sl.9.0: /usr/ccs/bin/ld: CODE_ONE_SYM fixup to non-code subspace in file gnu/javax/swing /text/html/.libs/parser.o - shared library must be position independent. Use +z or +Z to recompile. The wierd part of this is the above object was clearly compiled with -fPIC but the object contains numerous non-PIC relocations in .data. Dave
Subject: Re: [4.3 Regression] natVMURLConnection.cc:21: error: 'magic_t' does not name a type > /usr/ccs/bin/ld: CODE_ONE_SYM fixup to non-code subspace in file gnu/javax/swing > /text/html/.libs/parser.o - shared library must be position independent. Use +z > or +Z to recompile. > > The wierd part of this is the above object was clearly compiled with > -fPIC but the object contains numerous non-PIC relocations in .data. One thing that I can see that's wrong is that .IMPORT directives are missing for various symbols. For example, the file calls _ZN4java4lang6ObjectC1Ev but there's no no .IMPORT directive to properly type the symbol. Dave
This is just a random guess, but do you have this patch (gcc/java): 2007-01-29 Andrew Haley <aph@redhat.com> * class.c (add_method_1): Mark fndecl as external unless we are compiling it into this object file. This may affect the latest problem here.
Subject: Bug 30606 Author: tromey Date: Wed Jan 31 17:11:11 2007 New Revision: 121425 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=121425 Log: PR libgcj/30606: * configure, include/config.h.in: Rebuilt. * configure.ac: Check for magic_t in magic.h. * java/net/natVMURLConnection.cc: Use HAVE_MAGIC_T. Modified: trunk/libjava/ChangeLog trunk/libjava/configure trunk/libjava/configure.ac trunk/libjava/include/config.h.in trunk/libjava/java/net/natVMURLConnection.cc
Subject: Re: [4.3 Regression] natVMURLConnection.cc:21: error: 'magic_t' does not name a type > This is just a random guess, but do you have this patch (gcc/java): > > 2007-01-29 Andrew Haley <aph@redhat.com> > > * class.c (add_method_1): Mark fndecl as external unless we are > compiling it into this object file. > > This may affect the latest problem here. With the above patch, the problem still exists but it's moved to a different file: /usr/ccs/bin/ld: CODE_ONE_SYM fixup to non-code subspace in file gnu/javax/swing /text/html/parser/.libs/HTML_401F.o - shared library must be position independen t. Use +z or +Z to recompile. Dave
(In reply to comment #6) > Subject: Re: [4.3 Regression] natVMURLConnection.cc:21: error: 'magic_t' does > not name a type > > > This is just a random guess, but do you have this patch (gcc/java): > > > > 2007-01-29 Andrew Haley <aph@redhat.com> > > > > * class.c (add_method_1): Mark fndecl as external unless we are > > compiling it into this object file. > > > > This may affect the latest problem here. > > With the above patch, the problem still exists but it's moved to a > different file: > > /usr/ccs/bin/ld: CODE_ONE_SYM fixup to non-code subspace in file > gnu/javax/swing > /text/html/parser/.libs/HTML_401F.o - shared library must be position > independen > t. Use +z or +Z to recompile. > Please try with revision 121506 or later. That may fix this problem.
Subject: Re: [4.3 Regression] natVMURLConnection.cc:21: error: 'magic_t' does not name a type > > With the above patch, the problem still exists but it's moved to a > > different file: > > > > /usr/ccs/bin/ld: CODE_ONE_SYM fixup to non-code subspace in file > > gnu/javax/swing > > /text/html/parser/.libs/HTML_401F.o - shared library must be position > > independen > > t. Use +z or +Z to recompile. > > > > Please try with revision 121506 or later. That may fix this problem. Sadly, it didn't fix the problem. Dave
Subject: Re: [4.3 Regression] natVMURLConnection.cc:21: error: 'magic_t' does not name a type > > > With the above patch, the problem still exists but it's moved to a > > > different file: > > > > > > /usr/ccs/bin/ld: CODE_ONE_SYM fixup to non-code subspace in file > > > gnu/javax/swing > > > /text/html/parser/.libs/HTML_401F.o - shared library must be position > > > independen > > > t. Use +z or +Z to recompile. > > > > > > > Please try with revision 121506 or later. That may fix this problem. The above problem is a target bug (incorrect code is being generated for long indirect and millicode calls). The library now contains some modules that need long calls. Working on a patch to fix this. David Daney's patch fixed the original problem. Dave
The R_CODE_ONE_SYMBOL error was caused by my inadvertantly using an experimental (buggy) version of gas. Closing PR as fixed.