goterpsgo Posted May 21, 2012 Share Posted May 21, 2012 I just tried to make PHP with unixODBC support and I got a fatal error: /bin/sh /tmp/php-5.3.13/libtool... -o ext/odbc/php_odbc.lo In file included from /tmp/php-5.3.13/ext/odbc/php_odbc.c:37: /tmp/php-5.3.13/ext/odbc/php_odbc_includes.h:118:17: sql.h: No such file or directory /tmp/php-5.3.13/ext/odbc/php_odbc_includes.h:119:20: sqlext.h: No such file or directory In file included from /tmp/php-5.3.13/ext/odbc/php_odbc.c:37: <snip> *** Error code 1 make: Fatal error: Command failed for target `ext/odbc/php_odbc.lo' Here's part of my configure command: ./configure --prefix=/export/appl/pkgs/php/v5.3.13 \ --with-apxs2=/export/appl/pkgs/httpd/latest/bin/apxs \ ... --with-unixODBC=shared,/export/appl/pkgs/unixodbc/latest \ ... I'm pretty sure the rest of my configure command is valid since it was working prior to trying to install unixODBC. And I already installed unixODBC before I attempted this. Google returns alot of chaff. Can anyone clue me in? Much appreciated... - Joe Quote Link to comment Share on other sites More sharing options...
angelcool Posted May 21, 2012 Share Posted May 21, 2012 --with-unixODBC=shared,/export/appl/pkgs/unixodbc/latest \ Why is there a comma there? also do a cd to that directory and make sure the libraries are present. Quote Link to comment Share on other sites More sharing options...
goterpsgo Posted May 21, 2012 Author Share Posted May 21, 2012 The shared keyword is there so when everything is compiled, the feature will be externalized as a PHP module that can be referenced from PHP.INI rather than part of a monolithic binary. I have to separate the keyword from the location of the referenced library directory. As far as the library is concerned, I downloaded and compiled it last week myself. Quote Link to comment Share on other sites More sharing options...
angelcool Posted May 21, 2012 Share Posted May 21, 2012 I just did a ./configure --help and found: NOTE: Not all extensions can be build as 'shared'. Does it must be shared for your needs? I would try without shared keyword. Quote Link to comment Share on other sites More sharing options...
goterpsgo Posted May 21, 2012 Author Share Posted May 21, 2012 In the error msg the PHP configure script said it couldn't find sql.h and sqlext.h. It turns out those files were located in the unixODBC source code. I copied those two files over to the unixODBC includes directory and PHP compiled without any problems. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.