Closed Bug 1379456 Opened 8 years ago Closed 5 years ago

creation C++ header file by calling typelib.py plus *.idl file seems broken

Categories

(Thunderbird :: Build Config, defect, P3)

52 Branch
x86_64
Linux
defect

Tracking

(Not tracked)

RESOLVED INVALID

People

(Reporter: c.schoenert, Unassigned)

Details

(Whiteboard: tpi:-)

User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Firefox/52.0 Build ID: 20170623152303 Steps to reproduce: The issue I have found is happen within the Thunderbird package, but as we use the SDK from the Thunderbird source the origin is in the Firefox source I guess. We build a package thunderbird-dev in Debian that contains the Mozilla SDK, it contains quite the same as the package firefox-esr-dev, we only ship it extra for Thunderbird also. The Thunderbird package is using the automated testing possibility by the autopkg package. This is only a service wrapper that create a temporary environment were we can test some stuff independently. For doing some autotesting stuff in Debian we added some small test to check the possibility we can create a C++ header by calling typelib.py from the SDK package some time ago. The check is quite simple, we have a small file idlTest.idl that contains only a few things. // Include a file from thunderbird so we're sure these ended up in the right // location #include "nsIMsgIncomingServer.idl" [scriptable, uuid(1b9d7057-90f5-4ca5-a379-a59aa47acbd2)] interface IdlTestIncomingServer : nsIMsgIncomingServer { readonly attribute boolean thisIsATest; }; We use this file with the following shell script that is called within the autopkg testing after all Debian packages for Thunderbird are built. #!/bin/sh set -e cleanup() { [ ! -d "${SCRATCHDIR}" ] || rm -rf "${SCRATCHDIR}" } #trap cleanup EXIT SCRATCHDIR=`mktemp -d` TEST_IDL_FILE="debian/tests/idlTest.idl" TESTFILE=$(basename $0 .sh) echo "Running tests in ${TESTFILE}" echo -n "Test1: Make sure we can generate typelibs..." /usr/lib/thunderbird-devel/sdk/bin/typelib.py \ -I"/usr/lib/thunderbird-devel/idl" \ -o "${SCRATCHDIR}/test.xpt" \ "${TEST_IDL_FILE}" if [ -f "${SCRATCHDIR}/test.xpt" ]; then echo "done." else echo "No!" echo "Test call successful but no outputfile '${SCRATCHDIR}/test.xpt' found!" exit 1 fi echo -n "Test2: Make sure we can generate C++ headers..." /usr/lib/thunderbird-devel/sdk/bin/header.py \ -I"/usr/lib/thunderbird-devel/idl" \ -o "${SCRATCHDIR}/test.h" \ "${TEST_IDL_FILE}" if [ -f "${SCRATCHDIR}/test.h" ]; then echo "done." else echo "No!" echo "Test call successful but no outputfile '${SCRATCHDIR}/test.h' found!" exit 1 fi echo -n "Test3: Compiling generated file..." g++ -std=c++11 \ -I/usr/include/thunderbird \ -I/usr/include/nspr \ -o "${SCRATCHDIR}/test.o" \ "${SCRATCHDIR}/test.h" echo "done." echo "All Tests in ${TESTFILE} finished successfully." All the autopkg tests for Thunderbird can be found here: https://anonscm.debian.org/cgit/pkg-mozilla/icedove.git/tree/debian/tests The test in detail are the following two files: https://anonscm.debian.org/cgit/pkg-mozilla/icedove.git/tree/debian/tests/idlTest.idl https://anonscm.debian.org/cgit/pkg-mozilla/icedove.git/tree/debian/tests/idlTest.sh Actual results: Since version 52 of Thunderbird this test is failing. https://ci.debian.net/data/autopkgtest/unstable/amd64/i/icedove/20170709_071145/log.gz For doing some checking if we have may broke something inside the Thunderbird packaging I've used the files and package from the Firefox ESR package in Debian and also from the source tarball, but the test is also failing there. So I conclude there will probably something broken outside Debian. I saw some greater changes in typelib.py in the past and did try some debugging within the python file but my experiences are not good enough to track down the issue. Or maybe the documentation on https://developer.mozilla.org/en-US/docs/Mozilla/XPIDL/pyxpidl is outdated and we do simply calling typelib.py the wrong way?
OS: Unspecified → Linux
Hardware: Unspecified → x86_64
Component: Untriaged → Widget
Product: Firefox → Core
Whiteboard: tpi:-
Component: Widget → Build Config
Priority: -- → P3
Product: Core → Thunderbird
This report will become invalid once TB 60 will be released.

To anyone who also hit this bug:

This bug was introduced in this commit - https://hg.mozilla.org/mozreview/gecko/rev/1e581787198eefb8ae688e885472ecb11e458639 as a part of this bug fix - https://bugzilla.mozilla.org/show_bug.cgi?id=1253431 .

Basically this commit removed ability to execute header.py file from command line, only from internal build system.
In order to resurrect this file, if anyone still wants to build binary headers from XPIDL files - you need to manually fix header.py file by reverting this commit (replace everything since def main(outputfile): by original piece of code).

(In reply to Carsten Schoenert from comment #1)

This report will become invalid once TB 60 will be released.

Rob, do you agree?

Flags: needinfo?(rob)

I believe what Carsten was referring to was that since Firefox 60, there isn't an "SDK" to speak of, and the same holds true for Thunderbird. There's no "thunderbird-dev" package in Debian since version 52, nor has there been a "firefox-dev" package.

Flags: needinfo?(rob)
Status: UNCONFIRMED → RESOLVED
Closed: 5 years ago
Resolution: --- → INVALID
You need to log in before you can comment on or make changes to this bug.