redefinition of 'inline namespace' in installed headers

Bug #435793 reported by Matthias Klose
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
wireless-tools (Ubuntu)
Fix Released
High
Unassigned

Bug Description

Binary package hint: xulrunner-1.9.1

This is insane, apparently breaking all platforms having long double 128 support (sparc, powerpc, alpha, s390). Doing that during the package build is one thing, installing this as public header files is annoying, breaking all builds on these platforms using these headers.

g++ -o nsWifiScannerUnix.o -c -fvisibility=hidden -DMOZILLA_INTERNAL_API -D_IMPL_NS_COM -DEXPORT_XPT_API -DEXPORT_XPTC_API -D_IMPL_NS_COM_OBSOLETE -D_IMPL_NS_GFX -D_IMPL_NS_WIDGET -DIMPL_XREAPI -DIMPL_NS_NET -DIMPL_THEBES -DOSTYPE=\"Linux2.6\" -DOSARCH=Linux -DIMPL_NS_NET -I. -I. -I../../../dist/include/xpcom -I../../../dist/include/string -I../../../dist/include/pref -I../../../dist/include/storage -I../../../dist/include -I../../../dist/include/necko -I/usr/include/nspr -I/usr/include -I/home/asac/build/build-area/xulrunner-1.9.1-1.9.1.3+build1+nobinonly/build-tree/mozilla/dist/sdk/include -fPIC -fno-rtti -fno-exceptions -Wall -Wpointer-arith -Woverloaded-virtual -Wsynth -Wno-ctor-dtor-privacy -Wno-non-virtual-dtor -Wno-invalid-offsetof -Wno-long-long -pedantic -g -fno-strict-aliasing -fshort-wchar -pthread -pipe -DNDEBUG -DTRIMMED -Os -freorder-blocks -fno-reorder-functions -DMOZILLA_CLIENT -include ../../../mozilla-config.h -Wp,-MD,.deps/nsWifiScannerUnix.pp nsWifiScannerUnix.cpp
In file included from /usr/include/c++/4.4/cstddef:43,
                 from /usr/include/c++/4.4/new:39,
                 from ../../../dist/include/xpcom/nsTArray.h:46,
                 from ../../../dist/include/string/nsReadableUtils.h:51,
                 from ../../../dist/include/string/nsString.h:52,
                 from ../../../dist/include/xpcom/nsStringGlue.h:49,
                 from ../../../dist/include/xpcom/nsVoidArray.h:43,
                 from ../../../dist/include/xpcom/nsCOMArray.h:42,
                 from nsWifiMonitor.h:46,
                 from nsWifiScannerUnix.cpp:45:
/usr/include/c++/4.4/sparc-linux-gnu/bits/c++config.h:214: error: expected unqualified-id before 'namespace'

sparc-linux-gnu/bits/c++config.h reads:

  // Namespace associations for long double 128 mode.
  #if defined _GLIBCXX_LONG_DOUBLE_COMPAT && defined __LONG_DOUBLE_128__
  namespace std
  {
    inline namespace __gnu_cxx_ldbl128 { }
  }

which gets expanded to:

  # 212 "/usr/include/c++/4.4/sparc-linux-gnu/bits/c++config.h" 3
  namespace std
  {
     inline __attribute__((always_inline)) namespace __gnu_cxx_ldbl128 { }
  }

Please really consider fixing this for karmic.

Matthias Klose (doko)
Changed in xulrunner-1.9.1 (Ubuntu):
importance: Undecided → High
milestone: none → ubuntu-9.10
Revision history for this message
Alexander Sack (asac) wrote :

doko found this is a redifinition of inline and found that its in iwlib.h:

/* Make gcc understant that when we say inline, we mean it.
 * I really hate when the compiler is trying to be more clever than me,
 * because in this case gcc is not able to figure out functions with a
 * single call site, so not only I have to tag those functions inline
 * by hand, but then it refuse to inline them properly.
 * Total saving for iwevent : 150B = 0.7%.
 * Fortunately, in gcc 3.4, they now automatically inline static functions
 * with a single call site. Hurrah !
 * Jean II */
#undef IW_GCC_HAS_BROKEN_INLINE
#if __GNUC__ == 3
#if __GNUC_MINOR__ >= 1 && __GNUC_MINOR__ < 4
#define IW_GCC_HAS_BROKEN_INLINE 1
#endif /* __GNUC_MINOR__ */
#endif /* __GNUC__ */
/* However, gcc 4.0 has introduce a new "feature", when compiling with
 * '-Os', it does not want to inline iw_ether_cmp() and friends.
 * So, we need to fix inline again !
 * Jean II */
#if __GNUC__ == 4
#define IW_GCC_HAS_BROKEN_INLINE 1
#endif /* __GNUC__ */
/* Now, really fix the inline */
#ifdef IW_GCC_HAS_BROKEN_INLINE
#ifdef inline
#undef inline
#endif /* inline */
#define inline inline __attribute__((always_inline))
#endif /* IW_GCC_HAS_BROKEN_INLINE */

#ifdef __cplusplus
extern "C" {
#endif

affects: xulrunner-1.9.1 (Ubuntu) → iw (Ubuntu)
affects: iw (Ubuntu) → wireless-tools (Ubuntu)
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package wireless-tools - 29-2ubuntu6

---------------
wireless-tools (29-2ubuntu6) karmic; urgency=low

  * Don't try to outsmart the compiler and don't redefine `inline' in an
    installed header file. LP: #435793.

    /* Make gcc understant that when we say inline, we mean it.
     * I really hate when the compiler is trying to be more clever than me,
     * because in this case gcc is not able to figure out functions with a
     * single call site, so not only I have to tag those functions inline
     * by hand, but then it refuse to inline them properly.
     * Total saving for iwevent : 150B = 0.7%.
     * Fortunately, in gcc 3.4, they now automatically inline static functions
     * with a single call site. Hurrah !
     * Jean II */

 -- Matthias Klose <email address hidden> Thu, 24 Sep 2009 13:01:03 +0200

Changed in wireless-tools (Ubuntu):
status: New → Fix Released
Revision history for this message
Amit Saha (amitksaha) wrote :

Typo in "Make gcc understant that when we say inline, we mean it."

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.