First Last Prev Next    No search results available      Search page      Enter new bug
Bug#: 140255
Alias:
Product:
Component:
Status: RESOLVED
Resolution: FIXED
Assigned To: Alin Năstac <mrness@gentoo.org>
Hardware:
OS:
Version:
Priority:
Severity:
Reporter: Matthias Schwarzott <zzam@gentoo.org>
Add CC:
CC:
Remove selected CCs
URL:
Summary:
Status Whiteboard:
Keywords:

Filename Description Type Creator Created Size Actions
Create a New Attachment (proposed patch, testcase, etc.) View All

Bug 140255 depends on: Show dependency tree
Show dependency graph
Bug 140255 blocks: 129413
Votes: 0    Show votes for this bug    Vote for this bug

Additional Comments: (this is where you put emerge --info)


Not eligible to see or edit group visibility for this bug.






View Bug Activity   |   Format For Printing   |   XML   |   Clone This Bug


Description:   Opened: 2006-07-13 09:51 0000
app-mobilephone/gammu-1.07.00 fails to compile with LDFLAGS="-Wl,--as-needed"

Linking gammu-shared
./common/libGammu.so: undefined reference to `sdp_uuid_to_proto'
./common/libGammu.so: undefined reference to `hci_read_remote_name'
./common/libGammu.so: undefined reference to `sdp_close'
./common/libGammu.so: undefined reference to `sdp_general_inquiry'
./common/libGammu.so: undefined reference to `sdp_list_append'
./common/libGammu.so: undefined reference to `hci_open_dev'
./common/libGammu.so: undefined reference to `sdp_get_access_protos'
./common/libGammu.so: undefined reference to `sin'
./common/libGammu.so: undefined reference to `sdp_data_get'
./common/libGammu.so: undefined reference to `sdp_record_free'
./common/libGammu.so: undefined reference to `sdp_uuid16_create'
./common/libGammu.so: undefined reference to `sdp_data_free'
./common/libGammu.so: undefined reference to `sdp_get_group_id'
./common/libGammu.so: undefined reference to `hci_devinfo'
./common/libGammu.so: undefined reference to `ba2str'
./common/libGammu.so: undefined reference to `sdp_service_search_attr_req'
./common/libGammu.so: undefined reference to `sdp_list_free'
./common/libGammu.so: undefined reference to `sdp_connect'
./common/libGammu.so: undefined reference to `str2ba'
collect2: ld gab 1 als Ende-Status zur

------- Comment #1 From Matthias Schwarzott 2006-07-13 09:51:37 0000 -------
app-mobilephone/gammu-1.07.00 fails to compile with LDFLAGS="-Wl,--as-needed"

Linking gammu-shared
./common/libGammu.so: undefined reference to `sdp_uuid_to_proto'
./common/libGammu.so: undefined reference to `hci_read_remote_name'
./common/libGammu.so: undefined reference to `sdp_close'
./common/libGammu.so: undefined reference to `sdp_general_inquiry'
./common/libGammu.so: undefined reference to `sdp_list_append'
./common/libGammu.so: undefined reference to `hci_open_dev'
./common/libGammu.so: undefined reference to `sdp_get_access_protos'
./common/libGammu.so: undefined reference to `sin'
./common/libGammu.so: undefined reference to `sdp_data_get'
./common/libGammu.so: undefined reference to `sdp_record_free'
./common/libGammu.so: undefined reference to `sdp_uuid16_create'
./common/libGammu.so: undefined reference to `sdp_data_free'
./common/libGammu.so: undefined reference to `sdp_get_group_id'
./common/libGammu.so: undefined reference to `hci_devinfo'
./common/libGammu.so: undefined reference to `ba2str'
./common/libGammu.so: undefined reference to `sdp_service_search_attr_req'
./common/libGammu.so: undefined reference to `sdp_list_free'
./common/libGammu.so: undefined reference to `sdp_connect'
./common/libGammu.so: undefined reference to `str2ba'
collect2: ld gab 1 als Ende-Status zurück
make: *** [gammu/gammu-shared] Fehler 1

!!! ERROR: app-mobilephone/gammu-1.07.00 failed.
Call stack:
  ebuild.sh, line 1545:   Called dyn_compile
  ebuild.sh, line 940:   Called src_compile
  gammu-1.07.00.ebuild, line 43:   Called die

!!! make failed
!!! If you need support, post the topmost build error, and the call stack if
relevant.


# emerge --info
Portage 2.1.1_pre2-r8 (default-linux/x86/2006.0, gcc-4.1.1/vanilla,
glibc-2.4-r3, 2.6.17-gentoo-r1 i686)
=================================================================
                       System Settings
