|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #66764 configure doesn't define EXPANDED_DATADIR / PHP_DATADIR correctly
Submitted: 2014-02-24 20:33 UTC Modified: 2015-01-05 05:02 UTC
From: rainer dot jung at kippdata dot de Assigned: tyrael (profile)
Status: Closed Package: *Compile Issues
PHP Version: 5.6.0alpha2 OS: All
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Bug Type:
From: rainer dot jung at kippdata dot de
New email:
PHP Version: OS:


 [2014-02-24 20:33 UTC] rainer dot jung at kippdata dot de
configure is used to determine EXPANDED_DATADIR, which in turn is used to set PHP_DATADIR in main/ / main/build-defs.h.

configure sets EXPANDED_DATADIR from datadir, which in turn is set to '$datarootdir' and then eval'ed once.

Now datarootdir is set to '${prefix}/shared', so first datadir is set to '$datarootdir', then once eval'ed to '${prefix}/shared' as a verbatim string. This string ends up as the value of PHP_DATADIR in main/build-defs.h:

#define PHP_DATADIR             "${prefix}/share"

To fix this one needs to eval datadir in twice:

---      2014-02-05 11:00:36.000000000 +0100
+++        2014-02-24 21:31:45.656842000 +0100
@@ -1172,6 +1172,7 @@
 exec_prefix=`eval echo $exec_prefix`
 libdir=`eval echo $libdir`
 datadir=`eval echo $datadir`
+datadir=`eval echo $datadir`

 dnl Build extension directory path




Add a Patch

Pull Requests

Pull requests:

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2014-10-17 14:00 UTC]
-Assigned To: +Assigned To: tyrael
 [2015-01-05 05:02 UTC]
-Status: Assigned +Status: Closed
 [2015-01-05 05:02 UTC]
The fix for this bug has been committed.

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.

PHP Copyright © 2001-2023 The PHP Group
All rights reserved.
Last updated: Wed Nov 29 18:01:27 2023 UTC