473,371 Members | 1,455 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,371 software developers and data experts.

Problems compiling PHP 4.3 on Solaris 8

Hello,

I'm having trouble compiling PHP 4.3.4 on Solaris 8. This is the error
message it is showing:

-- start --
Undefined first referenced
symbol in file
php_parse_date ext/standard/datetime.o
ld: fatal: Symbol referencing errors. No output written to sapi/cli/php
collect2: ld returned 1 exit status
*** Error code 1
make: Fatal error: Command failed for target `sapi/cli/php'
-- end --

The most common suggestiong I found while searching google was to
upgrade GCC from 2.95 to the latest. I upgraded both the GCC and the
libgcc packages and the error still continues. I also tried rolling back
to an earlier version (4.3.3) unsuccessfully.

Should I try rolling back to 4.3.2 or earlier? Is there anything I might
be missing? Any additional information?

TIA!

--
Andres Rosado
Email: an*****@despammed.com
ICQ: 66750646
AIM: pantear
Homepage: http://andres980.tripod.com/

"Megatron will not twist this innocent to his dark designs. I will
not allow it!"
"Hah! You will be too busy burning to prevent it!"
-- Silverbolt and Inferno, "Transmutate"
Jul 17 '05 #1
6 6855
Andres Rosado-Sepulveda wrote:
Hello,

I'm having trouble compiling PHP 4.3.4 on Solaris 8. This is the error
message it is showing:

-- start --
Undefined first referenced
symbol in file
php_parse_date ext/standard/datetime.o
ld: fatal: Symbol referencing errors. No output written to sapi/cli/php
collect2: ld returned 1 exit status
*** Error code 1
make: Fatal error: Command failed for target `sapi/cli/php'
-- end --

The most common suggestiong I found while searching google was to
upgrade GCC from 2.95 to the latest. I upgraded both the GCC and the
libgcc packages and the error still continues. I also tried rolling back
to an earlier version (4.3.3) unsuccessfully.

Should I try rolling back to 4.3.2 or earlier? Is there anything I might
be missing? Any additional information?

TIA!


