Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

X11 Build failure on Solaris #76

Closed
SDLBugzilla opened this issue Feb 10, 2021 · 0 comments
Closed

X11 Build failure on Solaris #76

SDLBugzilla opened this issue Feb 10, 2021 · 0 comments

Comments

@SDLBugzilla
Copy link
Collaborator

This bug report was migrated from our old Bugzilla tracker.

These attachments are available in the static archive:

Reported in version: HG 1.2
Reported for operating system, platform: Solaris, All

Comments on the original bug report:

On 2006-02-07 11:27:17 +0000, Mattias Karlsson wrote:

/pub/anarchy/dva00mkn/sun/bin/gcc -DHAVE_CONFIG_H -I. -I.
-I../../../include -g -O2 -Wall -D__ELF__ -DENABLE_DUMMYVIDEO
-DDISKAUD_SUPPORT -DUSE_DLOPEN -DESD_SUPPORT -I/pkg/esound/0.2.36/include
-I/pkg/audiofile/0.2.6/include -I/usr/openwin/include -DENABLE_X11
-DXTHREADS "-DX11_DYNAMIC="libX11.so.6""
"-DX11EXT_DYNAMIC="libXext.so.6"" -I./include -I./src/video -DENABLE_DGA
-DXFREE86_DGAMOUSE -DDEFAULT_DGAMOUSE -DXFREE86_VM -DXFREE86_VMGAMMA
-DXFREE86_XV -DHAVE_XINERAMA -DHAVE_XIGXME -DHAVE_OPENGL -DHAVE_OPENGL_X11
-D_REENTRANT -DSDL_USE_PTHREADS -DPTHREAD_RECURSIVE_MUTEX -DHAVE_SIGACTION
-DSUNAUDIO_SUPPORT -I../../../include -I../../../include/SDL
-I../../../src -I../../../src/main/solaris -I../../../src/audio
-I../../../src/video -I../../../src/video/Xext/extensions
-I../../../src/events -I../../../src/joystick -I../../../src/cdrom
-I../../../src/thread -I../../../src/timer -I../../../src/endian
-I../../../src/file -I../../../src/thread -MT SDL_x11dga.lo -MD -MP -MF
.deps/SDL_x11dga.Tpo -c SDL_x11dga.c -fPIC -DPIC -o .libs/SDL_x11dga.o
[...Snipped...]
In file included from SDL_x11dyn.h:30,
from SDL_x11video.h:44,
from SDL_x11dga_c.h:23,
from SDL_x11dga.c:32:
/usr/openwin/include/X11/Xlibint.h:46: warning: ignoring #pragma ident
/usr/openwin/include/X11/Xlibint.h:137: error: syntax error before
'xEvent'
In file included from SDL_x11dyn.h:30,
from SDL_x11video.h:44,
from SDL_x11dga_c.h:23,
from SDL_x11dga.c:32:
/usr/openwin/include/X11/Xlibint.h:761: error: syntax error before
'xReply'
/usr/openwin/include/X11/Xlibint.h:836: error: syntax error before
'xReply'
/usr/openwin/include/X11/Xlibint.h:836: warning: no semicolon at end of
struct or union
/usr/openwin/include/X11/Xlibint.h:838: error: syntax error before '}'
token
/usr/openwin/include/X11/Xlibint.h:838: warning: type defaults to 'int' in
declaration of '_XAlignedBuffer'
/usr/openwin/include/X11/Xlibint.h:838: warning: data definition has no
type or storage class
/usr/openwin/include/X11/Xlibint.h:903: error: syntax error before
'xGenericReply'
/usr/openwin/include/X11/Xlibint.h:921: error: syntax error before
'xReply'
/usr/openwin/include/X11/Xlibint.h:931: error: syntax error before
'xReply'
/usr/openwin/include/X11/Xlibint.h:978: error: syntax error before
'xReply'
/usr/openwin/include/X11/Xlibint.h:986: error: syntax error before
'xEvent'
/usr/openwin/include/X11/Xlibint.h:1187: error: syntax error before
'xEvent'
/usr/openwin/include/X11/Xlibint.h:1193: error: syntax error before
'xEvent'
/usr/openwin/include/X11/Xlibint.h:1205: error: syntax error before
'xEvent'
/usr/openwin/include/X11/Xlibint.h:1211: error: syntax error before
'xEvent'
In file included from SDL_x11dyn.h:32,
from SDL_x11video.h:44,
from SDL_x11dga_c.h:23,
from SDL_x11dga.c:32:
../../../src/video/Xext/extensions/extutil.h:112: error: syntax error
before 'xEvent'
../../../src/video/Xext/extensions/extutil.h:119: error: syntax error
before 'xEvent'
In file included from SDL_x11video.h:44,
from SDL_x11dga_c.h:23,
from SDL_x11dga.c:32:
SDL_x11dyn.h:53: error: syntax error before 'xEvent'
SDL_x11dyn.h:55: error: syntax error before 'xEvent'
In file included from SDL_x11dyn.h:59,
from SDL_x11video.h:44,
from SDL_x11dga_c.h:23,
from SDL_x11dga.c:32:
SDL_x11sym.h:136: error: syntax error before 'xReply'
SDL_x11sym.h:137: error: syntax error before 'xGenericReply'
make[3]: *** [SDL_x11dga.lo] Error 1
make[3]: Leaving directory
/import/anarchy/dva00mkn/SDL-1.2/src/video/x11' make[2]: *** [all-recursive] Error 1 make[2]: Leaving directory /import/anarchy/dva00mkn/SDL-1.2/src/video'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/import/anarchy/dva00mkn/SDL-1.2/src'
make: *** [all-recursive] Error 1


Adding "-DNEED_EVENTS -DNEED_REPLIES" to CFLAGS makes it build.

However, it apears like x11 headers are included in the wrong order, but I'm not that familliar with development with x11 to say for sure.

On 2006-02-08 03:42:21 +0000, Martin Berglund wrote:

I have failed to reproduce this problem with SDL 1.2.9, despite supposedly having compiled on the very same machines (vega/orion and the ma446 Blade 1k's). Do you have some specific instructions to make it happen?

On 2006-02-08 07:50:07 +0000, Mattias Karlsson wrote:

(In reply to comment # 1)

I have failed to reproduce this problem with SDL 1.2.9, despite supposedly
having compiled on the very same machines (vega/orion and the ma446 Blade
1k's). Do you have some specific instructions to make it happen?

Yes, 1.2.9 works like a charm, however the last CVS snapshot from 2005-02-07 (http://www.libsdl.org/cvs/SDL-1.2.tar.gz) fails to build.

On 2006-02-08 11:51:49 +0000, Martin Berglund wrote:

Created attachment 71
Fix for build on Solaris, reverse include order SDL12/src/video/x11/SDL_x11dyn.h

Right you are, it appears that the issue is that Xlibint.h sets NEED_EVENTS and NEED_REPLIES to pass on to Xproto.h, but Xproto.h is included before Xlibint.h in SDL_x11dyn.h

The included patch does this and fixes the build on Solaris, a bit of inspection of the headers on Linux and AIX suggests that the patch should cause no problems elsewhere either.

On 2006-02-08 15:29:44 +0000, Ryan C. Gordon wrote:

Patch is in CVS now, thanks!

--ryan.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant