Compiling CVS on Slackware....

Compiling, libraries, modules, coding guidelines and porting

Moderators: jesterKing, stiv

Post Reply
Lazareus
Posts: 0
Joined: Sun Jul 23, 2006 5:24 am

Compiling CVS on Slackware....

Post by Lazareus » Sun Jul 23, 2006 5:36 am

I've worked thru various deps issues, and figuring out how to set the options, and finally I get most of the way there, but now it all ends in failing to build the Ghost stuff. first part of the spew follows:

====> make all in intern/ghost/intern
g++ -c -DUSE_SUMO_SOLID -pipe -fPIC -DNDEBUG -O2 -DMOZ_NOT_NET -I/home/tonyag/blenderdev/blender/../lib/linux-glibc2.3.6-i386/string/include -I/home/tonyag/blenderdev/blender/../lib/linux-glibc2.3.6-i386/memutil/include -I.. -I/usr/X11R6/include GHOST_ISystem.cpp -o /home/tonyag/blenderdev/blender/obj/linux-glibc2.3.6-i386/intern/ghost/GHOST_ISystem.o
In file included from GHOST_SystemX11.h:39,
from GHOST_ISystem.cpp:52:
/usr/X11R6/include/X11/Xlib.h: In function `char* XSetOMValues(_XOM*, ...)':
/usr/X11R6/include/X11/Xlib.h:3573: error: syntax error before `(' token
/usr/X11R6/include/X11/Xlib.h:3573: error: ISO C++ forbids declaration of `
_X_SENTINEL' with no type
/usr/X11R6/include/X11/Xlib.h: In function `char* XGetOMValues(_XOM*, ...)':
/usr/X11R6/include/X11/Xlib.h:3578: error: syntax error before `(' token
/usr/X11R6/include/X11/Xlib.h:3578: error: ISO C++ forbids declaration of `
_X_SENTINEL' with no type
/usr/X11R6/include/X11/Xlib.h:3578: error: redefinition of `int _X_SENTINEL'
/usr/X11R6/include/X11/Xlib.h:3573: error: `int _X_SENTINEL' previously defined
here
/usr/X11R6/include/X11/Xlib.h: In function `_XOC* XCreateOC(_XOM*, ...)':
/usr/X11R6/include/X11/Xlib.h:3591: error: syntax error before `(' token
/usr/X11R6/include/X11/Xlib.h:3591: error: ISO C++ forbids declaration of `
_X_SENTINEL' with no type
/usr/X11R6/include/X11/Xlib.h:3591: error: redefinition of `int _X_SENTINEL'
/usr/X11R6/include/X11/Xlib.h:3578: error: `int _X_SENTINEL' previously defined
here
/usr/X11R6/include/X11/Xlib.h: In function `char* XSetOCValues(_XOC*, ...)':
/usr/X11R6/include/X11/Xlib.h:3604: error: syntax error before `(' token
/usr/X11R6/include/X11/Xlib.h:3604: error: ISO C++ forbids declaration of `
_X_SENTINEL' with no type
/usr/X11R6/include/X11/Xlib.h:3604: error: redefinition of `int _X_SENTINEL'
/usr/X11R6/include/X11/Xlib.h:3591: error: `int _X_SENTINEL' previously defined
here
/usr/X11R6/include/X11/Xlib.h: In function `char* XGetOCValues(_XOC*, ...)':
/usr/X11R6/include/X11/Xlib.h:3609: error: syntax error before `(' token
/usr/X11R6/include/X11/Xlib.h:3609: error: ISO C++ forbids declaration of `
_X_SENTINEL' with no type
/usr/X11R6/include/X11/Xlib.h:3609: error: redefinition of `int _X_SENTINEL'
/usr/X11R6/include/X11/Xlib.h:3604: error: `int _X_SENTINEL' previously defined
here
/usr/X11R6/include/X11/Xlib.h: In function `char* XGetIMValues(_XIM*, ...)':
/usr/X11R6/include/X11/Xlib.h:3841: error: syntax error before `(' token
/usr/X11R6/include/X11/Xlib.h:3841: error: ISO C++ forbids declaration of `
_X_SENTINEL' with no type
/usr/X11R6/include/X11/Xlib.h:3841: error: redefinition of `int _X_SENTINEL'
/usr/X11R6/include/X11/Xlib.h:3609: error: `int _X_SENTINEL' previously defined
here
/usr/X11R6/include/X11/Xlib.h: In function `char* XSetIMValues(_XIM*, ...)':
/usr/X11R6/include/X11/Xlib.h:3845: error: syntax error before `(' token
/usr/X11R6/include/X11/Xlib.h:3845: error: ISO C++ forbids declaration of `
_X_SENTINEL' with no type
/usr/X11R6/include/X11/Xlib.h:3845: error: redefinition of `int _X_SENTINEL'
/usr/X11R6/include/X11/Xlib.h:3841: error: `int _X_SENTINEL' previously defined
here
/usr/X11R6/include/X11/Xlib.h: In function `_XIC* XCreateIC(_XIM*, ...)':
/usr/X11R6/include/X11/Xlib.h:3857: error: syntax error before `(' token
/usr/X11R6/include/X11/Xlib.h:3857: error: ISO C++ forbids declaration of `
_X_SENTINEL' with no type
/usr/X11R6/include/X11/Xlib.h:3857: error: redefinition of `int _X_SENTINEL'
/usr/X11R6/include/X11/Xlib.h:3845: error: `int _X_SENTINEL' previously defined
here
/usr/X11R6/include/X11/Xlib.h: In function `char* XSetICValues(_XIC*, ...)':
/usr/X11R6/include/X11/Xlib.h:3885: error: syntax error before `(' token
/usr/X11R6/include/X11/Xlib.h:3885: error: ISO C++ forbids declaration of `
_X_SENTINEL' with no type
/usr/X11R6/include/X11/Xlib.h:3885: error: redefinition of `int _X_SENTINEL'
/usr/X11R6/include/X11/Xlib.h:3857: error: `int _X_SENTINEL' previously defined
here
/usr/X11R6/include/X11/Xlib.h: In function `char* XGetICValues(_XIC*, ...)':
/usr/X11R6/include/X11/Xlib.h:3889: error: syntax error before `(' token
/usr/X11R6/include/X11/Xlib.h:3889: error: ISO C++ forbids declaration of `
_X_SENTINEL' with no type
/usr/X11R6/include/X11/Xlib.h:3889: error: redefinition of `int _X_SENTINEL'
/usr/X11R6/include/X11/Xlib.h:3885: error: `int _X_SENTINEL' previously defined
here
/usr/X11R6/include/X11/Xlib.h: In function `void* XVaCreateNestedList(int, ...)
':
/usr/X11R6/include/X11/Xlib.h:3929: error: syntax error before `(' token
/usr/X11R6/include/X11/Xlib.h:3929: error: ISO C++ forbids declaration of `
_X_SENTINEL' with no type
/usr/X11R6/include/X11/Xlib.h:3929: error: redefinition of `int _X_SENTINEL'
/usr/X11R6/include/X11/Xlib.h:3889: error: `int _X_SENTINEL' previously defined
here
In file included from /usr/X11R6/include/GL/glx.h:40,
from GHOST_SystemX11.h:40,
from GHOST_ISystem.cpp:52:
/usr/X11R6/include/X11/Xutil.h:361: error: non-local function `
XVaCreateNestedList(int, ...)::XClassHint* XAllocClassHint()' uses local
type `XVaCreateNestedList(int, ...)::XClassHint'
/usr/X11R6/include/X11/Xutil.h:365: error: non-local function `
XVaCreateNestedList(int, ...)::XIconSize* XAllocIconSize()' uses local type
`XVaCreateNestedList(int, ...)::XIconSize'

It goes on in similar vein. I'll post more info, if requested, but I have a feeling someone's going to say "Oh, you need to do" .... something very simple that I just don't have a clue about yet.

I'll appreciate any help offered, it makes me Crazy! when I can't figure something out.

Lazareus
Posts: 0
Joined: Sun Jul 23, 2006 5:24 am

Post by Lazareus » Sun Jul 23, 2006 6:02 pm

Update:
Upgrading GCC from 3.3.6 to 3.4.6 shrinks the list of errors considerably. On 11 different lines in Xlib.h it gives "error: expected initializer before _X_SENTINEL" while compiling GHOST_DisplayManagerX11.cpp, and then stops.

Comments, advice, anyone? Please, save my remaining hair! :-)

Lazareus
Posts: 0
Joined: Sun Jul 23, 2006 5:24 am

Post by Lazareus » Sun Jul 23, 2006 8:24 pm

update 2:
commenting out _X_SENTINEL in Xlib.h gets GHOST built, but I have to disable ffmpeg for the build to complete.

I've found all kinds of tute's for making it work in Windows, but for Linux it's just not clear how I'm supposed to get that built in.
With ffmpeg enabled, I get:
"avformat.h: No such file....." and a slew of obviously related errors.
I found in the extern directory, an ffmpeg dir, but though 'configure' completes okay, 'make' gives:
"nan_subdirs.mk: No such file...."

Ooops. Never mind I found out about the NANBLENDERHOME and MAKEFLAGS env. vars.
We'll see. :-)

Lazareus
Posts: 0
Joined: Sun Jul 23, 2006 5:24 am

Post by Lazareus » Mon Jul 24, 2006 7:38 am

Okay, I have all those noobie issues figured out, and I can build blender at will, even built a couple of patched versions, blend2pov in particular: the reason I got into all this.

Here's what's happening:
I've been very interested in running blend2pov (http://www.ubuntuforums.org/showthread.php?t=104778) but when I choose the Pov rendering engine, and click Render, blender segfaults.
Also, running blender with the sculpt patch (http://blenderartists.org/forum/showthread.php?t=71671) I get a segfault when exiting the program.
When 2.42 was first released, I ran the build from blender.org for a while, and didn't see anything like that, now I run an SSE2 optimized version from graphicall.org with no problems.

Here's the interesting part:
backtracing the crashes in both blend2pov and the sculpt build end in libstdc++/STL calls.
every build I did with scons today ended with something like:
libstdc++.so.5 (required by libHalf.so) may conflict with libstdc++.so.6,
including the build of 2.42a that I just did. running ldd on ALL my blender binaries (quite a few now) shows that they are all linked to BOTH versions of libstdc++.so, even the ones I didn't build. Now, I'm no pro coder by any means, but that doesn't sound right to me, and I found indications on the web that it's not a stable configuration. :-)

Could someone take a moment to help me understand this?

Lazareus
Posts: 0
Joined: Sun Jul 23, 2006 5:24 am

Post by Lazareus » Mon Jul 24, 2006 6:17 pm

cha-ching! :-)

figured that one out too. libHalf.so was the key. I remembered that I had compiled OpenEXR with gcc 3.3.6 (where libHalf comes from) so I recompiled it w/ 3.4.6, then recompiled blender.
This time scons warned about linking libstdc++.so.5 to libGL.
I had also compiled X w/ 3.3.6. So I rebuilt X, and then recompiled blender. This time no complaints about mixed versions of libstdc++ and blend2pov works fine.

What a great learning experience, never mind about the lost weekend. :-)

SirDude
Posts: 233
Joined: Sun Oct 13, 2002 7:37 pm
Location: University of Minnesota (USA)
Contact:

Post by SirDude » Mon Jul 24, 2006 6:19 pm

Yep this is bad...

usually it results when you have stale .o files and or you have a lib that is compiled with different versions of gcc/g++. your first hint was it pointing
at libHalf.so which is part of OpenEXR.

Anyway it sounds like you have it all sorted out now.

Post Reply