=================================================================
System uname: 2.6.17-gentoo-r1 i686 AMD Athlon(tm) XP 3000+
Gentoo Base System version 1.12.1
distcc 2.18.3 i686-pc-linux-gnu (protocols 1 and 2) (default port 3632)
[disabled]
ccache version 2.4 [enabled]
app-admin/eselect-compiler: 2.0.0_rc2-r1
dev-lang/python:     2.3.5-r2, 2.4.3-r1
dev-python/pycrypto: 2.0.1-r5
dev-util/ccache:     2.4-r2
dev-util/confcache:  [Not Present]
sys-apps/sandbox:    1.2.18.1
sys-devel/autoconf:  2.13, 2.60
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2
sys-devel/binutils:  2.17
sys-devel/gcc-config: 2.0.0_rc1
sys-devel/libtool:   1.5.22
virtual/os-headers:  2.6.11-r5
ACCEPT_KEYWORDS="x86 ~x86"
AUTOCLEAN="yes"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-O2 -march=athlon-xp -fomit-frame-pointer -pipe"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/3.5/env /usr/kde/3.5/share/config
/usr/kde/3.5/shutdown /usr/share/X11/xkb /usr/share/config"
CONFIG_PROTECT_MASK="/etc/env.d /etc/env.d/java/ /etc/eselect/compiler
/etc/gconf /etc/java-config/vms/ /etc/revdep-rebuild /etc/terminfo
/etc/texmf/web2c"
CXXFLAGS="-O2 -march=athlon-xp -fomit-frame-pointer -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoaddcvs autoconfig ccache collision-detect cvs distlocks
metadata-transfer parallel-fetch sandbox sfperms sign strict"
GENTOO_MIRRORS="ftp://ftp-stud.fht-esslingen.de/pub/Mirrors/gentoo/"
LANG="de_DE.UTF-8"
LDFLAGS="-Wl,--as-needed"
LINGUAS="de"
MAKEOPTS="-j4"
PKGDIR="/usr/portage/packages"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress
--force --whole-file --delete --delete-after --stats --timeout=180
--exclude='/distfiles' --exclude='/local' --exclude='/packages'"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/home/matze/gentoo/overlays/sci /home/matze/gentoo/overlays/de
/home/matze/gentoo/overlays/zzam"
SYNC="cvs://zzam@cvs.gentoo.org:/var/cvsroot"
USE="x86 3dnow 3dnowext X a52 aac acl alsa apache2 apm artswrappersuid
audacious avi berkdb bitmap-fonts bluetooth bzip2 cap caps cddb cdparanoia cli
crypt cups dbus dlloader doc dri dts dvb dvd dvdr eds emboss encode fbcon
ffmpeg font-server foomaticdb fortran fuse gcj gdbm gif gimpprint glut gpm
gstreamer gtk gtk2 hal imap imlib ipv6 isdnlog java jpeg jpeg2k kde kdexdeltas
libg++ libwww lirc logitech-mouse mad mikmod mmx mmxext mng motif mp3 mpeg
mplayer musicbrainz mysql ncurses nls nogecko-sdk nptl nptlonly nvram ogg
opengl oss pam pcre pdf pdflib perl png ppds pppd python qt qt3 qt4 quotes
readline reflection samba session sms sndfile softmmu spell spl sqlite sse ssl
svg taglib tcltk tcpd tiff truetype truetype-fonts type1-fonts udev unicode usb
userlocales vcd vdr visualization vorbis win32codecs wma wmf xinerama xml xorg
xrandr xslt xv zlib zvbi elibc_glibc input_devices_mouse input_devices_keyboard
kernel_linux linguas_de lirc_devices_all userland_GNU video_cards_v4l
video_cards_vesa video_cards_vbdev video_cards_nv"
Unset:  CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LC_ALL,
PORTAGE_RSYNC_EXTRA_OPTS

------- Comment #2 From Matthias Schwarzott 2006-07-13 09:58:05 0000 -------
This bug can be solved by changing the existing as-needed patch
(gammu-1.07.00-as-needed.patch):

It is needed to move the $(LDLIBS) from the beginning of line 18 to its end.


Btw. Deleting -Wall from the Makefiles will decrease output by 1000th of
warning-lines when using gcc-4.1.1.

------- Comment #3 From Alin Năstac 2006-07-13 13:51:23 0000 -------
I'm confused. You say I need to modify line 18 of the as-needed.patch but your
errors are referring to "Linking gammu-shared" command, which is at line 27.
The line 27 cannot be wrong since the only option after the libraries is the -o
outfile (not something that would break linkage with --as-needed).

Btw, I did build it successfully using LDFLAGS=-Wl,-O1,--as-needed and
gcc-3.4.6, so I guess it fails only on gcc-4.1?

------- Comment #4 From Matthias Schwarzott 2006-07-13 14:03:28 0000 -------
I am trying to emerge gammu with these use-flags USE="bluetooth -debug -irda
-mysql"

The error message clearly states that ./common/libGammu.so is linked wrong
(more precise: is not linked with -lbluetooth but using its functions)

But as a library is allowed to have undefined symbols the error occurs when
linking against this lib.

moving the LDLIBS to the end of the line corrects the linking order (the to be
linked object files before the referenced libs).

At least for final linking this order is the only allowed - seems to work the
same way when linking shared objects.

------- Comment #5 From Alin Năstac 2006-07-13 14:33:08 0000 -------
I identified failing makefile command by the "Linking gammu-shared" line on top
of the captured output (please notice the echos above every change made by
as-needed.patch). If the failing make command were the one modified at the line
18 of the patch, it would have been "Linking libGammu.so.0.0", but I reckon you
made a mistake when you copy-pasted the output.

Anyway, I've fixed it in cvs. 
It still builds successfully on my gcc (yes, first I've set the USE flags to
match yours).

------- Comment #6 From Matthias Schwarzott 2006-07-13 14:50:38 0000 -------
That is the thing I mean which makes it complicate.

The lib is linked wrong, but the error does not show here.


It first shows when linking something against the built lib.

First Last Prev Next    No search results available      Search page      Enter new bug