Package: buici-clock
Version: 0.4.6.0.1
Severity: minor
Tags: patch
User: [email protected]
Usertags: ld-as-needed

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1



*** /tmp/tmpqT1SWI
In Ubuntu, the attached patch was applied to achieve the following:

  * xo/Makefile: LIBS should come after objects on the linker command
    line to fix an issue with ld --as-needed (LP: #765967)

Ubuntu passes ld --as-needed per default to the linker, buici-clock FTBFS with:

c++ -g -Wl,-Bsymbolic-functions -lX11 -lXext -o o/xo o/ldisplay.o o/lwindow.o 
o/lfont.o o/wbutton.o o/wtext.o o/wdialog.o o/lhash.o o/larray.o o/res.o 
o/dmalloc.o o/dither.o o/lpicture.o o/loupe.o o/stats.o o/res_l.o o/res_y.o
o/loupe.o: In function `WTopLevel::buttondown(XButtonEvent*)':
/build/buildd/buici-clock-0.4.6.0.1/xo/loupe.cxx:102: undefined reference to 
`XUnmapWindow'
o/loupe.o: In function `WTopLevel::expose(XExposeEvent*)':
/build/buildd/buici-clock-0.4.6.0.1/xo/loupe.cxx:132: undefined reference to 
`XPutImage'
o/loupe.o: In function `LDisplay::flush()':
/build/buildd/buici-clock-0.4.6.0.1/xo/ldisplay.h:148: undefined reference to 
`XFlush'
o/loupe.o: In function `WTopLevel::expose(XExposeEvent*)':
/build/buildd/buici-clock-0.4.6.0.1/xo/loupe.cxx:125: undefined reference to 
`XShmPutImage'
o/loupe.o: In function `LWindow::select_events(long)':
/build/buildd/buici-clock-0.4.6.0.1/xo/lwindow.h:174: undefined reference to 
`XSelectInput'
o/loupe.o: In function `register_base_classes(LDisplay*)':
/build/buildd/buici-clock-0.4.6.0.1/xo/loupe.cxx:149: undefined reference to 
`XBlackPixel'
o/loupe.o: In function `WTopLevel::load_image(char const*)':
/build/buildd/buici-clock-0.4.6.0.1/xo/loupe.cxx:185: undefined reference to 
`XShmQueryExtension'
/build/buildd/buici-clock-0.4.6.0.1/xo/loupe.cxx:204: undefined reference to 
`XCreateImage'
/build/buildd/buici-clock-0.4.6.0.1/xo/loupe.cxx:190: undefined reference to 
`XShmCreateImage'
/build/buildd/buici-clock-0.4.6.0.1/xo/loupe.cxx:196: undefined reference to 
`XShmAttach'
o/loupe.o: In function `LWindow::unmap()':
/build/buildd/buici-clock-0.4.6.0.1/xo/lwindow.h:105: undefined reference to 
`XUnmapWindow'
[skipped, full buildlog at 
https://launchpadlibrarian.net/69886009/buildlog_ubuntu-natty-i386.buici-clock_0.4.6.0.1_FAILEDTOBUILD.txt.gz]

The libraries are clearly in the wrong place on the link line for
- --as-needed (http://wiki.debian.org/ToolChain/DSOLinking).  This
probably doesn't affect Debian right now because --as-needed is a
positional option and only affects those libraries listed after it, but
Ubuntu's linker defaults to --as-needed right out of the gate.
Nevertheless, I believe that the debian-gcc team is tracking these
problems and wants to make Debian packages work cleanly with such a
linker.

Thanks for considering the patch.


- -- System Information:
Debian Release: wheezy/sid
  APT prefers oneiric
  APT policy: (500, 'oneiric')
Architecture: amd64 (x86_64)

Kernel: Linux 3.0.0-999-generic (SMP w/2 CPU cores)
Locale: LANG=C, LC_CTYPE=C (charmap=ANSI_X3.4-1968)
Shell: /bin/sh linked to /bin/dash

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)

iQIcBAEBAgAGBQJOJcPWAAoJEGHzRCZ03mYk6G4P/0EOvzqONqHG4eDpYQnJOpog
syMTn0OrEojSu587Ysi/haHd3taXArEesAMpL3lFA1vgQKk3jX3Bfeq8L2hCI5c5
z15/jun9k0g0ioMZORtZ/cj+0fCvcvM+1OwUi3S3+msDKIM/LTKdiwy8+4ZJxbY4
ogwOKjYZ0/mr7l9xHfdctQ+aQqHsD8LewPJ7rsBMrnqvgIPPXqLO4iobaikjPvyq
3BjUKH6bY4fhK3GzALK0Sdd/s0ul1Imp4f3Mm7+fwWolfB5t1i7FAq6vK+ibszQc
vtm/0mWv6099x6klQVH4JRETC9zhycAgDvEgYXBlIDpKDVAHXUZPK6JOQh3qFKkD
cA+NaUz/30SzcfKDuz3FNCRjvqxdHPXPUtuKlHornmvzOj1bbELUehJ53vPbtDsQ
i4Mu21tYIowEfWseYvjF7Galnf8kpQXK6LTegV8gxg58g8l8WaV0QIIWx5sMAwhH
ceBMBf6k6XHxCAm0uD0U5EgIwSLB6sHFOLcVsLUYSZSOwMukhUVPYW38DXpzbBBo
dkYTNuvRXywjlLmdQbX+Xu7INgYKJab6OWIbLH43hBPP4QnYfa6b6tnR5mil43gJ
9aMMh1RwfmKJm8bylgj/EEKhkWtbjFtrpD7vBfCz/1aHa1kh6Uhzlw20RYM1vRfK
YLRF+0dvbe3XIgEWL6ib
=BXjf
-----END PGP SIGNATURE-----
=== modified file 'xo/Makefile.in'
--- xo/Makefile.in      2006-04-17 08:23:19 +0000
+++ xo/Makefile.in      2011-07-19 17:39:36 +0000
@@ -133,7 +133,7 @@
        ar rc libxo.a $(addprefix $(O_D),$(OBJ_LIB))
 
 $(O_D)$(TARGET): $(OBJ)
-       $(CC) $(LFLAGS) -o $@ $(addprefix $(O_D),$(OBJ))
+       $(CC) -o $@ $(addprefix $(O_D),$(OBJ)) $(LFLAGS)
 
 #install:
 #      cp $(TARGET).exe c:/usr/local

Reply via email to