Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 139540 - GAMMU 1.05.0 fails to build - problems with mysql in smsd/s_mysql.o
Summary: GAMMU 1.05.0 fails to build - problems with mysql in smsd/s_mysql.o
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: High major
Assignee: Alin Năstac (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-07-07 05:14 UTC by smrspam88
Modified: 2006-07-12 13:03 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
cfg/config.h (config.h,5.53 KB, text/plain)
2006-07-12 09:23 UTC, smrspam88
Details

Note You need to log in before you can comment on or make changes to this bug.
Description smrspam88 2006-07-07 05:14:50 UTC
For me gammu-1.0.5 (the current stable version) fails with the same error message as in http://bugs.gentoo.org/show_bug.cgi?id=118074.


Making gammu/gammu.c
Linking gammu-shared
./gammu/smsd/s_mysql.o: In function `SMSDMySQL_Init':
s_mysql.c:(.text+0x65): undefined reference to `mysql_init'
s_mysql.c:(.text+0x9d): undefined reference to `mysql_real_connect'
s_mysql.c:(.text+0x12e): undefined reference to `mysql_real_query'
s_mysql.c:(.text+0x13e): undefined reference to `mysql_store_result'
s_mysql.c:(.text+0x14e): undefined reference to `mysql_free_result'
[...]
./gammu/smsd/s_mysql.o: In function `SMSDMySQL_FindOutboxSMS':
s_mysql.c:(.text+0x1ae4): undefined reference to `mysql_real_query'
s_mysql.c:(.text+0x1af8): undefined reference to `mysql_store_result'
s_mysql.c:(.text+0x3002): undefined reference to `mysql_real_query'
s_mysql.c:(.text+0x3016): undefined reference to `mysql_errno'
s_mysql.c:(.text+0x3162): undefined reference to `mysql_real_query'
s_mysql.c:(.text+0x319e): undefined reference to `mysql_error'
./gammu/smsd/s_mysql.o: In function `.L425':
s_mysql.c:(.text+0x3354): undefined reference to `mysql_error'
s_mysql.c:(.text+0x3362): undefined reference to `mysql_errno'
s_mysql.c:(.text+0x338e): undefined reference to `mysql_free_result'
s_mysql.c:(.text+0x339f): undefined reference to `mysql_error'
s_mysql.c:(.text+0x33ad): undefined reference to `mysql_errno'
./gammu/smsd/s_mysql.o: In function `.L531':
s_mysql.c:(.text+0x390b): undefined reference to `mysql_real_query'
./gammu/smsd/s_mysql.o: In function `.L532':
s_mysql.c:(.text+0x3d42): undefined reference to `mysql_error'
s_mysql.c:(.text+0x3d4c): undefined reference to `mysql_errno'
./gammu/smsd/s_mysql.o: In function `SMSDMySQL_RefreshPhoneStatus':
s_mysql.c:(.text+0x3e40): undefined reference to `mysql_real_query'
s_mysql.c:(.text+0x3e5d): undefined reference to `mysql_error'
s_mysql.c:(.text+0x3e67): undefined reference to `mysql_errno'
collect2: ld returned 1 exit status
make: *** [gammu/gammu-shared] Error 1

!!! ERROR: app-mobilephone/gammu-1.05.00 failed.
Call stack:
  ebuild.sh, line 1539:   Called dyn_compile
  ebuild.sh, line 939:   Called src_compile
  gammu-1.05.00.ebuild, line 42:   Called die

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

My emerge --info:
Banach momsen # emerge --info                                                                                           Portage 2.1-r1 (default-linux/x86/2006.0, gcc-3.4.6, glibc-2.3.6-r4, 2.6.16.11 i686)                                    =================================================================
System uname: 2.6.16.11 i686 AMD Duron(tm) processor
Gentoo Base System version 1.6.15
dev-lang/python:     2.4.3-r1
dev-python/pycrypto: 2.0.1-r5
dev-util/ccache:     [Not Present]
dev-util/confcache:  0.4.2-r1
sys-apps/sandbox:    1.2.17
sys-devel/autoconf:  2.13, 2.59-r7
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.16.1, 2.16.1-r3
sys-devel/gcc-config: 1.3.13-r3
sys-devel/libtool:   1.5.22
virtual/os-headers:  2.6.11-r2
ACCEPT_KEYWORDS="x86"
AUTOCLEAN="yes"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-O2 -march=athlon-tbird -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 /usr/share/texmf/dvipdfm/config/ /usr/share/texmf/dvips/config/ /usr/share/texmf/tex/generic/config/ /usr/share/texmf/tex/platex/config/ /usr/share/texmf/xdvi/"
CONFIG_PROTECT_MASK="/etc/env.d /etc/gconf /etc/revdep-rebuild /etc/terminfo"
CXXFLAGS="-O2 -march=athlon-tbird -fomit-frame-pointer -pipe -fvisibility-inlines-hidden"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoconfig confcache distlocks metadata-transfer parallel-fetch sandbox sfperms strict"
GENTOO_MIRRORS="http://distfiles.gentoo.org http://distro.ibiblio.org/pub/linux/distributions/gentoo"
LANG="en_US.UTF-8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed -Wl,--sort-common -Wl,-Bdirect"
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'"

SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="x86 3dnow mmx pic unicode usepackagedmakefiles elibc_glibc input_devices_keyboard input_devices_mouse kernel_linux userland_GNU video_cards_nvidia video_cards_nv"
Comment 1 smrspam88 2006-07-07 05:22:27 UTC
This bug occurs also with gammu-1.0.6 and LDFLAGS="" CFLAGS="".

BTW there is a new gammu version not in portage: gammu-1.0.7, I haven't tried it yet.
Comment 2 Alin Năstac (RETIRED) gentoo-dev 2006-07-10 12:10:20 UTC
Please verify that HAVE_MYSQL_MYSQL_H isn't defined in ${S}/cfg/config.h.
Comment 3 smrspam88 2006-07-12 08:58:34 UTC
Banach momsen # cat /var/tmp/portage/gammu-1.05.00/work/gammu-1.05.00/cfg/config.h | grep HAVE
#  define HAVE_DIRENT_H 1
#  define HAVE_SCANDIR 1
#  define HAVE_ALPHASORT 1
#  define HAVE_PTHREAD 1
#  define HAVE_SYS_IOCTL_H 1
#  define HAVE_MYSQL_MYSQL_H 1
//#  define HAVE_MYSQL_MYSQL_H 1
#  define HAVE_ISWSPACE 1
#  define HAVE_TOWLOWER 1
Comment 4 smrspam88 2006-07-12 09:23:34 UTC
Created attachment 91577 [details]
cfg/config.h

Since the last comment was somewhat ambigious I attached the log for
USE="mysql" emerge gammu
Comment 5 Alin Năstac (RETIRED) gentoo-dev 2006-07-12 11:51:39 UTC
hmm... but you do have #define HAVE_MYSQL_MYSQL_H 1 !
Are you sure you didn't build it with mysql USE flag enabled? 
What output do the 'emerge -p gammu' command have?
Comment 6 smrspam88 2006-07-12 12:10:28 UTC
Well, of course. Maybe I wasn't precise enough, but this error occurs if and only if I enable mysql support! And I do have mysql installed.
Comment 7 Alin Năstac (RETIRED) gentoo-dev 2006-07-12 12:27:27 UTC
I understood the exact opposite (bug #118074 was about that).
Now I can reproduce it.
 
Comment 8 Alin Năstac (RETIRED) gentoo-dev 2006-07-12 13:03:21 UTC
fixed in gammu-1.07.00.
It was a tipical --as-needed bug.