Last Comment Bug 525525 - AIX Port MailNews unresolved external in dir import/build
: AIX Port MailNews unresolved external in dir import/build
Status: RESOLVED FIXED
: fixed-seamonkey2.0.3
Product: MailNews Core
Classification: Components
Component: Build Config (show other bugs)
: Trunk
: PowerPC AIX
: -- normal (vote)
: Thunderbird 3.1b1
Assigned To: Uli Link (:ul-mcamafia)
:
Mentors:
Depends on:
Blocks: 537588
  Show dependency treegraph
 
Reported: 2009-10-30 12:03 PDT by Uli Link (:ul-mcamafia)
Modified: 2010-02-17 00:49 PST (History)
6 users (show)
bugzillamozillaorg_serge_20140323: in‑testsuite-
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
.2-fixed


Attachments
fixes the unresoived symbols to nsRDFResource:: in mailnew/import/build/ (1.12 KB, patch)
2010-01-03 03:27 PST, Uli Link (:ul-mcamafia)
no flags Details | Diff | Splinter Review
reworked to Neil's comment (999 bytes, patch)
2010-01-03 13:34 PST, Uli Link (:ul-mcamafia)
no flags Details | Diff | Splinter Review
Reworked to standard8's comment# 13 (758 bytes, patch)
2010-01-09 04:34 PST, Uli Link (:ul-mcamafia)
standard8: review-
Details | Diff | Splinter Review
reworked to comment# 15 [Checkin: Comment 22 & 24] (720 bytes, patch)
2010-01-11 15:30 PST, Uli Link (:ul-mcamafia)
standard8: review+
standard8: superreview+
standard8: approval‑thunderbird3.0.2+
Details | Diff | Splinter Review

Description Uli Link (:ul-mcamafia) 2009-10-30 12:03:36 PDT
User-Agent:       Mozilla/5.0 (X11; U; AIX 5.1; en-US; rv:1.8.1.23) Gecko/20091019 SeaMonkey/1.1.18
Build Identifier: Mozilla/5.0 (X11; U; AIX 5.1; en-US; rv:1.8.1.23) Gecko/20091019 SeaMonkey/1.1.18

