Allegro.cc - Online Community

Allegro.cc Forums » Installation, Setup & Configuration » Trouble with compiling Allegro 4.9

Credits go to Evert and Peter Wang for helping out!
This thread is locked; no one can reply to it. rss feed Print
Trouble with compiling Allegro 4.9
rossrisotto
Member #10,865
April 2009

Hello all,

I am trying to get Allegro up and running and have run into some trouble.
I am using Ubuntu 8.10

So far I have:
- Installed subversion and cmake
- Used svn to get the allegro source
- Installed the packages: zlib1g-dev, libpng12-dev, libfreetype6-dev, libvorbis-dev, libx11-dev, libxcursor-dev, libxxf86vm-dev, libasound2-dev, libjack-dev
- Used cmake to make the build files

All this has gone smoothly from what I can see.
Now I am trying to compile Allegro and am getting an error:

~/allegro/4.9/Build $ sudo make

#SelectExpand
1Scanning dependencies of target allegro 2[ 0%] Building C object CMakeFiles/allegro.dir/src/allegro.c.o 3/home/ross/allegro/4.9/src/allegro.c: In function ‘al_trace: 4/home/ross/allegro/4.9/src/allegro.c:395: warning: ignoring return value of ‘fwrite’, declared with attribute warn_unused_result 5[ 0%] Building C object CMakeFiles/allegro.dir/src/bitmap_new.c.o 6[ 1%] Building C object CMakeFiles/allegro.dir/src/blenders.c.o 7[ 1%] Building C object CMakeFiles/allegro.dir/src/config.c.o 8[ 2%] Building C object CMakeFiles/allegro.dir/src/convert.c.o 9[ 2%] Building C object CMakeFiles/allegro.dir/src/display_new.c.o 10[ 2%] Building C object CMakeFiles/allegro.dir/src/display_settings.c.o 11[ 3%] Building C object CMakeFiles/allegro.dir/src/dtor.c.o 12[ 3%] Building C object CMakeFiles/allegro.dir/src/events.c.o 13[ 4%] Building C object CMakeFiles/allegro.dir/src/evtsrc.c.o 14[ 4%] Building C object CMakeFiles/allegro.dir/src/fshook.c.o 15[ 4%] Building C object CMakeFiles/allegro.dir/src/fshook_stdio.c.o 16[ 5%] Building C object CMakeFiles/allegro.dir/src/graphics.c.o 17[ 5%] Building C object CMakeFiles/allegro.dir/src/inline.c.o 18[ 6%] Building C object CMakeFiles/allegro.dir/src/joynu.c.o 19[ 6%] Building C object CMakeFiles/allegro.dir/src/keybdnu.c.o 20[ 6%] Building C object CMakeFiles/allegro.dir/src/libc.c.o 21[ 7%] Building C object CMakeFiles/allegro.dir/src/math.c.o 22[ 7%] Building C object CMakeFiles/allegro.dir/src/memblit.c.o 23[ 8%] Building C object CMakeFiles/allegro.dir/src/memdraw.c.o 24[ 8%] Building C object CMakeFiles/allegro.dir/src/memory.c.o 25[ 8%] Building C object CMakeFiles/allegro.dir/src/mousenu.c.o 26[ 9%] Building C object CMakeFiles/allegro.dir/src/path.c.o 27[ 9%] Building C object CMakeFiles/allegro.dir/src/pixels.c.o 28[ 10%] Building C object CMakeFiles/allegro.dir/src/rotate.c.o 29[ 10%] Building C object CMakeFiles/allegro.dir/src/system_new.c.o 30[ 10%] Building C object CMakeFiles/allegro.dir/src/threads.c.o 31[ 11%] Building C object CMakeFiles/allegro.dir/src/timernu.c.o 32[ 11%] Building C object CMakeFiles/allegro.dir/src/tls.c.o 33[ 12%] Building C object CMakeFiles/allegro.dir/src/unicode.c.o 34[ 12%] Building C object CMakeFiles/allegro.dir/src/utf8.c.o 35[ 12%] Building C object CMakeFiles/allegro.dir/src/misc/bstrlib.c.o 36[ 13%] Building C object CMakeFiles/allegro.dir/src/misc/vector.c.o 37[ 13%] Building C object CMakeFiles/allegro.dir/src/unix/udjgpp.c.o 38[ 14%] Building C object CMakeFiles/allegro.dir/src/unix/udrvlist.c.o 39[ 14%] Building C object CMakeFiles/allegro.dir/src/unix/udummy.c.o 40[ 14%] Building C object CMakeFiles/allegro.dir/src/unix/ufdwatch.c.o 41[ 15%] Building C object CMakeFiles/allegro.dir/src/unix/ugfxdrv.c.o 42[ 15%] Building C object CMakeFiles/allegro.dir/src/unix/ujoydrv.c.o 43[ 16%] Building C object CMakeFiles/allegro.dir/src/unix/ukeybd.c.o 44[ 16%] Building C object CMakeFiles/allegro.dir/src/unix/umain.c.o 45[ 16%] Building C object CMakeFiles/allegro.dir/src/unix/umodules.c.o 46[ 17%] Building C object CMakeFiles/allegro.dir/src/unix/umouse.c.o 47[ 17%] Building C object CMakeFiles/allegro.dir/src/unix/upath.c.o 48/home/ross/allegro/4.9/src/unix/upath.c: In function ‘get_executable_name: 49/home/ross/allegro/4.9/src/unix/upath.c:184: warning: ignoring return value of ‘fgets’, declared with attribute warn_unused_result 50/home/ross/allegro/4.9/src/unix/upath.c:192: warning: ignoring return value of ‘fgets’, declared with attribute warn_unused_result 51[ 18%] Building C object CMakeFiles/allegro.dir/src/unix/utime.c.o 52[ 18%] Building C object CMakeFiles/allegro.dir/src/unix/uxthread.c.o 53[ 18%] Building C object CMakeFiles/allegro.dir/src/x/xcursor.c.o 54[ 19%] Building C object CMakeFiles/allegro.dir/src/x/xkeyboard.c.o 55[ 19%] Building C object CMakeFiles/allegro.dir/src/x/xmousenu.c.o 56[ 20%] Building C object CMakeFiles/allegro.dir/src/x/xdisplay.c.o 57[ 20%] Building C object CMakeFiles/allegro.dir/src/x/xfullscreen.c.o 58/home/ross/allegro/4.9/src/x/xfullscreen.c: In function ‘_al_xglx_fullscreen_set_mode’: 59/home/ross/allegro/4.9/src/x/xfullscreen.c:54: warning: ‘mode.width’ may be used uninitialized in this function 60/home/ross/allegro/4.9/src/x/xfullscreen.c:54: warning: ‘mode.height’ may be used uninitialized in this function 61/home/ross/allegro/4.9/src/x/xfullscreen.c:54: warning: ‘mode.format’ may be used uninitialized in this function 62/home/ross/allegro/4.9/src/x/xfullscreen.c:54: warning: ‘mode.refresh_rate’ may be used uninitialized in this function 63/home/ross/allegro/4.9/src/x/xfullscreen.c:55: warning: ‘mode2.refresh_rate’ may be used uninitialized in this function 64[ 20%] Building C object CMakeFiles/allegro.dir/src/x/xglx_config.c.o 65[ 21%] Building C object CMakeFiles/allegro.dir/src/x/xsystem.c.o 66[ 21%] Building C object CMakeFiles/allegro.dir/src/linux/ljoynu.c.o 67[ 22%] Building C object CMakeFiles/allegro.dir/src/opengl/extensions.c.o 68[ 22%] Building C object CMakeFiles/allegro.dir/src/opengl/ogl_bitmap.c.o 69[ 22%] Building C object CMakeFiles/allegro.dir/src/opengl/ogl_draw.c.o 70[ 23%] Building C object CMakeFiles/allegro.dir/src/opengl/ogl_display.c.o 71Linking C shared library lib/liballegro-4.9.10.so 72[ 23%] Built target allegro 73Scanning dependencies of target a5_iio 74[ 23%] Building C object addons/iio/CMakeFiles/a5_iio.dir/bmp.c.o 75[ 24%] Building C object addons/iio/CMakeFiles/a5_iio.dir/iio.c.o 76[ 24%] Building C object addons/iio/CMakeFiles/a5_iio.dir/pcx.c.o 77[ 24%] Building C object addons/iio/CMakeFiles/a5_iio.dir/tga.c.o 78Linking C shared library ../../lib/liba5_iio-4.9.10.so 79[ 24%] Built target a5_iio 80Scanning dependencies of target a5_font 81[ 25%] Building C object addons/font/CMakeFiles/a5_font.dir/font.c.o 82[ 25%] Building C object addons/font/CMakeFiles/a5_font.dir/fontbmp.c.o 83[ 26%] Building C object addons/font/CMakeFiles/a5_font.dir/text.c.o 84/home/ross/allegro/4.9/addons/font/text.c: In function ‘al_draw_textf’: 85/home/ross/allegro/4.9/addons/font/text.c:163: error: ‘__are_you_sure__’ undeclared (first use in this function) 86/home/ross/allegro/4.9/addons/font/text.c:163: error: (Each undeclared identifier is reported only once 87/home/ross/allegro/4.9/addons/font/text.c:163: error: for each function it appears in.) 88/home/ross/allegro/4.9/addons/font/text.c:163: warning: left-hand operand of comma expression has no effect 89/home/ross/allegro/4.9/addons/font/text.c:163: warning: left-hand operand of comma expression has no effect 90/home/ross/allegro/4.9/addons/font/text.c:163: warning: left-hand operand of comma expression has no effect 91/home/ross/allegro/4.9/addons/font/text.c:163: warning: left-hand operand of comma expression has no effect 92make[2]: *** [addons/font/CMakeFiles/a5_font.dir/text.c.o] Error 1 93make[1]: *** [addons/font/CMakeFiles/a5_font.dir/all] Error 2 94make: *** [all] Error 2

