[trunk] make package is broken if --disable-tests is used in .mozconfig

RESOLVED FIXED in Thunderbird 46.0

Status

defect
RESOLVED FIXED
4 years ago
4 years ago

People

(Reporter: fredbezies, Assigned: aleth)

Tracking

Trunk
Thunderbird 46.0
x86_64
Linux

Thunderbird Tracking Flags

(thunderbird44 unaffected, thunderbird45+ fixed, thunderbird46 fixed)

Details

Attachments

(2 attachments, 1 obsolete attachment)

Posted file tbird error log.
This is a really recent bug. It must have started on December 3rd. After a complete build session, when I enter objdir to package thunderbird, I got an error related to a missing file : bin/components/components.manifest

Error log is added on this bug report.

There is a python error message. Could it be related to Python3 being the default version of Python on Archlinux ?
I thought it was related to a "rotten copy" of Mozilla Thunderbird source code, but I still get this error :(
Here is what I get with ./mozilla/mach package

[fred@fredo-arch src]$ ./mozilla/mach package
 0:00.14 /usr/bin/make -C . -j3 -s -w package
 0:00.17 make: Entering directory '/home/fred/logs/mail/objdir-tb'
 0:00.50 make[1]: Entering directory '/home/fred/logs/mail/objdir-tb/mail/installer'
 0:00.82 make[2]: Entering directory '/home/fred/logs/mail/objdir-tb/mail/installer'
 0:01.10 make[3]: Entering directory '/home/fred/logs/mail/objdir-tb/mail/installer'
 0:01.57 Error: /home/fred/logs/mail/objdir-tb/mail/installer/package-manifest:83: Missing file(s): bin/components/components.manifest
 0:03.30 Traceback (most recent call last):
 0:03.30   File "/home/fred/logs/mail/src/mozilla/toolkit/mozapps/installer/packager.py", line 406, in <module>
 0:03.30     main()
 0:03.30   File "/home/fred/logs/mail/src/mozilla/toolkit/mozapps/installer/packager.py", line 358, in main
 0:03.31     copier.add(mozpath.join(respath, 'removed-files'), removals)
 0:03.31   File "/usr/lib64/python2.7/contextlib.py", line 24, in __exit__
 0:03.31     self.gen.next()
 0:03.31   File "/home/fred/logs/mail/src/mozilla/python/mozbuild/mozpack/errors.py", line 131, in accumulate
 0:03.31     raise AccumulatedErrors()
 0:03.31 mozpack.errors.AccumulatedErrors
 0:03.32 /home/fred/logs/mail/src/mozilla/toolkit/mozapps/installer/packager.mk:41: recipe for target 'stage-package' failed
 0:03.32 make[3]: *** [stage-package] Error 1
 0:03.32 make[3]: Leaving directory '/home/fred/logs/mail/objdir-tb/mail/installer'
 0:03.32 /home/fred/logs/mail/src/mozilla/toolkit/mozapps/installer/packager.mk:90: recipe for target 'make-package' failed
 0:03.32 make[2]: *** [make-package] Error 2
 0:03.33 make[2]: Leaving directory '/home/fred/logs/mail/objdir-tb/mail/installer'
 0:03.33 /home/fred/logs/mail/src/mozilla/config/rules.mk:547: recipe for target 'default' failed
 0:03.33 make[1]: *** [default] Error 2
 0:03.33 make[1]: Leaving directory '/home/fred/logs/mail/objdir-tb/mail/installer'
 0:03.33 /home/fred/logs/mail/src/mozilla/../mail/build.mk:10: recipe for target 'package' failed
 0:03.33 make: *** [package] Error 2
 0:03.33 make: Leaving directory '/home/fred/logs/mail/objdir-tb'

Any idea ?
If it could help, here is my .mozconfig (adapted for archlinux) :

mk_add_options PYTHON=/usr/bin/python2
mk_add_options AUTOCONF=autoconf-2.13

mk_add_options MOZ_OBJDIR=/home/fred/logs/mail/objdir-tb

mk_add_options MOZ_MAKE_FLAGS="-j3"

ac_add_options --enable-application=mail
ac_add_options --enable-calendar
ac_add_options --with-ccache
ac_add_options --disable-debug
ac_add_options --disable-tests
ac_add_options --disable-crashreporter
ac_add_options --disable-warnings-as-errors
ac_add_options --disable-debug-symbols
ac_add_options --disable-elf-hack
ac_add_options --enable-gstreamer=1.0
OS: Unspecified → Linux
Hardware: Unspecified → x86_64
Summary: make package is broken after an error in mail/installer/package-manifest on Archlinux → [trunk] make package is broken if --disable-tests is used in .mozconfig
After some chat on #maildev, looks like installer is working only if --disable-tests is removed.

Any idea why ?
components.manifest contains
22:07:17 - fredbezies: binary-component libtest656331.so
22:07:17 - fredbezies: binary-component libtestcompnoaslr.so
22:07:17 - fredbezies: binary-component libtestcomponent.so

Probably with disable-tests it is empty or is not generated at all, so its packaging fails.
So why it is not generated ? Even a empty file to workaround this bug, or am I wrong ?
Given that when starting a TB build (with tests), we get (in the error console)

Failed to load native module at path 'Daily.app/Contents/Resources/components/libtest656331.dylib': (80004005) <unknown; can't get error from NSPR>
Failed to load native module at path 'Daily.app/Contents/Resources/components/libtestcompnoaslr.dylib': (80004005) <unknown; can't get error from NSPR>
Failed to load native module at path 'Daily.app/Contents/Resources/components/libtestcomponent.dylib': (80004005) <unknown; can't get error from NSPR>

there's something wrong here.
Attachment #8696503 - Flags: review?(Pidgeot18)
Assignee: nobody → aleth
Status: NEW → ASSIGNED
jcranmer: bug 821291 also does s/#include "nsStringAPI.h"/#include "nsString.h" in some places; are there cases in c-c where this would be appropriate too?
Might as well include IB.
Attachment #8696505 - Flags: review?(Pidgeot18)
Attachment #8696503 - Attachment is obsolete: true
Attachment #8696503 - Flags: review?(Pidgeot18)
Note this patch doesn't resolve comment 7.
(In reply to aleth [:aleth] from comment #9)
> jcranmer: bug 821291 also does s/#include "nsStringAPI.h"/#include
> "nsString.h" in some places; are there cases in c-c where this would be
> appropriate too?

nsStringAPI is used for external linkage, while nsString for internal. The only places I see nsStringAPI in mailnews are contexts where external linkage is clearly needed (C++ tests and addons).
(In reply to aleth [:aleth] from comment #11)
> Note this patch doesn't resolve comment 7.

Filed as bug 1230998.
Comment on attachment 8696505 [details] [diff] [review]
Port changes from bug 821291 (move libmozgnome into libxul) for c-c

Review of attachment 8696505 [details] [diff] [review]:
-----------------------------------------------------------------

rs+
Attachment #8696505 - Flags: review?(Pidgeot18) → review+
https://hg.mozilla.org/comm-central/rev/cace0ff88a9c0c2d3d56037b9e7c58f8eece4105
Bug 1230778 - Port changes from bug 821291 (move libmozgnome into libxul) for c-c. r=jcranmer
Comment on attachment 8696505 [details] [diff] [review]
Port changes from bug 821291 (move libmozgnome into libxul) for c-c

[Approval Request Comment]
Regression caused by (bug #): Bug 821291 (mozilla 45)
Risk to taking this patch (and alternatives if risky): straightforward port
Attachment #8696505 - Flags: approval-comm-aurora?
Status: ASSIGNED → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → Thunderbird 46.0
Comment on attachment 8696505 [details] [diff] [review]
Port changes from bug 821291 (move libmozgnome into libxul) for c-c

https://hg.mozilla.org/releases/comm-aurora/rev/2fbcc55372e4
Attachment #8696505 - Flags: approval-comm-aurora? → approval-comm-aurora+
You need to log in before you can comment on or make changes to this bug.