Bug #64685 Not building on Hurd
Submitted: 18 Mar 2012 21:43 Modified: 15 Dec 2014 15:22
Reporter: Nicholas Bamber (OCA) Email Updates:
Status: Won't fix Impact on me:
None 
Category:MySQL Server: Compiling Severity:S2 (Serious)
Version:5.5 OS:Other (Debian GNU/Hurd)
Assigned to: CPU Architecture:Any
Tags: Contribution

[18 Mar 2012 21:43] Nicholas Bamber
Description:
MySQl 5.1 successfully built on Debian GNU/Hurd. 5.5 does not. We have a patch that provides the necessary CMake options and we have extended this to get past the testing sanity checks. This allows the package to build. However, although 'make test' works 'make test-bt' fails with only 84 of ~280 tests done. I can give more detailed information on request. 

How to repeat:
Build on Debian GNU/Hurd. the cmake invocation was as follows:

            cmake -DCMAKE_INSTALL_PREFIX=/usr \
                \
                 \
                -DMYSQL_UNIX_ADDR=/var/run/mysqld/mysqld.sock \
                -DMYSQL_USER=mysql \
                -DWITH_LIBWRAP=ON \
                -DWITH_READLINE=OFF \
                -DWITH_LIBEDIT=OFF \
                 \
                -DWITH_SSL=yes \
            -DCOMPILATION_COMMENT="(Debian)" \
            -DMYSQL_SERVER_SUFFIX="-1" \
            -DSYSTEM_TYPE="debian-linux-gnu" \
            -DINSTALL_LAYOUT=RPM \
            -DINSTALL_LIBDIR=lib/i386-gnu \
            -DINSTALL_PLUGINDIR=lib/mysql/plugin \
        -DWITH_EMBEDDED_SERVER=ON \
        -DHAVE_EMBEDDED_PRIVILEGE_CONTROL=ON \
            -DWITH_ARCHIVE_STORAGE_ENGINE=ON \
            -DWITH_BLACKHOLE_STORAGE_ENGINE=ON \
            -DWITH_FEDERATED_STORAGE_ENGINE=ON \
                -DWITH_EXTRA_CHARSETS=all ..'

Suggested fix:
Author: Pino Toscano <pino@debian.org>
Subject: cmake options for GNU/Hurd
Forwarded: no
Bug-Debian: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=651002
Last-Update: 2012-03-16
--- /dev/null
+++ b/cmake/os/GNU.cmake
@@ -0,0 +1,20 @@
+# This file includes GNU/Hurd specific options and quirks, related to system checks
+
+INCLUDE(CheckSymbolExists)
+
+SET(_GNU_SOURCE 1)
+
+# Fix CMake (< 2.8) flags. -rdynamic exports too many symbols.
+FOREACH(LANG C CXX)
+  STRING(REPLACE "-rdynamic" ""
+  CMAKE_SHARED_LIBRARY_LINK_${LANG}_FLAGS
+  "${CMAKE_SHARED_LIBRARY_LINK_${LANG}_FLAGS}"
+  )
+ENDFOREACH()
+
+# Ensure we have clean build for shared libraries
+# without unresolved symbols
+SET(LINK_FLAG_NO_UNDEFINED "-Wl,--no-undefined")
+
+# 64 bit file offset support flag
+SET(_FILE_OFFSET_BITS 64)
--- a/mysql-test/lib/My/Platform.pm
+++ b/mysql-test/lib/My/Platform.pm
@@ -110,6 +110,9 @@
   # This may not be true, but we can't test for it on AIX due to Perl bug
   # See Bug #45771
   return 0 if ($^O eq 'aix');
+  # Similarly the path length is hidden.
+  # See Debian bug #651002
+  return 0 if ($^O eq 'gnu');
 
   require IO::Socket::UNIX;
[19 Mar 2012 4:54] Valeriy Kravchuk
Thank you for the problem report and patch contributed.
[16 Jan 2013 12:28] Bjoern Boschman
Hi folks,

is there any hope that the Triage will take place?

Cheers
B
[12 Dec 2014 8:36] Ståle Deraas
Posted by developer:
 
We do not have access to a Hurd environment, and cannot maintain a fix that we cannot test.
[15 Dec 2014 15:22] Erlend Dahl
[12 Dec 2014 0:36] Staale Deraas (SDERAAS)

We do not have access to a Hurd environment, and cannot maintain a fix that
we cannot test.
[23 Dec 2014 12:02] Bjoern Boschman
would it hurd to add those few lines?