Uploaded image for project: 'CUBRID APIs'
  1. CUBRID APIs
  2. APIS-549

Warnings during PHP/PDO API build via PECL

    Details

    • Type: Improvement
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: PDO-Aprium, PHP-Aprium
    • Fix Version/s: PHP 9.1.0 0004
    • Component/s: PHP Driver
    • Labels:
      None
    • Environment:

      Mac OS X 10.8.3 x64
      PHP 5.3.15
      PECL
      CUBRID CCI 9.1.0212 x64

      Description

      I've tried to build CUBRID PHP and PDO drivers on Mac OS X. Though the build is successful and drivers work, during the installation, there were a few warnings displayed as follows:

      {code}
      $ sudo pecl install cubrid
      downloading CUBRID-9.1.0.0001.tgz ...
      Starting to download CUBRID-9.1.0.0001.tgz (48,090 bytes)
      .............done: 48,090 bytes
      8 source files, building
      running: phpize
      Configuring for:
      PHP Api Version: 20090626
      Zend Module Api No: 20090626
      Zend Extension Api No: 220090626
      configure.in:3: warning: prefer named diversions
      configure.in:3: warning: prefer named diversions
      CUBRID base install dir [autodetect] : /usr
      building in /private/tmp/pear/temp/pear-build-rootqMNC1V/CUBRID-9.1.0.0001
      running: /private/tmp/pear/temp/CUBRID/configure --with-cubrid=/usr
      checking for grep that handles long lines and -e... /usr/bin/grep
      checking for egrep... /usr/bin/grep -E
      checking for a sed that does not truncate output... /usr/bin/sed
      checking for cc... cc
      checking whether the C compiler works... yes
      checking for C compiler default output file name... a.out
      checking for suffix of executables...
      checking whether we are cross compiling... no
      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 ISO C89... 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... i386-apple-darwin12.3.0
      checking host system type... i386-apple-darwin12.3.0
      checking target system type... i386-apple-darwin12.3.0
      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/extensions/no-debug-non-zts-20090626
      checking for PHP installed headers prefix... /usr/include/php
      checking if debug is enabled... no
      checking if zts is enabled... no
      checking for re2c... no
      configure: WARNING: You will need re2c 0.13.4 or later if you want to regenerate PHP parsers.
      checking for gawk... no
      checking for nawk... no
      checking for awk... awk
      checking if awk is broken... no
      checking for CUBRID support... yes, shared
      checking for cci_init in -l"cascci"... yes
      checking for ld used by cc... /usr/bin/ld
      checking if the linker (/usr/bin/ld) is GNU ld... no
      checking for /usr/bin/ld option to reload object files... -r
      checking for BSD-compatible nm... /usr/bin/nm
      checking whether ln -s works... yes
      checking how to recognize dependent libraries... pass_all
      checking for ANSI C header files... yes
      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 the maximum length of command line arguments... 196608
      checking command to parse /usr/bin/nm output from cc object... ok
      checking for objdir... .libs
      checking for ar... ar
      checking for ranlib... ranlib
      checking for strip... strip
      checking for dsymutil... dsymutil
      checking for nmedit... nmedit
      checking for -single_module linker flag... yes
      checking for -exported_symbols_list linker flag... yes
      checking if cc supports -fno-rtti -fno-exceptions... yes
      checking for cc option to produce PIC... -fno-common
      checking if cc PIC flag -fno-common 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 dynamic linker characteristics... darwin12.3.0 dyld
      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

      creating libtool
      appending configuration tag "CXX" to libtool
      configure: creating ./config.status
      config.status: creating config.h
      running: make
      /bin/sh /private/tmp/pear/temp/pear-build-rootqMNC1V/CUBRID-9.1.0.0001/libtool --mode=compile cc -I. -I/private/tmp/pear/temp/CUBRID -DPHP_ATOM_INC -I/private/tmp/pear/temp/pear-build-rootqMNC1V/CUBRID-9.1.0.0001/include -I/private/tmp/pear/temp/pear-build-rootqMNC1V/CUBRID-9.1.0.0001/main -I/private/tmp/pear/temp/CUBRID -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 -DHAVE_CONFIG_H -g -O2 -c /private/tmp/pear/temp/CUBRID/php_cubrid.c -o php_cubrid.lo
      mkdir .libs
      cc -I. -I/private/tmp/pear/temp/CUBRID -DPHP_ATOM_INC -I/private/tmp/pear/temp/pear-build-rootqMNC1V/CUBRID-9.1.0.0001/include -I/private/tmp/pear/temp/pear-build-rootqMNC1V/CUBRID-9.1.0.0001/main -I/private/tmp/pear/temp/CUBRID -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 -DHAVE_CONFIG_H -g -O2 -c /private/tmp/pear/temp/CUBRID/php_cubrid.c -fno-common -DPIC -o .libs/php_cubrid.o
      /private/tmp/pear/temp/CUBRID/php_cubrid.c:2517:37: warning: size argument in 'strlcpy' call appears to be size of the source; expected the size of the destination [-Wstrlcpy-strlcat-size]
      strlcpy(attr_name[i], key, strlen(key) + 1);
      ~~~~~~^~~~~~~
      /private/tmp/pear/temp/CUBRID/php_cubrid.c:3180:54: warning: comparison of unsigned enum expression < 0 is always false [-Wtautological-compare]
      if ((mode = cci_get_autocommit(connect->handle)) < 0) {
      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^ ~
      /private/tmp/pear/temp/CUBRID/php_cubrid.c:3541:66: warning: implicit conversion from enumeration type 'T_CUBRID_CURSOR_ORIGIN' to different enumeration type 'T_CCI_CURSOR_POS' [-Wenum-conversion]
      if ((cubrid_retval = cci_cursor(request->handle, offset + 1, CUBRID_CURSOR_FIRST, &error)) < 0) {
      ~~~~~~~~~~ ^~~~~~~~~~~~~~~~~~~
      /private/tmp/pear/temp/CUBRID/php_cubrid.c:5023:117: warning: format specifies type 'int' but the argument has type 'long' [-Wformat]
      php_error_docref(NULL TSRMLS_CC, E_WARNING, "offet(%d) is out of range, please input a proper number.", offset);
      ~~ ^~~~~~
      %ld
      /private/tmp/pear/temp/CUBRID/php_cubrid.c:5032:133: warning: format specifies type 'int' but the argument has type 'long' [-Wformat]
      php_error_docref(NULL TSRMLS_CC, E_WARNING, "offset(%d) is not correct, it can't be a negative number or larger than size", offset);
      ~~ ^~~~~~
      %ld
      5 warnings generated.
      /bin/sh /private/tmp/pear/temp/pear-build-rootqMNC1V/CUBRID-9.1.0.0001/libtool --mode=link cc -DPHP_ATOM_INC -I/private/tmp/pear/temp/pear-build-rootqMNC1V/CUBRID-9.1.0.0001/include -I/private/tmp/pear/temp/pear-build-rootqMNC1V/CUBRID-9.1.0.0001/main -I/private/tmp/pear/temp/CUBRID -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 -DHAVE_CONFIG_H -g -O2 -o cubrid.la -export-dynamic -avoid-version -prefer-pic -module -rpath /private/tmp/pear/temp/pear-build-rootqMNC1V/CUBRID-9.1.0.0001/modules php_cubrid.lo -lcascci
      cc ${wl}-flat_namespace ${wl}-undefined ${wl}suppress -o .libs/cubrid.so -bundle .libs/php_cubrid.o -lcascci
      dsymutil .libs/cubrid.so || :
      creating cubrid.la
      (cd .libs && rm -f cubrid.la && ln -s ../cubrid.la cubrid.la)
      /bin/sh /private/tmp/pear/temp/pear-build-rootqMNC1V/CUBRID-9.1.0.0001/libtool --mode=install cp ./cubrid.la /private/tmp/pear/temp/pear-build-rootqMNC1V/CUBRID-9.1.0.0001/modules
      cp ./.libs/cubrid.so /private/tmp/pear/temp/pear-build-rootqMNC1V/CUBRID-9.1.0.0001/modules/cubrid.so
      cp ./.libs/cubrid.lai /private/tmp/pear/temp/pear-build-rootqMNC1V/CUBRID-9.1.0.0001/modules/cubrid.la
      ----------------------------------------------------------------------
      Libraries have been installed in:
      /private/tmp/pear/temp/pear-build-rootqMNC1V/CUBRID-9.1.0.0001/modules

      If you ever happen to want to link against installed libraries
      in a given directory, LIBDIR, you must either use libtool, and
      specify the full pathname of the library, or use the `-LLIBDIR'
      flag during linking and do at least one of the following:
      - add LIBDIR to the `DYLD_LIBRARY_PATH' environment variable
      during execution

      See any operating system documentation about shared libraries for
      more information, such as the ld(1) and ld.so(8) manual pages.
      ----------------------------------------------------------------------

      Build complete.
      Don't forget to run 'make test'.

      running: make INSTALL_ROOT="/private/tmp/pear/temp/pear-build-rootqMNC1V/install-CUBRID-9.1.0.0001" install
      Installing shared extensions: /private/tmp/pear/temp/pear-build-rootqMNC1V/install-CUBRID-9.1.0.0001/usr/lib/php/extensions/no-debug-non-zts-20090626/
      running: find "/private/tmp/pear/temp/pear-build-rootqMNC1V/install-CUBRID-9.1.0.0001" | xargs ls -dils
      6098368 0 drwxr-xr-x 3 root wheel 102 May 28 15:27 /private/tmp/pear/temp/pear-build-rootqMNC1V/install-CUBRID-9.1.0.0001
      6098793 0 drwxr-xr-x 3 root wheel 102 May 28 15:27 /private/tmp/pear/temp/pear-build-rootqMNC1V/install-CUBRID-9.1.0.0001/usr
      6098794 0 drwxr-xr-x 3 root wheel 102 May 28 15:27 /private/tmp/pear/temp/pear-build-rootqMNC1V/install-CUBRID-9.1.0.0001/usr/lib
      6098795 0 drwxr-xr-x 3 root wheel 102 May 28 15:27 /private/tmp/pear/temp/pear-build-rootqMNC1V/install-CUBRID-9.1.0.0001/usr/lib/php
      6098796 0 drwxr-xr-x 3 root wheel 102 May 28 15:27 /private/tmp/pear/temp/pear-build-rootqMNC1V/install-CUBRID-9.1.0.0001/usr/lib/php/extensions
      6098797 0 drwxr-xr-x 3 root wheel 102 May 28 15:27 /private/tmp/pear/temp/pear-build-rootqMNC1V/install-CUBRID-9.1.0.0001/usr/lib/php/extensions/no-debug-non-zts-20090626
      6098798 248 rwxr-xr-x 1 root wheel 125496 May 28 15:27 /private/tmp/pear/temp/pear-build-rootqMNC1V/installCUBRID-9.1.0.0001/usr/lib/php/extensions/no-debug-non-zts-20090626/cubrid.so

      Build process completed successfully
      Installing '/usr/lib/php/extensions/no-debug-non-zts-20090626/cubrid.so'
      install ok: channel://pecl.php.net/CUBRID-9.1.0.0001
      configuration option "php_ini" is not set to php.ini location
      You should add "extension=cubrid.so" to php.ini{code}

      Please take a lok at the above 4 warning messages.

      1. log
        10 kB
        谢韦华[Bert]

        Activity

        Hide
        cn15800 谢韦华[Bert] added a comment -

        The attach file is compile log.

        To resolve the problem, we should convert data type before call cci api.

        Show
        cn15800 谢韦华[Bert] added a comment - The attach file is compile log. To resolve the problem, we should convert data type before call cci api.

          People

          • Assignee:
            ryin005 Ray Yin
            Reporter:
            kadishmal Esen Sagynov
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: