A different openjdk6 install problem

David Rowe drowe at roden.myzen.co.uk
Mon Aug 17 15:43:47 PDT 2009


Brandon Allbery wrote:
> On Aug 16, 2009, at 19:32 , David Rowe wrote:
>> ../../../src/solaris/native/sun/awt/awt_GraphicsEnv.c: In function 
>> 'J2DXErrHandler':
>> ../../../src/solaris/native/sun/awt/awt_GraphicsEnv.c:966: error: 
>> 'X_ShmAttach' undeclared (first use in this function)
>> ../../../src/solaris/native/sun/awt/awt_GraphicsEnv.c:966: error: 
>> (Each undeclared identifier is reported only once
>> ../../../src/solaris/native/sun/awt/awt_GraphicsEnv.c:966: error: for 
>> each function it appears in.)
>
>
> Er, this error doesn't mean X_ShmAttach wasn't found, it means the 
> source file didn't #include the appropriate #include file.  Since 
> there's no error about a missing #include file, this is a 
> (compatibility?) error in the source.
>
Well I am not sure I know exactly what I am doing - but following the 
clue from Brandon Allbery (thanks Brandon), I found that X_ShmAttach is 
defined in /opt/local/include/X11/extensions/shmproto.h

This looks like the sort of thing I would expect MacPorts to #include.
[MacOS Spotlight shows that there are other instances of 'X_ShmAttach' - 
but they are in the /Developer/SDKs tree - I didn't think MacPorts makes 
use of things outside /opt/local].

Now near the beginning of
/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_java_openjdk6/work/jdk/src/solaris/native/sun/awt/awt_GraphicsEnv.c
there are #includes such as "#include <X11/extensions/Xdbe.h>"

so I tried inserting a new line:
#include <X11/extensions/shmproto.h>
just afterwards. I was hoping that shmproto.h would supply the missing 
definition of X_ShmAttach

Well it does - but - it also seems to introduce a number of other 
problems. Here is the console log (using my modified version of 
awt_GraphicsEnv.c)

