php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #18873 qtdom extension causes CLI compilation to fail
Submitted: 2002-08-13 00:05 UTC Modified: 2002-08-14 00:27 UTC
From: kennyz at nycap dot rr dot com Assigned:
Status: Closed Package: Compile Failure
PHP Version: 4CVS-2002-08-12 OS: Linux 2.4.19
Private report: No CVE-ID: None
View Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: kennyz at nycap dot rr dot com
New email:
PHP Version: OS:

 

 [2002-08-13 00:05 UTC] kennyz at nycap dot rr dot com
Compiling PHP4 with qtdom support and enabling the CLI version causes a compilation failure when the final CLI binary is being built.  The error message is:


main/internal_functions_cli.lo: In function `php_startup_internal_extensions':
/usr/local/src/Internet/php4-200208121800/main/internal_functions_cli.c(.data+0x10): undefined reference to `qtdom_module_entry'
collect2: ld returned 1 exit status
make: *** [sapi/cli/php] Error 1



The external variable qtdom_module_entry is not defined.  This variable is defined in ext/qtdom/qtdom.c, but it does not appear that qtdom.c is ever compiled or linked into anything else.

My simplest configure line is:
./configure --prefix=/usr/local/php --with-qtdom --enable-cli 

but the compilation error also occurs if I build the Apache module as well as the CLI.  In that case, the Apache module, libphp4.la, builds fine, but the CLI fails to build.  The configure line I used to build both the module and the CLI was:

./configure --prefix=/usr/local/php --with-qtdom --enable-cli --with-apxs2


GCC version:
GCC version:
Reading specs from /usr/lib/gcc-lib/i386-slackware-linux/2.95.3/specs
gcc version 2.95.3 20010315 (release)

Make version:
GNU Make version 3.79.1, by Richard Stallman and Roland McGrath.

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-08-13 01:13 UTC] kalowsky@php.net
This bug has been fixed in CVS. You can grab a snapshot of the
CVS version at http://snaps.php.net/. In case this was a documentation 
problem, the fix will show up soon at http://www.php.net/manual/.
In case this was a PHP.net website problem, the change will show
up on the PHP.net site and on the mirror sites.
Thank you for the report, and for helping us make PHP better.

Do please test this and tell me if it works.  I can't test it, but I see what your error is (I think).
 [2002-08-13 01:34 UTC] kennyz at nycap dot rr dot com
I just tried compiling once again with the latest 200208122100 snapshot, as you requested, and the same compilation error occurs:

main/internal_functions_cli.lo: In function `php_startup_internal_extensions':
/usr/local/src/Internet/php4-200208122100/main/internal_functions_cli.c:101: undefined reference to `qtdom_module_entry'
collect2: ld returned 1 exit status
make: *** [sapi/cli/php] Error 1


Note that if I do not specify --with-qtdom in the configure command line, then everything builds fine.  It is definitely the qtdom module that is causing the problem, and it appears to be the fact that qtdom.c is not being built, only qtdom_qt.lo and qtdom_qt.o (which is a symbolic link pointing to qtdom_qt.lo).  This means that the variable qtdom_module_entry is not being defined.

If there is any other information that you need, please let me know.
 [2002-08-13 08:33 UTC] kalowsky@php.net
can you make sure the config.m4 for ext/qtdom contains the qtdom.c file in the PHP_NEW_EXTENSION lines?

If it doesn't please add it, or wait for a newer snapshot and try again.

If it doesn, back to the drawing board for this..
 [2002-08-13 10:13 UTC] kennyz at nycap dot rr dot com
As you requested, I checked to see if qtdom.c was listed in the PHP_NEW_EXTENSION() macro.  It was not.  I added "qtdom.c" to the PHP_NEW_EXTENSION() parameter list in ext/qtdom/config.m4, so that each of the two occurrences of it looked like:

PHP_NEW_EXTENSION(qtdom, qtdom_qt.cpp qtdom.c, $ext_shared)

I then ran "configure" and tried building.  Once again, the build failed at the same spot, with the same error.  I checked in ext/qtdom, and the file qtdom.c was never built into qtdom.o.  It is also not mentioned in the top-level generated Makefile.

Maybe the fact that there is both a .cpp file and .c file confuses something in the configure process.

I even changed PHP_NEW_EXTENSION() to include ONLY qtdom.c, and after running configure, the top-level Makefile still referenced only qtdom_qt.lo.  I think configure must be finding qtdom_qt.cpp on its own, independent of whatever the PHP_NEW_EXTENSION() macro specifies.

I don't think I need to build PHP all the way in order to test this anymore.  I think it's clear right after the configure process whether or not qtdom.c was included by looking at the top-level Makefile.
 [2002-08-13 10:16 UTC] kalowsky@php.net
After fixing the config.m4 you will need to do "./cvsclean" and "./buildconf" to rebuild the configure script and reflect your changes.

If you don't have some of the devtools (libtool 1.4.x or autoconf 2.1.5) just grab a recent snapshot as this will have already been built for you.  
 [2002-08-13 11:10 UTC] kennyz at nycap dot rr dot com
Alright, qtdom.c appears to have compiled now.  I changed the PHP_NEW_EXTENSION() macro to include qtdom.c, then ran ./cvsclean, followed by ./buildconf.  After running ./configure, I already noticed that qtdom.lo was mentioned in the Makefile, so I was confident that it would work.

HOWEVER, the PHP CLI still did not build.  Here is the new error.  It's probably a similar problem with a different module:

ext/dba/dba_db2.lo: In function `dba_open_db2':
/usr/local/src/Internet/php4-200208122100/ext/dba/dba_db2.c:74: undefined reference to `db_open'
collect2: ld returned 1 exit status
make: *** [sapi/cli/php] Error 1


Any ideas?
 [2002-08-13 11:25 UTC] kalowsky@php.net
Good so this is fixed.

Regarding your other problem, please open a new bug with regards to that... one bug per report.   I know a pain..
 [2002-08-14 00:27 UTC] kennyz at nycap dot rr dot com
I downloaded and built 200208131800, and everything built fine, including qtdom and db2.

Therefore, I would consider the "qtdom" bug to be closed, and there is no need for me to open up a new "db2" bug, since it must have been fixed sometime today.

Thanks for all your assistance and extremely prompt response time.
 
PHP Copyright © 2001-2026 The PHP Group
All rights reserved.
Last updated: Tue Oct 06 22:00:02 2026 UTC