|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #61475 Yaml's config.m4 can't find macports' yaml.h
Submitted: 2012-03-22 17:12 UTC Modified: 2012-03-24 22:26 UTC
From: nolte at adobe dot com Assigned: bd808 (profile)
Status: Closed Package: yaml (PECL)
PHP Version: 5.3.10 OS: Mac OS X 10.7.3
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:
Solve the problem:
35 - 9 = ?
Subscribe to this entry?

 [2012-03-22 17:12 UTC] nolte at adobe dot com
The macports ( pecl cannot install the yaml extension 
because the extension's config.m4 (and generated configure script) look for yaml.h 
in /usr/include and /usr/local/include rather than in /opt/local/include.

The config.m4 script should use the result of 'php-config --prefix' (which is 
stored in $prefix) rather than (or in addition to?) the hard coded /usr and 

The pecl script doesn't allow the user to pass "--with-yaml=/opt/local" to yaml's 
downloading yaml-1.0.1.tgz ...
Starting to download yaml-1.0.1.tgz (33,774 bytes)
configure so there is no workaround for this problem.

Test script:
% sudo pecl install yaml

Expected result:
downloading yaml-1.0.1.tgz ...
Starting to download yaml-1.0.1.tgz (33,774 bytes)
checking for yaml in default path... found in /opt/local
config.status: creating config.h

Actual result:
downloading yaml-1.0.1.tgz ...
Starting to download yaml-1.0.1.tgz (33,774 bytes)
Please provide the prefix of libyaml installation [autodetect] : 

checking for yaml in default path... configure: error: not found
ERROR: `/private/tmp/pear/temp/yaml/configure --with-yaml' failed


yaml-include.patch (last revision 2012-03-22 17:12 UTC by nolte at adobe dot com)

Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2012-03-22 17:17 UTC]
-Assigned To: +Assigned To: bd80
 [2012-03-22 17:17 UTC]
-Assigned To: bd80 +Assigned To: bd808
 [2012-03-24 22:25 UTC]
Automatic comment from SVN on behalf of bd808
Log: Bug #61475: config.m4 honors `php-config --prefix`

- Added $prefix to default search path for include/yaml.h.
- Simplified include checks by collapsing branches.
- Removed cargo cult sections from config.m4
 [2012-03-24 22:26 UTC]
-Status: Assigned +Status: Closed
 [2012-03-24 22:26 UTC]
This bug has been fixed in SVN.

Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at

 For Windows:
Thank you for the report, and for helping us make PHP better.

Thanks for the patch. I didn't use it directly but I did use your $prefix suggestion.
PHP Copyright © 2001-2023 The PHP Group
All rights reserved.
Last updated: Fri Sep 29 05:01:24 2023 UTC