<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
bash-3.2# port install openjdk6
--->  Building openjdk6
Error: Target org.macports.build returned: shell command " cd 
"/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_java_openjdk6/work/./" 
&& make all ALT_BOOTDIR="/opt/local/share/java/openjdk6_bootstrap" 
ALT_BINARY_PLUGS_PATH="/opt/local/share/java/icedtea6-plugs/jre/lib/rt-closed.jar" 
ANT_HOME="/opt/local/share/java/apache-ant" 
ALT_FREETYPE_HEADERS_PATH="/opt/local/include" 
ALT_FREETYPE_LIB_PATH="/opt/local/lib" 
ALT_CUPS_HEADERS_PATH="/usr/include" ALT_MOTIF_DIR="/opt/local" 
ALT_X11_PATH="/opt/local" ALT_DEVTOOLS_PATH=/usr 
ALT_CACERTS_FILE=/System/Library/Frameworks/JavaVM.framework/Home/lib/security/cacerts 
NO_DOCS=true HOTSPOT_BUILD_JOBS=1 " returned error 2
Command output: /opt/local/include/X11/extensions/shmproto.h:171: 
warning: data definition has no type or storage class
/opt/local/include/X11/extensions/shmproto.h:172: error: syntax error 
before 'bpad1'
/opt/local/include/X11/extensions/shmproto.h:172: warning: type defaults 
to 'int' in declaration of 'bpad1'
/opt/local/include/X11/extensions/shmproto.h:172: warning: data 
definition has no type or storage class
/opt/local/include/X11/extensions/shmproto.h:173: error: syntax error 
before 'shmseg'
/opt/local/include/X11/extensions/shmproto.h:173: warning: type defaults 
to 'int' in declaration of 'B32'
/opt/local/include/X11/extensions/shmproto.h:173: warning: data 
definition has no type or storage class
/opt/local/include/X11/extensions/shmproto.h:174: error: syntax error 
before 'offset'
/opt/local/include/X11/extensions/shmproto.h:174: warning: type defaults 
to 'int' in declaration of 'B32'
/opt/local/include/X11/extensions/shmproto.h:174: warning: data 
definition has no type or storage class
/opt/local/include/X11/extensions/shmproto.h:175: error: syntax error 
before 'pad0'
/opt/local/include/X11/extensions/shmproto.h:175: warning: type defaults 
to 'int' in declaration of 'B32'
/opt/local/include/X11/extensions/shmproto.h:175: warning: data 
definition has no type or storage class
/opt/local/include/X11/extensions/shmproto.h:176: error: syntax error 
before 'pad1'
/opt/local/include/X11/extensions/shmproto.h:176: warning: type defaults 
to 'int' in declaration of 'B32'
/opt/local/include/X11/extensions/shmproto.h:176: warning: data 
definition has no type or storage class
/opt/local/include/X11/extensions/shmproto.h:177: error: syntax error 
before 'pad2'
/opt/local/include/X11/extensions/shmproto.h:177: warning: type defaults 
to 'int' in declaration of 'B32'
/opt/local/include/X11/extensions/shmproto.h:177: warning: data 
definition has no type or storage class
/opt/local/include/X11/extensions/shmproto.h:178: warning: type defaults 
to 'int' in declaration of 'xShmCompletionEvent'
/opt/local/include/X11/extensions/shmproto.h:178: warning: data 
definition has no type or storage class
/usr/bin/gcc  -O2    -fno-strict-aliasing -fPIC -W -Wall  -Wno-unused 
-Wno-parentheses -fno-omit-frame-pointer -D_LITTLE_ENDIAN 
-mstackrealign   -Di586 -DARCH='"i586"' -D_ALLBSD_SOURCE 
-DRELEASE='"1.6.0-internal"' -D_LARGEFILE64_SOURCE -D_GNU_SOURCE 
-D_REENTRANT -I. 
-I/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_java_openjdk6/work/build/bsd-i586/tmp/sun/sun.awt.X11/xawt/CClassHeaders 
-I../../../src/solaris/javavm/export -I../../../src/share/javavm/export 
-I../../../src/share/javavm/include 
-I../../../src/solaris/javavm/include -I../../../src/share/native/common 
-I../../../src/solaris/native/common 
-I../../../src/share/native/sun/awt/X11 
-I../../../src/solaris/native/sun/awt/X11   -DXAWT -DXAWT_HACK 
-I/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_java_openjdk6/work/build/bsd-i586/tmp/sun/sun.awt.X11/xawt/../../sun.awt/awt/CClassHeaders 
-I../../../src/solaris/native/sun/awt 
-I../../../src/solaris/native/sun/xawt 
-I../../../src/solaris/native/sun/jdga 
-I../../../src/share/native/sun/awt/debug 
-I../../../src/share/native/sun/awt/image/cvutils 
-I../../../src/share/native/sun/java2d 
-I../../../src/share/native/sun/java2d/loops 
-I../../../src/share/native/sun/awt/image/cvutils 
-I../../../src/share/native/sun/awt/image 
-I../../../src/share/native/sun/font 
-I../../../src/solaris/native/sun/java2d 
-I../../../src/share/native/sun/java2d/pipe 
-I../../../src/share/native/sun/java2d/opengl 
-I../../../src/solaris/native/sun/java2d/opengl 
-I../../../src/solaris/native/sun/java2d/x11 
-I../../../src/share/native/sun/dc/path 
-I../../../src/share/native/sun/dc/doe 
-I../../../src/share/native/sun/awt/alphacomposite 
-I../../../src/share/native/sun/awt/medialib 
-I../../../src/solaris/native/sun/awt/medialib 
-I../../../src/solaris/native/sun/font 
-I../../../src/share/native/sun/awt 
-I../../../src/solaris/native/sun/awt  -I/usr/include 
-I/opt/local/include/X11/extensions -I/opt/local/include 
-DX11_PATH=\"/opt/local\" -DPACKAGE_PATH=\"/usr/local\" 
-DINTERNAL_BUILD  -c -o 
/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_java_openjdk6/work/build/bsd-i586/tmp/sun/sun.awt.X11/xawt/obj/X11FontScaler_md.o  
../../../src/solaris/native/sun/java2d/x11/X11FontScaler_md.c
../../../src/solaris/native/sun/awt/awt_GraphicsEnv.c: In function 
'makeDefaultConfig':
../../../src/solaris/native/sun/awt/awt_GraphicsEnv.c:295: warning: 
format '%x' expects type 'unsigned int *', but argument 3 has type 
'VisualID *'
make[4]: *** 
[/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_java_openjdk6/work/build/bsd-i586/tmp/sun/sun.awt.X11/xawt/obj/awt_GraphicsEnv.o] 
Error 1
make[4]: *** Waiting for unfinished jobs....
make[3]: *** [library_parallel_compile] Error 2
make[2]: *** [all] Error 1
make[1]: *** [all] Error 1
make: *** [jdk-build] Error 2

Error: Status 1 encountered during processing.
bash-3.2#
 >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>

So just using /opt/local/include/X11/extensions/shmproto.h to supply the 
missing definition of X_ShmAttach is obviously not the answer (or at 
least the whole answer).

I think this is going to take someone who really understands this code 
to sort out.

David Rowe


More information about the macports-users mailing list