xlC_r -o nsImportModule.o -c  -DMOZILLA_INTERNAL_API -DMOZ_SUITE=1 -DOSTYPE=\"AIX5.1\" -DOSARCH=AIX -I/home/ulink/Src/comm-1.9.1/mailnews/import/build/../src -I/home/ulink/Src/comm-1.9.1/mailnews/import/build/../comm4x/src -I/home/ulink/Src/comm-1.9.1/mailnews/import/build/../text/src  -I/home/ulink/Src/comm-1.9.1/mailnews/import/build -I. -I../../../mozilla/dist/include/xpcom -I../../../mozilla/dist/include/string -I../../../mozilla/dist/include/uconv -I../../../mozilla/dist/include/intl -I../../../mozilla/dist/include/impComm4xMail -I../../../mozilla/dist/include   -I../../../mozilla/dist/include/import `/home/ulink/Src/AIX-51/sm2/mozilla/dist/bin/nspr-config --prefix=/home/ulink/Src/AIX-51/sm2/mozilla/dist --includedir=/home/ulink/Src/AIX-51/sm2/mozilla/dist/include/nspr --cflags`      -qflag=w:w      -DNDEBUG -DTRIMMED -O2 -qmaxmem=16384 -qalias=noansi   -DMOZILLA_1_9_1_BRANCH=1 -DMOZILLA_VERSION=\"1.9.1.4\" -DMOZILLA_VERSION_U=1.9.1.4 -DAIX=1 -DHAVE_SYS_INTTYPES_H=1 -DNSCAP_DISABLE_DEBUG_PTR_TYPES=1 -DD_INO=d_ino -DSTDC_HEADERS=1 -DHAVE_ST_BLKSIZE=1 -DHAVE_SIGINFO_T=1 -DHAVE_INT16_T=1 -DHAVE_INT32_T=1 -DHAVE_INT64_T=1 -DHAVE_INT64=1 -DHAVE_UINT=1 -DHAVE_UINT_T=1 -DHAVE_UINT16_T=1 -DHAVE_DIRENT_H=1 -DHAVE_MEMORY_H=1 -DHAVE_UNISTD_H=1 -DHAVE_NL_TYPES_H=1 -DHAVE_MALLOC_H=1 -DHAVE_X11_XKBLIB_H=1 -DHAVE_SYS_STATVFS_H=1 -DHAVE_SYS_STATFS_H=1 -DHAVE_LIBC_R=1 -DHAVE_LIBM=1 -DHAVE_LIBDL=1 -DHAVE_LIBC_R=1 -DFUNCPROTO=15 -DHAVE_XSHM=1 -D_REENTRANT=1 -DHAVE_RANDOM=1 -DHAVE_STRERROR=1 -DHAVE_LCHOWN=1 -DHAVE_FCHMOD=1 -DHAVE_SNPRINTF=1 -DHAVE_MEMMOVE=1 -DHAVE_RINT=1 -DHAVE_STAT64=1 -DHAVE_LSTAT64=1 -DHAVE_TRUNCATE64=1 -DHAVE_FLOCKFILE=1 -DHAVE_LOCALTIME_R=1 -DHAVE_STRTOK_R=1 -DHAVE_RES_NINIT=1 -DHAVE_LANGINFO_CODESET=1 -DHAVE_I18N_LC_MESSAGES=1 -DMOZ_SUITE=1 -DMOZ_BUILD_APP=suite -DMOZ_X11=1 -DMOZ_WIDGET_GTK2=1 -DMOZ_DISTRIBUTION_ID=\"org.mozilla\" -DOJI=1 -DIBMBIDI=1 -DMOZ_VIEW_SOURCE=1 -DMOZ_XPINSTALL=1 -DMOZ_JSLOADER=1 -DNS_PRINTING=1 -DNS_PRINT_PREVIEW=1 -DMOZ_NO_XPCOM_OBSOLETE=1 -DMOZ_XTF=1 -DMOZ_UPDATE_CHANNEL=default -DMOZ_PLACES=1 -DMOZ_FEEDS=1 -DMOZ_STORAGE=1 -DMOZ_HELP_VIEWER=1 -DMOZ_LOGGING=1 -DMOZ_USER_DIR=\".mozilla\" -DMOZ_STATIC_MAIL_BUILD=1 -DHAVE_INTTYPES_H=1 -DMOZ_XUL=1 -DMOZ_PROFILELOCKING=1 -DMOZ_RDF=1 -DMOZ_MORK=1 -DMOZ_MORKREADER=1 -DMOZ_DLL_SUFFIX=\".so\" -DXP_UNIX=1 -DUNIX_ASYNC_DNS=1  -D_COMM_CONFIG_H_ -DMOZILLA_CLIENT /home/ulink/Src/comm-1.9.1/mailnews/import/build/nsImportModule.cpp
gmake[3]: *** No rule to make target `../../base/util/libmsgbsutl_s.a', needed by `libimport.so'.  Stop.
gmake[3]: Leaving directory `/home/ulink/Src/AIX-51/sm2/mailnews/import/build'
gmake[2]: *** [libs] Error 2
gmake[2]: Leaving directory `/home/ulink/Src/AIX-51/sm2/mailnews/import'
gmake[1]: *** [import_libs] Error 2
gmake[1]: Leaving directory `/home/ulink/Src/AIX-51/sm2/mailnews'
gmake: *** [default] Error 2
bash-3.00$ 


Reproducible: Always

Steps to Reproduce:
1. Try to build on AIX
Actual Results:  
Build failure

Expected Results:  
Successful build
Comment 1 Uli Link (:ul-mcamafia) 2009-10-31 05:19:51 PDT
AIX isn't using GCC,

I can build mailnews/base/util/libmsgutl_s.a when calling gmake in this dir, but this isn't done automatically.
Comment 2 Uli Link (:ul-mcamafia) 2010-01-01 10:44:08 PST
The build system assumes !GCC == Windows,
AIX at the moment is the first UNIX'ish platform not using GCC, hopefully Solaris will follow.
Comment 3 Karsten Düsterloh 2010-01-01 11:01:22 PST
Is this just a problem with SeaMonkey MailNews or does building Thunderbird break as well? Does Firefox build?
Comment 4 Uli Link (:ul-mcamafia) 2010-01-01 11:06:28 PST
Firefox 3.5.7 builds well in default configuration,
the last Thunderbird I built in AIX was 2.0.0.23 without hacking the build system.
Comment 5 Karsten Düsterloh 2010-01-01 11:17:05 PST
(In reply to comment #4)
> Firefox 3.5.7 builds well in default configuration,

Okay, so not a "core core" problem, "just" mailnews core or SeaMonkey.

> the last Thunderbird I built in AIX was 2.0.0.23 without hacking the build
> system.

TB2 ~ SM1, so that doesn't mean much - I suppose SM 1.x did build okay as well?
SM2 ~ TB3, so if TB3 would build without problems, it's a SeaMonkey bug, if not, it's a mailnews core bug...
Comment 6 Uli Link (:ul-mcamafia) 2010-01-01 11:32:46 PST
The problematic Makefile.in are all living below
<http://mxr.mozilla.org/comm-central/source/mailnews/>
What does this mean for needing to sort it on a TB3 build?

I'm not familiar with TB3 by now.
As there is a whole bunch of non-trivial C++ patches needed for building Seamonkey or Firefox a Thunderbird build will need a few days of work, optimistic estimate.

All C++ problems for Seamonkey 2.0.x are sorted out now. 
Have it up and running, only need to cycle a few times over all directories until all links fine. 
Until earlier today I had a few unresolved external symbol which were AIX compiler/linker specific.
Comment 7 Karsten Düsterloh 2010-01-01 11:39:47 PST
(In reply to comment #6)
> I'm not familiar with TB3 by now.

No problem, then just let's assume it's affected as well, with  

> The problematic Makefile.in are all living below
> <http://mxr.mozilla.org/comm-central/source/mailnews/>
Comment 8 Uli Link (:ul-mcamafia) 2010-01-02 16:24:57 PST
Building Thunderbird 3.0 from source tarball (after applying the Firefox 3.5.7 porting patches) went through until:

rm -f libimport.so
xlC_r -qmkshrobj=1 -o libimport.so -bE:/home/ulink/Src/comm-1.9.1/mozilla/build/unix/aix.exp -bnoexpall  nsImportModule.o     -lpthreads -bh:5 -Wl,-brtl -blibpath:/usr/lib:/lib     ../src/libimport_s.a ../text/src/libimptext_s.a ../comm4x/src/libimp4mail_s.a   ../../base/util/libmsgbsutl_s.a -L../../../mozilla/dist/bin -L../../../mozilla/dist/lib  /home/ulink/Src/comm-1.9.1/TB3_OBJ/mozilla/dist/lib/libunicharutil_s.a ../../../mozilla/modules/libreg/src/libmozreg_s.a -L/home/ulink/Src/comm-1.9.1/TB3_OBJ/mozilla/dist/bin -lxpcom -lxpcom_core  -liconv -L/home/ulink/Src/comm-1.9.1/TB3_OBJ/mozilla/dist/bin `/home/ulink/Src/comm-1.9.1/TB3_OBJ/mozilla/dist/bin/nspr-config --prefix=/home/ulink/Src/comm-1.9.1/TB3_OBJ/mozilla/dist --libdir=/home/ulink/Src/comm-1.9.1/TB3_OBJ/mozilla/dist/lib --libs`   -lC_r -ldl -lm -lc_r    
ld: 0711-317 ERROR: Undefined symbol: .nsRDFResource::QueryInterface(const nsID&,void**)
ld: 0711-317 ERROR: Undefined symbol: .nsRDFResource::AddRef()
ld: 0711-317 ERROR: Undefined symbol: .nsRDFResource::Release()
ld: 0711-317 ERROR: Undefined symbol: .nsRDFResource::nsRDFResource()
ld: 0711-317 ERROR: Undefined symbol: nsRDFResource::EqualsNode(nsIRDFNode*,int*)
ld: 0711-317 ERROR: Undefined symbol: nsRDFResource::GetValue(char**)
ld: 0711-317 ERROR: Undefined symbol: nsRDFResource::GetValueUTF8(nsACString_internal&)
ld: 0711-317 ERROR: Undefined symbol: nsRDFResource::GetValueConst(const char**)
ld: 0711-317 ERROR: Undefined symbol: nsRDFResource::EqualsString(const char*,int*)
ld: 0711-317 ERROR: Undefined symbol: nsRDFResource::GetDelegate(const char*,const nsID&,void**)
ld: 0711-317 ERROR: Undefined symbol: nsRDFResource::ReleaseDelegate(const char*)
ld: 0711-317 ERROR: Undefined symbol: .nsRDFResource::~nsRDFResource()
ld: 0711-317 ERROR: Undefined symbol: .nsRDFResource::Init(const char*)
ld: 0711-317 ERROR: Undefined symbol: .nsRDFResource::GetValueUTF8(nsACString_internal&)
ld: 0711-345 Use the -bloadmap or -bnoquiet option to obtain more information.
gmake[5]: *** [libimport.so] Error 8
gmake[5]: Leaving directory `/home/ulink/Src/comm-1.9.1/TB3_OBJ/mailnews/import/build'
Comment 9 Uli Link (:ul-mcamafia) 2010-01-03 03:27:20 PST
Created attachment 419816 [details] [diff] [review]
fixes the unresoived symbols to nsRDFResource:: in mailnew/import/build/

