php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #45721 TOC overflow on IBM AIX ld
Submitted: 2008-08-05 11:42 UTC Modified: 2008-08-05 11:55 UTC
Votes:1
Avg. Score:4.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:1 (100.0%)
Same OS:1 (100.0%)
From: Bjorn dot Wiberg at its dot uu dot se Assigned:
Status: Not a bug Package: Compile Failure
PHP Version: 5.3.0alpha1 OS: IBM AIX 5.3 5300-08-01-0819
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: Bjorn dot Wiberg at its dot uu dot se
New email:
PHP Version: OS:

 

 [2008-08-05 11:42 UTC] Bjorn dot Wiberg at its dot uu dot se
Description:
------------
When compiling on AIX, one gets a TOC overflow error from ld.

Something like:
  export LDFLAGS="-Wl,-bbigtoc" (if using gcc) or
  export LDFLAGS="-bbigtoc" (if using cc/xlC)
...prior to running ./configure (and make) appears to be needed.

This was not the case with PHP 5.2.6.

Reproduce code:
---------------
#! /bin/sh
#
# Created by configure

CC='gcc' \
'./configure' \
'--disable-fileinfo' \
'--enable-bcmath' \
'--enable-calendar' \
'--enable-cli' \
'--enable-dba' \
'--enable-dbase' \
'--enable-debug' \
'--enable-exif' \
'--enable-flatfile' \
'--enable-ftp' \
'--enable-gd-jis-conv' \
'--enable-gd-native-ttf' \
'--enable-inifile' \
'--enable-mbstring' \
'--enable-pcntl' \
'--enable-shmop' \
'--enable-soap' \
'--enable-sockets' \
'--enable-sqlite-utf8' \
'--enable-sysvmsg' \
'--enable-sysvsem' \
'--enable-sysvshm' \
'--enable-wddx' \
'--enable-zip' \
'--enable-zend-multibyte' \
'--prefix=/apache/php' \
'--with-apxs2=/apache/bin/apxs' \
'--with-bz2' \
'--with-cdb' \
'--with-curl' \
'--with-freetype-dir' \
'--with-gd' \
'--with-gdbm' \
'--with-gettext' \
'--with-jpeg-dir' \
'--with-ldap' \
'--with-libxml-dir=/usr/local' \
'--with-mime-magic' \
'--with-mysql=mysqlnd' \
'--with-mysqli=mysqlnd' \
'--with-openssl=/opt/freeware' \
'--with-pdo-mysql=mysqlnd' \
'--with-png-dir' \
'--with-xmlrpc' \
'--with-xpm-dir' \
'--with-xsl' \
'--with-zlib' \
'--with-zlib-dir' \
"$@"

Expected result:
----------------
No TOC overflow error. Successful linking.

Actual result:
--------------
---8<--- excerpt ---8<---
GNOME_ACL/GNOME/build/acc_gnome2_12_0f1/export/power_510_32/usr/lib -L/gestconf/project/GNOME_ACL/GNOME/build/GNOME_2_12_0/export/power_510_32/usr/lib -lX11 -lXpm -lpng -L/gestconf/project/GNOME_ACL/GNOME/build/BLD_M_gnome2_14f1/export/power_510_32/usr/lib -L/gestconf/project/GNOME_ACL/GNOME/build/M_acc_gnome2_14_0f1/export/power_510_32/usr/lib -L/gestconf/project/GNOME_ACL/GNOME/build/acc_gnome2_14_0f1/export/power_510_32/usr/lib -L/gestconf/project/GNOME_ACL/GNOME/build/GNOME_2_14_0/export/power_510_32/usr/lib -L/users/project/PDP/PDP_51_vac_6_14/usr/ccs/lib -L/users/project/PDP/PDP_51_vac_6_14/usr/lib -lz -ljpeg -lssl -lcrypto -lgdbm -lbz2 -lz -lssl -lcrypto -lm -lz -liconv -lm -lcurl -lssl -lcrypto -lz -lz -liconv -lm -lz -liconv -lm -lz -liconv -lm -lz -liconv -lm -lz -liconv -lm -lz -liconv -lm -lz -liconv -lm -lz -liconv -lm -lxslt -lxml2 -lz -liconv -lm -lc  -Wl,-brtl -Wl,-bI:/apache/modules/httpd.exp -Wl,-bE:.libs/libphp5.exp -Wl,-bnoentry ${wl}-berok
ld: 0711-224 WARNING: Duplicate symbol: php_optidx
ld: 0711-345 Use the -bloadmap or -bnoquiet option to obtain more information.
ld: 0711-781 ERROR: TOC overflow. TOC size: 72448       Maximum size: 65536
collect2: ld returned 12 exit status
make: *** [libphp5.la] Error 1
Bad exit status from /var/opt/freeware/tmp/rpm-tmp.22146 (%build)
---8<--- end excerpt --8<--

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2008-08-05 11:53 UTC] jani@php.net
Expected behaviour. Just use those flags.
 [2008-08-05 11:55 UTC] Bjorn dot Wiberg at its dot uu dot se
Shouldn't ./configure take care of this if detecting AIX? Especially if this has occurred with PHP 5.3 and up?
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Sun Jul 20 18:00:03 2025 UTC