*** snip *** ===> CC [ufoslicer] src/ports/unix/unix_files.c ===> CC [ufoslicer] src/ports/unix/unix_shared.c <command-line>:0:0: warning: "_FORTIFY_SOURCE" redefined [enabled by default] src/shared/utf8.c:1:0: note: this is the location of the previous definition <command-line>:0:0: warning: "_FORTIFY_SOURCE" redefined [enabled by default] src/shared/images.c:1:0: note: this is the location of the previous definition <command-line>:0:0: warning: "_FORTIFY_SOURCE" redefined [enabled by default] src/shared/shared.c:1:0: note: this is the location of the previous definition ===> CC [ufoslicer] src/ports/unix/unix_main.c <command-line>:0:0: warning: "_FORTIFY_SOURCE" redefined [enabled by default] src/ports/unix/unix_files.c:1:0: note: this is the location of the previous definition ===> LD [base/game.so] ===> LD [memory] <command-line>:0:0: warning: "_FORTIFY_SOURCE" redefined [enabled by default] src/ports/unix/unix_shared.c:1:0: note: this is the location of the previous definition <command-line>:0:0: warning: "_FORTIFY_SOURCE" redefined [enabled by default] src/ports/unix/unix_main.c:1:0: note: this is the location of the previous definition ===> LD [testall] ===> LD [ufomodel] ===> LD [ufoslicer] ===> LD [ufo] ===> LD [ufoded] /usr/lib/gcc/x86_64-pc-linux-gnu/4.7.3/../../../../x86_64-pc-linux-gnu/bin/ld: release-linux-x86_64/testall/game/lua/lmathlib.c.o: undefined reference to symbol '__sinh_finite@@GLIBC_2.15' /usr/lib/gcc/x86_64-pc-linux-gnu/4.7.3/../../../../x86_64-pc-linux-gnu/bin/ld: note: '__sinh_finite@@GLIBC_2.15' is defined in DSO /lib64/libm.so.6 so try adding it to the linker command line /lib64/libm.so.6: could not read symbols: Invalid operation collect2: error: ld returned 1 exit status make: *** [testall] Error 1 make: *** Waiting for unfinished jobs.... emake failed * ERROR: games-strategy/ufo-ai-2.4::gentoo failed (compile phase): * (no error message) * * Call stack: * ebuild.sh, line 93: Called src_compile * environment, line 2930: Called die * The specific snippet of code: * emake || die; * * If you need support, post the output of `emerge --info '=games-strategy/ufo-ai-2.4::gentoo'`, * the complete build log and the output of `emerge -pqv '=games-strategy/ufo-ai-2.4::gentoo'`. * The complete build log is located at '/var/log/portage/games-strategy:ufo-ai-2.4:20140712-073535.log'. * For convenience, a symlink to the build log is located at '/var/tmp/portage/games-strategy/ufo-ai-2.4/temp/build.log'. * The ebuild environment file is located at '/var/tmp/portage/games-strategy/ufo-ai-2.4/temp/environment'. * Working directory: '/var/tmp/portage/games-strategy/ufo-ai-2.4/work/ufoai-2.4-source' * S: '/var/tmp/portage/games-strategy/ufo-ai-2.4/work/ufoai-2.4-source' >>> Failed to emerge games-strategy/ufo-ai-2.4, Log file: >>> '/var/log/portage/games-strategy:ufo-ai-2.4:20140712-073535.log' * * The following package has failed to build or install: * * (games-strategy/ufo-ai-2.4::gentoo, ebuild scheduled for merge), Log file: * '/var/log/portage/games-strategy:ufo-ai-2.4:20140712-073535.log' * Reproducible: Always There already exists a corresponding patch, which adds the -lm switch for ufo-ai's main build file. I added the -lm switch to the testall.mk. Here's the diff for this patch-file with my changes. --- files/ufo-ai-2.4-mathlib.patch 2014-05-10 07:40:33.000000000 +0200 +++ /tmp/ufo-ai-2.4-mathlib.patch 2014-07-12 09:29:39.760947338 +0200 @@ -16,3 +16,14 @@ $(TARGET)_SRCS = \ client/cl_console.c \ +--- build/modules/testall.mk.old 2014-07-12 09:28:36.000000000 +0200 ++++ build/modules/testall.mk 2014-07-12 09:28:54.000000000 +0200 +@@ -9,7 +9,7 @@ + $(TARGET)_LINKER := $(CC) + $(TARGET)_FILE := $(TARGET)$(EXE_EXT) + $(TARGET)_CFLAGS += -DCOMPILE_UFO -DHARD_LINKED_GAME -DCOMPILE_UNITTESTS $(BFD_CFLAGS) $(SDL_CFLAGS) $(CURL_CFLAGS) $(OGG_CFLAGS) $(MXML_CFLAGS) +-$(TARGET)_LDFLAGS += -lcunit -lpng -ljpeg $(BFD_LIBS) $(INTL_LIBS) $(SDL_TTF_LIBS) $(SDL_MIXER_LIBS) $(OPENGL_LIBS) $(SDL_LIBS) $(CURL_LIBS) $(THEORA_LIBS) $(XVID_LIBS) $(VORBIS_LIBS) $(OGG_LIBS) $(MXML_LIBS) $(SO_LIBS) -lz ++$(TARGET)_LDFLAGS += -lcunit -lpng -ljpeg $(BFD_LIBS) $(INTL_LIBS) $(SDL_TTF_LIBS) $(SDL_MIXER_LIBS) $(OPENGL_LIBS) $(SDL_LIBS) $(CURL_LIBS) $(THEORA_LIBS) $(XVID_LIBS) $(VORBIS_LIBS) $(OGG_LIBS) $(MXML_LIBS) $(SO_LIBS) -lz -lm + + $(TARGET)_SRCS = \ + tests/test_all.c \
Created attachment 380594 [details, diff] ufo-ai-2.4-mathlib.patch Replace /usr/portage/games-strategy/files/ufo-ai-2.4-mathlib.patch with this; this contains the changes I lined out in the first patch. Building with this works.
done. thanks.