php.net |  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
 [2012-03-22 17:12 UTC] nolte at adobe dot com
Description:
------------
The macports (http://www.macports.org) 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 
/usr/local.

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

Patches

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

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2012-03-22 17:17 UTC] bd808@php.net
-Assigned To: +Assigned To: bd80
 [2012-03-22 17:17 UTC] bd808@php.net
-Assigned To: bd80 +Assigned To: bd808
 [2012-03-24 22:25 UTC] bd808@php.net
Automatic comment from SVN on behalf of bd808
Revision: http://svn.php.net/viewvc/?view=revision&revision=324511
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] bd808@php.net
-Status: Assigned +Status: Closed
 [2012-03-24 22:26 UTC] bd808@php.net
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
http://snaps.php.net/.

 For Windows:

http://windows.php.net/snapshots/
 
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-2021 The PHP Group
All rights reserved.
Last updated: Mon Dec 06 18:03:34 2021 UTC