[MDEV-5706] threadpool does not build on hurd-i386 Created: 2014-02-19  Updated: 2015-07-23  Resolved: 2014-07-25

Status: Closed
Project: MariaDB Server
Component/s: Platform Debian
Affects Version/s: 5.5.38
Fix Version/s: 5.5.40

Type: Bug Priority: Major
Reporter: Otto Kekäläinen Assignee: Sergei Golubchik
Resolution: Fixed Votes: 0
Labels: compile, debian, hurd
Environment:

Debian official build system



 Description   

MariaDB 5.5.35 has just been uploaded to Debian and the Debian build system reported, that building for architecture hurd-i386 failed.

Build overview: https://buildd.debian.org/status/package.php?p=mariadb-5.5
Hurd-i386 build overview: https://buildd.debian.org/status/logs.php?pkg=mariadb-5.5&arch=hurd-i386

Some error lines from the build log:

/«PKGBUILDDIR»/sql/threadpool_unix.cc:39:2: error: #error threadpool is not available on this platform
 #error threadpool is not available on this platform
  ^
/«PKGBUILDDIR»/sql/threadpool_unix.cc: In function 'connection_t* listener(worker_thread_t*, thread_group_t*)':
/«PKGBUILDDIR»/sql/threadpool_unix.cc:641:5: error: 'native_event' was not declared in this scope
     native_event ev[MAX_EVENTS];
     ^
/«PKGBUILDDIR»/sql/threadpool_unix.cc:641:18: error: expected ';' before 'ev'
     native_event ev[MAX_EVENTS];
                  ^
/«PKGBUILDDIR»/sql/threadpool_unix.cc:647:46: error: 'ev' was not declared in this scope
     cnt = io_poll_wait(thread_group->pollfd, ev, MAX_EVENTS, -1);

Full log at:
https://buildd.debian.org/status/fetch.php?pkg=mariadb-5.5&arch=hurd-i386&ver=5.5.35-1&stamp=1392719557

Equivalent MySQL packages for hurd-i386 build successfully, are there maybe some patches to import to MariaDB?
https://buildd.debian.org/status/logs.php?pkg=mysql-5.5&&arch=hurd-i386



 Comments   
Comment by Elena Stepanova [ 2014-02-20 ]

Equivalent MySQL packages for hurd-i386 build successfully, are there maybe some patches to import to MariaDB?

MySQL does not have the thread pool, so there are no patches that can be taken from MySQL.


I see things like than in other projects that add support for hurd:

-#if defined(FREEBSD) || defined(__linux__)
+#if defined(FREEBSD) || defined(__linux__) || defined(__gnu_hurd__)

or

-#if defined(__linux__) 
+#if defined(__linux__) || defined(__GNU__)

Maybe we need something like that (or maybe it's much more complicated).

svoj,
Could you please take a quick look? If there is no easy fix, please change the 'Fix version' field.

Comment by Sergey Vojtovich [ 2014-02-20 ]

Looks like threadpool is not aware of GNU Hurd indeed and there is no way to just switch it off. I'll need to setup Hurd VM and check what we can do about it.

Comment by Sergey Vojtovich [ 2014-04-15 ]

As a quick fix I'd suggest to disable pool of threads on GNU/Hurd.

Somewhat better fix is to be done by MDEV-5756 - CMake option to build without thread pool.

Even better to implement native pool of threads for GNU/Hurd, but that's rather time consuming.

Comment by Sergey Vojtovich [ 2014-04-15 ]

Sergei, please review fix for this bug.

There is still one compilation failure in auth_dialog plugin due to missing RTLD_DEFAULT, but that's rather odd because there is RTLD_DEFAULT in dlfcn.h of GNU/Hurd. This plugin can be disabled on GNU/Hurd anyway.

I failed to run test suite, but I suppose that's another problem.

Comment by Otto Kekäläinen [ 2014-07-19 ]

This is still valid for 5.5.38:
https://buildd.debian.org/status/fetch.php?pkg=mariadb-5.5&arch=hurd-i386&ver=5.5.38-1&stamp=1405753481

MySQL in Debian does however build (https://buildd.debian.org/status/package.php?p=mysql-5.5) on this architecture and I think we should get to the same level.

Comment by Otto Kekäläinen [ 2014-08-12 ]

It seems this issue still exists in 5.5.39. The fail log is about the same threadpool issue:

/«PKGBUILDDIR»/sql/threadpool_unix.cc:39:2: error: #error threadpool is not available on this platform
 #error threadpool is not available on this platform

Full log at https://buildd.debian.org/status/fetch.php?pkg=mariadb-5.5&arch=hurd-i386&ver=5.5.39-1&stamp=1407828438

Comment by Sergei Golubchik [ 2014-08-12 ]

Fixed in 5.5.40

Comment by Otto Kekäläinen [ 2014-09-26 ]

This is fixed in 5.5. in https://bazaar.launchpad.net/~maria-captains/maria/5.5/revision/4267
Also for 10.0 in https://bazaar.launchpad.net/~maria-captains/maria/10.0/revision/4355#sql/CMakeLists.txt

Generated at Thu Feb 08 07:06:25 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.