Bug #306

Build process should set proper rpath for linking mysql library

Added by Jason Heiss almost 11 years ago. Updated over 10 years ago.

Status:ClosedStart date:08/03/2010
Priority:NormalDue date:
Assignee:Javi Fontan% Done:

0%

Category:Core & System
Target version:-
Resolution:duplicate Pull request:
Affected Versions:

Description

The build process in 2.0 beta 1 does not set an rpath for the mysql library when linking oned. As such, if the mysql library is not in a standard system location it is not found when oned is executed. The build process does seem to be setting rpath for other libraries, particularly xmlrpc-c.

In particular, here's the command executed when oned gets built. Note that an appropriate -L is included, presumably gathered from mysql-config. But there is no matching rpath option.

g++ -o src/nebula/oned -Wl,--rpath -Wl,/opt/t/lib src/nebula/oned.o -Lsrc/common -Lsrc/log -Lsrc/sql -Lsrc/host -Lsrc/mad -Lsrc/nebula -Lsrc/pool -Lsrc/template -Lsrc/vm -Lsrc/vmm -Lsrc/lcm -Lsrc/tm -Lsrc/dm -Lsrc/im -Lsrc/image -Lsrc/rm -Lsrc/vnm -Lsrc/hm -Lsrc/um -Lsrc/authm -L/opt/t/lib -L/opt/t/mysql/lib/mysql -L/usr/lib -lxmlrpc_client++ -lxmlrpc_client -lcurl -lz -lcrypt -lnsl -lm -lssl -lnebula_core -lnebula_vmm -lnebula_lcm -lnebula_im -lnebula_hm -lnebula_rm -lnebula_dm -lnebula_tm -lnebula_um -lnebula_authm -lnebula_mad -lnebula_template -lnebula_image -lnebula_pool -lnebula_host -lnebula_vnm -lnebula_vm -lnebula_common -lnebula_sql -lnebula_log -lcrypto -lmysqlclient -lxmlrpc_server_abyss++ -lxmlrpc_server++ -lxmlrpc_server_abyss -lxmlrpc_server -lxmlrpc_abyss -lpthread -lxmlrpc++ -lxmlrpc -lxmlrpc_util -lxmlrpc_xmlparse -lxmlrpc_xmltok


Related issues

Duplicated by Bug #520: CentOS 5.5 scheduler compilation problems Closed 03/09/2011

History

#1 Updated by Javi Fontan almost 11 years ago

  • Category set to Core & System
  • Status changed from New to Assigned
  • Assignee set to Javi Fontan

#2 Updated by Javi Fontan almost 11 years ago

When checking for compile and link flags we use mysql_config. Unfortunately this command does not add rpath parameter. I see a couple of ways to add this:

  • Use recently added feature that make scons scripts aware of build environment variables so adding rpath to LDFLAGS should make the trick
  • Adding a parameter to SConstruct so you can tell it to add an specific directory as rpath flag

Automatic rpath generation is a bit tricky as not all mysql installations have the same path for the library directory.

#3 Updated by Javi Fontan over 10 years ago

  • Target version deleted (Release 2.0)

#4 Updated by Ruben S. Montero over 10 years ago

  • Status changed from Assigned to Closed
  • Resolution set to duplicate

Also available in: Atom PDF