dumb icon indicating copy to clipboard operation
dumb copied to clipboard

allegro-5.2.5.0

Open rubyFeedback opened this issue 4 years ago • 1 comments

Hello,

I just compiled allegro from source into /usr prefix on my slackware system; URL was:

https://github.com/liballeg/allegro5/releases/download/5.2.5.0/allegro-5.2.5.0.tar.gz

No errors were reported here during this step.

Now I try to compile dumb, this tarball release:

https://github.com/kode54/dumb/archive/2.0.3.tar.gz

But I get an error during cmake checking stuff:

cmake -DCMAKE_INSTALL_PREFIX=/usr/ /Depot/Temp/rbt/dumb-2.0.3/

-- The C compiler identification is GNU 9.2.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 -- Performing Test CC_HAS_WNO_UNUSED_VARIABLE -- Performing Test CC_HAS_WNO_UNUSED_VARIABLE - Success -- Performing Test CC_HAS_WNO_UNUSED_BUT_SET_VARIABLE -- Performing Test CC_HAS_WNO_UNUSED_BUT_SET_VARIABLE - Success -- Performing Test CC_HAS_WALL -- Performing Test CC_HAS_WALL - Success -- Performing Test CC_HAS_GGDB -- Performing Test CC_HAS_GGDB - Success -- Performing Test CC_HAS_ZI -- Performing Test CC_HAS_ZI - Failed -- Performing Test CC_HAS_G -- Performing Test CC_HAS_G - Success -- Performing Test CC_HAS_MSSE -- Performing Test CC_HAS_MSSE - Success -- Compiling with SSE support CMake Warning at cmake-scripts/Findargtable2.cmake:26 (message): Could not find Argtable2 Call Stack (most recent call first): CMakeLists.txt:59 (find_package)

-- Looking for pthread.h -- Looking for pthread.h - found -- Performing Test CMAKE_HAVE_LIBC_PTHREAD -- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Failed -- Looking for pthread_create in pthreads -- Looking for pthread_create in pthreads - not found -- Looking for pthread_create in pthread -- Looking for pthread_create in pthread - found -- Found Threads: TRUE
-- Found SDL2: /usr/lib64/libSDL2.so;-lpthread -- Looked for Allegro libraries named . CMake Error at cmake-scripts/FindAllegro4.cmake:35 (MESSAGE): Could NOT find Allegro library Call Stack (most recent call first): CMakeLists.txt:66 (find_package)

-- Configuring incomplete, errors occurred! See also "/Depot/Temp/rbt/dumb-2.0.3/CMakeFiles/CMakeOutput.log". See also "/Depot/Temp/rbt/dumb-2.0.3/CMakeFiles/CMakeError.log".

The first .log file reports strange errors such as:

/usr/bin/cc -Wall -Wno-unused-but-set-variable -Wno-unused-variable -O2 -fPIC -fno-strict-overflow -Wno-error -DCC_HAS_ZI -Zi -o CMakeFiles/cmTC_555bf.dir/src.c.o -c /Depot/Temp/rbt/dumb-2.0.3/CMakeFiles/CMakeTmp/src.c cc: error: unrecognized command line option '-Zi'; did you mean '-Z'?

But I am not sure if these are the problems.

For some reason the cmake script can not find allegro.

I think some problem comes here:

-- Found Threads: TRUE
-- Found SDL2: /usr/lib64/libSDL2.so;-lpthread -- Looked for Allegro libraries named .

It oddly enough looks at libraries named "." which perhaps means that either it could not find anything at that spot; or it tried the current working directory. I assume some substitution may happen here that fails. GNU configure also sometimes behaved oddly in some scripts, not sure. Anyway I report this here - perhaps it does not work for others, perhaps it does. Perhaps the information may be useful if someone finds some problem here - I am not knowledgable enough about cmake to resolve this, but perhaps a future release of dumb may fix these issues.

rubyFeedback avatar Sep 28 '19 23:09 rubyFeedback

Please try: Add -DBUILD_ALLEGRO4=OFF when you cmake DUMB. Also build and install DUMB first, and only then CMake/build/install Allegro 5.

Reason: Allegro 4 (what you aren't using; you're using Allegro 5) and DUMB have a dependency cycle, each depends on the other. You must turn that off manually. The idea is that Allegro 4 can find DUMB to play music, but also DUMB offers Allegro 4 packfile support.

(I feel like the Allegro 4 switch default should change to OFF. Allegro 5 has been out for over a decade. Although, some projects with Allegro 4 are still maintained and popular, e.g., AGS.)

Allegro 5 depends on DUMB, but DUMB does not need to know about Allegro 5. This is good. Ideally, you build DUMB first with -DBUILD_ALLEGRO4=OFF, then install that build of DUMB, then CMake Allegro 5. Like this, Allegro 5 will find DUMB during CMake. Look at Allegro 5's output during CMake, it should tell you whether Allegro 5 has found DUMB.

SimonN avatar Sep 29 '19 07:09 SimonN