Allegro.cc - Online Community

Allegro.cc Forums » Installation, Setup & Configuration » Building on Ubuntu

This thread is locked; no one can reply to it. rss feed Print
Building on Ubuntu
Schyfis
Member #9,752
May 2008
avatar

I'm trying to build Allegro 5.1.7 on Ubuntu for Android development, because it seems like it isn't possible on Windows yet(?). I've been following the instructions in readme_android.txt, but when I run the command cmake .. -DANDROID_NDK_TOOLCHAIN_ROOT=$ANDROID_TC -DWANT_ANDROID=on -DWANT_EXAMPLES=OFF -DWANT_DEMO=OFF -DCMAKE_BUILD_TYPE=Debug, I get the following output:

-- Selected Android toolchain: /home/me/android-sdks
-- Could NOT find PkgConfig (missing:  PKG_CONFIG_EXECUTABLE) 
-- Could NOT find OpenAL (missing:  OPENAL_LIBRARY OPENAL_INCLUDE_DIR) 
-- Could NOT find OPENSL (missing:  OPENSL_INCLUDE_DIR OPENSL_LIBRARY) 
WARNING: allegro_audio wanted but no supported backend found
-- Could NOT find Freetype (missing:  FREETYPE_LIBRARY FREETYPE_INCLUDE_DIRS) 
WARNING: FreeType not found, disabling support.
-- Could NOT find PhysFS (missing:  PHYSFS_LIBRARY PHYSFS_INCLUDE_DIR) 
-- Could NOT find PHYSFS (missing:  PHYSFS_LIBRARY PHYSFS_INCLUDE_DIR) 
-- Could NOT find OGG (missing:  OGG_INCLUDE_DIR OGG_LIBRARY) 
-- Could NOT find OGG (missing:  OGG_INCLUDE_DIR OGG_LIBRARY) 
WARNING: allegro_video wanted but no supported backend found
-- Not building tests due to missing library. Have: allegro allegro_main allegro_image allegro_color allegro_font  allegro_primitives
-- Configuring done
-- Generating done
-- Build files have been written to: /home/me/allegro/build

So, I set about installing all of them. I found some instructions on the wiki, and ran the command sudo apt-get install -y cmake g++ freeglut3-dev libxcursor-dev libpng12-dev libjpeg-dev libfreetype6-dev libgtk2.0-dev libasound2-dev libpulse-dev libopenal-dev libflac-dev libdumb1-dev libvorbis-dev libphysfs-dev with no errors.
However, when I try the previously mentioned cmake command again, it's the same result. How can I get cmake to find the libraries Allegro wants?

Edit:
Obviously, I'm not a Linux guru... I know enough to get around a bit, but that's about it. Any advice?

EditEdit:
So I figured out you could put various things in the allegro/deps folder for cmake to find, and this is slightly improving things:

$ cmake .. -DANDROID_NDK_TOOLCHAIN_ROOT=$ANDROID_TC -DWANT_ANDROID=on -DWANT_EXAMPLES=OFF -DWANT_DEMO=OFF -DCMAKE_BUILD_TYPE=Debug -DWANT_MONOLITH=ON
-- Selected Android toolchain: /home/will/android-sdks
-- Adding /home/me/allegro/deps/PhysicsFS to CMAKE_FIND_ROOT_PATH
-- Adding /home/me/allegro/deps/freetype to CMAKE_FIND_ROOT_PATH
-- Adding /home/me/allegro/deps/FLAC to CMAKE_FIND_ROOT_PATH
-- Adding /home/me/allegro/deps/OpenAL to CMAKE_FIND_ROOT_PATH
-- Adding /home/me/allegro/deps/ogg to CMAKE_FIND_ROOT_PATH
-- Adding /home/me/allegro/deps/DUMB to CMAKE_FIND_ROOT_PATH
-- Adding /home/me/allegro/deps/Vorbis to CMAKE_FIND_ROOT_PATH
-- Could NOT find PkgConfig (missing:  PKG_CONFIG_EXECUTABLE) 
-- Could NOT find OPENSL (missing:  OPENSL_INCLUDE_DIR OPENSL_LIBRARY) 
WARNING: libFLAC not found or compile test failed, disabling support.
-- Found DUMB: /home/me/allegro/deps/DUMB/include  
-- Performing Test DUMB_COMPILES
-- Performing Test DUMB_COMPILES - Failed
WARNING: libdumb not found or compile test failed, disabling support. <http://dumb.sourceforge.net/>
WARNING: libvorbis not found or compile test failed, disabling support.
-- Could NOT find THEORA (missing:  THEORA_INCLUDE_DIR THEORA_LIBRARY) 
WARNING: allegro_video wanted but no supported backend found
-- Configuring done
-- Generating done
-- Build files have been written to: /home/me/allegro/build

I must still be missing something?

...(later)...
I found the pkg-config utility, and had to put it in the allegro/build folder for cmake to find it. Anyone know a fix for all this?
Slightly improved again:

$ cmake .. -DANDROID_NDK_TOOLCHAIN_ROOT=$ANDROID_TC -DWANT_ANDROID=on -DWANT_EXAMPLES=OFF -DWANT_DEMO=OFF -DCMAKE_BUILD_TYPE=Debug -DWANT_MONOLITH=ON
-- Selected Android toolchain: /home/me/android-sdks
-- Adding /home/me/allegro/deps/PhysicsFS to CMAKE_FIND_ROOT_PATH
-- Adding /home/me/allegro/deps/freetype to CMAKE_FIND_ROOT_PATH
-- Adding /home/me/allegro/deps/FLAC to CMAKE_FIND_ROOT_PATH
-- Adding /home/me/allegro/deps/OpenAL to CMAKE_FIND_ROOT_PATH
-- Adding /home/me/allegro/deps/ogg to CMAKE_FIND_ROOT_PATH
-- Adding /home/me/allegro/deps/DUMB to CMAKE_FIND_ROOT_PATH
-- Adding /home/me/allegro/deps/Vorbis to CMAKE_FIND_ROOT_PATH
-- Could NOT find OPENSL (missing:  OPENSL_INCLUDE_DIR OPENSL_LIBRARY) 
WARNING: libFLAC not found or compile test failed, disabling support.
WARNING: libdumb not found or compile test failed, disabling support. <http://dumb.sourceforge.net/>
WARNING: libvorbis not found or compile test failed, disabling support.
-- Could NOT find THEORA (missing:  THEORA_INCLUDE_DIR THEORA_LIBRARY) 
WARNING: allegro_video wanted but no supported backend found
-- Configuring done
-- Generating done
-- Build files have been written to: /home/me/allegro/build

libFLAC.a and libFLAC.so are indeed in allegro/deps/FLAC/lib, and libdumb.a and a link to libdumb.so are in allegro/deps/DUMB/lib. Not sure why they aren't found or aren't compiling. Same with Vorbis, it's in allegro/deps/Vorbis/lib.

________________________________________________________________________________________________________
[freedwill.us]
[unTied Games]

Go to: