Bug #17604 Updated: Apache 2/MySQL/PHP4/Sablotron Will not compile

From: Date: Mon, 17 Jun 2002 05:17:05 +0000
Subject: Bug #17604 Updated: Apache 2/MySQL/PHP4/Sablotron Will not compile
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-10824@lists.php.net to get a copy of this message
ID: 17604 Updated by: kevin@kevinfries.com Reported By: kevin@kevinfries.com -Status: Feedback +Status: Open Bug Type: Compile Failure Operating System: Solaris 8 IA PHP Version: 4.2.1 New Comment: OK, did as you asked. You are going to really love this one: First I did the ldd command as you asked, and it said: bash-2.0LDFLAGS="-lstdc++" ./configure --with-mysql --enable-xslt --with-xslt-sablot --enable-track-vars --with-apxs2 bash-2.05$ ldd which sabcmd libsablot.so.0 => /usr/local/lib/libsablot.so.0 libexpat.so.0 => /usr/local/lib/libexpat.so.0 libstdc++.so.3 => /usr/local/lib/libstdc++.so.3 libm.so.1 => /usr/lib/libm.so.1 libgcc_s.so.1 => /usr/local/lib/libgcc_s.so.1 libc.so.1 => /usr/lib/libc.so.1 libdl.so.1 => /usr/lib/libdl.so.1 Then I went back to my PHP source, and issued: bash-2.05# LDFLAGS="-lstdc++" ./configure --with-mysql --enable-xslt --with-xslt-sablot --enable-track-vars --with-apxs2 followed by a make and make install. Then I tried to do a start of apache: bash-2.05# apachectl start Syntax error on line 230 of /usr/local/apache/conf/httpd.conf: Cannot load /usr/local/apache/modules/libphp4.so into server: ld.so.1: /usr/local/apache/bin/httpd: fatal: relocation error: file /usr/local/apache/modules/libphp4.so: symbol mysql_field_count: referenced symbol not found ./apachectl start: httpd could not be started changing --with-mysql to --with-mysql=/usr/local/mysql in the configure command, issuing a new make and make install, then trying to start bash-2.05$ sudo apachectl start Syntax error on line 230 of /usr/local/apache/conf/httpd.conf: Cannot load /usr/local/apache/modules/libphp4.so into server: ld.so.1: /usr/local/apache/bin/httpd: fatal: relocation error: file /usr/local/lib/libsablot.so.0: symbol _ZTVN10__cxxabiv120__si_class_type_infoE: referenced symbol not found apachectl start: httpd could not be started I feel like I am on a Merry-Go-Round. No matter what I try, I keep ending up in the same place. Kevin Fries Previous Comments: ------------------------------------------------------------------------ [2002-06-16 22:38:05] sniper@php.net Kevin, please try what Pavel suggested: do 'ldd sablotcmd' to see what libraries is linked with it. And add the extra libs to LDFLAGS before you run configure for PHP. e.g. LDFLAGS="-lstdc++" ./configure <and your options..> ------------------------------------------------------------------------ [2002-06-16 15:26:52] kevin@kevinfries.com Pavel, My default tools are the gnu tools: bash-2.05$ which gcc --version 3.0.1 bash-2.05$ which ld --version GNU ld 2.11.2 Copyright 2001 Free Software Foundation, Inc. This program is free software; you may redistribute it under the terms of the GNU General Public License. This program has absolutely no warranty. Supported emulations: elf_i386 bash-2.05$ which make --version GNU Make version 3.79.1, by Richard Stallman and Roland McGrath. Built for i386-pc-solaris2.8 Copyright (C) 1988, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 2000 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. Report bugs to <bug-make@gnu.org>. bash-2.05$ which libtool --version ltmain.sh (GNU libtool) 1.4 (1.920 2001/04/24 23:26:18) bash-2.05$ which libtool --version ltmain.sh (GNU libtool) 1.4 (1.920 2001/04/24 23:26:18) bash-2.05$ which autoconf --version autoconf (GNU Autoconf) 2.53 Written by David J. MacKenzie and Akim Demaille. Copyright 2002 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. bash-2.05$ which automake --version automake (GNU automake) 1.6.1 Written by Tom Tromey <tromey@redhat.com>. Copyright 2002 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. Kevin Fries ------------------------------------------------------------------------ [2002-06-16 05:34:03] pavel@gingerall.cz It looks like traditional problem with linking the C++ library (what Sablotron is) and C code. This is rather the autoconf/libtool issue then sablotron's one. Sablotron itself doesn't require any other librraies then expat and libjs (when enabled, what is not the problem discussed). An issue usually is, that gnu linker links additional 'magic' libraries to the executable file (not to the library file). This is typically named like libstdc++. Problem is, that Sablotron can not guess these libraries, since they depend on the system and compiler used. This is a known issue related to configuration tools, read libtool documentation and FAQs. It is possible to check, waht libraries are linked to working sabcmd (use something like ldd from GNU's binutils) and set LDFLAGS='-lsomething' when configuring PHP. Conclusion: may be I'm wrong, but problem described looks like one we meet from time to time. It is usually on platforms, where gnu tools are not the default (namely gnu ld is not the default linker). If I could do anything to kill this problem, I'd do it, but there are many people solving this problem with many libraries :( The best solution (of bad ones) is to maintain good README file and list libraries needed for different platforms. We'd like to do it in our README, but we usually do not get the solution and platform set, we can use is limited. Pavel (Sablotron maintainer) ------------------------------------------------------------------------ [2002-06-15 23:09:48] sniper@php.net This sounds like some libraries are missing. There isn't much we can do about it unless sablot gets some 'sablot-config' script which tells what libraries are needed to link with it.. Please report this to the sablotron authors. ------------------------------------------------------------------------ [2002-06-05 20:27:36] kevin@kevinfries.com Sablotron version 0.90 All I did was a standard: ./configure make make install Nothing special ------------------------------------------------------------------------ The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at http://bugs.php.net/17604 -- Edit this bug report at http://bugs.php.net/?id=17604&edit=1

« previous php.bugs (#10824) next »