this fixes building directory mailnews/import/build but I'm looking for a more generic way, also fitting Solaris and other UNIX flavours not using GCC. Criticism welcome. Therefore not requesting review now.
Comment 10 Ian Neal 2010-01-03 04:24:47 PST
I did look at this yesterday and thought this couldn't be the problem due to the WINNT at the start, but does AIX identify itself as both WINNT and AIX OS_ARCH then?
As I'm sure that patch says:
if OS_ARCH=WINNT and GNU_CC is not defined and OS_ARCH<>AIX then add to the REQUIRES
Comment 11 Uli Link (:ul-mcamafia) 2010-01-03 13:34:58 PST
Created attachment 419837 [details] [diff] [review]
reworked to Neil's comment

THX Neil,
No AIX does not defile WINNT, so only the second hunk is needed.
Building of TB 3.0 went right through for a nearly default .mozconfig and resulting Shredder was working well.
Next I will try a clean run with --disable-shared --enable-static options, so a can create a tarball installer.
Comment 12 Uli Link (:ul-mcamafia) 2010-01-04 17:23:24 PST
Successfully tested Thunderbird shared and static, plus Seamonkey.
Comment 13 Mark Banner (:standard8) 2010-01-09 03:54:12 PST
Comment on attachment 419837 [details] [diff] [review]
reworked to Neil's comment