Something to do with fonts? I have no idea. Would really appreciate some help if anyone could spare the time ;D

Evert
Member #794
November 2000
avatar

Something to do with fonts? I have no idea. Would really appreciate some help if anyone could spare the time ;D

I don't think it has anything to do with you, but I haven't found the problem yet either.
The error message is caused by a #define near the top of that source file that #defines away strlen() (to discourage its use because using it in this context is likely to be a bug, apparently). I get the impression that your C compiler is doing a macro expansion that inserts a call to strlen().
You can comment out the #define for now, that should fix the problem temporarily.

EDIT: well, no explicit calls to strlen anywhere. I'm guessing your compiler (what version do you have?) #defines strcmp(s1,s2) as strncmp(s1,s2,min(strlen(s1), strlen(s2)) or something to that effect. Could you check this?
I'll remove the #define for the time being (so the problem should then be fixed in svn).

Peter Wang
Member #23
April 2000

I noticed this today and committed the same fix to my git repository but evidently forgot to propagate that to svn, sorry.

Evert
Member #794
November 2000
avatar

No problem, it was an easy fix.
I opted for commenting out the line and adding a comment in favour of removing it completely, but that's probably what we should do before 5.0 release anyway.

rossrisotto
Member #10,865
April 2009

Oh I see, I will try this tonight and also check my compiler version. Thanks heaps for the help

EDIT:
I have GCC 4.3.2 if you still wanted to know.
It compiles and installs correctly now, thanks again for the help, appreciate it.

Go to: