AIX Port TOC overflow when linking static thunderbird-bin

RESOLVED FIXED in Thunderbird 3.1b1

Status

MailNews Core
Build Config
RESOLVED FIXED
7 years ago
7 years ago

People

(Reporter: ul, Assigned: ul)

Tracking

({fixed-seamonkey2.0.4})

Trunk
Thunderbird 3.1b1
PowerPC
AIX
fixed-seamonkey2.0.4

Thunderbird Tracking Flags

(thunderbird3.1 beta1-fixed, thunderbird3.0 .2-fixed)

Details

Attachments

(2 attachments, 1 obsolete attachment)

(Assignee)

Description

7 years ago
User-Agent:       Mozilla/5.0 (X11; U; AIX 5.1; en-US; rv:1.9.1.6) Gecko/20100101 SeaMonkey/2.0.1
Build Identifier: Thunderbird 3.0.x / Seamonkey 2.0.x

When linking thunderbird-bin configured with --enable-static / --disable-shared
the TOC overflows the 64k size on AIX. Needs additional passing the -bbigtoc LDFLAG in mail/app/Makefile.in

Detaied output:
xlC_r -o thunderbird-bin    -DNDEBUG -DTRIMMED -O2 -qarch=com -qmaxmem=-1 -qalias=noansi  nsMailApp.o nsStaticComponents.o    -lpthreads -bh:5 -Wl,-brtl -blibpath:/usr/lib:/lib    -L../../mozilla/dist/bin -L../../mozilla/dist/lib ../../mozilla/toolkit/xre/libxulapp_s.a -L../../mozilla/staticlib -L/home/ulink/Src/comm-1.9.1/TB3_OBJ_STATIC/mozilla/dist/bin -lmozjs  -L/home/ulink/Src/comm-1.9.1/TB3_OBJ_STATIC/mozilla/dist/bin -lxpcom -lxpcom_core  -liconv `/home/ulink/Src/comm-1.9.1/TB3_OBJ_STATIC/mozilla/dist/bin/nspr-config --prefix=/home/ulink/Src/comm-1.9.1/TB3_OBJ_STATIC/mozilla/dist --libdir=/home/ulink/Src/comm-1.9.1/TB3_OBJ_STATIC/mozilla/dist/lib --libs` -L/opt/freeware/lib -lgtk-x11-2.0 -latk-1.0 -lgdk-x11-2.0 -lgdk_pixbuf-2.0 -lm -lpangocairo-1.0 -lpango-1.0 -lcairo -lgobject-2.0 -lgmodule-2.0 -lglib-2.0 -lintl -liconv      -lX11   -lC_r -ldl -lm -lc_r  ../../mozilla/staticlib/components/libpref.a ../../mozilla/staticlib/components/libuconv.a ../../mozilla/staticlib/components/libucvmath.a ../../mozilla/staticlib/components/libi18n.a ../../mozilla/staticlib/components/libnecko.a ../../mozilla/staticlib/components/libauth.a ../../mozilla/staticlib/components/libxpconnect.a ../../mozilla/staticlib/components/libchardet.a ../../mozilla/staticlib/components/libzipwriter.a ../../mozilla/staticlib/components/libmork.a ../../mozilla/staticlib/components/libcookie.a ../../mozilla/staticlib/components/libpermissions.a ../../mozilla/staticlib/components/libstoragecomps.a ../../mozilla/staticlib/components/librdf.a ../../mozilla/staticlib/components/libcaps.a ../../mozilla/staticlib/components/libhtmlpars.a ../../mozilla/staticlib/components/libgkgfxthebes.a ../../mozilla/staticlib/components/libimglib2.a ../../mozilla/staticlib/components/libgkplugin.a ../../mozilla/staticlib/components/libwidget_gtk2.a ../../mozilla/staticlib/components/libtxmgr.a ../../mozilla/staticlib/components/libcomposer.a ../../mozilla/staticlib/components/libgklayout.a ../../mozilla/staticlib/components/libdocshell.a ../../mozilla/staticlib/components/libembedcomponents.a ../../mozilla/staticlib/components/libwebbrwsr.a ../../mozilla/staticlib/components/libnsappshell.a ../../mozilla/staticlib/components/libuniversalchardet.a ../../mozilla/staticlib/components/libchrome.a ../../mozilla/staticlib/components/libmozfind.a ../../mozilla/staticlib/components/libintlapp.a ../../mozilla/staticlib/components/libwindowds.a ../../mozilla/staticlib/components/libxpautocomplete.a ../../mozilla/staticlib/components/libappcomps.a ../../mozilla/staticlib/components/libremoteservice.a ../../mozilla/staticlib/components/libfileview.a ../../mozilla/staticlib/components/libtkautocomplete.a ../../mozilla/staticlib/components/libsatchel.a ../../mozilla/staticlib/components/libcommandlines.a ../../mozilla/staticlib/components/libtoolkitcomps.a ../../mozilla/staticlib/components/libspellchecker.a ../../mozilla/staticlib/components/libunixproxy.a ../../mozilla/staticlib/components/libpipboot.a ../../mozilla/staticlib/components/libpipnss.a ../../mozilla/staticlib/components/libpippki.a ../../mozilla/staticlib/components/libautoconfig.a ../../mozilla/staticlib/components/libsystem-pref.a ../../mozilla/staticlib/components/libmozldap.a ../../mozilla/staticlib/components/libimport.a ../../mozilla/staticlib/components/libmsgsmime.a ../../mozilla/staticlib/components/libmail.a ../../mozilla/staticlib/components/libmailcomps.a ../../mozilla/staticlib/libmozreg_s.a ../../mozilla/staticlib/libunicharutil_s.a ../../mozilla/staticlib/libucvutil_s.a ../../mozilla/staticlib/libgtkxtbin.a ../../mozilla/staticlib/libthebes.a ../../mozilla/staticlib/libgfxshared_s.a ../../mozilla/staticlib/libgfxpsshar.a ../../mozilla/staticlib/libgkgfx.a ../../mozilla/staticlib/libmimecthglue_s.a  -L../../mozilla/modules/libimg/png -lmozpng -L../../mozilla/jpeg -lmozjpeg -lz   -L../../mozilla/dist/bin -L../../mozilla/dist/lib -lcrmf -lsmime3 -lssl3 -lnss3 -lnssutil3 -lsoftokn3  -L../../mozilla/dist/bin -L../../mozilla/dist/lib -lldap60 -lprldap60 -lldif60  -L/opt/freeware/lib -lcairo -lfreetype -lfontconfig    -L/opt/freeware/lib -lXrender -lSM -lICE -lX11 -lcairo   ../../mozilla/gfx/qcms/libmozqcms.a  -lXm -lXt -lgthread-2.0 -L/opt/freeware/lib -lpangoft2-1.0 -lpango-1.0 -lgobject-2.0 -lgmodule-2.0 -lglib-2.0 -lintl -liconv   -L../../mozilla/dist/lib -lsqlite3 -lodm -lcfg    
ld: 0711-781 ERROR: TOC overflow. TOC size: 66892       Maximum size: 65536
gmake[1]: *** [thunderbird-bin] Error 12
gmake[1]: Leaving directory `/home/ulink/Src/comm-1.9.1/TB3_OBJ_STATIC/mail/app'
gmake: *** [default] Error 2


Reproducible: Always

Steps to Reproduce:
1. Have --enable-static and --disable-shared in you .mozconfig
2. Compile on AIX with IBM XLC/C++ 7.0 (or later)
Actual Results:  
Linker error

Expected Results:  
Linking a working binary
(Assignee)

Comment 1

7 years ago
Created attachment 419861 [details] [diff] [review]
passed the -bigtoc LDFLAGS only for AIX and static builds
(Assignee)

Updated

7 years ago
Attachment #419861 - Attachment description: oassed the -bigtoc LDFLAGS only for AIX and static builds → passed the -bigtoc LDFLAGS only for AIX and static builds
Attachment #419861 - Flags: review?(bugzilla)
(Assignee)

Updated

7 years ago
Blocks: 537588
(Assignee)

Comment 2

7 years ago
The -bbigtoc ld flag has a performance penalty. So I always try to use it selective instead as hacking it into the toplevel configure.in script.
Another candidate is the libxul.so, if configured for big libxul.so / small binary. Same trick.
When building 64bit it seems more symbols are exported.
(Assignee)

Updated

7 years ago
Attachment #419861 - Flags: review?(mnyromyr)

Comment 3

7 years ago
Comment on attachment 419861 [details] [diff] [review]
passed the -bigtoc LDFLAGS only for AIX and static builds

Sorry, but I'm not intimate enough with our build system to review patches to it. :-(
I would have passed on to Mark if you hadn't already asked him for review...
Attachment #419861 - Flags: review?(mnyromyr)
(Assignee)

Comment 4

7 years ago
Created attachment 421147 [details] [diff] [review]
additional LDFLAGS for AIX

Repositioned the block ifdef ($(OS_ARCH),AIX) block
Attachment #419861 - Attachment is obsolete: true
Attachment #421147 - Flags: review?(bugzilla)
Attachment #419861 - Flags: review?(bugzilla)
(Assignee)

Updated

7 years ago
Attachment #421147 - Flags: review?(philringnalda)
Comment on attachment 421147 [details] [diff] [review]
additional LDFLAGS for AIX

Sorry for the delay in getting to this.

>+ifeq ($(OS_ARCH),AIX)
>+ifdef  BUILD_STATIC_LIBS
>+LDFLAGS += -bbigtoc
>+endif
>+endif

nit: only one space after ifdef and before BUILD_STATIC_LIBS

r=Standard8 with that fixed.
Attachment #421147 - Flags: review?(philringnalda)
Attachment #421147 - Flags: review?(bugzilla)
Attachment #421147 - Flags: review+
(Assignee)

Comment 6

7 years ago
Created attachment 425781 [details] [diff] [review]
additional LDFLAG for AIX, fixed to comment #5

whitespace fixed
(Assignee)

Updated

7 years ago
Keywords: checkin-needed
Assignee: nobody → ul.mcamafia
Status: UNCONFIRMED → ASSIGNED
Ever confirmed: true
Version: unspecified → Trunk
Checked in: http://hg.mozilla.org/comm-central/rev/bcba89660b72
Status: ASSIGNED → RESOLVED
Last Resolved: 7 years ago
status-thunderbird3.1: --- → beta1-fixed
Keywords: checkin-needed
Resolution: --- → FIXED
Target Milestone: --- → Thunderbird 3.1b1
(Assignee)

Comment 8

7 years ago
Comment on attachment 425781 [details] [diff] [review]
additional LDFLAG for AIX, fixed to comment #5

No risc for everything but AIX,
this patch was locally applied when building TB 3.0 and 3.0.1 w/o problems on AIX 5.1 and AIX 4.3.3
Attachment #425781 - Flags: approval-thunderbird3.0.2?
Attachment #425781 - Flags: approval-thunderbird3.0.2? → approval-thunderbird3.0.2+
Checked in: http://hg.mozilla.org/releases/comm-1.9.1/rev/c82fc38a3a5c
status-thunderbird3.0: --- → .2-fixed
Marking as verified fixed for 3.0.2 release - verified that the tree is still building fine, and did visual inspection that the patch only affects AIX.
Keywords: verified-thunderbird3.0
(Assignee)

Comment 11

7 years ago
(In reply to comment #10)
> Marking as verified fixed for 3.0.2 release - verified that the tree is still
> building fine, and did visual inspection that the patch only affects AIX.

Verified with successful build on AIX too.
THX

Updated

7 years ago
Keywords: fixed-seamonkey2.0.4
You need to log in before you can comment on or make changes to this bug.