Bug 138422 - port games/exult: linking fails with undefined references
Summary: port games/exult: linking fails with undefined references
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: Pav Lucistnik
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-08-31 20:50 UTC by gonebsd
Modified: 2009-09-17 16:30 UTC (History)
0 users

See Also:


Attachments
file.txt (2.33 KB, text/plain)
2009-08-31 20:50 UTC, gonebsd
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description gonebsd 2009-08-31 20:50:01 UTC
The port games/exult fails at linking with undefined references. I'm sending
the compressed and uue'd log as an attachment.

Fix: Patch attached with submission follows:
How-To-Repeat: cd /usr/ports/games/exult; make
Comment 1 gonebsd 2009-08-31 21:09:49 UTC
gnats 1, freebsd 0. I'll try to weed out the essentials:

#make depends
===>   exult-1.2_4 depends on shared library: SDL-1.2.11 - found
===>   exult-1.2_4 depends on shared library: SDL_mixer-1.2.2 - found
===>   exult-1.2_4 depends on executable: timidity - found
===>   exult-1.2_4 depends on file: /usr/local/bin/sdl-config - found
===>   exult-1.2_4 depends on executable: gmake - found
===>   exult-1.2_4 depends on package: libtool>=2.2 - found
===>   exult-1.2_4 depends on executable: timidity - found
#make
===>  Building for exult-1.2_4
gmake  all-recursive
[...]
gmake[2]: Entering directory `/usr/ports/games/exult/work/exult-1.2'
/bin/sh /usr/local/bin/libtool --mode=link c++  -O2 -Wno-long-long -O2
-fno-strict-aliasing -pipe -march=pentium4 -I/usr/local/include
-L/usr/local/lib -o exult  actions.o actorio.o actors.o alloc.o args.o
bggame.o browser.o cheat.o cheat_screen.o combat.o delobjs.o devgame.o
dir.o drag.o effects.o exult.o exultmenu.o game.o gameclk.o gamedat.o
gamemap.o gamerend.o gamewin.o keys.o keyactions.o menulist.o
monsters.o mouse.o npcnear.o npctime.o palette.o party.o paths.o
readnpcs.o schedule.o segfile.o shapeid.o sigame.o tqueue.o
txtscroll.o version.o xdrag.o pathfinder/libpathfinder.la
audio/libaudio.la audio/midi_drivers/libmididrv.la flic/libflic.la
conf/libconf.la imagewin/libimagewin.la server/libserver.la
usecode/libusecode.la shapes/libshapes.la objs/libobjs.la
gumps/libgumps.la files/libu7file.la files/zip/libminizip.la
-L/usr/local/lib -Wl,-rpath,/usr/local/lib -lSDL -pthread -lSDL_mixer
   -lz
libtool: link: c++ -O2 -Wno-long-long -O2 -fno-strict-aliasing -pipe
-march=pentium4 -I/usr/local/include -o exult actions.o actorio.o
actors.o alloc.o args.o bggame.o browser.o cheat.o cheat_screen.o
combat.o delobjs.o devgame.o dir.o drag.o effects.o exult.o
exultmenu.o game.o gameclk.o gamedat.o gamemap.o gamerend.o gamewin.o
keys.o keyactions.o menulist.o monsters.o mouse.o npcnear.o npctime.o
palette.o party.o paths.o readnpcs.o schedule.o segfile.o shapeid.o
sigame.o tqueue.o txtscroll.o version.o xdrag.o -Wl,-rpath
-Wl,/usr/local/lib -pthread  -L/usr/local/lib
pathfinder/.libs/libpathfinder.a audio/.libs/libaudio.a
audio/midi_drivers/.libs/libmididrv.a flic/.libs/libflic.a
conf/.libs/libconf.a imagewin/.libs/libimagewin.a
server/.libs/libserver.a usecode/.libs/libusecode.a
shapes/.libs/libshapes.a objs/.libs/libobjs.a gumps/.libs/libgumps.a
files/.libs/libu7file.a files/zip/.libs/libminizip.a
/usr/local/lib/libSDL_mixer.so /usr/local/lib/libSDL.so
/usr/local/lib/libiconv.so -lm -lvgl -lusbhid
/usr/local/lib/libmikmod.so -lz -pthread -Wl,-rpath -Wl,/usr/local/lib
-Wl,-rpath -Wl,/usr/local/lib
xdrag.o(.text+0xc6): In function `Get_window_coords(_XDisplay*,
unsigned long, int&, int&)':
: undefined reference to `XQueryTree'
xdrag.o(.text+0xd5): In function `Get_window_coords(_XDisplay*,
unsigned long, int&, int&)':
: undefined reference to `XFree'
xdrag.o(.text+0x111): In function `Get_window_coords(_XDisplay*,
unsigned long, int&, int&)':
: undefined reference to `XGetWindowAttributes'
xdrag.o(.text+0x1f8): In function `Xdnd::Xdnd(_XDisplay*, unsigned
long, unsigned long, void (*)(int, int, int, int, int, int, bool),
void (*)(int, int, int, int, int, int, int, int, bool), void (*)(int,
int, int, int, void*), void (*)(int, int, int, void*), void (*)(int,
U7_combo_data*, int, int, void*))':
: undefined reference to `XInternAtom'
xdrag.o(.text+0x215): In function `Xdnd::Xdnd(_XDisplay*, unsigned
long, unsigned long, void (*)(int, int, int, int, int, int, bool),
void (*)(int, int, int, int, int, int, int, int, bool), void (*)(int,
int, int, int, void*), void (*)(int, int, int, void*), void (*)(int,
U7_combo_data*, int, int, void*))':
: undefined reference to `XInternAtom'
xdrag.o(.text+0x232): In function `Xdnd::Xdnd(_XDisplay*, unsigned
long, unsigned long, void (*)(int, int, int, int, int, int, bool),
void (*)(int, int, int, int, int, int, int, int, bool), void (*)(int,
int, int, int, void*), void (*)(int, int, int, void*), void (*)(int,
U7_combo_data*, int, int, void*))':
: undefined reference to `XInternAtom'
xdrag.o(.text+0x24f): In function `Xdnd::Xdnd(_XDisplay*, unsigned
long, unsigned long, void (*)(int, int, int, int, int, int, bool),
void (*)(int, int, int, int, int, int, int, int, bool), void (*)(int,
int, int, int, void*), void (*)(int, int, int, void*), void (*)(int,
U7_combo_data*, int, int, void*))':
: undefined reference to `XInternAtom'
xdrag.o(.text+0x26c): In function `Xdnd::Xdnd(_XDisplay*, unsigned
long, unsigned long, void (*)(int, int, int, int, int, int, bool),
void (*)(int, int, int, int, int, int, int, int, bool), void (*)(int,
int, int, int, void*), void (*)(int, int, int, void*), void (*)(int,
U7_combo_data*, int, int, void*))':
: undefined reference to `XInternAtom'
xdrag.o(.text+0x289): more undefined references to `XInternAtom' follow
xdrag.o(.text+0x646): In function `Xdnd::select_msg(XSelectionEvent&)':
: undefined reference to `XGetAtomName'
xdrag.o(.text+0x7b6): In function `Xdnd::select_msg(XSelectionEvent&)':
: undefined reference to `XGetWindowProperty'
xdrag.o(.text+0x7df): In function `Xdnd::select_msg(XSelectionEvent&)':
: undefined reference to `XFree'
xdrag.o(.text+0x9f7): In function `Xdnd::client_msg(XClientMessageEvent&)':
: undefined reference to `XGetAtomName'
xdrag.o(.text+0xbd9): In function `Xdnd::client_msg(XClientMessageEvent&)':
: undefined reference to `XSendEvent'
xdrag.o(.text+0xdf2): In function `Xdnd::client_msg(XClientMessageEvent&)':
: undefined reference to `XGetWindowProperty'
xdrag.o(.text+0xe73): In function `Xdnd::client_msg(XClientMessageEvent&)':
: undefined reference to `XConvertSelection'
xdrag.o(.text+0x3a5): In function `Xdnd::Xdnd(_XDisplay*, unsigned
long, unsigned long, void (*)(int, int, int, int, int, int, bool),
void (*)(int, int, int, int, int, int, int, int, bool), void (*)(int,
int, int, int, void*), void (*)(int, int, int, void*), void (*)(int,
U7_combo_data*, int, int, void*))':
: undefined reference to `XChangeProperty'
xdrag.o(.text+0x625): In function `Xdnd::Xdnd(_XDisplay*, unsigned
long, unsigned long, void (*)(int, int, int, int, int, int, bool),
void (*)(int, int, int, int, int, int, int, int, bool), void (*)(int,
int, int, int, void*), void (*)(int, int, int, void*), void (*)(int,
U7_combo_data*, int, int, void*))':
: undefined reference to `XChangeProperty'
gmake[2]: *** [exult] Error 1
gmake[2]: Leaving directory `/usr/ports/games/exult/work/exult-1.2'
gmake[1]: *** [all-recursive] Error 1
gmake[1]: Leaving directory `/usr/ports/games/exult/work/exult-1.2'
gmake: *** [all] Error 2
*** Error code 1

