php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #70747 Compile failure on OpenBSD 5.8/i386 due "thread-local storage"
Submitted: 2015-10-19 23:52 UTC Modified: 2015-10-21 10:34 UTC
Votes:1
Avg. Score:5.0 ± 0.0
Reproduced:0 of 0 (0.0%)
From: stolen dot data dot net at gmail dot com Assigned:
Status: Not a bug Package: Compile Failure
PHP Version: 5.6.14 OS: OpenBSD 5.8
Private report: No CVE-ID: None
 [2015-10-19 23:52 UTC] stolen dot data dot net at gmail dot com
Description:
------------
I don't know exactly when this problem showed up - my last working build of PHP 5.6.x (not sure what exact version; installation is lost) was on OpenBSD 5.6 which is exactly 1 year old, which may help to narrow things down a little bit. I suspect it has to do with ZTS, though I can't find any obvious options in configure for tuning this for a production environment.

Output:

/bin/sh /usr/opt/php-5.6.14/libtool --silent --preserve-dup-deps --mode=compile /usr/opt/php-5.6.14/meta_ccld  -Imain/ -I/usr/opt/php-5.6.14/main/ -DPHP_ATOM_INC -I/usr/opt/php-5.6.14/include -I/usr/opt/php-5.6.14/main -I/usr/opt/php-5.6.14 -I/usr/opt/php-5.6.14/ext/date/lib -I/usr/opt/php-5.6.14/ext/ereg/regex -I/usr/local/include -I/usr/opt/php-5.6.14/ext/mbstring/oniguruma -I/usr/opt/php-5.6.14/ext/mbstring/libmbfl -I/usr/opt/php-5.6.14/ext/mbstring/libmbfl/mbfl -I/usr/opt/php-5.6.14/ext/sqlite3/libsqlite -I/usr/opt/php-5.6.14/TSRM -I/usr/opt/php-5.6.14/Zend    -I/usr/local/include -g -O2 -fvisibility=hidden -pthread -DZTS  -c /usr/opt/php-5.6.14/main/php_open_temporary_file.c -o main/php_open_temporary_file.lo 
/usr/opt/php-5.6.14/main/php_open_temporary_file.c:187: error: thread-local storage not supported for this target
*** Error 1 in /usr/opt/php-5.6.14 (Makefile:1096 'main/php_open_temporary_file.lo')

OpenBSD 5.8 runs GCC 4.2.1.


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2015-10-19 23:55 UTC] stolen dot data dot net at gmail dot com
I don't know when this problem showed up, but my last working build of PHP 5.6.x - not sure what exact version as the installation is lost - was on OpenBSD 5.6 which is 1 year old, which may help to narrow things down a little bit. I suspect it has to do with ZTS, though I can't find any obvious options in configure for tuning this for a production environment.

Output:

/bin/sh /usr/opt/php-5.6.14/libtool --silent --preserve-dup-deps --mode=compile /usr/opt/php-5.6.14/meta_ccld  -Imain/ -I/usr/opt/php-5.6.14/main/ -DPHP_ATOM_INC -I/usr/opt/php-5.6.14/include -I/usr/opt/php-5.6.14/main -I/usr/opt/php-5.6.14 -I/usr/opt/php-5.6.14/ext/date/lib -I/usr/opt/php-5.6.14/ext/ereg/regex -I/usr/local/include -I/usr/opt/php-5.6.14/ext/mbstring/oniguruma -I/usr/opt/php-5.6.14/ext/mbstring/libmbfl -I/usr/opt/php-5.6.14/ext/mbstring/libmbfl/mbfl -I/usr/opt/php-5.6.14/ext/sqlite3/libsqlite -I/usr/opt/php-5.6.14/TSRM -I/usr/opt/php-5.6.14/Zend    -I/usr/local/include -g -O2 -fvisibility=hidden -pthread -DZTS  -c /usr/opt/php-5.6.14/main/php_open_temporary_file.c -o main/php_open_temporary_file.lo 
/usr/opt/php-5.6.14/main/php_open_temporary_file.c:187: error: thread-local storage not supported for this target
*** Error 1 in /usr/opt/php-5.6.14 (Makefile:1096 'main/php_open_temporary_file.lo')

OpenBSD 5.8 runs GCC 4.2.1.
 [2015-10-20 09:08 UTC] stolen dot data dot net at gmail dot com
5.6.11 builds fine, but 5.6.12 and onwards produce the same failure.
 [2015-10-20 15:38 UTC] ab@php.net
-Status: Open +Status: Feedback
 [2015-10-20 15:38 UTC] ab@php.net
When looking at the ports here ftp://ftp.iinet.net.au/pub/OpenBSD/5.8/packages/amd64/ - it seems that OpenBSD 5.8 delivers gcc 4.8.4 as lowest. Could you please check that first?

Thanks.
 [2015-10-20 20:35 UTC] stolen dot data dot net at gmail dot com
The GCC 4.8.4 port builds 5.6.14. Test suite produces slightly more than expected failures: http://pastebin.com/raw.php?i=BJRAxVAh
 [2015-10-21 10:34 UTC] ab@php.net
-Status: Feedback +Status: Not a bug
 [2015-10-21 10:34 UTC] ab@php.net
Hi,

grateful thanks for the compiler check. Yeah, i'd expect that gcc would at least emulate TLS with POSIX calls starting at least with gcc 4.6. But OpenBSD could have been improved as well (last check 2013 seems it wasn't supporting it). Anyway, all seems good now.

Regarding the test fails - from the failed test list I see quite some regarding OpenSSL. You should try to use the latest 1.0.2 series, but even then - many of those are network based. As well - some tests fail most likely due to missing locales. I'd expect also some differences in libc and your system configuration which can lead to some false positives.

In general I guess OpenBSD is quite a rare target where the tests are run :) You can try to use some newer libs, as mentioned with OpenSSL. Also please investigate on the test fails, there's always a file like ext/openssl/tests/bug46127.diff corresponding to the actual failing test. You can then either supply github PRs with the test fixes or open new tickets if those fails look like real bugs.

Thanks.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Apr 18 05:01:28 2024 UTC