retitle 673262 mydumper: FTBFS with multiarch libmysqlclient
block 671115 by 673262
tag 673262 patch
thanks

On Thu, May 17, 2012 at 12:51:24PM +0200, Samuel Thibault wrote:
> mydumper currently FTBFS in sid:
[...]
> MYSQL_LIBRARIES_crypto
>     linked by target "mydumper" in directory /tmp/buildd/mydumper-0.5.1
>     linked by target "myloader" in directory /tmp/buildd/mydumper-0.5.1
> MYSQL_LIBRARIES_ssl
>     linked by target "mydumper" in directory /tmp/buildd/mydumper-0.5.1
>     linked by target "myloader" in directory /tmp/buildd/mydumper-0.5.1

The above two go away once "-lssl -lcrypto" is removed from mysql_config
(#590905).

> MYSQL_LIBRARIES_inux-gnu
>     linked by target "mydumper" in directory /tmp/buildd/mydumper-0.5.1
>     linked by target "myloader" in directory /tmp/buildd/mydumper-0.5.1

As for this one, the transition to multiarch triggered a misbehaving
regexp in cmake/modules/FindMySQL.cmake:

--- mydumper-0.5.1~/cmake/modules/FindMySQL.cmake
+++ mydumper-0.5.1/cmake/modules/FindMySQL.cmake
@@ -47,7 +47,9 @@
 
         set(MYSQL_ADD_LIBRARIES "")
 
-        string(REGEX MATCHALL "-l[^ ]*" MYSQL_LIB_LIST "${MY_TMP}")
+        # prepend space in order to match separate words only (e.g. rather
+        # than "-linux" from within "-L/usr/lib/i386-linux-gnu")
+        string(REGEX MATCHALL " +-l[^ ]*" MYSQL_LIB_LIST " ${MY_TMP}")
         foreach(MY_LIB ${MYSQL_LIB_LIST})
             string(REGEX REPLACE "[ ]*-l([^ ]*)" "\\1" MY_LIB "${MY_LIB}")
             list(APPEND MYSQL_ADD_LIBRARIES "${MY_LIB}")
@@ -55,7 +57,7 @@
 
         set(MYSQL_ADD_LIBRARY_PATH "")
 
-        string(REGEX MATCHALL "-L[^ ]*" MYSQL_LIBDIR_LIST "${MY_TMP}")
+        string(REGEX MATCHALL " +-L[^ ]*" MYSQL_LIBDIR_LIST " ${MY_TMP}")
         foreach(MY_LIB ${MYSQL_LIBDIR_LIST})
             string(REGEX REPLACE "[ ]*-L([^ ]*)" "\\1" MY_LIB "${MY_LIB}")
             list(APPEND MYSQL_ADD_LIBRARY_PATH "${MY_LIB}")

Cheers,

Matej



-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to