php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #63499 [configure] Oracle library version compatibility check fails on tail command
Submitted: 2012-11-12 22:24 UTC Modified: 2012-11-14 01:55 UTC
From: ch dot melin at gmail dot com Assigned: sixd (profile)
Status: Duplicate Package: Compile Failure
PHP Version: 5.4.8 OS: SunOS 5.10 / Solaris 10
Private report: No CVE-ID: None
 [2012-11-12 22:24 UTC] ch dot melin at gmail dot com
Description:
------------
From PHP 5.4.8, we can see the following changes in the configure file compared to previous PHP releases:

PHP 5.4.8 / configure :
$as_echo_n "checking Oracle library version compatibility... " >&6; }
  OCI8_LCS_BASE=$OCI8_DIR/$OCI8_LIB_DIR/libclntsh.$SHLIB_SUFFIX_NAME
  OCI8_LCS=`ls $OCI8_LCS_BASE.*.1 2> /dev/null | tail -n1`  # Oracle 10g, 11g etc

PHP 5.4.7 / configure :
$as_echo_n "checking Oracle library version compatibility... " >&6; }
  OCI8_LCS_BASE=$OCI8_DIR/$OCI8_LIB_DIR/libclntsh.$SHLIB_SUFFIX_NAME
  OCI8_LCS=`ls $OCI8_LCS_BASE.*.1 2> /dev/null | tail -1`  # Oracle 10g, 11g etc

When configuring with --with-oci8=shared and a valid ORACLE_HOME environment variable set, configure fails with the following error message:
checking Oracle ORACLE_HOME install directory... /u01/app/oracle/product/11107
checking ORACLE_HOME library validity... lib32
checking Oracle library version compatibility... usage: tail [+/-[n][lbc][f]] [file]
       tail [+/-[n][l][r|f]] [file]
configure: error: Oracle libclntsh.so client library not found

Indeed, the tail command syntax is incorrect.
cmelin@bt1sss:/$ tail -n1
usage: tail [+/-[n][lbc][f]] [file]
       tail [+/-[n][l][r|f]] [file]

The syntax in previous PHP releases was OK:
cmelin@bt1sss:/$ echo 'test' | tail -1
test

Reverting to tail -1 instead of tail -n1 in the configure file of PHP 5.4.8 solves this issue.


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2012-11-14 01:55 UTC] sixd@php.net
-Status: Open +Status: Duplicate -Assigned To: +Assigned To: sixd
 [2012-11-14 01:55 UTC] sixd@php.net
This change was already re-fixed for https://bugs.php.net/bug.php?id=60901
Use PECL OCI8 1.4.9 or wait for next month's PHP release.
 
PHP Copyright © 2001-2019 The PHP Group
All rights reserved.
Last updated: Thu May 23 13:01:30 2019 UTC