* [PATCH 0/1] Fix dpkg-native compile fail on Fedora 19
@ 2013-08-13 9:57 Kai Kang
2013-08-13 9:57 ` [PATCH 1/1] dpkg: fix include header caused compile error Kai Kang
0 siblings, 1 reply; 2+ messages in thread
From: Kai Kang @ 2013-08-13 9:57 UTC (permalink / raw)
To: sgw; +Cc: Zhangle.Yang, openembedded-core
The following changes since commit 16d522bcd1f1b7741577fa31fab7e2129da0cae9:
maintainers.inc: reassign maintainers, remove obsolete recipes (2013-08-12 13:13:05 +0100)
are available in the git repository at:
git://git.pokylinux.org/poky-contrib kangkai/dpkg-native
http://git.pokylinux.org/cgit.cgi/poky-contrib/log/?h=kangkai/dpkg-native
Kai Kang (1):
dpkg: fix include header caused compile error
.../dpkg/dpkg/fix-abs-redefine.patch | 40 ++++++++++++++++++++++
meta/recipes-devtools/dpkg/dpkg_1.17.1.bb | 1 +
2 files changed, 41 insertions(+)
create mode 100644 meta/recipes-devtools/dpkg/dpkg/fix-abs-redefine.patch
--
1.8.1.2
^ permalink raw reply [flat|nested] 2+ messages in thread
* [PATCH 1/1] dpkg: fix include header caused compile error
2013-08-13 9:57 [PATCH 0/1] Fix dpkg-native compile fail on Fedora 19 Kai Kang
@ 2013-08-13 9:57 ` Kai Kang
0 siblings, 0 replies; 2+ messages in thread
From: Kai Kang @ 2013-08-13 9:57 UTC (permalink / raw)
To: sgw; +Cc: Zhangle.Yang, openembedded-core
Build dpkg-native on Fedora 19, it fails with:
/usr/include/c++/4.8.1/cstdlib: In function ‘long long int std::abs(long long int)’:
/usr/include/c++/4.8.1/cstdlib:174:20: error: declaration of C function ‘long long int std::abs(long long int)’ conflicts with
abs(long long __x) { return __builtin_llabs (__x); }
^
/usr/include/c++/4.8.1/cstdlib:166:3: error: previous declaration ‘long int std::abs(long int)’ here
abs(long __i) { return __builtin_labs(__i); }
^
That because header cstdlib is included in a 'extern "C"' block that gcc
4.8 doesn't support. Fix it by move the header file out of the 'extern "C"'
block.
Signed-off-by: Kai Kang <kai.kang@windriver.com>
---
.../dpkg/dpkg/fix-abs-redefine.patch | 40 ++++++++++++++++++++++
meta/recipes-devtools/dpkg/dpkg_1.17.1.bb | 1 +
2 files changed, 41 insertions(+)
create mode 100644 meta/recipes-devtools/dpkg/dpkg/fix-abs-redefine.patch
diff --git a/meta/recipes-devtools/dpkg/dpkg/fix-abs-redefine.patch b/meta/recipes-devtools/dpkg/dpkg/fix-abs-redefine.patch
new file mode 100644
index 0000000..e73311c
--- /dev/null
+++ b/meta/recipes-devtools/dpkg/dpkg/fix-abs-redefine.patch
@@ -0,0 +1,40 @@
+Upstream-Status: Pending
+
+dpkg defines:
+#define DPKG_BEGIN_DECLS extern "C" {
+
+That makes header cstdlib included in a extern "C" block which is not supported
+by gcc 4.8. It fails on Fedora 19:
+
+/usr/include/c++/4.8.1/cstdlib: In function ‘long long int std::abs(long long int)’:
+/usr/include/c++/4.8.1/cstdlib:174:20: error: declaration of C function ‘long long int std::abs(long long int)’ conflicts with
+ abs(long long __x) { return __builtin_llabs (__x); }
+ ^
+/usr/include/c++/4.8.1/cstdlib:166:3: error: previous declaration ‘long int std::abs(long int)’ here
+ abs(long __i) { return __builtin_labs(__i); }
+ ^
+
+Move include gettext.h out of the extern "C" block to fix this issue.
+
+Signed-off-by: Kai Kang <kai.kang@windriver.com>
+
+--- dpkg-1.17.1/lib/dpkg/i18n.h.orig 2013-08-13 17:31:28.870935573 +0800
++++ dpkg-1.17.1/lib/dpkg/i18n.h 2013-08-13 17:31:37.893065249 +0800
+@@ -23,8 +23,6 @@
+
+ #include <dpkg/macros.h>
+
+-DPKG_BEGIN_DECLS
+-
+ /**
+ * @defgroup i18n Internationalization support
+ * @ingroup dpkg-internal
+@@ -33,6 +31,8 @@
+
+ #include <gettext.h>
+
++DPKG_BEGIN_DECLS
++
+ /* We need to include this because pgettext() uses LC_MESSAGES, but libintl.h
+ * which gets pulled by gettext.h only includes it if building optimized. */
+ #include <locale.h>
diff --git a/meta/recipes-devtools/dpkg/dpkg_1.17.1.bb b/meta/recipes-devtools/dpkg/dpkg_1.17.1.bb
index 9ac2aa7..01027a0 100644
--- a/meta/recipes-devtools/dpkg/dpkg_1.17.1.bb
+++ b/meta/recipes-devtools/dpkg/dpkg_1.17.1.bb
@@ -7,6 +7,7 @@ SRC_URI += "file://noman.patch \
file://preinst.patch \
file://fix-timestamps.patch \
file://remove-tar-no-timestamp.patch \
+ file://fix-abs-redefine.patch \
"
SRC_URI[md5sum] = "ece3ae87a099158c17bde95c0036c575"
--
1.8.1.2
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2013-08-13 9:58 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-08-13 9:57 [PATCH 0/1] Fix dpkg-native compile fail on Fedora 19 Kai Kang
2013-08-13 9:57 ` [PATCH 1/1] dpkg: fix include header caused compile error Kai Kang
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox