diff --git a/asps/rexe/Conscript b/asps/rexe/Conscript index 1c87ae344f2..b767595d2a1 100644 --- a/asps/rexe/Conscript +++ b/asps/rexe/Conscript @@ -80,7 +80,7 @@ if ($FC =~ /^pgf/) { $LIBS .= " -lgeant321 -lgcalor"; $LIBS .= " " . $env->{CERNLIBS}; $LIBS .= $env->{LDALL}; -$LIBS .= " " . $env->{Packages}->{MYSQL}->{LIBS}; +$LIBS .= " " . $env->{Packages}->{MYSQL}->{LIB}; $LIBS .= $env->{LDNONE}; $LIBS .= " " . $FLIBS . " " . $env->{CLIBS};# " " . $env->{SYSLIBS} ; if ($STAR_SYS =~ /^sun4x_5.$/) { diff --git a/asps/rexe/MAIN_rmain.cxx b/asps/rexe/MAIN_rmain.cxx index 1220da5fe1f..55e1ee1239c 100644 --- a/asps/rexe/MAIN_rmain.cxx +++ b/asps/rexe/MAIN_rmain.cxx @@ -13,6 +13,12 @@ extern "C" { strncpy(args,Margv[*k],i); memset (args+i,' ',n-i); return 0; } } + +// A dummy global definition to satisfy the linker when linking mysqlclient library statically with --whole-archive +// /opt/software/linux-scientific7-x86_64/gcc-4.8.5/mysql-5.7.27-pfyt3fwtkubcc5eazmoqfick3lgp67mf/lib/libmysqlclient.a(posix_timers.c.o): In function `my_timer_initialize': +// (.text+0x140): undefined reference to `key_thread_timer_notifier' +unsigned int key_thread_timer_notifier = 0; + //______________________________________________________________________________ int main(int argcp, char **argv) { diff --git a/docker/Dockerfile.root5 b/docker/Dockerfile.root5 index e32ab12e089..577782a4b94 100644 --- a/docker/Dockerfile.root5 +++ b/docker/Dockerfile.root5 @@ -102,24 +102,6 @@ FROM base-stage AS build-stage COPY . /star-sw -# XXX TEMP XXX: Don't force mysql static libraries to be linked into root4star -RUN cd /star-sw \ - && cat > root4star_cons.patch <<<$'\ -diff --git a/asps/rexe/Conscript b/asps/rexe/Conscript \n\ ---- a/asps/rexe/Conscript \n\ -+++ b/asps/rexe/Conscript \n\ -@@ -79,9 +79,7 @@ \n\ - } \n\ - $LIBS .= " -lgeant321 -lgcalor"; \n\ - $LIBS .= " " . $env->{CERNLIBS};\n\ --$LIBS .= $env->{LDALL};\n\ - $LIBS .= " " . $env->{Packages}->{MYSQL}->{LIBS};\n\ --$LIBS .= $env->{LDNONE};\n\ - $LIBS .= " " . $FLIBS . " " . $env->{CLIBS};# " " . $env->{SYSLIBS} ;\n\ - if ($STAR_SYS =~ /^sun4x_5.$/) {\n\ - if ($LIBPATH) { $LIBPATH .= $main::PATH_SEPARATOR; }\n' \ - && patch -p1 < root4star_cons.patch - RUN source /etc/profile \ && cd /star-sw \ && cons \ diff --git a/docker/Dockerfile.root6 b/docker/Dockerfile.root6 index 3ecb3f7eef9..87ec42b4866 100644 --- a/docker/Dockerfile.root6 +++ b/docker/Dockerfile.root6 @@ -104,24 +104,6 @@ FROM base-stage AS build-stage COPY . /star-sw -# XXX TEMP XXX: Don't force mysql static libraries to be linked into root4star -RUN cd /star-sw \ - && cat > root4star_cons.patch <<<$'\ -diff --git a/asps/rexe/Conscript b/asps/rexe/Conscript \n\ ---- a/asps/rexe/Conscript \n\ -+++ b/asps/rexe/Conscript \n\ -@@ -79,9 +79,7 @@ \n\ - } \n\ - $LIBS .= " -lgeant321 -lgcalor"; \n\ - $LIBS .= " " . $env->{CERNLIBS};\n\ --$LIBS .= $env->{LDALL};\n\ - $LIBS .= " " . $env->{Packages}->{MYSQL}->{LIBS};\n\ --$LIBS .= $env->{LDNONE};\n\ - $LIBS .= " " . $FLIBS . " " . $env->{CLIBS};# " " . $env->{SYSLIBS} ;\n\ - if ($STAR_SYS =~ /^sun4x_5.$/) {\n\ - if ($LIBPATH) { $LIBPATH .= $main::PATH_SEPARATOR; }\n' \ - && patch -p1 < root4star_cons.patch - RUN source /etc/profile \ # Override default Vc version && export Vc_DIR=/opt/software/linux-scientific7-x86_64/gcc-4.8.5/vc_-0.7.4-gqbhzu2x5u2dbe5tafxnl36xj5qbwov4 \ diff --git a/mgr/ConsDefs.pm b/mgr/ConsDefs.pm index 6b64f4d8c99..eb45e41aa94 100644 --- a/mgr/ConsDefs.pm +++ b/mgr/ConsDefs.pm @@ -1259,7 +1259,8 @@ 'MYSQL' => { 'LIBDIR'=> $MYSQLLIBDIR, 'INCDIR'=> $MYSQLINCDIR, - 'LIBS' => $MYSQLLIB + 'LIBS' => $MYSQLLIB, + 'LIB' => "-lmysqlclient" }, 'QT' => { 'QT_VERSION' => $QT_VERSION,