Skip to content

Commit ffda75b

Browse files
author
Tor Didriksen
committed
Bug#22504264 MYSQL COMMUNITY SERVER PACKAGE FOR SOLARIS 10 X86/AMD64 BROKEN
Our binaries depend on libstlport, which is not part of Solaris by default, so we ship it as part of mysql packages. The problem was that this dependency was not noted in the client library. Fix: bacport more from: Bug#16555106 FIX BROKEN BUILD WITH SOLARIS/GCC 64BIT MODE Specifically: add -R$ORIGIN/../lib when linking the client library.
1 parent 83ececd commit ffda75b

3 files changed

Lines changed: 17 additions & 7 deletions

File tree

libmysql/CMakeLists.txt

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright (c) 2006, 2014, Oracle and/or its affiliates. All rights reserved.
1+
# Copyright (c) 2006, 2016, Oracle and/or its affiliates. All rights reserved.
22
#
33
# This program is free software; you can redistribute it and/or modify
44
# it under the terms of the GNU General Public License as published by
@@ -235,11 +235,17 @@ IF(NOT DISABLE_SHARED)
235235
VERSION "${OS_SHARED_LIB_VERSION}"
236236
SOVERSION "${SHARED_LIB_MAJOR_VERSION}")
237237
CONFIGURE_FILE(libmysql.ver.in ${CMAKE_CURRENT_BINARY_DIR}/libmysql.ver)
238+
239+
GET_TARGET_PROPERTY(libmysql_link_flags libmysql LINK_FLAGS)
240+
IF(NOT libmysql_link_flag)
241+
SET(libmysql_link_flags)
242+
ENDIF()
243+
SET(libmysql_link_flags
244+
"${CMAKE_SHARED_LIBRARY_C_FLAGS} ${libmysql_link_flags}")
245+
SET_TARGET_PROPERTIES(libmysql
246+
PROPERTIES LINK_FLAGS "${libmysql_link_flags}")
247+
238248
IF(LINK_FLAG_NO_UNDEFINED)
239-
GET_TARGET_PROPERTY(libmysql_link_flags libmysql LINK_FLAGS)
240-
IF(NOT libmysql_link_flag)
241-
SET(libmysql_link_flags)
242-
ENDIF()
243249
SET(libmysql_link_flags
244250
"${libmysql_link_flags} ${LINK_FLAG_NO_UNDEFINED}")
245251
SET(libmysql_link_flags

scripts/mysql_config.sh

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#!/bin/sh
2-
# Copyright (c) 2000, 2014, Oracle and/or its affiliates. All rights reserved.
2+
# Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved.
33
#
44
# This program is free software; you can redistribute it and/or modify
55
# it under the terms of the GNU General Public License as published by
@@ -113,7 +113,9 @@ fi
113113
# We intentionally add a space to the beginning and end of lib strings, simplifies replace later
114114
libs=" $ldflags -L$pkglibdir @RPATH_OPTION@ -lmysqlclient @ZLIB_DEPS@ @NON_THREADED_LIBS@"
115115
libs="$libs @openssl_libs@ @STATIC_NSS_FLAGS@ "
116+
libs="$libs @QUOTED_CMAKE_C_LINK_FLAGS@"
116117
libs_r=" $ldflags -L$pkglibdir @RPATH_OPTION@ -lmysqlclient @ZLIB_DEPS@ @CLIENT_LIBS@ @openssl_libs@ "
118+
libs_r="$libs_r @QUOTED_CMAKE_C_LINK_FLAGS@"
117119
embedded_libs=" $ldflags -L$pkglibdir @RPATH_OPTION@ -lmysqld @LIBDL@ @ZLIB_DEPS@ @LIBS@ @WRAPLIBS@ @openssl_libs@ "
118120
embedded_libs="$embedded_libs @QUOTED_CMAKE_CXX_LINK_FLAGS@"
119121

sql/CMakeLists.txt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright (c) 2006, 2015, Oracle and/or its affiliates. All rights reserved.
1+
# Copyright (c) 2006, 2016, Oracle and/or its affiliates. All rights reserved.
22
#
33
# This program is free software; you can redistribute it and/or modify
44
# it under the terms of the GNU General Public License as published by
@@ -419,6 +419,8 @@ IF(WIN32 OR HAVE_DLOPEN AND NOT DISABLE_SHARED)
419419
ELSE()
420420
# udf_example is using safemutex exported by mysqld
421421
TARGET_LINK_LIBRARIES(udf_example mysqld)
422+
SET_TARGET_PROPERTIES(udf_example
423+
PROPERTIES LINK_FLAGS "${CMAKE_SHARED_LIBRARY_C_FLAGS}")
422424
ENDIF()
423425
ENDIF()
424426

0 commit comments

Comments
 (0)