Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 482496 - net-analyzer/hydra-7.4.2 USE=mysql - bin/ld: cannot find -lmysqlclient
Summary: net-analyzer/hydra-7.4.2 USE=mysql - bin/ld: cannot find -lmysqlclient
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal with 1 vote (vote)
Assignee: Gentoo Netmon project
URL:
Whiteboard:
Keywords: PATCH
Depends on:
Blocks:
 
Reported: 2013-08-26 03:04 UTC by Andrew Savchenko
Modified: 2014-10-24 20:33 UTC (History)
2 users (show)

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


Attachments
build.log (build.log,43.58 KB, text/x-log)
2013-08-26 03:04 UTC, Andrew Savchenko
Details
environment (environment,82.95 KB, text/plain)
2013-08-26 03:05 UTC, Andrew Savchenko
Details
emerge --info (emerge.info,8.42 KB, text/plain)
2013-08-26 03:07 UTC, Andrew Savchenko
Details
hydra-7.4.2-linker.patch (hydra-7.4.2-linker.patch,3.26 KB, patch)
2013-08-26 03:25 UTC, Andrew Savchenko
Details | Diff
skip lib32 libraries on 64-bit arches (hydra-x-link.patch,760 bytes, patch)
2013-08-27 18:24 UTC, Tony Krysak
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Andrew Savchenko gentoo-dev 2013-08-26 03:04:32 UTC
Hello,

hydra fails to build with sql support:

i686-pc-linux-gnu-gcc -march=native -m32 -O2 -funswitch-loops -fpredictive-commoning  -fgcse-after-reload -ftree-loop-im -fweb -frename-registers -fomit-frame-pointer -mfpmath=sse -pipe -frecord-gcc-switches -I. -march=native -m32 -O2 -funswitch-loops -fpredictive-commoning -Wl,-O1,--as-needed -pipe -lm -march=native -m32 -O2 -funswitch-loops -fpredictive-commoning  -fgcse-after-reload -ftree-loop-im -fweb -frename-registers -fomit-frame-pointer -mfpmath=sse -pipe -frecord-gcc-switches  -march=native -m32 -O2 -funswitch-loops -fpredictive-commoning -Wl,-O1,--as-needed -pipe -o hydra  hydra.c hydra-vnc.o hydra-pcnfs.o hydra-rexec.o hydra-nntp.o hydra-socks5.o hydra-telnet.o hydra-cisco.o hydra-http.o hydra-ftp.o hydra-imap.o hydra-pop3.o hydra-smb.o hydra-icq.o hydra-cisco-enable.o hydra-ldap.o hydra-mysql.o hydra-mssql.o hydra-xmpp.o hydra-http-proxy-urlenum.o hydra-snmp.o hydra-cvs.o hydra-smtp.o hydra-smtp-enum.o hydra-sapr3.o hydra-ssh.o hydra-sshkey.o hydra-teamspeak.o hydra-postgres.o hydra-rsh.o hydra-rlogin.o hydra-oracle-listener.o hydra-svn.o hydra-pcanywhere.o hydra-sip.o hydra-oracle-sid.o hydra-oracle.o hydra-vmauthd.o hydra-firebird.o hydra-afp.o hydra-ncp.o hydra-http-proxy.o hydra-http-form.o hydra-irc.o hydra-rdp.o crc32.o d3des.o bfg.o ntlm.o sasl.o hmacmd5.o hydra-mod.o -lm -lcurses -lssl -lidn -lpcre -lmysqlclient -lsvn_client-1 -lapr-1 -laprutil-1 -lsvn_subr-1 -lssh -lcrypto -L/usr/lib -L/usr/local/lib -L/lib -L/usr/lib -I/usr/include/subversion-1 -I/usr/include/apr-1 -I/usr/include/subversion-1 -I/usr/include/mysql -DLIBOPENSSL -DLIBOPENSSLNEW -DLIBNCURSES -DLIBIDN -DHAVE_PR29_H -DHAVE_PCRE -DLIBMYSQLCLIENT -DLIBSVN -DLIBSSH -DHAVE_MATH_H
hydra.c: In function ‘main’:
hydra.c:3133:9: warning: format ‘%d’ expects argument of type ‘int’, but argument 2 has type ‘long unsigned int’ [-Wformat]
‘src/xhydra’ -> ‘../xhydra’
The GTK GUI is ready, type "./xhydra" to start
/usr/lib/gcc/i686-pc-linux-gnu/4.7.3/../../../../i686-pc-linux-gnu/bin/ld: cannot find -lmysqlclient
collect2: error: ld returned 1 exit status
Comment 1 Andrew Savchenko gentoo-dev 2013-08-26 03:04:56 UTC
Created attachment 357032 [details]
build.log
Comment 2 Andrew Savchenko gentoo-dev 2013-08-26 03:05:09 UTC
Created attachment 357034 [details]
environment
Comment 3 Andrew Savchenko gentoo-dev 2013-08-26 03:07:03 UTC
Created attachment 357036 [details]
emerge --info
Comment 4 Andrew Savchenko gentoo-dev 2013-08-26 03:24:07 UTC
This happens because:

1) I have mysqlclient preserved libs on my system (libmysqlclient.so.16).
2) Preserved libs are in /usr/lib while new mysql setup is in the /usr/lib/mysql.
3) hydra's configure checks /usr/lib before /usr/lib/mysql.
4) hydra's configure is happy when it founds *.so.* file even when *.so is not there.

My solution is to remove *.so.* checks because in Gentoo we always have *.so installed.
Comment 5 Andrew Savchenko gentoo-dev 2013-08-26 03:25:44 UTC
Created attachment 357038 [details, diff]
hydra-7.4.2-linker.patch

Remove *.so.* checks thus forcing configure script to look for *.so files.
Comment 6 Tony Krysak 2013-08-27 18:24:36 UTC
Created attachment 357194 [details, diff]
skip lib32 libraries on 64-bit arches
Comment 7 Tony Krysak 2013-08-27 18:28:29 UTC
same missing -lmysqlclient on amd64, but for a different reason.  configure uses all libs in ld.so.conf, and since 32 sorts before 64, 64-bit multilib systems won't find libs when a 32-bit version also exists.  The hydra-x-lik.patch works for both hydra-7.4.2 and hydra-7.5
Comment 8 Andrew Savchenko gentoo-dev 2013-08-27 19:36:04 UTC
The same linker issue with hydra-7.5 and the same patch works.
Comment 9 Andrew Savchenko gentoo-dev 2014-02-26 23:29:59 UTC
Ping. Same issue here with hydra-7.6.
Comment 10 Jeroen Roovers (RETIRED) gentoo-dev 2014-07-12 16:20:59 UTC
I think this was fixed in 8.0.
Comment 11 Andrew Savchenko gentoo-dev 2014-10-24 20:33:20 UTC
Hydra-8.0 builds fine for me.