A different openjdk6 install problem
David Rowe
drowe at roden.myzen.co.uk
Fri Aug 21 07:42:29 PDT 2009
Brandon Allbery wrote:
> On Aug 20, 2009, at 19:06 , David Rowe wrote:
>> Brandon Allbery wrote:
>>> On Aug 18, 2009, at 20:21 , David Rowe wrote:
>>>> I had thought it was possible that a suitable declaration of
>>>> 'X_ShmAttach' could be supplied by #including
>>>> <X11/extensions/shmproto.h> - so I inserted an appropriate #include
>>>> statement near the beginning of awt_GraphicsEnv.c
>>> Hm. Actually not; that's internal, you want <X11/extensions/XShm.h>
>>> which includes shmproto.h after doing some other setup that's needed
>>> for it to work right.
>> . . . .
> I just looked more closely and I'm not sure shmproto.h is intended for
> user code, but instead for the server. On my system XShmAttach() is
> declared in XShm.h as well as shmproto.h.
>
Perhaps we are getting warmer.
What is upsetting the compilation 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
is a missing declaration of: 'X_ShmAttach' (with an underscore character).
What is declared in
/opt/local/include/X11/extensions/XShm.h
(which is #include-d in awt_GraphicsEnv.c)
is 'XShmAttach' (without an underscore character)
This is in my copy of XShm.h as well as in yours (Brandon)
I have just done a MacOS 'find' of files in /opt/local and:
There are many (11 to be precise) .h and .c files containing mentions
of 'XShmAttach'
There are only 2 files contining mentions of 'X_ShmAttach' and those
files are 'awt_GraphicsEnv.c' (using, and causing all our problems) and
'shmproto.h' (defining - but not correctly for our purposes)
I also note that awt_GraphicsEnv.c already contains usage of
'XShmAttach' as well as the one, failing usage of 'X_ShmAttach'
In the process of some Googling, I did see some mention of the X11
codebase being recently modified to separate the X-server code from the
X-client code (or something like that) - this looks very much like a
slip-up during the modification.
So - in the spirit of 'suck it and see' I edited the one occurrence of
X_ShmAttach in awt_GraphicsEnv.c (line 966) to XShmAttach - and,
Geronimo!, openjdk6 now builds.
HOWEVER - I have not yet had time to try out the resulting code to see
if it runs correctly. I presume some-one some-where has a validation
suite for Java - but I guess it would have to try out the awt functions
as that is the code I altered.
Can anyone who actually knows the bowels of Java awt and X11 confirm
that this edit is the correct fix for the bug.
Regards
David Rowe
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-users/attachments/20090821/565f914a/attachment.html>
More information about the macports-users
mailing list