|
Compiling Allegro 5 on Solaris 10 (sparc) |
Buckley
Member #10,105
August 2008
|
I have a Sun Blade 100 system (it is old, but works great) that I've installed Solaris 10 on. I have also installed Gnu make 3.80 and CMake 2.6.4. gcc came pre-installed and is at version 3.4.3. Whenever I follow the instructions to compile Allegro on this system, I get the error messages indicated in the attached text file. (CompileError.txt) The cmake .. command works great. The compilation seems to work up to the 16% mark, then errors out. Refer to the attached text file. I have not modified any Allegro source code. The warnings and errors you see in the text file are what I've been getting "out of the box" when trying to compile Allegro. Any comments or suggestions are GREATLY appreciated.
|
Arthur Kalliokoski
Second in Command
February 2005
|
The first error points to a line that says typedef unsigned char _Bool; Does your compiler know what a typedef is? Is it using the Sun compiler or gcc? They all watch too much MSNBC... they get ideas. |
Buckley
Member #10,105
August 2008
|
As per my first post I'm using the gcc compiler that installed with Solaris. It is gcc version 3.4.3. However, I have also tried using the SunStudio 12 compiler. Both fail when following the Allegro build instructions. Looking at the error output (text file attached in first post) it appears that Allegro is redefining some OpenGL variables that are already defined in header files that Solaris installs. From attached file: In the above, /usr/include/GL/glx.h came with Solaris 10. Is it normal for Allegro to redefine OpenGL variables that are already defined in OpenGL header files in the OS?
|
Edgar Reynaldo
Major Reynaldo
May 2007
|
Your gcc and cmake are pretty out of date. Try updating those first. My Website! | EAGLE GUI Library Demos | My Deviant Art Gallery | Spiraloid Preview | A4 FontMaker | Skyline! (Missile Defense) Eagle and Allegro 5 binaries | Older Allegro 4 and 5 binaries | Allegro 5 compile guide |
Buckley
Member #10,105
August 2008
|
Okay, I've upgraded the system to use gcc/g++ 4.8.2. The results? EXACTLY the same. I'll try installing a newer version of cmake onto the system. I see that version 2.8.12 is now available for download. If this doesn't work then I'm not quite sure what to do. What versions of Gnu make, gcc/g++ and cmake are others using? Thanks!!
|
Edgar Reynaldo
Major Reynaldo
May 2007
|
OpenGL comes with gcc, but it looks like allegro is trying to patch deficient GL stuff on systems that use X. (I'm thinking out loud) Unix isn't supported explicitly. Is there an updated graphics driver for Solaris 10? How old is Solaris 10? My Website! | EAGLE GUI Library Demos | My Deviant Art Gallery | Spiraloid Preview | A4 FontMaker | Skyline! (Missile Defense) Eagle and Allegro 5 binaries | Older Allegro 4 and 5 binaries | Allegro 5 compile guide |
Arthur Kalliokoski
Second in Command
February 2005
|
I just tried this with gcc 4.8.2 on Linux #include <stdio.h> typedef unsigned char _Bool; int main(void) { _Bool mybit = 1; printf("mybit is %u\n",mybit); return 0; } and it bombed out with pepsi@fractal:~ 07:59 PM $ gcc -s -O2 -Wall t.c -o t t.c:3:23: error: two or more data types in declaration specifiers typedef unsigned char _Bool; ^ t.c:3:1: warning: useless type name in empty declaration [enabled by default] typedef unsigned char _Bool; ^ pepsi@fractal:~ 07:59 PM $ Removing the prepended underscore fixed it. Maybe manually patching it will fix it, and possibly the other errors are some type of cascade? [EDIT] Renaming it to _Booll also caused it to compile without error. Adding the option -std=c89 didn't affect the _Bool causing an error. [EDIT2] Eliminating the typedef entirely allowed it to compile even with -std=c89, as if it's still using _Bool as a keyword. Compiler bug? I ran into another gcc 4.8.2 bug a few weeks ago concerning structs. They all watch too much MSNBC... they get ideas. |
Buckley
Member #10,105
August 2008
|
Thank you Arthur and Edgar for your responses, I really appreciate them. I've been slowly 'fixing' the Allegro source code so that it compiles on my Solaris system. However, I have a wife, a toddler, an infant and a full time job that all compete for my time as well. I'm lucky some days to have 20 minutes on the computer. This is why I was hoping that Allegro would compile "out of the box" on my system. Anyways, I'll post my progress (hopefully a solution) by next week...maybe. Thanks again!!
|
Edgar Reynaldo
Major Reynaldo
May 2007
|
It would be awesome if you contributed a patch once you're done. Then we might be able to add Unix to the list of supported platforms. Which would be cool. Have you figured out why you're getting OpenGL errors? Also, threads lock after a week of inactivity, so if you need us to bump the thread we will. My Website! | EAGLE GUI Library Demos | My Deviant Art Gallery | Spiraloid Preview | A4 FontMaker | Skyline! (Missile Defense) Eagle and Allegro 5 binaries | Older Allegro 4 and 5 binaries | Allegro 5 compile guide |
Thomas Fjellstrom
Member #476
June 2000
|
Technically _Bool is a type in C now, so something is causing allegro to define it, even when the system is. I assume the solaris compiler isn't declaring that it supports that type (stdint.h?) the way allegro is expecting? -- |
torhu
Member #2,727
September 2002
|
It sounds really weird to me that GCC on Solaris would mess up something like that. Are you sure the standard C headers are up to date too? The required header is stdbool.h, the #define is __bool_true_false_are_defined. |
Buckley
Member #10,105
August 2008
|
So I'm guessing that something may not have been properly cleaned out in my allegro directory. Therefore I decided to create a brand new directory to untar allegro into and start from scratch, using only the new version of gcc this time vice starting with the older compiler then moving to the newer compiler. The result this time? Allegro still compiled to the 16% mark, but the error message this time was "unknown type name 'GLintptr'" from file allegro-5.0.10/include/allegro5/opengl/GLext/gl_ext_api.h. I got this error corrected and recompiled. More errors were displayed. I corrected a bunch and recompiled. More errors, corrected them and recompiled, etc, etc. My current progress: Allegro compiles to the 50% mark and there is a linker error due to some undefined symbols. But it is late, I have family staying with me and have eggs to hide for my daughter and her neighbors tomorrow. Edit: On Sunday night I had 3 linker errors. I now have it down to 2 linker errors. Time has been very hard to come by this week so far. I'm hoping that I'll have more time Friday or Saturday to work on this. When I finally get everything compiled and linked I'll post a summary of what I did, just in case there are others out there who want to use Allegro on a Solaris 10 sparc platform.
|
|