Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 494186 - net-libs/wt-3.3.1 - src/Wt/Dbo/backend/libwtdbomysql.so.3.3.1: ld: cannot find -lmysqlclient
Summary: net-libs/wt-3.3.1 - src/Wt/Dbo/backend/libwtdbomysql.so.3.3.1: ld: cannot fin...
Status: RESOLVED WONTFIX
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Library (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: No maintainer - Look at https://wiki.gentoo.org/wiki/Project:Proxy_Maintainers if you want to take care of it
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-12-13 18:48 UTC by Boris Vingradov
Modified: 2016-10-01 06:59 UTC (History)
0 users

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


Attachments
build.log (wt-build.log,417.53 KB, text/plain)
2013-12-13 18:52 UTC, Boris Vingradov
Details
emerge --info (wt-emerge-info.txt,4.95 KB, text/plain)
2013-12-13 19:08 UTC, Boris Vingradov
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Boris Vingradov 2013-12-13 18:48:49 UTC
I'm installing a new version of net-libs/wt and so build failed:

/usr/bin/cmake -E cmake_progress_report /var/tmp/portage/net-libs/wt-3.3.1/work/wt-3.3.1_build/CMakeFiles  1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79
[ 83%] Built target wt
make[1]: Leaving directory '/var/tmp/portage/net-libs/wt-3.3.1/work/wt-3.3.1_build'
Makefile:116: recipe for target 'all' failed
make: *** [all] Error 2
emake failed


Reproducible: Always

Steps to Reproduce:
1.emerge -av net-libs/wt
2.
3.
Comment 1 Boris Vingradov 2013-12-13 18:52:44 UTC
Created attachment 365256 [details]
build.log
Comment 2 Boris Vingradov 2013-12-13 19:08:11 UTC
Created attachment 365260 [details]
emerge --info
Comment 3 Boris Vingradov 2013-12-13 19:14:01 UTC
I think this failed because libmysqlclient path is broken:
jane ~ # ldconfig -p | grep mysqlclient
        libmysqlclient_r.so.16 (libc6) => /usr/lib32/libmysqlclient_r.so.16
        libmysqlclient_r.so (libc6) => /usr/lib32/libmysqlclient_r.so
        libmysqlclient.so.18 (libc6,x86-64) => /usr/lib64/mysql/libmysqlclient.so.18
        libmysqlclient.so.16 (libc6) => /usr/lib32/libmysqlclient.so.16
        libmysqlclient.so (libc6,x86-64) => /usr/lib64/mysql/libmysqlclient.so
        libmysqlclient.so (libc6) => /usr/lib32/libmysqlclient.so

and fail standart compile test app with libmysqlclient:

nis@jane ~ $ g++ -lmysqlclient test.cpp -o test
/usr/lib/gcc/x86_64-pc-linux-gnu/4.8.2/../../../../x86_64-pc-linux-gnu/bin/ld: cannot find -lmysqlclient
collect2: ошибка: выполнение ld завершилось с кодом возврата 1

but if I provide non relative path to lib this compile is success:

nis@jane ~ $ g++ -L/usr/lib64/mysql/ -lmysqlclient test.cpp -o test
nis@jane ~ $
Comment 4 Boris Vingradov 2013-12-13 19:15:33 UTC
I'm build for test net-libs/wt-3.3.1 without @mysql@ flag and build succeseful.
Comment 5 Boris Vingradov 2013-12-14 04:16:57 UTC
Also after build any versions of net-libs/wt, I can't build any programs using this lib (compiling examples):
-- Boost version: 1.52.0
-- Found the following Boost libraries:
--   date_time
--   regex
--   program_options
--   signals
--   system
--   filesystem
--   thread
-- Found png libraries
-- Found libharu libraries
** Enabling multi threading.
-- Boost 105200 < 1.54, WT_SIGNALS_IMPLEMENTATION = boost.signals recommended
-- Selecting boost.signals
** Enabling advanced font support using libpango
** Wt::Dbo: building SQLite3 backend.
** Wt::Dbo: not building Postgres backend.
** Wt::Dbo: not building Firebird backend.
    Indicate the location of your FirebirdSQL and IBPP installation using 
    -DFIREBIRD_PREFIX=... -DIBPP_SRC_DIRECTORY=...
** Wt::Dbo: not building MySQL backend.
** Disabling ISAPI.
** Enabling FastCGI connector.
** Enabling built-in httpd.
*** Not building widget gallery; C++11 required (gcc > 4.6 + set WT_CPP_11_MODE=-std=c++0x or MSVS >= 2012)
** Testing Wt::Dbo using Sqlite3 backend
-- Configuring done
-- Generating done
-- Build files have been written to: /home/nis/wt-3.3.1
[ 80%] Built target wt
[ 80%] Built target wttest
Linking CXX executable test
../src/libwt.so.3.3.1: undefined reference to `boost::thread::join()'
../src/libwt.so.3.3.1: undefined reference to `boost::thread::start_thread()'
../src/libwt.so.3.3.1: undefined reference to `boost::this_thread::get_id()'

This result expected on compile my example with lib.

But I write test example with boost::tread and it compiling and running success:
nis@jane ~/test $ g++ -lboost_system -lboost_thread boost-thread-test.cpp -o boost-thread-test
nis@jane ~/test $ ./boost-thread-test 
7f9eb38a6700
0
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24

Source of this example:
#include <boost/thread/thread.hpp>
#include <boost/bind.hpp>
#include <iostream>
#include <unistd.h>

using namespace std;

void printer(void)
{
        for (int i = 0; i < 25; i++) {
                cout << i << endl;
                sleep(1);
        }
}

int main()
{
        boost::thread t(printer);
        cout << t.get_id() << endl;
        t.join();
        return 0;
}
Comment 6 Boris Vingradov 2013-12-14 15:02:14 UTC
I roolback Boost to 1.52 and threadin problem not reply.
Comment 7 Matthew Marlowe (RETIRED) gentoo-dev 2013-12-14 18:03:27 UTC
I didn't get the comment about boost_thread and rolling back boost, rolled back from what version to what? Did it fix anything?

As to mysql, the seems to be that boost isn't forcing the -L/usr/lib64/mysql flag when use=mysql.. I'll have to ask someone who knows boost better why this might be.

Thanks for the detailed debugging.
Comment 8 Matthew Marlowe (RETIRED) gentoo-dev 2013-12-14 18:16:17 UTC
This looks related.

http://redmine.webtoolkit.eu/boards/2/topics/6770

Apparently, mysql support is new, and by default they search for mariadb libs and not standard mysql.  We have to pass another argument to cmake for regular mysql.

Messy.
Comment 9 Pacho Ramos gentoo-dev 2016-10-01 06:59:13 UTC
removed