Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 541736 - dev-db/mysql-workbench-6.2.3-r1 with dev-db/mysql-connector-c++-1.1.5 - Unknown CMake command "add_definition".
Summary: dev-db/mysql-workbench-6.2.3-r1 with dev-db/mysql-connector-c++-1.1.5 - Unkno...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Development (show other bugs)
Hardware: All Linux
: Normal normal with 1 vote (vote)
Assignee: Hans de Graaff
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-02-28 23:22 UTC by Martin von Gagern
Modified: 2015-03-07 08:03 UTC (History)
1 user (show)

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


Attachments
Change to add_definitions (definitions.patch,504 bytes, patch)
2015-02-28 23:22 UTC, Martin von Gagern
Details | Diff
Allow successful compilation against connector 1.1.5 (MySQLCppConn115.patch,1.83 KB, patch)
2015-03-01 01:46 UTC, Martin von Gagern
Details | Diff
build-log (build-log.txt,7.20 KB, text/plain)
2015-03-05 19:04 UTC, Alexander Pimenov
Details
emerge-info (emerge-info.txt,6.25 KB, text/plain)
2015-03-05 19:04 UTC, Alexander Pimenov
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Martin von Gagern 2015-02-28 23:22:27 UTC
Created attachment 397720 [details, diff]
Change to add_definitions

-- Found MYSQLCPPCONN: /usr/lib64/libmysqlcppconn.so  
-- C/C++ version 1.1.4+: TRUE
-- Found VSQLITE: /usr/lib64/libvsqlitepp.so  
-- Found TINYXML: /usr/lib64/libtinyxml.so  
-- Found GDAL: /usr/lib64/libgdal.so  
CMake Error at CMakeLists.txt:92 (add_definition):
  Unknown CMake command "add_definition".

The lines in question read

if (MYSQLCPPCONN_VERSION_1_1_4)
  add_definition(-DMYSQLCPPCONN_VERSION_1_1_4)
endif ()

but I guess that should be “add_definitions”, with a trailing “s”. Changing that, the workbench builds as expected.
Comment 1 Martin von Gagern 2015-03-01 00:39:18 UTC
(In reply to Martin von Gagern from comment #0)
> Changing that, the workbench builds as expected.

I've been too quick: the configure phase went well, but eventually I got this:

/var/tmp/portage/dev-db/mysql-workbench-6.2.3-r1/work/mysql-workbench-community-6.2.3-src/library/cdbc/src/driver_manager.cpp: In member function ‘sql::ConnectionWrapper sql::DriverManager::getConnection(const db_mgmt_ConnectionRef&, boost::shared_ptr<sql::TunnelConnection>, sql::Authentication::Ref, sql::DriverManager::ConnectionInitSlot)’:
/var/tmp/portage/dev-db/mysql-workbench-6.2.3-r1/work/mysql-workbench-community-6.2.3-src/library/cdbc/src/driver_manager.cpp:405:74: error: no matching function for call to ‘get(sql::Variant&)’
         sql::SQLString &val= boost::get<sql::SQLString>(prop_iter->second);

This, too, appears to be due to the mysql-connector-c++ version in use. Where 1.1.3 had typedef “boost::variant<…> ConnectPropertyVal”, 1.1.5 has “typedef sql::Variant ConnectPropertyVal”. I'm working on a patch…
Comment 2 Martin von Gagern 2015-03-01 01:46:30 UTC
Created attachment 397728 [details, diff]
Allow successful compilation against connector 1.1.5
Comment 3 Alexander Pimenov 2015-03-05 19:04:03 UTC
Created attachment 398186 [details]
build-log
Comment 4 Alexander Pimenov 2015-03-05 19:04:48 UTC
Created attachment 398188 [details]
emerge-info
Comment 5 Alexander Pimenov 2015-03-05 19:06:25 UTC
reproduction always:
dev-db/mysql-connector-c++-1.1.5
Comment 6 Hans de Graaff gentoo-dev Security 2015-03-07 08:03:21 UTC
Thanks for the patches.

I just added mysql-workbench 6.2.5 to the tree, and it looks like the compatibility issues with mysql-connector-c++ have been fixed upstream. The CMakeList.txt typo has been fixed, and the code in driver_manager.cpp has been rewritten, I assume in a more compatible way. Please reopen if there are still issues with mysql-workbench-6.2.5.