Stop in /usr/ports/games/exult.
Comment 2 Toni Gundogdu 2009-09-03 12:56:26 UTC
Proposing the following change:

diff -ruN /usr/ports/games/exult/Makefile exult/Makefile
--- /usr/ports/games/exult/Makefile	2009-09-03 14:26:37.000000000 +0300
+++ exult/Makefile	2009-09-03 12:41:25.000000000 +0300
@@ -17,6 +17,7 @@
 BUILD_DEPENDS=3D	timidity:${PORTSDIR}/audio/timidity
 RUN_DEPENDS=3D	timidity:${PORTSDIR}/audio/timidity

+USE_XORG=3D	x11
 USE_SDL=3D	sdl mixer
 USE_GMAKE=3D	yes
 USE_AUTOTOOLS=3D	libtool:22

--=20
Toni G=C3=BCndogdu
Comment 3 Pav Lucistnik freebsd_committer freebsd_triage 2009-09-16 12:54:11 UTC
State Changed
From-To: open->feedback

This shouldn't be needed.  Did you perhaps disabled X11 option in sdl? 


Comment 4 Pav Lucistnik freebsd_committer freebsd_triage 2009-09-16 12:54:11 UTC
Responsible Changed
From-To: freebsd-ports-bugs->pav

This shouldn't be needed.  Did you perhaps disabled X11 option in sdl?
Comment 5 gonebsd 2009-09-17 13:00:10 UTC
Thanks Pav for taking a look at this. I have the following
tags on in devel/sdl12:

  OPENGL
  OSS
  VGL
  XLIB