Checking on the PHP-install list archive, I found two links to how-to's
( http://www.tldp.org/HOWTO/Apache-Compile-HOWTO/php.html and
http://www.bolthole.com/solaris/php+solaris.html ). I have followed both
how-to's instructions and I am still unable to compile PHP.

TIA!

--
Andres Rosado
Email: an*****@despammed.com
ICQ: 66750646
AIM: pantear
Homepage: http://andres980.tripod.com/

"I laugh in the face of danger. Then I hide until it goes away."
-- Xander, "Buffy, The Vampire Slayer"
Jul 17 '05 #2
>>>>> "Andres" == Andres Rosado-Sepulveda <ar*****@softhome.net> writes:
Andres>
Andres> Andres Rosado-Sepulveda wrote:
Hello,
I'm having trouble compiling PHP 4.3.4 on Solaris 8. This is the
error message it is showing: Andres> -- start -- Andres> Undefined first referenced
symbol in file
php_parse_date ext/standard/datetime.o
ld: fatal: Symbol referencing errors. No output written to sapi/cli/php
collect2: ld returned 1 exit status
*** Error code 1
make: Fatal error: Command failed for target `sapi/cli/php'
-- end --
The most common suggestiong I found while searching google was to
upgrade GCC from 2.95 to the latest. I upgraded both the GCC and
the libgcc packages and the error still continues. I also tried
rolling back to an earlier version (4.3.3) unsuccessfully. Andres> Should I try rolling back to 4.3.2 or earlier? Is there anything I
might be missing? Any additional information? Andres> TIA! Andres>

Andres>
Andres> Checking on the PHP-install list archive, I found two links to
Andres> how-to's (
Andres> http://www.tldp.org/HOWTO/Apache-Compile-HOWTO/php.html and
Andres> http://www.bolthole.com/solaris/php+solaris.html ). I have
Andres> followed both how-to's instructions and I am still unable to
Andres> compile PHP.

Just prior to where you cut the output, there should be the command
that was used to link sapi/cli/php. This command is missing a .o
file, or maybe a library listed in the -llib format, that has that
symbol.

If you run the command "nm" on an object file or library, it will list
the symbols. So if you by hand or with a simple script ran nm on
every .so and .o in the php source tree, you should find that library
if it was correctly built.

cd php-4.3.4
for file in *.so */*.so */*/*.so ; do
echo $file
nm $file | grep php_parse_date
done

This will help you find the library that you need to add to the link
line. Note that the grep will catch objects that have the symbol in
them but because they refer to it not because they define it.

It might also help if you were to post the ./configure command you
used and a little more the output of the failed make, say 50 lines or
so so that we can see the link command.

--Rob
Jul 17 '05 #3
Rob Ristroph wrote:
>>"Andres" == Andres Rosado-Sepulveda <ar*****@softhome.net> writes:
Andres>
Andres> Andres Rosado-Sepulveda wrote:
Hello,
I'm having trouble compiling PHP 4.3.4 on Solaris 8. This is the
error message it is showing:
Andres>
-- start --
Andres>
Undefined first referenced
symbol in file
php_parse_date ext/standard/datetime.o
ld: fatal: Symbol referencing errors. No output written to sapi/cli/php
collect2: ld returned 1 exit status
*** Error code 1
make: Fatal error: Command failed for target `sapi/cli/php'
-- end --
The most common suggestiong I found while searching google was to
upgrade GCC from 2.95 to the latest. I upgraded both the GCC and
the libgcc packages and the error still continues. I also tried
rolling back to an earlier version (4.3.3) unsuccessfully.
Andres>
Should I try rolling back to 4.3.2 or earlier? Is there anything I
might be missing? Any additional information?
Andres>
TIA!


Andres>

Andres>
Andres> Checking on the PHP-install list archive, I found two links to
Andres> how-to's (
Andres> http://www.tldp.org/HOWTO/Apache-Compile-HOWTO/php.html and
Andres> http://www.bolthole.com/solaris/php+solaris.html ). I have
Andres> followed both how-to's instructions and I am still unable to
Andres> compile PHP.

Just prior to where you cut the output, there should be the command
that was used to link sapi/cli/php. This command is missing a .o
file, or maybe a library listed in the -llib format, that has that
symbol.

If you run the command "nm" on an object file or library, it will list
the symbols. So if you by hand or with a simple script ran nm on
every .so and .o in the php source tree, you should find that library
if it was correctly built.

cd php-4.3.4
for file in *.so */*.so */*/*.so ; do
echo $file
nm $file | grep php_parse_date
done

This will help you find the library that you need to add to the link
line. Note that the grep will catch objects that have the symbol in
them but because they refer to it not because they define it.

It might also help if you were to post the ./configure command you
used and a little more the output of the failed make, say 50 lines or
so so that we can see the link command.


Thanks for the input! Here's the last few commands.

-- start --
bison -y -p ini_ -v -d
/usr/local/php4.3.4src/php-4.3.4/Zend/zend_ini_parser.y -o
Zend/zend_ini_parser.c
conflicts: 2 shift/reduce
/bin/sh /usr/local/php4.3.4src/php-4.3.4/libtool --silent
--preserve-dup-deps --mode=link gcc -export-dynamic -g -O2
-L/usr/ucblib -L/usr/local/lib/gcc-lib/sparc-sun-solaris2.8/3.3.2
-L/usr/local/ssl//lib -L/usr/local/lib -L./imap-2002e/c-client
-L../ldap/lib -R /usr/ucblib -R
/usr/local/lib/gcc-lib/sparc-sun-solaris2.8/3.3.2 -R /usr/local/ssl//lib
-R /usr/local/lib -R ./imap-2002e/c-client -R ./ldap/lib
ext/openssl/openssl.lo ext/zlib/zlib.lo ext/zlib/zlib_fopen_wrapper.lo
ext/ctype/ctype.lo ext/dba/dba.lo ext/dba/dba_cdb.lo ext/dba/dba_db2.lo
ext/dba/dba_dbm.lo ext/dba/dba_gdbm.lo ext/dba/dba_ndbm.lo
ext/dba/dba_db3.lo ext/dba/dba_db4.lo ext/dba/dba_flatfile.lo
ext/dba/dba_inifile.lo ext/dba/libcdb/cdb.lo ext/dba/libcdb/cdb_make.lo
ext/dba/libcdb/uint32.lo ext/dba/libflatfile/flatfile.lo
ext/dba/libinifile/inifile.lo ext/gd/gd.lo ext/gd/gdttf.lo
ext/gd/libgd/gd.lo ext/gd/libgd/gd_gd.lo ext/gd/libgd/gd_gd2.lo
ext/gd/libgd/gd_io.lo ext/gd/libgd/gd_io_dp.lo
ext/gd/libgd/gd_io_file.lo ext/gd/libgd/gd_ss.lo
ext/gd/libgd/gd_io_ss.lo ext/gd/libgd/gd_png.lo ext/gd/libgd/gd_jpeg.lo
ext/gd/libgd/gdxpm.lo ext/gd/libgd/gdfontt.lo ext/gd/libgd/gdfonts.lo
ext/gd/libgd/gdfontmb.lo ext/gd/libgd/gdfontl.lo ext/gd/libgd/gdfontg.lo
ext/gd/libgd/gdtables.lo ext/gd/libgd/gdft.lo ext/gd/libgd/gdcache.lo
ext/gd/libgd/gdkanji.lo ext/gd/libgd/wbmp.lo ext/gd/libgd/gd_wbmp.lo
ext/gd/libgd/gdhelpers.lo ext/gd/libgd/gd_topal.lo
ext/gd/libgd/gd_gif_in.lo ext/gd/libgd/xbm.lo ext/imap/php_imap.lo
ext/ldap/ldap.lo ext/mysql/php_mysql.lo ext/mysql/libmysql/libmysql.lo
ext/mysql/libmysql/errmsg.lo ext/mysql/libmysql/net.lo
ext/mysql/libmysql/violite.lo ext/mysql/libmysql/password.lo
ext/mysql/libmysql/my_init.lo ext/mysql/libmysql/my_lib.lo
ext/mysql/libmysql/my_static.lo ext/mysql/libmysql/my_malloc.lo
ext/mysql/libmysql/my_realloc.lo ext/mysql/libmysql/my_create.lo
ext/mysql/libmysql/my_delete.lo ext/mysql/libmysql/my_tempnam.lo
ext/mysql/libmysql/my_open.lo ext/mysql/libmysql/mf_casecnv.lo
ext/mysql/libmysql/my_read.lo ext/mysql/libmysql/my_write.lo
ext/mysql/libmysql/errors.lo ext/mysql/libmysql/my_error.lo
ext/mysql/libmysql/my_getwd.lo ext/mysql/libmysql/my_div.lo
ext/mysql/libmysql/mf_pack.lo ext/mysql/libmysql/my_messnc.lo
ext/mysql/libmysql/mf_dirname.lo ext/mysql/libmysql/mf_fn_ext.lo
ext/mysql/libmysql/mf_wcomp.lo ext/mysql/libmysql/typelib.lo
ext/mysql/libmysql/safemalloc.lo ext/mysql/libmysql/my_alloc.lo
ext/mysql/libmysql/mf_format.lo ext/mysql/libmysql/mf_path.lo
ext/mysql/libmysql/mf_unixpath.lo ext/mysql/libmysql/my_fopen.lo
ext/mysql/libmysql/mf_loadpath.lo ext/mysql/libmysql/my_pthread.lo
ext/mysql/libmysql/my_thr_init.lo ext/mysql/libmysql/thr_mutex.lo
ext/mysql/libmysql/mulalloc.lo ext/mysql/libmysql/string.lo
ext/mysql/libmysql/default.lo ext/mysql/libmysql/my_compress.lo
ext/mysql/libmysql/array.lo ext/mysql/libmysql/my_once.lo
ext/mysql/libmysql/list.lo ext/mysql/libmysql/my_net.lo
ext/mysql/libmysql/dbug.lo ext/mysql/libmysql/strmov.lo
ext/mysql/libmysql/strxmov.lo ext/mysql/libmysql/strnmov.lo
ext/mysql/libmysql/strmake.lo ext/mysql/libmysql/strend.lo
ext/mysql/libmysql/strfill.lo ext/mysql/libmysql/is_prefix.lo
ext/mysql/libmysql/int2str.lo ext/mysql/libmysql/str2int.lo
ext/mysql/libmysql/strinstr.lo ext/mysql/libmysql/strcont.lo
ext/mysql/libmysql/strcend.lo ext/mysql/libmysql/bchange.lo
ext/mysql/libmysql/bmove.lo ext/mysql/libmysql/bmove_upp.lo
ext/mysql/libmysql/longlong2str.lo ext/mysql/libmysql/strtoull.lo
ext/mysql/libmysql/strtoll.lo ext/mysql/libmysql/charset.lo
ext/mysql/libmysql/ctype.lo ext/overload/overload.lo
ext/pcre/pcrelib/maketables.lo ext/pcre/pcrelib/get.lo
ext/pcre/pcrelib/study.lo ext/pcre/pcrelib/pcre.lo ext/pcre/php_pcre.lo
ext/posix/posix.lo ext/session/session.lo ext/session/mod_files.lo
ext/session/mod_mm.lo ext/session/mod_user.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/parsedate.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/aggregation.lo ext/standard/sha1.lo
ext/tokenizer/tokenizer.lo ext/xml/xml.lo ext/xml/expat/xmlparse.lo
ext/xml/expat/xmlrole.lo ext/xml/expat/xmltok.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/streams.lo main/network.lo
main/php_open_temporary_file.lo main/php_logos.lo main/output.lo
main/memory_streams.lo main/user_streams.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_execute.lo sapi/cli/php_cli.lo sapi/cli/getopt.lo
main/internal_functions_cli.lo -lcrypt -lc-client -lssl -lcrypto -lldap
-llber -lcrypt -lpam -lt1 -lpng -lz -ljpeg -lgdbm -lz -lssl -lcrypto
-lresolv -lm -ldl -lnsl -lsocket -lgcc -lcrypt -o sapi/cli/php
Undefined first referenced
symbol in file
php_parse_date ext/standard/datetime.o
ld: fatal: Symbol referencing errors. No output written to sapi/cli/php
collect2: ld returned 1 exit status
*** Error code 1
make: Fatal error: Command failed for target `sapi/cli/php'
-- end --

And here's the ./configure line:

-- start --

../configure --with-apache=../apache --disable-display-source
--disable-short-tags --with-gdbm --with-imap=../imap-2002e
--with-imsp=../libimsp --with-ldap=../ldap --with-gd
--with-jpeg-dir=/usr/local/lib/ --with-t1lib=/usr/local/lib
--with-openssl=/usr/local/ssl/ --with-zlib-dir=/usr/local/lib
--with-png-dir=/usr/local/lib/ --with-imap-ssl=/usr/local/ssl/

-- end --
(Note: All the paths in both are absolute. I shorten them manually)

There is only one instance of php_parse_date in the files already
compiled in ext/standard/datetime.o. Aside from that, nothing else. BTW,
I only found *.o and *.lo files (I only checked *.o files though).

I got to compile it without the Command Line Interface and without PEAR.

Any problems I might encounter by disabling PEAR?

TIA,

--
Andres Rosado
Email: an*****@despammed.com
ICQ: 66750646
AIM: pantear
Homepage: http://andres980.tripod.com/

Microsoft Palladium:
"Where the hell do you think YOU'RE going today?"
Jul 17 '05 #4

The object file parsedate.o (or parsedate.lo, one should be a link to
the other I think) should define that symbol. If you look in
ext/standard/parsedate.c you should see where that function is
defined.

Perhaps the order in which the objects are linked matters ? You could
try cutting and pasting that long link command to the command line,
and editting it to move parsedate.lo to just after datetime.lo. I'm
not sure where in the build system you would change that order to make
it happen automatically, but you could report it as a bug.

I don't know about PEAR; it depends on if you are using it. I was
under the impression that it was just a bunch of php class files and
could be installed by untarring it in the right place and editting
something in php.ini, but I am not sure about that.

--Rob
Jul 17 '05 #5
Rob Ristroph wrote:
The object file parsedate.o (or parsedate.lo, one should be a link to
the other I think) should define that symbol. If you look in
ext/standard/parsedate.c you should see where that function is
defined.

Perhaps the order in which the objects are linked matters ? You could
try cutting and pasting that long link command to the command line,
and editting it to move parsedate.lo to just after datetime.lo. I'm
not sure where in the build system you would change that order to make
it happen automatically, but you could report it as a bug.
I editted the line and it didn't worked either. I checked again the bug
reports and nothing seemed to help either. I'm submitting a bug report
for this situation. Thanks!
I don't know about PEAR; it depends on if you are using it. I was
under the impression that it was just a bunch of php class files and
could be installed by untarring it in the right place and editting
something in php.ini, but I am not sure about that.


I managed to compile PHP 4.3.4 without PEAR support. I wanted to make
sure if something was moved between PHP4.0.x and 4.3.4 (IIRC, some
classes were moved to PEAR in PHP5. I don't know the validity of this
statement).

--
Andres Rosado
Email: an*****@despammed.com
ICQ: 66750646
AIM: pantear
Homepage: http://andres980.tripod.com/

Strike first, strike fast, strike hard.
-- Cliffjumper (G1)
Jul 17 '05 #6
Andres Rosado-Sepulveda wrote:
I editted the line and it didn't worked either. I checked again the bug
reports and nothing seemed to help either. I'm submitting a bug report
for this situation. Thanks!


The problem was solved by upgrading bison and using the latest snapshot.
(link: http://bugs.php.net/bug.php?id=27449 ).

--
Andres Rosado
Email: an*****@despammed.com
ICQ: 66750646
AIM: pantear
Homepage: http://andres980.tripod.com/

Go confidently in the direction of your dreams. Live the life you've
imagined.
-- Henry David Thoreau
Jul 17 '05 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Jeremy Fincher | last post by:
I'm having problems compiling Python with socket support (and support for several other libraries) on Solaris 7. When I do the standard ./configure, make, make install dance, I got a fully...
1
by: Andres Monroy-Hernandez | last post by:
Hi, I'm trying to compile the latest mysql source in a Sun box: # uname -a SunOS bucktown 5.8 Generic_108528-20 sun4u sparc SUNW,Ultra-80 My configration looks like this: CFLAGS="-O3"...
11
by: Arturo DiDonna | last post by:
Hello everyone. I am trying to compile someone else code and I am stuck with compilation problems using the g++ 3.3 compiler. Basically, when compiling the following code, I get this error...
15
by: Rob Ratcliff | last post by:
I'm compiling the latest version of a CORBA ORB called MICO on a Cray X1. It makes heavy use of templates and namespaces. Up until the link step, the C++ source code compiled flawlessly. But, when...
0
by: mmarkzon | last post by:
I have been struggling compiling linkchecker from http://linkchecker.sourceforge.net/. The last thing I get is "error: command 'gcc' failed with exit status 1" which is not very helpful. This is...
2
by: etienne | last post by:
Hello, I'm trying to compile this C++ code with gcc 3.4.5 under Solaris/SPARC (from a complete application, the file is : FullLinkedList.hh) but the make fails (no problem when compiling under...
6
by: aki27 | last post by:
Is there a way to find the platform and compiler name during compile time so that conditional compilation can be performed in C? thanks.
15
by: John Nagle | last post by:
I've been installing Python and its supporting packages on a dedicated server with Fedora Core 6 for about a day now. This is a standard dedicated rackmount server in a colocation facility,...
2
by: Darren | last post by:
Apache, PHP and MySQL are all running in 32 bit on a Solaris server that is 64 bit. The main problem I have is I need 64 bit integers so I have 2 questions: If I compile PHP for 64 bit, do I...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.