We generally use EXTRA_DSO_LDOPTS for linking against core libraries - does that not work here?

You may also want to set it up for external linkage such as shown here:

http://mxr.mozilla.org/comm-central/source/mailnews/addrbook/build/Makefile.in#94
Comment 14 Uli Link (:ul-mcamafia) 2010-01-09 04:34:04 PST
Created attachment 420883 [details] [diff] [review]
Reworked to standard8's comment# 13

Thanks for the hint including external linkage case.
Comment 15 Mark Banner (:standard8) 2010-01-11 14:21:19 PST
Comment on attachment 420883 [details] [diff] [review]
Reworked to standard8's comment# 13

>+ifeq ($(OS_ARCH),AIX)
>+ifdef MOZILLA_INTERNAL_API
>+EXTRA_DSO_LDOPTS += \
>+       $(MOZDEPTH)/rdf/util/src/internal/$(LIB_PREFIX)rdfutil_s.$(LIB_SUFFIX)

if you're going to use this format, then it is normally:

EXTRA_DSO_LDOPTS += \
       $(MOZDEPTH)/rdf/util/src/internal/$(LIB_PREFIX)rdfutil_s.$(LIB_SUFFIX) \
       $(NULL)

>+else
>+EXTRA_DSO_LDOPTS += \
>+       $(MOZDEPTH)/rdf/util/src/internal/$(LIB_PREFIX)rdfutil_external_s.$(LIB_SUFFIX)

