php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #58594 Fails to load on Linux due to improper use of __USE_GNU
Submitted: 2009-03-23 16:22 UTC Modified: 2009-03-28 07:41 UTC
From: russ at last dot fm Assigned: kannan (profile)
Status: Closed Package: xhprof (PECL)
PHP Version: 5.2.5 OS: Linux
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem:
27 + 20 = ?
Subscribe to this entry?

 
 [2009-03-23 16:22 UTC] russ at last dot fm
Description:
------------
The xhprof.so library will build on my system (Debian Lenny), however it will not load due to an unresolved symbol CPU_ZERO.

This is due to the incorrect use of __USE_GNU, which subsequently gets undefined by /usr/local/features.h. The correct define to use is _GNU_SOURCE, which causes __USE_GNU to be defined within features.h.

This define must also happen before php.h is included, as php.h indirectly includes sched.h on my system.

Reproduce code:
---------------
A patch to fix this problem can be found here:

http://playground.audioscrobbler.com/russ/xhprof_gnu.patch.txt

Actual result:
--------------
/usr/sbin/apache2: symbol lookup error: /usr/local/lib/php/extensions/no-debug-zts-20060613/xhprof.so: undefined symbol: CPU_ZERO


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2009-03-23 18:59 UTC] kannan@php.net
Thanks for filing the issue and suggesting a patch. We'll try out the patch in our env to make sure it is fine, and then check in the fix.
 [2009-03-28 07:41 UTC] kannan@php.net
This bug has been fixed in CVS.

In case this was a documentation problem, the fix will show up at the
end of next Sunday (CET) on pecl.php.net.

In case this was a pecl.php.net website problem, the change will show
up on the website in short time.
 
Thank you for the report, and for helping us make PECL better.

applied Russ's patch to resolve problems building on debian linux.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Apr 20 00:01:27 2024 UTC