URL:
<http://gna.org/bugs/?19096>
Summary: link errors for wesnoth, wesnothd (CMake)
Project: Battle for Wesnoth
Submitted by: kernigh
Submitted on: Fri 02 Dec 2011 11:07:59 PM GMT
Category: Bug
Severity: 3 - Normal
Priority: 5 - Normal
Item Group: None of the others
Status: None
Privacy: Public
Assigned to: None
Originator Email:
Open/Closed: Open
Discussion Lock: Any
Release: trunk r52150
Operating System: OpenBSD
_______________________________________________________
Details:
I get link errors about missing libraries when trying to link wesnoth,
wesnothd. I compiled trunk r52150 and used CMake 2.8.4. My system is OpenBSD
5.0, amd64. My compiler is g++ (GCC) 4.2.1 20070719. My system has these
libraries.
I had to edit src/CMakeLists.txt to solve the link errors. I am attaching a
patch.
The link error for wesnoth was
[ 99%] Building CXX object src/CMakeFiles/wesnoth.dir/network_worker.cpp.o
Linking CXX executable ../wesnoth
/usr/bin/ld: cannot find -lpixman-1
collect2: ld returned 1 exit status
*** Error code 1
Stop in /home/kernigh/park/wesnoth-trunk/build (line 7529 of
src/CMakeFiles/wesnoth.dir/build.make).
*** Error code 1
Stop in /home/kernigh/park/wesnoth-trunk/build (line 267 of
CMakeFiles/Makefile2).
*** Error code 1
Stop in /home/kernigh/park/wesnoth-trunk/build (line 133 of Makefile).
I have this library at /usr/X11R6/lib/libpixman-1.so.22.2 (because OpenBSD
has X11R7 in /usr/X11R6). The error happens because src/CMakeLists.txt links
to ${PANGOCAIRO_LIBRARIES} but forgot to use ${PANGOCAIRO_LIBRARY_DIRS}. All
libraries from pkg_check_modules() have <PREFIX>_LIBRARY_DIRS.
The other link error for wesnothd was
[100%] Building CXX object
src/CMakeFiles/wesnothd.dir/loadscreen_empty.cpp.o
Linking CXX executable ../wesnothd
[...skipping some warnings...]
libwesnoth-core.a(gettext.cpp.o)(.text+0x2c): In function `dsngettext(char
const*, char const*, char const*, int)':
: undefined reference to `libintl_bind_textdomain_codeset'
libwesnoth-core.a(gettext.cpp.o)(.text+0x3d): In function `dsngettext(char
const*, char const*, char const*, int)':
: undefined reference to `libintl_dngettext'
libwesnoth-core.a(gettext.cpp.o)(.text+0x95): In function `sngettext(char
const*, char const*, int)':
: undefined reference to `libintl_ngettext'
libwesnoth-core.a(gettext.cpp.o)(.text+0xea): In function `dsgettext(char
const*, char const*)':
[...more undefined references...]
My fix was easy: just move LIBINTL_LIBRARY from game-external-libs to
common-external-libs. My attached patch has both fixes.
_______________________________________________________
File Attachments:
-------------------------------------------------------
Date: Fri 02 Dec 2011 11:07:59 PM GMT Name: link-error.diff Size: 838B
By: kernigh
link-error.diff: edit src/CMakeLists.txt to prevent link errors
<http://gna.org/bugs/download.php?file_id=14634>
_______________________________________________________
Reply to this item at:
<http://gna.org/bugs/?19096>
_______________________________________________
Message sent via/by Gna!
http://gna.org/
_______________________________________________
Wesnoth-bugs mailing list
[email protected]
https://mail.gna.org/listinfo/wesnoth-bugs