That's not quite right you need to drop the extra internal.
Comment 16 Uli Link (:ul-mcamafia) 2010-01-11 15:30:48 PST
Created attachment 421145 [details] [diff] [review]
reworked to comment# 15
[Checkin: Comment 22 & 24]

fixed the bogus internal and changed to trailing $(NULL), fixed indent.
Comment 17 Mark Banner (:standard8) 2010-01-17 07:42:02 PST
Comment on attachment 421145 [details] [diff] [review]
reworked to comment# 15
[Checkin: Comment 22 & 24]

Thanks for updating the patch, r/sr=Standard8
Comment 18 Justin Wood (:Callek) 2010-01-20 17:29:25 PST
Uli, is this only 1.9.1?

If so it needs an approval or blocking before it can be pushed to that branch. [and please remove checkin-needed until it does have approval]

If not then I'll be glad to push to trunk for you.
Comment 19 Uli Link (:ul-mcamafia) 2010-01-21 03:13:41 PST
(In reply to comment #18)
> Uli, is this only 1.9.1?
> 
> If so it needs an approval or blocking before it can be pushed to that branch.
> [and please remove checkin-needed until it does have approval]
> 
> If not then I'll be glad to push to trunk for you.

The patch is needed on both branch 1.9.1 and trunk.
Comment 20 Mark Banner (:standard8) 2010-01-21 03:26:05 PST
Ok, here's the general process for landing patches:

https://wiki.mozilla.org/Thunderbird/Thunderbird3_Security_And_Stability_Releases#General_Process_for_landing_bugs_on_Thunderbird_3.0.x

Basically land on trunk first, then request approval. As its mailnews/ you just need Thunderbird approval. I'll cancel the SeaMonkey approval request as you don't need that but I just won't process approval until this has been checked in on trunk.
Comment 21 Uli Link (:ul-mcamafia) 2010-01-21 04:06:42 PST
> Basically land on trunk first, then request approval.

This was my "checkin-needed" without the approval request.

> As its mailnews/ you just
> need Thunderbird approval. I'll cancel the SeaMonkey approval request as you
> don't need that but I just won't process approval until this has been checked
> in on trunk.

I cannot verify the result on trunk for AIX because the 1.9.2 JavaScript engine (trunk) won't compile on AIX 32bit by now. 
But it should prove the patch don't break anything but AIX. 
Same for https://bugzilla.mozilla.org/show_bug.cgi?id=537642 

So what is the preferred way to specify "checkin-needed" for a specified branch/trunk only?
Comment 22 Serge Gautherie (:sgautherie) 2010-01-21 06:14:37 PST
Comment on attachment 421145 [details] [diff] [review]
reworked to comment# 15
[Checkin: Comment 22 & 24]


http://hg.mozilla.org/comm-central/rev/3eb472d16acb
Comment 23 Mark Banner (:standard8) 2010-01-25 15:04:50 PST
(In reply to comment #21)
> So what is the preferred way to specify "checkin-needed" for a specified
> branch/trunk only?

Use just checkin-needed keyword for trunk. For branch its best to add checkin-needed to the keyword and something like [checkin to comm-1.9.1] in the status whiteboard.
Comment 24 Serge Gautherie (:sgautherie) 2010-01-25 15:38:52 PST
Comment on attachment 421145 [details] [diff] [review]
reworked to comment# 15
[Checkin: Comment 22 & 24]


http://hg.mozilla.org/releases/comm-1.9.1/rev/d73002ec08ae
Comment 25 Mark Banner (:standard8) 2010-02-16 12:40:51 PST
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.
Comment 26 Uli Link (:ul-mcamafia) 2010-02-17 00:49:20 PST
(In reply to comment #25)
> 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.

And builds fine on AIX too.

THX.

Note You need to log in before you can comment on or make changes to this bug.