php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #34900 [patch] pdo_odbc.c:115: undefined reference to `REGISTER_PDO_CONST_LONG'
Submitted: 2005-10-18 02:08 UTC Modified: 2005-10-18 03:07 UTC
From: akorthaus at web dot de Assigned:
Status: Closed Package: PDO related
PHP Version: 5CVS-2005-10-18 (CVS) OS: Linux 2.4.31 (gentoo)
Private report: No CVE-ID: None
 [2005-10-18 02:08 UTC] akorthaus at web dot de
Description:
------------
I tried to compile PHP 5.1.0 RC3 with pdo-odbc extension, but make failed.

Reproduce code:
---------------
./configure --prefix=$PHP_PREFIX --disable-all --enable-pdo --with-pdo-odbc=unixODBC,/usr
make

Expected result:
----------------
should compile PHP 5.1.0 RC3 with pdo_odbc

Actual result:
--------------
/bin/sh /home/akorthaus/src/php-5.1.0RC3/libtool --silent --preserve-dup-deps --mode=link gcc -export-dynamic -g -O2     ext/date/php_date.lo ext/date/lib/dow.lo ext/date/lib/parse_date.lo ext/date/lib/parse_tz.lo ext/date/lib/timelib.lo ext/date/lib/tm2unixtime.lo ext/date/lib/unixtime2tm.lo ext/pdo/pdo.lo ext/pdo/pdo_dbh.lo ext/pdo/pdo_stmt.lo ext/pdo/pdo_sql_parser.lo ext/pdo/pdo_sqlstate.lo ext/pdo_odbc/pdo_odbc.lo ext/pdo_odbc/odbc_driver.lo ext/pdo_odbc/odbc_stmt.lo regex/regcomp.lo regex/regexec.lo regex/regerror.lo regex/regfree.lo ext/standard/array.lo ext/standard/base64.lo ext/standard/basic_functions.lo ext/standard/browscap.lo ext/standard/crc32.lo ext/standard/crypt.lo ext/standard/cyr_convert.lo ext/standard/datetime.lo ext/standard/dir.lo ext/standard/dl.lo ext/standard/dns.lo ext/standard/exec.lo ext/standard/file.lo ext/standard/filestat.lo ext/standard/flock_compat.lo ext/standard/formatted_print.lo ext/standard/fsock.lo ext/standard/head.lo ext/standard/html.lo ext/standard/image.lo ext/standard/info.lo ext/standard/iptc.lo ext/standard/lcg.lo ext/standard/link.lo ext/standard/mail.lo ext/standard/math.lo ext/standard/md5.lo ext/standard/metaphone.lo ext/standard/microtime.lo ext/standard/pack.lo ext/standard/pageinfo.lo ext/standard/quot_print.lo ext/standard/rand.lo ext/standard/reg.lo ext/standard/soundex.lo ext/standard/string.lo ext/standard/scanf.lo ext/standard/syslog.lo ext/standard/type.lo ext/standard/uniqid.lo ext/standard/url.lo ext/standard/url_scanner.lo ext/standard/var.lo ext/standard/versioning.lo ext/standard/assert.lo ext/standard/strnatcmp.lo ext/standard/levenshtein.lo ext/standard/incomplete_class.lo ext/standard/url_scanner_ex.lo ext/standard/ftp_fopen_wrapper.lo ext/standard/http_fopen_wrapper.lo ext/standard/php_fopen_wrapper.lo ext/standard/credits.lo ext/standard/css.lo ext/standard/var_unserializer.lo ext/standard/ftok.lo ext/standard/sha1.lo ext/standard/user_filters.lo ext/standard/uuencode.lo ext/standard/filters.lo ext/standard/proc_open.lo ext/standard/sunfuncs.lo ext/standard/streamsfuncs.lo ext/standard/http.lo TSRM/TSRM.lo TSRM/tsrm_strtok_r.lo TSRM/tsrm_virtual_cwd.lo main/main.lo main/snprintf.lo main/spprintf.lo main/php_sprintf.lo main/safe_mode.lo main/fopen_wrappers.lo main/alloca.lo main/php_scandir.lo main/php_ini.lo main/SAPI.lo main/rfc1867.lo main/php_content_types.lo main/strlcpy.lo main/strlcat.lo main/mergesort.lo main/reentrancy.lo main/php_variables.lo main/php_ticks.lo main/network.lo main/php_open_temporary_file.lo main/php_logos.lo main/output.lo main/streams/streams.lo main/streams/cast.lo main/streams/memory.lo main/streams/filter.lo main/streams/plain_wrapper.lo main/streams/userspace.lo main/streams/transports.lo main/streams/xp_socket.lo main/streams/mmap.lo Zend/zend_language_parser.lo Zend/zend_language_scanner.lo Zend/zend_ini_parser.lo Zend/zend_ini_scanner.lo Zend/zend_alloc.lo Zend/zend_compile.lo Zend/zend_constants.lo Zend/zend_dynamic_array.lo Zend/zend_execute_API.lo Zend/zend_highlight.lo Zend/zend_llist.lo Zend/zend_opcode.lo Zend/zend_operators.lo Zend/zend_ptr_stack.lo Zend/zend_stack.lo Zend/zend_variables.lo Zend/zend.lo Zend/zend_API.lo Zend/zend_extensions.lo Zend/zend_hash.lo Zend/zend_list.lo Zend/zend_indent.lo Zend/zend_builtin_functions.lo Zend/zend_sprintf.lo Zend/zend_ini.lo Zend/zend_qsort.lo Zend/zend_multibyte.lo Zend/zend_ts_hash.lo Zend/zend_stream.lo Zend/zend_iterators.lo Zend/zend_interfaces.lo Zend/zend_exceptions.lo Zend/zend_strtod.lo Zend/zend_objects.lo Zend/zend_object_handlers.lo Zend/zend_objects_API.lo Zend/zend_mm.lo Zend/zend_default_classes.lo Zend/zend_reflection_api.lo Zend/zend_execute.lo sapi/cgi/cgi_main.lo sapi/cgi/getopt.lo main/internal_functions.lo -lcrypt -lcrypt -lresolv -lm -ldl -lnsl -lodbc -lcrypt -lcrypt  -o sapi/cgi/php
ext/pdo_odbc/pdo_odbc.o(.text+0xac): In function `zm_startup_pdo_odbc':
/home/akorthaus/src/php-5.1.0RC3/ext/pdo_odbc/pdo_odbc.c:115: undefined reference to `REGISTER_PDO_CONST_LONG'
ext/pdo_odbc/pdo_odbc.o(.text+0xbe):/home/akorthaus/src/php-5.1.0RC3/ext/pdo_odbc/pdo_odbc.c:116: undefined reference to `REGISTER_PDO_CONST_LONG'
ext/pdo_odbc/pdo_odbc.o(.text+0xd3):/home/akorthaus/src/php-5.1.0RC3/ext/pdo_odbc/pdo_odbc.c:117: undefined reference to `REGISTER_PDO_CONST_LONG'
ext/pdo_odbc/pdo_odbc.o(.text+0xe8):/home/akorthaus/src/php-5.1.0RC3/ext/pdo_odbc/pdo_odbc.c:118: undefined reference to `REGISTER_PDO_CONST_LONG'
collect2: ld returned 1 exit status
make: *** [sapi/cgi/php] Error 1


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2005-10-18 02:40 UTC] akorthaus at web dot de
the following patch solves the issue for me:

--- ext/pdo_odbc/pdo_odbc.c_orig        2005-10-18 02:37:01.000000000 +0200
+++ ext/pdo_odbc/pdo_odbc.c     2005-10-18 02:39:35.000000000 +0200
@@ -112,10 +112,10 @@
        }
 #endif

-       REGISTER_PDO_CONST_LONG("ODBC_ATTR_USE_CURSOR_LIBRARY", PDO_ODBC_ATTR_USE_CURSOR_LIBRARY);
-       REGISTER_PDO_CONST_LONG("ODBC_SQL_USE_IF_NEEDED", SQL_CUR_USE_IF_NEEDED);
-       REGISTER_PDO_CONST_LONG("ODBC_SQL_USE_DRIVER", SQL_CUR_USE_DRIVER);
-       REGISTER_PDO_CONST_LONG("ODBC_SQL_USE_ODBC", SQL_CUR_USE_ODBC);
+       REGISTER_PDO_CLASS_CONST_LONG("ODBC_ATTR_USE_CURSOR_LIBRARY", PDO_ODBC_ATTR_USE_CURSOR_LIBRARY);
+       REGISTER_PDO_CLASS_CONST_LONG("ODBC_SQL_USE_IF_NEEDED", SQL_CUR_USE_IF_NEEDED);
+       REGISTER_PDO_CLASS_CONST_LONG("ODBC_SQL_USE_DRIVER", SQL_CUR_USE_DRIVER);
+       REGISTER_PDO_CLASS_CONST_LONG("ODBC_SQL_USE_ODBC", SQL_CUR_USE_ODBC);

        return SUCCESS;
 }
 [2005-10-18 03:07 UTC] iliaa@php.net
This bug has been fixed in CVS.

Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.
 
Thank you for the report, and for helping us make PHP better.


 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Dec 26 19:01:30 2024 UTC