<?xml version="1.0"?>
<rss version="2.0">
	<channel>
		<title>Building on Ubuntu</title>
		<link>http://www.allegro.cc/forums/view/612690</link>
		<description>Allegro.cc Forum Thread</description>
		<webMaster>matthew@allegro.cc (Matthew Leverton)</webMaster>
		<lastBuildDate>Mon, 03 Jun 2013 03:44:30 +0000</lastBuildDate>
	</channel>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>I&#39;m trying to build Allegro 5.1.7 on Ubuntu for Android development, because it seems like it isn&#39;t possible on Windows yet(?). I&#39;ve been following the instructions in readme_android.txt, but when I run the command <tt>cmake .. -DANDROID_NDK_TOOLCHAIN_ROOT=$ANDROID_TC -DWANT_ANDROID=on -DWANT_EXAMPLES=OFF -DWANT_DEMO=OFF -DCMAKE_BUILD_TYPE=Debug</tt>, I get the following output:</p><pre class="terminal scroll">-- 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</pre><p>

So, I set about installing all of them. I found <a href="http://wiki.allegro.cc/index.php?title=Ubuntu_and_Allegro_5">some instructions</a> on the wiki, and ran the command <tt>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</tt> with no errors.<br />However, when I try the previously mentioned cmake command again, it&#39;s the same result. How can I get cmake to find the libraries Allegro wants?</p><p>Edit:<br />Obviously, I&#39;m not a Linux guru... I know enough to get around a bit, but that&#39;s about it. Any advice?</p><p>EditEdit:<br />So I figured out you could put various things in the allegro/deps folder for cmake to find, and this is slightly improving things:
</p><pre class="terminal scroll">$ 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. &lt;http://dumb.sourceforge.net/&gt;
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</pre><p>
I must still be missing something?</p><p>...(later)...<br />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?<br />Slightly improved again:
</p><pre class="terminal scroll">$ 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. &lt;http://dumb.sourceforge.net/&gt;
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</pre><p>
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&#39;t found or aren&#39;t compiling. Same with Vorbis, it&#39;s in allegro/deps/Vorbis/lib.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Schyfis)</author>
		<pubDate>Mon, 03 Jun 2013 03:44:30 +0000</pubDate>
	</item>
</rss>
