Page 1 of 1

Trying to build it on OpenSolaris

Posted: Sun Apr 26, 2009 9:26 pm
by cindy
Hello :) OpenSolaris runs Blender quite well... well, at least it doesn't have the weird bugs that I have on ubuntu... =/

I tested it with blender 2.46, but I want to use a newer version, but I'm having problems trying to compile the latest version.

I followed these instructions: http://wiki.blender.org/index.php/Dev:D ... er/Solaris but I'm having trouble with the OpenGL libraries.

I tried that command to create a symbolic link:

Code: Select all

ln -s /usr/X11/include/mesa/*.h /usr/X11/include/GL/
but all I got was this

Code: Select all

ln: cannot create /usr/X11/include/GL//gl.h: File exists
        (...)
        ...same error for a lot of headers
So I thought, OK, let's change the source to point to the correct place, but I don't know what changes to make... =/ Annyone could help?

I tried to make the changes sugested in this topic: http://www.blender.org/forum/viewtopic. ... df25e441d6

But the errors are the same when I try to compile:



Code: Select all

====> gmake all in extern/glew/src
gcc -m64 -c -DGAMEBLENDER=1 -DUSE_SUMO_SOLID -pipe -fPIC -funsigned-char -fno-strict-aliasing -DNDEBUG -O2 -I../include glew.c -o /export/home/cindy/Desktop/blender-2.48a/obj/solaris-2.11-x86_64/extern/glew/glew.o
In file included from glew.c:36:
../include/GL/glxew.h:62:22: X11/Xlib.h: No such file or directory
../include/GL/glxew.h:63:23: X11/Xutil.h: No such file or directory
../include/GL/glxew.h:64:21: X11/Xmd.h: No such file or directory
In file included from glew.c:36:
../include/GL/glxew.h:101: error: syntax error before "GLXDrawable"
../include/GL/glxew.h:101: warning: data definition has no type or storage class
../include/GL/glxew.h:102: error: syntax error before "GLXPixmap"
../include/GL/glxew.h:102: warning: data definition has no type or storage class
../include/GL/glxew.h:105: error: syntax error before "glXQueryExtension"
../include/GL/glxew.h:105: error: syntax error before '*' token
../include/GL/glxew.h:105: warning: data definition has no type or storage class
../include/GL/glxew.h:106: error: syntax error before "glXQueryVersion"
../include/GL/glxew.h:106: error: syntax error before '*' token
../include/GL/glxew.h:106: warning: data definition has no type or storage class
../include/GL/glxew.h:107: error: syntax error before '*' token
../include/GL/glxew.h:108: error: syntax error before '*' token
../include/GL/glxew.h:108: error: syntax error before '*' token
../include/GL/glxew.h:108: warning: data definition has no type or storage class
../include/GL/glxew.h:109: error: syntax error before "glXCreateGLXPixmap"
../include/GL/glxew.h:109: error: syntax error before '*' token
../include/GL/glxew.h:109: warning: data definition has no type or storage class
../include/GL/glxew.h:110: error: syntax error before '*' token
../include/GL/glxew.h:111: error: syntax error before '*' token
../include/GL/glxew.h:112: error: syntax error before '*' token
../include/GL/glxew.h:113: error: syntax error before "glXIsDirect"
../include/GL/glxew.h:113: error: syntax error before '*' token
../include/GL/glxew.h:113: warning: data definition has no type or storage class
../include/GL/glxew.h:114: error: syntax error before '*' token
../include/GL/glxew.h:115: error: syntax error before "glXMakeCurrent"
../include/GL/glxew.h:115: error: syntax error before '*' token
../include/GL/glxew.h:115: warning: data definition has no type or storage class
../include/GL/glxew.h:117: error: syntax error before "glXGetCurrentDrawable"
../include/GL/glxew.h:117: warning: data definition has no type or storage class
../include/GL/glxew.h:120: error: syntax error before '*' token
../include/GL/glxew.h:121: error: syntax error before "font"
../include/GL/glxew.h:136: error: syntax error before '*' token
../include/GL/glxew.h:137: error: syntax error before '*' token
../include/GL/glxew.h:138: error: syntax error before '*' token
../include/GL/glxew.h:149: error: syntax error before '*' token
../include/GL/glxew.h:149: warning: data definition has no type or storage class
../include/GL/glxew.h:219: error: syntax error before "GLXFBConfigID"
../include/GL/glxew.h:219: warning: data definition has no type or storage class
../include/GL/glxew.h:220: error: syntax error before "GLXWindow"
../include/GL/glxew.h:220: warning: data definition has no type or storage class
../include/GL/glxew.h:221: error: syntax error before "GLXPbuffer"
../include/GL/glxew.h:221: warning: data definition has no type or storage class
../include/GL/glxew.h:223: error: syntax error before "Bool"
../include/GL/glxew.h:223: warning: no semicolon at end of struct or union
../include/GL/glxew.h:223: warning: data definition has no type or storage class
../include/GL/glxew.h:223: error: syntax error before "drawable"
../include/GL/glxew.h:223: warning: data definition has no type or storage class
../include/GL/glxew.h:223: error: syntax error before '}' token
../include/GL/glxew.h:223: warning: data definition has no type or storage class
../include/GL/glxew.h:224: error: syntax error before "GLXPbufferClobberEvent"
../include/GL/glxew.h:224: warning: no semicolon at end of struct or union
../include/GL/glxew.h:224: error: syntax error before '}' token
../include/GL/glxew.h:224: warning: data definition has no type or storage class
../include/GL/glxew.h:226: error: syntax error before '*' token
../include/GL/glxew.h:227: error: syntax error before '*' token
../include/GL/glxew.h:228: error: syntax error before '*' token
../include/GL/glxew.h:228: error: syntax error before '*' token
../include/GL/glxew.h:228: error: `GLXPbuffer' declared as function returning a function
../include/GL/glxew.h:228: error: 'GLXPbuffer' redeclared as different kind of symbol
../include/GL/glxew.h:221: error: previous declaration of 'GLXPbuffer' was here
../include/GL/glxew.h:229: error: syntax error before '*' token
../include/GL/glxew.h:229: error: syntax error before '*' token
../include/GL/glxew.h:229: error: `GLXPixmap' declared as function returning a function
../include/GL/glxew.h:229: error: 'GLXPixmap' redeclared as different kind of symbol
../include/GL/glxew.h:102: error: previous declaration of 'GLXPixmap' was here
../include/GL/glxew.h:230: error: syntax error before '*' token
../include/GL/glxew.h:230: error: syntax error before '*' token
../include/GL/glxew.h:230: error: `GLXWindow' declared as function returning a function
../include/GL/glxew.h:230: error: 'GLXWindow' redeclared as different kind of symbol
../include/GL/glxew.h:220: error: previous declaration of 'GLXWindow' was here
../include/GL/glxew.h:231: error: syntax error before '*' token
../include/GL/glxew.h:232: error: syntax error before '*' token
../include/GL/glxew.h:233: error: syntax error before '*' token
../include/GL/glxew.h:234: error: syntax error before '*' token
../include/GL/glxew.h:234: error: `GLXDrawable' declared as function returning a function
../include/GL/glxew.h:234: error: 'GLXDrawable' redeclared as different kind of symbol
../include/GL/glxew.h:101: error: previous declaration of 'GLXDrawable' was here
../include/GL/glxew.h:235: error: syntax error before '*' token
../include/GL/glxew.h:236: error: syntax error before '*' token
../include/GL/glxew.h:237: error: syntax error before '*' token
../include/GL/glxew.h:238: error: syntax error before '*' token
../include/GL/glxew.h:238: error: syntax error before '*' token
../include/GL/glxew.h:238: warning: data definition has no type or storage class
../include/GL/glxew.h:239: error: syntax error before '*' token
../include/GL/glxew.h:239: error: syntax error before '*' token
../include/GL/glxew.h:239: error: `Bool' declared as function returning a function
../include/GL/glxew.h:240: error: syntax error before '*' token
../include/GL/glxew.h:241: error: syntax error before '*' token
../include/GL/glxew.h:242: error: syntax error before '*' token
../include/GL/glxew.h:379: error: syntax error before '*' token
../include/GL/glxew.h:380: error: syntax error before '*' token
../include/GL/glxew.h:381: error: syntax error before '*' token
../include/GL/glxew.h:400: error: syntax error before "GLXContextID"
../include/GL/glxew.h:400: warning: data definition has no type or storage class
../include/GL/glxew.h:402: error: syntax error before '*' token
../include/GL/glxew.h:403: error: syntax error before '*' token
../include/GL/glxew.h:403: error: `GLXContextID' declared as function returning a function
../include/GL/glxew.h:403: error: 'GLXContextID' redeclared as different kind of symbol
../include/GL/glxew.h:400: error: previous declaration of 'GLXContextID' was here
../include/GL/glxew.h:404: error: syntax error before '*' token
../include/GL/glxew.h:405: error: syntax error before '*' token
../include/GL/glxew.h:482: error: syntax error before '*' token
../include/GL/glxew.h:495: error: syntax error before '*' token
../include/GL/glxew.h:495: error: `PFNGLXCREATEGLXPIXMAPMESAPROC' declared as function returning a function
../include/GL/glxew.h:508: error: syntax error before '*' token
../include/GL/glxew.h:508: error: `PFNGLXRELEASEBUFFERSMESAPROC' declared as function returning a function
../include/GL/glxew.h:665: error: syntax error before "GLXFBConfigIDSGIX"
../include/GL/glxew.h:665: warning: data definition has no type or storage class
../include/GL/glxew.h:668: error: syntax error before '*' token
../include/GL/glxew.h:669: error: syntax error before '*' token
../include/GL/glxew.h:670: error: syntax error before '*' token
../include/GL/glxew.h:670: error: `PFNGLXCREATEGLXPIXMAPWITHCONFIGSGIXPROC' declared as function returning a function
../include/GL/glxew.h:671: error: syntax error before '*' token
../include/GL/glxew.h:672: error: syntax error before '*' token
../include/GL/glxew.h:673: error: syntax error before '*' token
../include/GL/glxew.h:673: error: syntax error before '*' token
../include/GL/glxew.h:673: warning: data definition has no type or storage class
../include/GL/glxew.h:717: error: syntax error before "GLXPbufferSGIX"
../include/GL/glxew.h:717: warning: data definition has no type or storage class
../include/GL/glxew.h:718: error: field `send_event' declared as a function
../include/GL/glxew.h:718: error: syntax error before "Display"
../include/GL/glxew.h:718: warning: no semicolon at end of struct or union
../include/GL/glxew.h:718: error: 'drawable' redeclared as different kind of symbol
../include/GL/glxew.h:223: error: previous declaration of 'drawable' was here
../include/GL/glxew.h:718: error: syntax error before '}' token
../include/GL/glxew.h:718: warning: data definition has no type or storage class
../include/GL/glxew.h:720: error: syntax error before '*' token
../include/GL/glxew.h:720: error: `PFNGLXCREATEGLXPBUFFERSGIXPROC' declared as function returning a function
../include/GL/glxew.h:721: error: syntax error before '*' token
../include/GL/glxew.h:722: error: syntax error before '*' token
../include/GL/glxew.h:723: error: syntax error before '*' token
../include/GL/glxew.h:724: error: syntax error before '*' token
../include/GL/glxew.h:741: error: syntax error before '*' token
../include/GL/glxew.h:742: error: syntax error before '*' token
../include/GL/glxew.h:742: error: `PFNGLXQUERYMAXSWAPBARRIERSSGIXPROC' declared as function returning a function
../include/GL/glxew.h:756: error: syntax error before '*' token
../include/GL/glxew.h:772: error: syntax error before '*' token
../include/GL/glxew.h:773: error: syntax error before '*' token
../include/GL/glxew.h:774: error: syntax error before '*' token
../include/GL/glxew.h:775: error: syntax error before '*' token
../include/GL/glxew.h:776: error: syntax error before '*' token
../include/GL/glxew.h:804: error: syntax error before '*' token
../include/GL/glxew.h:817: error: `PFNGLXGETCURRENTREADDRAWABLESGIPROC' declared as function returning a function
../include/GL/glxew.h:818: error: syntax error before '*' token
../include/GL/glxew.h:818: error: `PFNGLXMAKECURRENTREADSGIPROC' declared as function returning a function
../include/GL/glxew.h:845: error: syntax error before '*' token
../include/GL/glxew.h:860: error: syntax error before '*' token
../include/GL/glxew.h:860: error: syntax error before '*' token
../include/GL/glxew.h:860: error: `Status' declared as function returning a function
../include/GL/glxew.h:876: error: syntax error before '*' token
../include/GL/glxew.h:877: error: syntax error before '*' token
../include/GL/glxew.h:894: error: syntax error before "__glewXGetCurrentDisplay"
../include/GL/glxew.h:894: warning: data definition has no type or storage class
../include/GL/glxew.h:898: error: syntax error before "__glewXCreatePbuffer"
../include/GL/glxew.h:898: warning: data definition has no type or storage class
../include/GL/glxew.h:899: error: syntax error before "__glewXCreatePixmap"
../include/GL/glxew.h:899: warning: data definition has no type or storage class
../include/GL/glxew.h:900: error: syntax error before "__glewXCreateWindow"
../include/GL/glxew.h:900: warning: data definition has no type or storage class
../include/GL/glxew.h:904: error: syntax error before "__glewXGetCurrentReadDrawable"
../include/GL/glxew.h:904: warning: data definition has no type or storage class
../include/GL/glxew.h:908: error: syntax error before "__glewXGetVisualFromFBConfig"
../include/GL/glxew.h:908: warning: data definition has no type or storage class
../include/GL/glxew.h:909: error: syntax error before "__glewXMakeContextCurrent"
../include/GL/glxew.h:909: warning: data definition has no type or storage class
../include/GL/glxew.h:919: error: syntax error before "__glewXGetContextIDEXT"
../include/GL/glxew.h:919: warning: data definition has no type or storage class
../include/GL/glxew.h:949: error: syntax error before "__glewXGetVisualFromFBConfigSGIX"
../include/GL/glxew.h:949: warning: data definition has no type or storage class
../include/GL/glxew.h:978: error: syntax error before "__glewXGetTransparentIndexSUN"
../include/GL/glxew.h:978: warning: data definition has no type or storage class
glew.c:6429: error: syntax error before "__glewXGetCurrentDisplay"
glew.c:6429: warning: data definition has no type or storage class
glew.c:6433: error: syntax error before "__glewXCreatePbuffer"
glew.c:6433: warning: data definition has no type or storage class
glew.c:6434: error: syntax error before "__glewXCreatePixmap"
glew.c:6434: warning: data definition has no type or storage class
glew.c:6435: error: syntax error before "__glewXCreateWindow"
glew.c:6435: warning: data definition has no type or storage class
glew.c:6439: error: syntax error before "__glewXGetCurrentReadDrawable"
glew.c:6439: warning: data definition has no type or storage class
glew.c:6443: error: syntax error before "__glewXGetVisualFromFBConfig"
glew.c:6443: warning: data definition has no type or storage class
glew.c:6444: error: syntax error before "__glewXMakeContextCurrent"
glew.c:6444: warning: data definition has no type or storage class
glew.c:6454: error: syntax error before "__glewXGetContextIDEXT"
glew.c:6454: warning: data definition has no type or storage class
glew.c:6484: error: syntax error before "__glewXGetVisualFromFBConfigSGIX"
glew.c:6484: warning: data definition has no type or storage class
glew.c:6513: error: syntax error before "__glewXGetTransparentIndexSUN"
glew.c:6513: warning: data definition has no type or storage class
glew.c: In function `_glewInit_GLX_VERSION_1_2':
glew.c:6571: warning: assignment makes integer from pointer without a cast
glew.c:6571: error: syntax error before "dlGetProcAddress"
glew.c: In function `_glewInit_GLX_VERSION_1_3':
glew.c:6586: error: `PFNGLXCREATEPBUFFERPROC' undeclared (first use in this function)
glew.c:6586: error: (Each undeclared identifier is reported only once
glew.c:6586: error: for each function it appears in.)
glew.c:6586: error: syntax error before "dlGetProcAddress"
glew.c:6587: error: `PFNGLXCREATEPIXMAPPROC' undeclared (first use in this function)
glew.c:6587: error: syntax error before "dlGetProcAddress"
glew.c:6588: error: `PFNGLXCREATEWINDOWPROC' undeclared (first use in this function)
glew.c:6588: error: syntax error before "dlGetProcAddress"
glew.c:6592: error: `PFNGLXGETCURRENTREADDRAWABLEPROC' undeclared (first use in this function)
glew.c:6592: error: syntax error before "dlGetProcAddress"
glew.c:6596: warning: assignment makes integer from pointer without a cast
glew.c:6596: error: syntax error before "dlGetProcAddress"
glew.c:6597: error: `PFNGLXMAKECONTEXTCURRENTPROC' undeclared (first use in this function)
glew.c:6597: error: syntax error before "dlGetProcAddress"
glew.c: In function `_glewInit_GLX_EXT_import_context':
glew.c:6653: error: `PFNGLXGETCONTEXTIDEXTPROC' undeclared (first use in this function)
glew.c:6653: error: syntax error before "dlGetProcAddress"
glew.c: In function `_glewInit_GLX_SGIX_fbconfig':
glew.c:6806: warning: assignment makes integer from pointer without a cast
glew.c:6806: error: syntax error before "dlGetProcAddress"
glew.c: In function `_glewInit_GLX_SUN_get_transparent_index':
glew.c:6938: error: `PFNGLXGETTRANSPARENTINDEXSUNPROC' undeclared (first use in this function)
glew.c:6938: error: syntax error before "dlGetProcAddress"
glew.c: In function `glxewGetExtension':
glew.c:6969: error: called object is not a function
glew.c: In function `glxewContextInit':
glew.c:6993: error: called object is not a function
gmake[2]: ** [/export/home/cindy/Desktop/blender-2.48a/obj/solaris-2.11-x86_64/extern/glew/glew.o] Erro 1
gmake[1]: ** [all] Erro 1
gmake: ** [all] Erro 1
[/code]

Posted: Mon Apr 27, 2009 12:50 am
by stiv
When creating your symlinks, either delete the existing files or use the -f or --force flag to force 'ln' to overwrite them.

In file included from glew.c:36:
../include/GL/glxew.h:62:22: X11/Xlib.h: No such file or directory
For this, you either messed up the #includes in the source, are missing a -I path, or have screwed up the X11 dir. Are Xlib.h and friends actually still there?

Posted: Mon Apr 27, 2009 5:13 am
by cindy
stiv wrote:When creating your symlinks, either delete the existing files or use the -f or --force flag to force 'ln' to overwrite them.

In file included from glew.c:36:
../include/GL/glxew.h:62:22: X11/Xlib.h: No such file or directory
For this, you either messed up the #includes in the source, are missing a -I path, or have screwed up the X11 dir. Are Xlib.h and friends actually still there?
This: X11/Xlib.h
Should be where?
Well, these headers aren't in
/usr/X11/include/X11
or in
/usr/X11/
or in
/usr/X11/lib/X11

Then I made a search and couldn't find that file. Where could it be? How can I recover those files?

Posted: Mon Apr 27, 2009 9:26 am
by jesterKing
You'll need to install the X11 development packages that contain the proper headers and development libraries.

/Nathan

Posted: Tue Apr 28, 2009 4:06 am
by cindy
jesterKing wrote:You'll need to install the X11 development packages that contain the proper headers and development libraries.

/Nathan
These are the packages:

Code: Select all

pkg install SUNWxorg-headers SUNWxwinc
Well, Now I need another packages...

Code: Select all

/usr/include/OpenEXR/ImfInputFile.h:47:28: ImfFrameBuffer.h: No such file or directory
/usr/include/OpenEXR/ImfInputFile.h:48:32: ImfTiledOutputFile.h: No such file or directory
/usr/include/OpenEXR/ImfInputFile.h:51:26: ImfThreading.h: No such file or directory
Except I've already installed

Code: Select all

 SUNWopenexr SUNWilmbase
So I have NO idea what's the name of the package I need... =/

Posted: Tue Apr 28, 2009 5:56 am
by jesterKing
Again this would be the development package for OpenEXR, probably ending in -headers again.

/Nathan

Posted: Thu Jun 04, 2009 6:36 am
by mjordan
cindy wrote:
jesterKing wrote:You'll need to install the X11 development packages that contain the proper headers and development libraries.

/Nathan
These are the packages:

Code: Select all

pkg install SUNWxorg-headers SUNWxwinc
Well, Now I need another packages...

Code: Select all

/usr/include/OpenEXR/ImfInputFile.h:47:28: ImfFrameBuffer.h: No such file or directory
/usr/include/OpenEXR/ImfInputFile.h:48:32: ImfTiledOutputFile.h: No such file or directory
/usr/include/OpenEXR/ImfInputFile.h:51:26: ImfThreading.h: No such file or directory
Except I've already installed

Code: Select all

 SUNWopenexr SUNWilmbase
So I have NO idea what's the name of the package I need... =/
I'm trying OpenSolaris 2009.06 (Solaris 2.11 build 111b) and I have installed Ilmbase and OpenEXR. Seems like the OpenEXR package installs development files (it creates a /usr/include/OpenEXR directory), but some files are missing (specifically, the Imf* files). No other packages are available from the official opensolaris repositories (at least, I didn't find anything suitable), so I tried building the libraries myself (after I have successfully bootstrapped a GCC 4.4 compiler on it ;-) )
Building the OpenEXR library, gives a compiler error in main.cpp (exrmaketiled) at line 213:

Code: Select all

error: `strcmp` was not declared in this scope
So I have edited the file main.cpp and I have added the line:

Code: Select all

#include <cstring>
at the top of the file (incredible how some great programmers forget basic things). I repeated the above process for the main.cpp file in exrenvmap directory (adding the missing #include). Now the library compile flawlessly (I'm so happy gcc and g++ are becoming more and more pedant, issuing errors for basic mistakes).
Install it with the command:

Code: Select all

pfexec make install-strip
and everything will go fine. Now here are the problems. Blender won't compile well with GCC 4.4 issuing many errors with the OpenEXR header files. The problem is GCC 4.4 is less tolerant to improper header inclusion. OpenEXR headers include local headers like global headers, and GCC 4.4 is not happy. So I have edited manually every OpenEXR header that has problems (specifically, ImfIO.h, ImfChannelList.h, ImfInputFile.h, ImfHeader.h, ImfCompressionAttribute.h, ImfFrameBuffer.h, ImfTiledOutputFile.h, ImfAttribute.h, ImfStringAttribute.h, ImfOutputFile.h and ImfXdr.h changing global declarations in local ones). Notice that are all Imf* headers, so this explains why these headers are not included with the opensolaris OpenEXR package: the sources are broken with latest compilers ;)

Make sure to install SUNWPython25 also.
Other things I did:
a) Modified BSE_seqaudio.h SDL.h inclusion from:

Code: Select all

#include <SDL.h>
to:

Code: Select all

#include <SDL/SDL.h>
b) Fixed *a lot* of problems with the recognition of the Python installation and the Blender Python API, by manually editing files (sigh). I don't know why the Python headers are not recognized by the NAN makefiles...
Notice that the number of warnings generated by the compiler is *insane*.

After all this effort, I still cannot compile Blender on OpenSolaris (well, I cannot link):

Code: Select all

make[1]: *** No rule to make target `/export/home/mjordan/Blender/blender/../lib/solaris-2.11-i386/jpeg/lib/libjpeg.a', needed by `/export/home/mjordan/Blender/blender/obj/solaris-2.11-i386/bin/blender'.  Stop.
make: *** [all] Error 1

Posted: Mon Oct 12, 2009 8:19 am
by keremet
Blender 2.49b binaries for OpenSolaris 2009.06 x64: http://os-solaris.ru/en/pakety/graphics/