Skip to content

cannot find -ldb2 and execute pecl install ibm_db2 command on docker container  #22

@MaraRuizG

Description

@MaraRuizG

Logs:
=> ERROR [16/18] RUN pecl install ibm_db2 4.7s

[16/18] RUN pecl install ibm_db2:
#20 1.910 downloading ibm_db2-2.1.5.tgz ...
#20 1.912 Starting to download ibm_db2-2.1.5.tgz (196,974 bytes)
#20 1.984 .........................................done: 196,974 bytes
#20 2.231 9 source files, building
#20 2.231 running: phpize
#20 2.237 Configuring for:
#20 2.237 PHP Api Version: 20180731
#20 2.237 Zend Module Api No: 20180731
#20 2.237 Zend Extension Api No: 320180731
#20 2.529 DB2 Installation Directory? : building in /tmp/pear/temp/pear-build-defaultuserynMpFT/ibm_db2-2.1.5
#20 2.529 running: /tmp/pear/temp/ibm_db2/configure --with-php-config=/usr/local/bin/php-config --with-IBM_DB2=
#20 2.601 checking for grep that handles long lines and -e... /bin/grep
#20 2.603 checking for egrep... /bin/grep -E
#20 2.605 checking for a sed that does not truncate output... /bin/sed
#20 2.612 checking for cc... cc
#20 2.650 checking whether the C compiler works... yes
#20 2.650 checking for C compiler default output file name... a.out
#20 2.675 checking for suffix of executables...
#20 2.701 checking whether we are cross compiling... no
#20 2.716 checking for suffix of object files... o
#20 2.731 checking whether we are using the GNU C compiler... yes
#20 2.746 checking whether cc accepts -g... yes
#20 2.772 checking for cc option to accept ISO C89... none needed
#20 2.790 checking how to run the C preprocessor... cc -E
#20 2.813 checking for icc... no
#20 2.820 checking for suncc... no
#20 2.848 checking whether cc understands -c and -o together... yes
#20 2.848 checking for system library directory... lib
#20 2.857 checking if compiler supports -R... no
#20 2.882 checking if compiler supports -Wl,-rpath,... yes
#20 2.920 checking build system type... aarch64-unknown-linux-gnu
#20 2.920 checking host system type... aarch64-unknown-linux-gnu
#20 2.920 checking target system type... aarch64-unknown-linux-gnu
#20 2.946 checking for PHP prefix... /usr/local
#20 2.946 checking for PHP includes... -I/usr/local/include/php -I/usr/local/include/php/main -I/usr/local/include/php/TSRM -I/usr/local/include/php/Zend -I/usr/local/include/php/ext -I/usr/local/include/php/ext/date/lib
#20 2.946 checking for PHP extension directory... /usr/local/lib/php/extensions/no-debug-non-zts-20180731
#20 2.946 checking for PHP installed headers prefix... /usr/local/include/php
#20 2.967 checking if debug is enabled... no
#20 2.986 checking if zts is enabled... no
#20 2.986 checking for re2c... re2c
#20 2.991 checking for re2c version... 2.0.3 (ok)
#20 2.991 checking for gawk... no
#20 2.992 checking for nawk... nawk
#20 2.993 checking if nawk is broken... no
#20 2.993 checking for IBM_DB2 support... yes, shared
#20 3.002 checking PHP... Detected 64-bit PHP
#20 3.002 checking IBM_DB_HOME location... /opt/ibm/clidriver
#20 3.002 checking Looking for DB2 CLI libraries... checking in /opt/ibm/clidriver...
#20 3.002 checking in /opt/ibm/clidriver/lib64...
#20 3.002 checking in /opt/ibm/clidriver/lib... found
#20 3.002 checking for DB2 CLI include files in default path... checking in /opt/ibm/clidriver... found in /opt/ibm/clidriver
#20 3.012 checking for ld used by cc... /usr/bin/ld
#20 3.014 checking if the linker (/usr/bin/ld) is GNU ld... yes
#20 3.014 checking for /usr/bin/ld option to reload object files... -r
#20 3.016 checking for BSD-compatible nm... /usr/bin/nm -B
#20 3.016 checking whether ln -s works... yes
#20 3.017 checking how to recognize dependent libraries... pass_all
#20 3.088 checking for ANSI C header files... yes
#20 3.107 checking for sys/types.h... yes
#20 3.128 checking for sys/stat.h... yes
#20 3.150 checking for stdlib.h... yes
#20 3.174 checking for string.h... yes
#20 3.197 checking for memory.h... yes
#20 3.220 checking for strings.h... yes
#20 3.243 checking for inttypes.h... yes
#20 3.266 checking for stdint.h... yes
#20 3.291 checking for unistd.h... yes
#20 3.314 checking dlfcn.h usability... yes
#20 3.322 checking dlfcn.h presence... yes
#20 3.322 checking for dlfcn.h... yes
#20 3.326 checking the maximum length of command line arguments... 1572864
#20 3.377 checking command to parse /usr/bin/nm -B output from cc object... ok
#20 3.381 checking for objdir... .libs
#20 3.381 checking for ar... ar
#20 3.381 checking for ranlib... ranlib
#20 3.381 checking for strip... strip
#20 3.435 checking if cc supports -fno-rtti -fno-exceptions... no
#20 3.436 checking for cc option to produce PIC... -fPIC
#20 3.453 checking if cc PIC flag -fPIC works... yes
#20 3.499 checking if cc static flag -static works... yes
#20 3.519 checking if cc supports -c -o file.o... yes
#20 3.528 checking whether the cc linker (/usr/bin/ld) supports shared libraries... yes
#20 3.548 checking whether -lc should be explicitly linked in... no
#20 3.558 checking dynamic linker characteristics... GNU/Linux ld.so
#20 3.558 checking how to hardcode library paths into programs... immediate
#20 3.560 checking whether stripping libraries is possible... yes
#20 3.561 checking if libtool supports shared libraries... yes
#20 3.561 checking whether to build shared libraries... yes
#20 3.561 checking whether to build static libraries... no
#20 3.663
#20 3.663 creating libtool
#20 3.676 appending configuration tag "CXX" to libtool
#20 3.722 configure: creating ./config.status
#20 3.755 config.status: creating config.h
#20 3.777 running: make
#20 3.779 /bin/bash /tmp/pear/temp/pear-build-defaultuserynMpFT/ibm_db2-2.1.5/libtool --mode=compile cc -I. -I/tmp/pear/temp/ibm_db2 -DPHP_ATOM_INC -I/tmp/pear/temp/pear-build-defaultuserynMpFT/ibm_db2-2.1.5/include -I/tmp/pear/temp/pear-build-defaultuserynMpFT/ibm_db2-2.1.5/main -I/tmp/pear/temp/ibm_db2 -I/usr/local/include/php -I/usr/local/include/php/main -I/usr/local/include/php/TSRM -I/usr/local/include/php/Zend -I/usr/local/include/php/ext -I/usr/local/include/php/ext/date/lib -I/opt/ibm/clidriver/include -DHAVE_CONFIG_H -g -O2 -c /tmp/pear/temp/ibm_db2/ibm_db2.c -o ibm_db2.lo
#20 3.825 mkdir .libs
#20 3.827 cc -I. -I/tmp/pear/temp/ibm_db2 -DPHP_ATOM_INC -I/tmp/pear/temp/pear-build-defaultuserynMpFT/ibm_db2-2.1.5/include -I/tmp/pear/temp/pear-build-defaultuserynMpFT/ibm_db2-2.1.5/main -I/tmp/pear/temp/ibm_db2 -I/usr/local/include/php -I/usr/local/include/php/main -I/usr/local/include/php/TSRM -I/usr/local/include/php/Zend -I/usr/local/include/php/ext -I/usr/local/include/php/ext/date/lib -I/opt/ibm/clidriver/include -DHAVE_CONFIG_H -g -O2 -c /tmp/pear/temp/ibm_db2/ibm_db2.c -fPIC -DPIC -o .libs/ibm_db2.o
#20 3.876 In file included from /opt/ibm/clidriver/include/sqlcli1.h:45,
#20 3.876 from /tmp/pear/temp/ibm_db2/php_ibm_db2.h:45,
#20 3.876 from /tmp/pear/temp/ibm_db2/ibm_db2.c:35:
#20 3.876 /opt/ibm/clidriver/include/sqlcli.h:876: warning: "ODBCVER" redefined
#20 3.876 876 | #define ODBCVER 0x0380
#20 3.876 |
#20 3.876 In file included from /usr/local/include/php/Zend/zend_config.h:1,
#20 3.876 from /usr/local/include/php/Zend/zend_portability.h:43,
#20 3.876 from /usr/local/include/php/Zend/zend_types.h:25,
#20 3.876 from /usr/local/include/php/Zend/zend.h:27,
#20 3.876 from /usr/local/include/php/main/php.h:33,
#20 3.876 from /tmp/pear/temp/ibm_db2/ibm_db2.c:31:
#20 3.876 /usr/local/include/php/main/../main/php_config.h:2260: note: this is the location of the previous definition
#20 3.876 2260 | #define ODBCVER 0x0350
#20 3.876 |
#20 4.583 /bin/bash /tmp/pear/temp/pear-build-defaultuserynMpFT/ibm_db2-2.1.5/libtool --mode=link cc -DPHP_ATOM_INC -I/tmp/pear/temp/pear-build-defaultuserynMpFT/ibm_db2-2.1.5/include -I/tmp/pear/temp/pear-build-defaultuserynMpFT/ibm_db2-2.1.5/main -I/tmp/pear/temp/ibm_db2 -I/usr/local/include/php -I/usr/local/include/php/main -I/usr/local/include/php/TSRM -I/usr/local/include/php/Zend -I/usr/local/include/php/ext -I/usr/local/include/php/ext/date/lib -I/opt/ibm/clidriver/include -DHAVE_CONFIG_H -g -O2 -o ibm_db2.la -export-dynamic -avoid-version -prefer-pic -module -rpath /tmp/pear/temp/pear-build-defaultuserynMpFT/ibm_db2-2.1.5/modules ibm_db2.lo -Wl,-rpath,/opt/ibm/clidriver/lib/ -L/opt/ibm/clidriver/lib/ -ldb2
#20 4.637 cc -shared .libs/ibm_db2.o -L/opt/ibm/clidriver/lib/ -ldb2 -Wl,-rpath -Wl,/opt/ibm/clidriver/lib/ -Wl,-soname -Wl,ibm_db2.so -o .libs/ibm_db2.so
#20 4.640 /usr/bin/ld: skipping incompatible /opt/ibm/clidriver/lib//libdb2.so when searching for -ldb2
#20 4.640 /usr/bin/ld: cannot find -ldb2
#20 4.640 /usr/bin/ld: skipping incompatible /opt/ibm/clidriver/lib//libdb2.so when searching for -ldb2
#20 4.641 collect2: error: ld returned 1 exit status
#20 4.641 make: *** [Makefile:199: ibm_db2.la] Error 1
#20 4.645 ERROR: `make' failed


executor failed running [/bin/sh -c pecl install ibm_db2]: exit code: 1
ERROR: Service 'main_php' failed to build : Build failed

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions