Allegro.cc - Online Community

Allegro.cc Forums » Installation, Setup & Configuration » Trying to setup allegro-4.4.2

This thread is locked; no one can reply to it. rss feed Print
Trying to setup allegro-4.4.2
alexx.
Member #10,925
April 2009

I recently set up a new system, ubuntu 16.04 64 bit.

I am trying to install allegro-4.4.2, I tried with first with allegro-4.2.3.1 but this now comes with an error in ./configure which I'm sure didn't happen a few years ago. So I thought I would try 4.4.2 as it has jpg included. I have working source files and compilation is working but not linking.

To be honest I found the instructions slightly vague. "cmake .." only seem to work from the docs/build directory so I did that.

Output:
-- The C compiler identification is GNU 5.4.0
-- The CXX compiler identification is GNU 5.4.0
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
CMake Warning (dev) in CMakeLists.txt:
No cmake_minimum_required command is present. A line of code such as

cmake_minimum_required(VERSION 3.5)

should be added at the top of the file. The version specified may be lower
if you wish to support older CMake versions for this project. For more
information run "cmake --help-policy CMP0000".
This warning is for project developers. Use -Wno-dev to suppress it.

-- Configuring done
-- Generating done

make install DESTDIR=../../../allegro.lib

Scanning dependencies of target makedoc
[ 1%] Building C object CMakeFiles/makedoc.dir/src/makedoc/makedoc.o
[ 2%] Building C object CMakeFiles/makedoc.dir/src/makedoc/makehtml.o
[ 4%] Building C object CMakeFiles/makedoc.dir/src/makedoc/makemisc.o
[ 5%] Building C object CMakeFiles/makedoc.dir/src/makedoc/maketxt.o
[ 7%] Building C object CMakeFiles/makedoc.dir/src/makedoc/makertf.o
[ 8%] Building C object CMakeFiles/makedoc.dir/src/makedoc/maketexi.o
[ 9%] Building C object CMakeFiles/makedoc.dir/src/makedoc/makeman.o
[ 11%] Building C object CMakeFiles/makedoc.dir/src/makedoc/makechm.o
[ 12%] Building C object CMakeFiles/makedoc.dir/src/makedoc/makedevh.o
[ 14%] Building C object CMakeFiles/makedoc.dir/src/makedoc/makesci.o
[ 15%] Linking C executable makedoc
[ 15%] Built target makedoc
Scanning dependencies of target docs
[ 16%] Generating txt/abi.txt
[ 18%] Generating html/abi.html
[ 19%] Generating txt/addons.txt
[ 21%] Generating html/addons.html
[ 22%] Generating txt/ahack.txt
[ 23%] Generating html/ahack.html
[ 25%] Generating txt/allegro.txt
[ 26%] Generating html/allegro.html
[ 28%] Generating txt/api.txt
[ 29%] Generating html/api.html
[ 30%] Generating txt/changes.txt
[ 32%] Generating html/changes.html
[ 33%] Generating txt/const.txt
[ 35%] Generating html/const.html
[ 36%] Generating txt/dat2c.txt
[ 38%] Generating html/dat2c.html
[ 39%] Generating txt/dat2s.txt
[ 40%] Generating html/dat2s.html
[ 42%] Generating txt/datafile.txt
[ 43%] Generating html/datafile.html
[ 45%] Generating txt/dat.txt
[ 46%] Generating html/dat.html
[ 47%] Generating txt/faq.txt
[ 49%] Generating html/faq.html
[ 50%] Generating txt/grabber.txt
[ 52%] Generating html/grabber.html
[ 53%] Generating txt/help.txt
[ 54%] Generating html/help.html
[ 56%] Generating txt/index.txt
[ 57%] Generating html/index.html
[ 59%] Generating txt/license.txt
[ 60%] Generating html/license.html
[ 61%] Generating txt/makedoc.txt
[ 63%] Generating html/makedoc.html
[ 64%] Generating txt/mistakes.txt
[ 66%] Generating html/mistakes.html
[ 67%] Generating txt/packfile.txt
[ 69%] Generating html/packfile.html
[ 70%] Generating txt/readme.txt
[ 71%] Generating html/readme.html
[ 73%] Generating txt/thanks.txt
[ 74%] Generating html/thanks.html
[ 76%] Generating build/cmake.txt
[ 77%] Generating build/cmake.html
[ 78%] Generating build/linux.txt
[ 80%] Generating build/linux.html
[ 81%] Generating build/macosx.txt
[ 83%] Generating build/macosx.html
[ 84%] Generating build/mingw32.txt
[ 85%] Generating build/mingw32.html
[ 87%] Generating build/msvc.txt
[ 88%] Generating build/msvc.html
[ 90%] Generating build/unix.txt
[ 91%] Generating build/unix.html
[ 92%] Generating AUTHORS
[ 94%] Generating THANKS
[ 95%] Generating CHANGES
[ 97%] Generating readme.txt
[ 98%] Generating man/allegro_init.3
[100%] Generating scite/allegro.api
[100%] Built target docs
Install the project...
-- Install configuration: ""
-- Installing: ../../../allegro.lib/usr/local/doc/allegro-/AUTHORS
-- Installing: ../../../allegro.lib/usr/local/doc/allegro-/THANKS
-- Installing: ../../../allegro.lib/usr/local/doc/allegro-/CHANGES
-- Installing: ../../../allegro.lib/usr/local/doc/allegro-/readme.txt
-- Installing: ../../../allegro.lib/usr/local/doc/allegro-/abi.txt
-- Installing: ../../../allegro.lib/usr/local/doc/allegro-/addons.txt
-- Installing: ../../../allegro.lib/usr/local/doc/allegro-/ahack.txt
-- Installing: ../../../allegro.lib/usr/local/doc/allegro-/allegro.txt
-- Installing: ../../../allegro.lib/usr/local/doc/allegro-/api.txt
-- Installing: ../../../allegro.lib/usr/local/doc/allegro-/const.txt
-- Installing: ../../../allegro.lib/usr/local/doc/allegro-/dat.txt
-- Installing: ../../../allegro.lib/usr/local/doc/allegro-/dat2c.txt
-- Installing: ../../../allegro.lib/usr/local/doc/allegro-/dat2s.txt
-- Installing: ../../../allegro.lib/usr/local/doc/allegro-/datafile.txt
-- Installing: ../../../allegro.lib/usr/local/doc/allegro-/faq.txt
-- Installing: ../../../allegro.lib/usr/local/doc/allegro-/grabber.txt
-- Installing: ../../../allegro.lib/usr/local/doc/allegro-/help.txt
-- Installing: ../../../allegro.lib/usr/local/doc/allegro-/license.txt
-- Installing: ../../../allegro.lib/usr/local/doc/allegro-/makedoc.txt
-- Installing: ../../../allegro.lib/usr/local/doc/allegro-/mistakes.txt
-- Installing: ../../../allegro.lib/usr/local/doc/allegro-/packfile.txt
( no errors )

