firegpg FTBFS: xulrunner.../nsStringAPI.h: size of array 'arg' is negative

Bug #515872 reported by Kamal Mostafa
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
FireGPG
New
Undecided
Unassigned
firegpg (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

http://launchpadlibrarian.net/36059913/buildlog_ubuntu-lucid-i386.firegpg_0.7.10-1_FAILEDTOBUILD.txt.gz

make[2]: Entering directory `/build/buildd/firegpg-0.7.10/debian/ipc/build'
c++ -Wall -Wconversion -Wpointer-arith -Woverloaded-virtual -Wsynth -Wno-ctor-dtor-privacy -Wno-non-virtual-dtor -Wcast-align -Wno-long-long -Os -g -c -o nsIPCModule.o -include mozilla-config.h -include xpcom-config.h `pkg-config --cflags-only-I libxul-unstable` -I ../src -I ../public -fno-rtti -fno-exceptions -shared -fPIC -pthread -pipe -fvisibility=hidden nsIPCModule.cpp
In file included from ../src/nsProcessInfo.h:39,
                 from nsIPCModule.cpp:37:
/usr/include/xulrunner-1.9.1.5/unstable/nsStringAPI.h:1054: error: size of array 'arg' is negative

Related branches

Revision history for this message
Kamal Mostafa (kamalmostafa) wrote :

The cryptic "size of array 'arg' is negative" error is caused by this protection assert in a xulrunner header file:

nsStringAPI.h:1054: PR_STATIC_ASSERT(sizeof(wchar_t) == 2);

The comment a few lines above explains:

                * NOTE: HAVE_CPP_2BYTE_WCHAR_T may be automatically defined for some platforms
                * in nscore.h. On other platforms, it may be defined in xpcom-config.h.
                * Under GCC, this define should only be set if compiling with -fshort-wchar.

Changed in firegpg (Ubuntu):
assignee: nobody → Kamal Mostafa (kamalmostafa)
status: New → In Progress
Revision history for this message
Kamal Mostafa (kamalmostafa) wrote :

Attached branch adds -fshort-wchar to the C++ build flags for the sources that include xulrunner. Fixes the firegpg FTBFS.

Changed in firegpg (Ubuntu):
assignee: Kamal Mostafa (kamalmostafa) → nobody
status: In Progress → Confirmed
Benjamin Drung (bdrung)
Changed in firegpg (Ubuntu):
assignee: nobody → Benjamin Drung (bdrung)
Revision history for this message
Benjamin Drung (bdrung) wrote :

Thanks for the patch. Please forward the patch to Debian, if this patch works on Debian, too.

Changed in firegpg (Ubuntu):
assignee: Benjamin Drung (bdrung) → nobody
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package firegpg - 0.7.10-1ubuntu1

---------------
firegpg (0.7.10-1ubuntu1) lucid; urgency=low

  * Add -fshort-wchar to C++ build flags to fix FTBFS (LP: #515872):
    - xulrunner.../nsStringAPI.h: size of array 'arg' is negative
 -- Kamal Mostafa <email address hidden> Mon, 01 Feb 2010 21:49:02 -0800

Changed in firegpg (Ubuntu):
status: Confirmed → Fix Released
Revision history for this message
Kamal Mostafa (kamalmostafa) wrote :

Hi Benjamin- The problem seems to be specific to Ubuntu (caused by a peculiarity (?) of Ubuntu's version of xulrunner). This package builds successfully on all platforms in Debian unstable and testing -- so I think it wouldn't be appropriate to file a bug report and patch in Debian.

Revision history for this message
dkg (dkg0) wrote :

This has come up in discussion on pkg-mozext-maintainers:

http://lists.alioth.debian.org/pipermail/pkg-mozext-maintainers/2010-April/000511.html (and following messages in that thread)

perhaps the pkg-config files for xulrunner in ubuntu need to be updated to fix this properly?

Revision history for this message
Micah Gersten (micahg) wrote : Re: [Bug 515872] Re: firegpg FTBFS: xulrunner.../nsStringAPI.h: size of array 'arg' is negative

Yes, the pkg-config files weren't updated for xulrunner-1.9.1 when
that change was made. There is no issue with xulrunner-1.9.2 which is
the version for Lucid.

On 04/20/2010 02:13 PM, dkg wrote:
> This has come up in discussion on pkg-mozext-maintainers:
>
> http://lists.alioth.debian.org/pipermail/pkg-mozext-
> maintainers/2010-April/000511.html (and following messages in that
> thread)
>
> perhaps the pkg-config files for xulrunner in ubuntu need to be updated
> to fix this properly?
>

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.