I reinstalled devel/sdl12 with those settings just to be sure.
No change. The proposed change fixes this for me though.

If portsmon (last I checked) reports the build OK then I must
have flipped something off somewhere along the way.

-gb
Comment 6 Pav Lucistnik freebsd_committer freebsd_triage 2009-09-17 13:28:37 UTC
State Changed
From-To: feedback->open

Feedback received
Comment 7 Pav Lucistnik freebsd_committer freebsd_triage 2009-09-17 13:28:45 UTC
State Changed
From-To: open->feedback

Can you post a complete transcript of the build attempt? (Privately, if possible)
Comment 8 Pav Lucistnik freebsd_committer freebsd_triage 2009-09-17 16:20:30 UTC
State Changed
From-To: feedback->closed

Committed, thanks!
Comment 9 dfilter service freebsd_committer freebsd_triage 2009-09-17 16:20:53 UTC
pav         2009-09-17 15:20:39 UTC

  FreeBSD ports repository

  Modified files:
    games/exult          Makefile 
  Log:
  - Fails to link when sdl is installed without aalib.  Workaround this by
    explicitly stating X11 dependency in a way that configure script can find it.
  
  PR:             ports/138422
  Submitted by:   gonebsd <gonebsd@gmail.com>
  Feature safe:   yes
  
  Revision  Changes    Path
  1.32      +1 -0      ports/games/exult/Makefile
_______________________________________________
cvs-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/cvs-all
To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"