I'm not sure how to proceed, with my old make file it can't find allegro-config. There is no allegro-config or pkg-config anywhere so how or what to link, or have the libraries even been created. Thanks for any help.

Edgar Reynaldo
Major Reynaldo
May 2007
avatar

All you built was the docs. :/

You need to be in the root allegro source directory, then do the following :

cd allegro
allegro>mkdir build
allegro>cd build
allegro/build>cmake -G "Unix Makefiles" ..

Options you can pass to cmake include -DCMAKE_BUILD_TYPE=[Release|RelWithDebInfo|Debug], or -DSHARED=[On|Off] before the ..

alexx.
Member #10,925
April 2009

Thanks for help earlier, I had no trouble creating the libraries but still seem to have another, what must be an obvious mistake.

The libraries are not being found by pkg-config, the path seems correct? See below

felix@felix-H61M-S2PV:~/prog/a4a5/plants/prog$
felix@felix-H61M-S2PV:~/prog/a4a5/plants/prog$ ls /home/felix/prog/a4a5/allegro-4.4.2/build/lib/pkgconfig
total 60
rw-r--r- 1 felix felix 365 Sep 25 17:28 allegrogl.pc
rw-r--r- 1 felix felix 363 Sep 25 17:28 allegro.pc
rw-r--r- 1 felix felix 345 Sep 25 17:28 jpgalleg.pc
rw-r--r- 1 felix felix 352 Sep 25 17:28 loadpng.pc
rw-r--r- 1 felix felix 361 Sep 25 17:28 logg.pc

felix@felix-H61M-S2PV:~/prog/a4a5/plants/prog$ $PKG_CONFIG_PATH
bash: /home/felix/prog/a4a5/allegro-4.4.2/build/lib/pkgconfig: Is a directory

felix@felix-H61M-S2PV:~/prog/a4a5/plants/prog$ gcc -Wall main.c `pkg-config --cflags --libs allegrogl allegro jpgalleg loadpng logg`
Package allegrogl was not found in the pkg-config search path.
Perhaps you should add the directory containing `allegrogl.pc'
to the PKG_CONFIG_PATH environment variable
No package 'allegrogl' found
Package allegro was not found in the pkg-config search path.
Perhaps you should add the directory containing `allegro.pc'
to the PKG_CONFIG_PATH environment variable
No package 'allegro' found
Package jpgalleg was not found in the pkg-config search path.
Perhaps you should add the directory containing `jpgalleg.pc'
to the PKG_CONFIG_PATH environment variable
No package 'jpgalleg' found
Package loadpng was not found in the pkg-config search path.
Perhaps you should add the directory containing `loadpng.pc'
to the PKG_CONFIG_PATH environment variable
No package 'loadpng' found
Package logg was not found in the pkg-config search path.
Perhaps you should add the directory containing `logg.pc'
to the PKG_CONFIG_PATH environment variable
No package 'logg' found
gcc: error: main.c: No such file or directory
gcc: fatal error: no input files
compilation terminated.
felix@felix-H61M-S2PV:~/prog/a4a5/plants/prog$

Edgar Reynaldo
Major Reynaldo
May 2007
avatar

Arthur Kalliokoski
Second in Command
February 2005
avatar

Often a simple "sudo ldconfig" fixes all kinds of problems, and it's easy and fast.

They all watch too much MSNBC... they get ideas.

Go to: