cannot create module odbc 5.3.15

Asked by Peter

 Hi guys, I need to build some custom modules like:
firebird, interbase, before some here point me the issue and fix my problem, I could build:

pdo
interbase
pdo_firebird
pdo_mysql
mysql
mysqli

 Now, I need to build each one, I cannot install php-53u-pdo because other module will complain, no issue I build my modules and done.

No this the problem, I update my rpm machine with centos 5.8. and need to build my modules with this new version, need to add odbc support, but I have issues, check this:

cd.. odbc module.

phpize --> ok.

./configure

./configure
checking for egrep... grep -E
checking for a sed that does not truncate output... /bin/sed
checking for cc... cc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables...
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether cc accepts -g... yes
checking for cc option to accept ANSI C... none needed
checking how to run the C preprocessor... cc -E
checking for icc... no
checking for suncc... no
checking whether cc understands -c and -o together... yes
checking for system library directory... lib
checking if compiler supports -R... no
checking if compiler supports -Wl,-rpath,... yes
checking build system type... i686-redhat-linux-gnu
checking host system type... i686-redhat-linux-gnu
checking target system type... i686-redhat-linux-gnu
checking for PHP prefix... /usr
checking for PHP includes... -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib
checking for PHP extension directory... /usr/lib/php/modules
checking for PHP installed headers prefix... /usr/include/php
checking if debug is enabled... no
checking if zts is enabled... no
checking for re2c... re2c
checking for re2c version... 0.13.5 (ok)
checking for gawk... gawk
checking for Adabas support... cp: cannot stat `/usr/local/lib/odbclib.a': No such file or directory
configure: error: ODBC header file '/usr/local/incl/sqlext.h' not found!

Adabas is something I don't know, the line that took my attention is the last one:

configure: error: ODBC header file '/usr/local/incl/sqlext.h' not found!

I install unixODBC, unixODBC-devel

But I think sqlext.h is related to sqlite I install that one found the file, but wasn't in the dir configure point, I decide to create the file and copy that file:

mkdir /usr/local/incl/
cp /usr/include/sqlext.h /usr/local/incl/

Now repeat the command and done:

./configure
checking for egrep... grep -E
checking for a sed that does not truncate output... /bin/sed
checking for cc... cc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables...
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether cc accepts -g... yes
checking for cc option to accept ANSI C... none needed
checking how to run the C preprocessor... cc -E
checking for icc... no
checking for suncc... no
checking whether cc understands -c and -o together... yes
checking for system library directory... lib
checking if compiler supports -R... no
checking if compiler supports -Wl,-rpath,... yes
checking build system type... i686-redhat-linux-gnu
checking host system type... i686-redhat-linux-gnu
checking target system type... i686-redhat-linux-gnu
checking for PHP prefix... /usr
checking for PHP includes... -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib
checking for PHP extension directory... /usr/lib/php/modules
checking for PHP installed headers prefix... /usr/include/php
checking if debug is enabled... no
checking if zts is enabled... no
checking for re2c... re2c
checking for re2c version... 0.13.5 (ok)
checking for gawk... gawk
checking for Adabas support... cp: cannot stat `/usr/local/lib/odbclib.a': No such file or directory
yes, shared
checking for ld used by cc... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... yes
checking for /usr/bin/ld option to reload object files... -r
checking for BSD-compatible nm... /usr/bin/nm -B
checking whether ln -s works... yes
checking how to recognise dependent libraries... pass_all
checking for ANSI C header files... no
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking dlfcn.h usability... yes
checking dlfcn.h presence... yes
checking for dlfcn.h... yes
checking for g77... no
checking for f77... no
checking for xlf... no
checking for frt... no
checking for pgf77... no
checking for fort77... no
checking for fl32... no
checking for af77... no
checking for f90... no
checking for xlf90... no
checking for pgf90... no
checking for epcf90... no
checking for f95... no
checking for fort... no
checking for xlf95... no
checking for ifc... no
checking for efc... no
checking for pgf95... no
checking for lf95... no
checking for gfortran... no
checking whether we are using the GNU Fortran 77 compiler... no
checking whether accepts -g... no
checking the maximum length of command line arguments... 32768
checking command to parse /usr/bin/nm -B output from cc object... ok
checking for objdir... .libs
checking for ar... ar
checking for ranlib... ranlib
checking for strip... strip
checking if cc supports -fno-rtti -fno-exceptions... no
checking for cc option to produce PIC... -fPIC
checking if cc PIC flag -fPIC works... yes
checking if cc static flag -static works... no
checking if cc supports -c -o file.o... yes
checking whether the cc linker (/usr/bin/ld) supports shared libraries... yes
checking whether -lc should be explicitly linked in... no
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... no
configure: creating libtool
appending configuration tag "CXX" to libtool
appending configuration tag "F77" to libtool
configure: creating ./config.status
config.status: creating config.h
config.status: config.h is unchanged

Next, make...

make

/bin/sh /usr/src/redhat/SOURCES/php-5.3.15/ext/odbc/libtool --mode=compile cc -I. -I/usr/src/redhat/SOURCES/php-5.3.15/ext/odbc -DPHP_ATOM_INC -I/usr/src/redhat/SOURCES/php-5.3.15/ext/odbc/include -I/usr/src/redhat/SOURCES/php-5.3.15/ext/odbc/main -I/usr/src/redhat/SOURCES/php-5.3.15/ext/odbc -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib -I/usr/local/incl -DHAVE_CONFIG_H -g -O2 -c /usr/src/redhat/SOURCES/php-5.3.15/ext/odbc/php_odbc.c -o php_odbc.lo
mkdir .libs
 cc -I. -I/usr/src/redhat/SOURCES/php-5.3.15/ext/odbc -DPHP_ATOM_INC -I/usr/src/redhat/SOURCES/php-5.3.15/ext/odbc/include -I/usr/src/redhat/SOURCES/php-5.3.15/ext/odbc/main -I/usr/src/redhat/SOURCES/php-5.3.15/ext/odbc -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib -I/usr/local/incl -DHAVE_CONFIG_H -g -O2 -c /usr/src/redhat/SOURCES/php-5.3.15/ext/odbc/php_odbc.c -fPIC -DPIC -o .libs/php_odbc.o
In file included from /usr/src/redhat/SOURCES/php-5.3.15/ext/odbc/php_odbc.c:37:
/usr/src/redhat/SOURCES/php-5.3.15/ext/odbc/php_odbc_includes.h:74:21: error: WINDOWS.H: No such file or directory
/usr/src/redhat/SOURCES/php-5.3.15/ext/odbc/php_odbc.c: In function 'zif_odbc_execute':
/usr/src/redhat/SOURCES/php-5.3.15/ext/odbc/php_odbc.c:1320: warning: passing argument 1 of 'strlen' from incompatible pointer type
make: *** [php_odbc.lo] Error 1

Do I forget to add a library?
Centos 5.8 x32

php53u.i386 5.3.15-1.ius.el5 installed
php53u-cli.i386 5.3.15-1.ius.el5 installed
php53u-common.i386 5.3.15-1.ius.el5 installed
php53u-devel.i386 5.3.15-1.ius.el5 installed
php53u-gd.i386 5.3.15-1.ius.el5 installed
php53u-ldap.i386 5.3.15-1.ius.el5 installed

Thanks!!!

Question information

Language:
English Edit question
Status:
Answered
For:
IUS Community Project Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Jeffrey Ness (jeffrey-ness) said :
#1

Hello,

Well the issue is the missing header files:

  configure: error: ODBC header file '/usr/local/incl/sqlext.h' not found!

This package is provided by ODBC-devel on a Redhat 5 server:

 # cat /etc/redhat-release
 Red Hat Enterprise Linux Server release 5.6 (Tikanga)

 # rpm -qf /usr/include/sqlext.h
 unixODBC-devel-2.2.11-7.1.x86_64

---

In your configure you will most likely need to provide a directive point to your include directory at /usr/include.

---

Why is it that you can't use php53u-odbc?

  http://dl.iuscommunity.org/pub/ius/stable/Redhat/5/x86_64/php53u-odbc-5.3.15-1.ius.el5.x86_64.rpm

Revision history for this message
Peter (pheriko-support) said :
#2

 As u can see, I create the folder incl and copy the file there and configure finish.

 The main module is interbase, once u start building the module and start apache, start giving to me issues about loading modules,
 I cannot just build interbase, I need to build pdo_firebird, etc, if I install php-odbc this one need request to me to install php-pdo, but interbase request pdo as module.

  And u can see why I need to build the modules by hand.

  My current issue right now is odbc and make, thanks!!!

Revision history for this message
Jeffrey Ness (jeffrey-ness) said :
#3

Peter, I don't think copying the headers to a new directory is the right approach,
I would suggest symlink if anything.

Have you a looked at our php53u.spec, it builds odbc, and should
give you direction on how to build it manually yourself.

Jeffrey-

Revision history for this message
Peter (pheriko-support) said :
#4

 Thanks for that tip, I build those modules for 5.3.8 without issue, maybe something change.
  I will read them and return with u guys, thanks!!!

Can you help with this problem?

Provide an answer of your own, or ask Peter for more information if necessary.

To post a message you must log in.