* [ptxdist] Some more Mac OS fixes @ 2012-05-07 20:03 Bernhard Walle 2012-05-07 20:03 ` [ptxdist] [PATCH 1/4] host-gettext: Add host-iconv dependency Bernhard Walle ` (3 more replies) 0 siblings, 4 replies; 11+ messages in thread From: Bernhard Walle @ 2012-05-07 20:03 UTC (permalink / raw) To: ptxdist The final goal was to build QEMU as host-tool in the OSELAS Generic SDK (a suggestion from Jürgen Beisert). QEMU uses glib, and when building this I stumbled over a few things which the patches fix. I'll send the final host-qemu patch to oselas@community.pengutronix.de. The patch series has been tested with Mac OS 10.7 and Arch Linux, as usual. -- ptxdist mailing list ptxdist@pengutronix.de ^ permalink raw reply [flat|nested] 11+ messages in thread
* [ptxdist] [PATCH 1/4] host-gettext: Add host-iconv dependency 2012-05-07 20:03 [ptxdist] Some more Mac OS fixes Bernhard Walle @ 2012-05-07 20:03 ` Bernhard Walle 2012-05-07 20:03 ` [ptxdist] [PATCH 2/4] rules/pre/Rules.make: Add DYLD_FALLBACK_LIBRARY_PATH for Darwin Bernhard Walle ` (2 subsequent siblings) 3 siblings, 0 replies; 11+ messages in thread From: Bernhard Walle @ 2012-05-07 20:03 UTC (permalink / raw) To: ptxdist host-iconv is needed when using msgfmt. While gettext builds fine without it, on Mac OS I get following error when compiling glib: ------------------------------------- 8< --------------------------- .../platform-versatilepb/sysroot-host/bin/msgfmt -o test.mo ./de.po; \ /Volumes/Daten/devel/ptxdist/bin/mkdir -p de/LC_MESSAGES; \ cp -f test.mo de/LC_MESSAGES dyld: lazy symbol binding failed: Symbol not found: _iconv_open ------------------------------------- >8 --------------------------- Signed-off-by: Bernhard Walle <bernhard@bwalle.de> --- platforms/hosttools.in | 1 + rules/host-gettext.in | 1 + 2 Dateien geändert, 2 Zeilen hinzugefügt(+) diff --git a/platforms/hosttools.in b/platforms/hosttools.in index 10d05e8..317237d 100644 --- a/platforms/hosttools.in +++ b/platforms/hosttools.in @@ -7,6 +7,7 @@ source "rules/host-dosfstools.in" source "rules/host-e2fsprogs.in" source "rules/host-genext2fs.in" source "rules/host-genpart.in" +source "rules/host-libiconv.in" source "rules/host-gettext.in" source "rules/host-libblkid.in" source "rules/host-libbz2.in" diff --git a/rules/host-gettext.in b/rules/host-gettext.in index ab899ab..dad5c28 100644 --- a/rules/host-gettext.in +++ b/rules/host-gettext.in @@ -3,6 +3,7 @@ config HOST_GETTEXT tristate default ALLYES + select HOST_LIBICONV help The gettext program translates a natural language message into the user's language, by looking up -- 1.7.10.1 -- ptxdist mailing list ptxdist@pengutronix.de ^ permalink raw reply [flat|nested] 11+ messages in thread
* [ptxdist] [PATCH 2/4] rules/pre/Rules.make: Add DYLD_FALLBACK_LIBRARY_PATH for Darwin 2012-05-07 20:03 [ptxdist] Some more Mac OS fixes Bernhard Walle 2012-05-07 20:03 ` [ptxdist] [PATCH 1/4] host-gettext: Add host-iconv dependency Bernhard Walle @ 2012-05-07 20:03 ` Bernhard Walle 2012-05-07 20:03 ` [ptxdist] [PATCH 3/4] host-glib: Add host-gettext dependency Bernhard Walle 2012-05-07 20:03 ` [ptxdist] [PATCH 4/4] " Bernhard Walle 3 siblings, 0 replies; 11+ messages in thread From: Bernhard Walle @ 2012-05-07 20:03 UTC (permalink / raw) To: ptxdist On Darwin (with Mach-O), rpath works different compared to ELF systems. It's not only sufficient to add -rpath to the linker (ld(1)) when compiling an application that requires a library (.dylib), but it's also necessary to add '@rpath' to the so-called "install path" when compiling a library. When compiling host-glib, the compiled programs are linked against libintl from the ptxdist sysroot-host. The compiled programs cannot be executed in that case. Setting DYLD_FALLBACK_LIBRARY_PATH fixed the problem. This environment variable is something like LD_LIBRARY_PATH on Linux. Signed-off-by: Bernhard Walle <bernhard@bwalle.de> --- rules/pre/Rules.make | 7 ++++++- 1 Datei geändert, 6 Zeilen hinzugefügt(+), 1 Zeile entfernt(-) diff --git a/rules/pre/Rules.make b/rules/pre/Rules.make index 1d09a18..522c90e 100644 --- a/rules/pre/Rules.make +++ b/rules/pre/Rules.make @@ -321,6 +321,10 @@ HOST_ENV_CXX := CXX="$(HOSTCXX)" HOST_ENV_CPPFLAGS := CPPFLAGS="$(HOST_CPPFLAGS)" HOST_ENV_LDFLAGS := LDFLAGS="$(HOST_LDFLAGS)" +ifeq ($(shell uname -s),Darwin) +HOST_ENV_LIBRARY_PATH := DYLD_FALLBACK_LIBRARY_PATH=$(PTXDIST_SYSROOT_HOST)/lib +endif + HOST_ENV_PKG_CONFIG := \ PKG_CONFIG_PATH="" \ PKG_CONFIG_LIBDIR="$(PTXDIST_SYSROOT_HOST)/lib/pkgconfig:$(PTXDIST_SYSROOT_HOST)/share/pkgconfig" @@ -335,7 +339,8 @@ HOST_ENV := \ $(HOST_ENV_CPPFLAGS) \ $(HOST_ENV_LDFLAGS) \ $(HOST_ENV_PKG_CONFIG) \ - $(HOST_ENV_PYTHONPATH) + $(HOST_ENV_PYTHONPATH) \ + $(HOST_ENV_LIBRARY_PATH) HOST_AUTOCONF := --prefix= -- 1.7.10.1 -- ptxdist mailing list ptxdist@pengutronix.de ^ permalink raw reply [flat|nested] 11+ messages in thread
* [ptxdist] [PATCH 3/4] host-glib: Add host-gettext dependency 2012-05-07 20:03 [ptxdist] Some more Mac OS fixes Bernhard Walle 2012-05-07 20:03 ` [ptxdist] [PATCH 1/4] host-gettext: Add host-iconv dependency Bernhard Walle 2012-05-07 20:03 ` [ptxdist] [PATCH 2/4] rules/pre/Rules.make: Add DYLD_FALLBACK_LIBRARY_PATH for Darwin Bernhard Walle @ 2012-05-07 20:03 ` Bernhard Walle 2012-05-30 7:19 ` Michael Olbrich 2012-05-07 20:03 ` [ptxdist] [PATCH 4/4] " Bernhard Walle 3 siblings, 1 reply; 11+ messages in thread From: Bernhard Walle @ 2012-05-07 20:03 UTC (permalink / raw) To: ptxdist We need gettext for glib. While gettext is present in glibc on Linux, this missing dependency was not discovered. On Mac OS, however, glib didn't compile. Signed-off-by: Bernhard Walle <bernhard@bwalle.de> --- rules/host-glib.in | 1 + 1 Datei geändert, 1 Zeile hinzugefügt(+) diff --git a/rules/host-glib.in b/rules/host-glib.in index e2c36ef..10096fd 100644 --- a/rules/host-glib.in +++ b/rules/host-glib.in @@ -8,5 +8,6 @@ config HOST_GLIB # header check in glib. # FIXME what to do if we build a target system without iconv? select HOST_LIBICONV + select HOST_GETTEXT select HOST_ZLIB select HOST_LIBFFI -- 1.7.10.1 -- ptxdist mailing list ptxdist@pengutronix.de ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [ptxdist] [PATCH 3/4] host-glib: Add host-gettext dependency 2012-05-07 20:03 ` [ptxdist] [PATCH 3/4] host-glib: Add host-gettext dependency Bernhard Walle @ 2012-05-30 7:19 ` Michael Olbrich 2012-06-10 9:30 ` [ptxdist] [PATCH 1/3] host-gettext: Fix build on Darwin Bernhard Walle 0 siblings, 1 reply; 11+ messages in thread From: Michael Olbrich @ 2012-05-30 7:19 UTC (permalink / raw) To: ptxdist On Mon, May 07, 2012 at 10:03:34PM +0200, Bernhard Walle wrote: > We need gettext for glib. While gettext is present in glibc on Linux, > this missing dependency was not discovered. On Mac OS, however, glib > didn't compile. > > Signed-off-by: Bernhard Walle <bernhard@bwalle.de> > --- > rules/host-glib.in | 1 + > 1 Datei geändert, 1 Zeile hinzugefügt(+) > > diff --git a/rules/host-glib.in b/rules/host-glib.in > index e2c36ef..10096fd 100644 > --- a/rules/host-glib.in > +++ b/rules/host-glib.in > @@ -8,5 +8,6 @@ config HOST_GLIB > # header check in glib. > # FIXME what to do if we build a target system without iconv? > select HOST_LIBICONV > + select HOST_GETTEXT There is a gettext-dummy package. Please make a host package for it and use it instead. mol > select HOST_ZLIB > select HOST_LIBFFI > -- > 1.7.10.1 > > > -- > ptxdist mailing list > ptxdist@pengutronix.de -- Pengutronix e.K. | | Industrial Linux Solutions | http://www.pengutronix.de/ | Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 | -- ptxdist mailing list ptxdist@pengutronix.de ^ permalink raw reply [flat|nested] 11+ messages in thread
* [ptxdist] [PATCH 1/3] host-gettext: Fix build on Darwin 2012-05-30 7:19 ` Michael Olbrich @ 2012-06-10 9:30 ` Bernhard Walle 2012-06-10 9:30 ` [ptxdist] [PATCH 2/3] Add host-gettext-dummy package Bernhard Walle ` (2 more replies) 0 siblings, 3 replies; 11+ messages in thread From: Bernhard Walle @ 2012-06-10 9:30 UTC (permalink / raw) To: ptxdist See the comments of the patches for a description. Signed-off-by: Bernhard Walle <bernhard@bwalle.de> --- ...-Fix-build-if-stpncpy-is-defined-as-macro.patch | 44 ++++++++++++++++++++ ...02-Fix-relocatable-installation-on-Darwin.patch | 44 ++++++++++++++++++++ patches/gettext-0.18.1/series | 5 +++ 3 Dateien geändert, 93 Zeilen hinzugefügt(+) create mode 100644 patches/gettext-0.18.1/0001-Fix-build-if-stpncpy-is-defined-as-macro.patch create mode 100644 patches/gettext-0.18.1/0002-Fix-relocatable-installation-on-Darwin.patch create mode 100644 patches/gettext-0.18.1/series diff --git a/patches/gettext-0.18.1/0001-Fix-build-if-stpncpy-is-defined-as-macro.patch b/patches/gettext-0.18.1/0001-Fix-build-if-stpncpy-is-defined-as-macro.patch new file mode 100644 index 0000000..e5c45a9 --- /dev/null +++ b/patches/gettext-0.18.1/0001-Fix-build-if-stpncpy-is-defined-as-macro.patch @@ -0,0 +1,44 @@ +From 1e2d81ef811df58db004191d21b2d5e15ef4cf0d Mon Sep 17 00:00:00 2001 +From: Bernhard Walle <bernhard@bwalle.de> +Date: Sat, 5 May 2012 10:16:16 +0200 +Subject: [PATCH] Fix build if stpncpy is defined as macro + +One such operating system where stpncpy is defined as macro is Mac OS X +(Darwin). + +The problem is already fixed with following commit in gnulib: + + commit c5728261c324a75f8d23dd7d10cb42dde9420227 + Author: Bruno Haible <bruno@clisp.org> + Date: Mon Aug 16 02:09:11 2010 +0200 + + stpncpy: Allow stpncpy to be defined as a macro. + +However, applying that patch involves re-running autotools. As they rely +on specific versions, this is a mess. This change is not nice but it +avoids that problems. + +Signed-off-by: Bernhard Walle <bernhard@bwalle.de> +--- + gettext-tools/gnulib-lib/stpncpy.c | 4 ++++ + 1 Datei geändert, 4 Zeilen hinzugefügt(+) + +diff --git a/gettext-tools/gnulib-lib/stpncpy.c b/gettext-tools/gnulib-lib/stpncpy.c +index ca53ebb..4ad6db5 100644 +--- a/gettext-tools/gnulib-lib/stpncpy.c ++++ b/gettext-tools/gnulib-lib/stpncpy.c +@@ -24,6 +24,8 @@ + /* Specification. */ + #include <string.h> + ++#ifndef stpncpy ++ + #ifndef weak_alias + # define __stpncpy stpncpy + #endif +@@ -90,3 +92,5 @@ __stpncpy (char *dest, const char *src, size_t n) + #ifdef weak_alias + weak_alias (__stpncpy, stpncpy) + #endif ++ ++#endif /* stpncpy */ diff --git a/patches/gettext-0.18.1/0002-Fix-relocatable-installation-on-Darwin.patch b/patches/gettext-0.18.1/0002-Fix-relocatable-installation-on-Darwin.patch new file mode 100644 index 0000000..289d030 --- /dev/null +++ b/patches/gettext-0.18.1/0002-Fix-relocatable-installation-on-Darwin.patch @@ -0,0 +1,44 @@ +From 5b6020579a18b0c81ad6a20ae87f9681e856151b Mon Sep 17 00:00:00 2001 +From: Bernhard Walle <bernhard@bwalle.de> +Date: Sun, 6 May 2012 20:32:56 +0200 +Subject: [PATCH] Fix relocatable installation on Darwin + +Without the patch, I get following error when installing host-gettext: + +----------------------------- 8< ------------------------------------ +.../platform-versatilepb/sysroot-host/include -g -O2 + -L..../platform-versatilepb/sysroot-host/lib + -Wl,-rpath -Wl,..../platform-versatilepb/sysroot-host/lib + -Wl,-rpath -Wl,/this/is/a/long/path/to/make/host/tools/relocateable/with/chrpath/when/using/dev/packages + -I../gnulib-lib -I../gnulib-lib -I.. -DHAVE_CONFIG_H -DIN_RELOCWRAPPER -DNO_XMALLOC -DINSTALLPREFIX="" + -DINSTALLDIR="/bin" -DLIBPATHVAR="DYLD_LIBRARY_PATH" -DLIBDIRS="/lib", -DEXEEXT="" ../gnulib-lib/relocwrapper.c + ../gnulib-lib/progname.c ../gnulib-lib/progreloc.c ../gnulib-lib/areadlink.c ../gnulib-lib/readlink.c + ../gnulib-lib/canonicalize-lgpl.c ../gnulib-lib/malloca.c ../gnulib-lib/relocatable.c + ../gnulib-lib/setenv.c ../gnulib-lib/strerror.c ../gnulib-lib/c-ctype.c + -o ..../packages/host-gettext-0.18.1/bin/gettext.wrapper +Undefined symbols for architecture x86_64: + "_rpl_stat", referenced from: + _rpl_readlink in ccx1kquY.o + "_rpl_lstat", referenced from: + _rpl_realpath in ccDavvkQ.o +ld: symbol(s) not found for architecture x86_64 +----------------------------- >8 ------------------------------------ + +Signed-off-by: Bernhard Walle <bernhard@bwalle.de> +--- + build-aux/install-reloc | 2 ++ + 1 Datei geändert, 2 Zeilen hinzugefügt(+) + +diff --git a/build-aux/install-reloc b/build-aux/install-reloc +index b5223a9..dd6fc51 100755 +--- a/build-aux/install-reloc ++++ b/build-aux/install-reloc +@@ -157,6 +157,8 @@ func_verbose $compile_command \ + "$srcdir"/progreloc.c \ + "$srcdir"/areadlink.c \ + "$srcdir"/readlink.c \ ++ "$srcdir"/stat.c \ ++ "$srcdir"/lstat.c \ + "$srcdir"/canonicalize-lgpl.c \ + "$srcdir"/malloca.c \ + "$srcdir"/relocatable.c \ diff --git a/patches/gettext-0.18.1/series b/patches/gettext-0.18.1/series new file mode 100644 index 0000000..206380e --- /dev/null +++ b/patches/gettext-0.18.1/series @@ -0,0 +1,5 @@ +# generated by git-ptx-patches +#tag:base --start-number 1 +0001-Fix-build-if-stpncpy-is-defined-as-macro.patch +0002-Fix-relocatable-installation-on-Darwin.patch +# 0dc9ec23506a7d86f04d8566cdf8d62c - git-ptx-patches magic -- 1.7.10.4 -- ptxdist mailing list ptxdist@pengutronix.de ^ permalink raw reply [flat|nested] 11+ messages in thread
* [ptxdist] [PATCH 2/3] Add host-gettext-dummy package 2012-06-10 9:30 ` [ptxdist] [PATCH 1/3] host-gettext: Fix build on Darwin Bernhard Walle @ 2012-06-10 9:30 ` Bernhard Walle 2012-06-10 9:30 ` [ptxdist] [PATCH 3/3] host-glib: Add host-gettext dependency Bernhard Walle 2012-06-13 22:50 ` [ptxdist] [PATCH 1/3] host-gettext: Fix build on Darwin Michael Olbrich 2 siblings, 0 replies; 11+ messages in thread From: Bernhard Walle @ 2012-06-10 9:30 UTC (permalink / raw) To: ptxdist Signed-off-by: Bernhard Walle <bernhard@bwalle.de> --- rules/host-gettext-dummy.in | 7 +++++++ rules/host-gettext-dummy.make | 25 +++++++++++++++++++++++++ 2 Dateien geändert, 32 Zeilen hinzugefügt(+) create mode 100644 rules/host-gettext-dummy.in create mode 100644 rules/host-gettext-dummy.make diff --git a/rules/host-gettext-dummy.in b/rules/host-gettext-dummy.in new file mode 100644 index 0000000..0362791 --- /dev/null +++ b/rules/host-gettext-dummy.in @@ -0,0 +1,7 @@ +## SECTION=hosttools_noprompt + +config HOST_GETTEXT_DUMMY + tristate + default ALLYES + help + This is a small do nothing replacement for the gettext monster diff --git a/rules/host-gettext-dummy.make b/rules/host-gettext-dummy.make new file mode 100644 index 0000000..00579ed --- /dev/null +++ b/rules/host-gettext-dummy.make @@ -0,0 +1,25 @@ +# -*-makefile-*- +# +# Copyright (C) 2012 by Bernhard Walle <bernhard@bwalle.de> +# +# See CREDITS for details about who has contributed to this project. +# +# For further information about the PTXdist project and license conditions +# see the README file. +# + +# +# We provide this package +# +HOST_PACKAGES-$(PTXCONF_HOST_GETTEXT_DUMMY) += host-gettext-dummy + +# ---------------------------------------------------------------------------- +# Prepare +# ---------------------------------------------------------------------------- + +# +# autoconf +# +HOST_GETTEXT_DUMMY_AUTOCONF := $(HOST_AUTOCONF) + +# vim: syntax=make -- 1.7.10.4 -- ptxdist mailing list ptxdist@pengutronix.de ^ permalink raw reply [flat|nested] 11+ messages in thread
* [ptxdist] [PATCH 3/3] host-glib: Add host-gettext dependency 2012-06-10 9:30 ` [ptxdist] [PATCH 1/3] host-gettext: Fix build on Darwin Bernhard Walle 2012-06-10 9:30 ` [ptxdist] [PATCH 2/3] Add host-gettext-dummy package Bernhard Walle @ 2012-06-10 9:30 ` Bernhard Walle 2012-06-13 22:50 ` Michael Olbrich 2012-06-13 22:50 ` [ptxdist] [PATCH 1/3] host-gettext: Fix build on Darwin Michael Olbrich 2 siblings, 1 reply; 11+ messages in thread From: Bernhard Walle @ 2012-06-10 9:30 UTC (permalink / raw) To: ptxdist We need a gettext implementation for glib. While gettext is present in glibc on Linux, this missing dependency was not discovered. On Mac OS, however, glib didn't compile. Signed-off-by: Bernhard Walle <bernhard@bwalle.de> --- rules/host-glib.in | 1 + 1 Datei geändert, 1 Zeile hinzugefügt(+) diff --git a/rules/host-glib.in b/rules/host-glib.in index e2c36ef..60d7e9e 100644 --- a/rules/host-glib.in +++ b/rules/host-glib.in @@ -8,5 +8,6 @@ config HOST_GLIB # header check in glib. # FIXME what to do if we build a target system without iconv? select HOST_LIBICONV + select HOST_GETTEXT_DUMMY select HOST_ZLIB select HOST_LIBFFI -- 1.7.10.4 -- ptxdist mailing list ptxdist@pengutronix.de ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [ptxdist] [PATCH 3/3] host-glib: Add host-gettext dependency 2012-06-10 9:30 ` [ptxdist] [PATCH 3/3] host-glib: Add host-gettext dependency Bernhard Walle @ 2012-06-13 22:50 ` Michael Olbrich 0 siblings, 0 replies; 11+ messages in thread From: Michael Olbrich @ 2012-06-13 22:50 UTC (permalink / raw) To: ptxdist On Sun, Jun 10, 2012 at 11:30:38AM +0200, Bernhard Walle wrote: > We need a gettext implementation for glib. While gettext is present in > glibc on Linux, this missing dependency was not discovered. On Mac OS, > however, glib didn't compile. Applied this and the previous patch. Michael > Signed-off-by: Bernhard Walle <bernhard@bwalle.de> > --- > rules/host-glib.in | 1 + > 1 Datei geändert, 1 Zeile hinzugefügt(+) > > diff --git a/rules/host-glib.in b/rules/host-glib.in > index e2c36ef..60d7e9e 100644 > --- a/rules/host-glib.in > +++ b/rules/host-glib.in > @@ -8,5 +8,6 @@ config HOST_GLIB > # header check in glib. > # FIXME what to do if we build a target system without iconv? > select HOST_LIBICONV > + select HOST_GETTEXT_DUMMY > select HOST_ZLIB > select HOST_LIBFFI > -- > 1.7.10.4 > > > -- > ptxdist mailing list > ptxdist@pengutronix.de -- Pengutronix e.K. | | Industrial Linux Solutions | http://www.pengutronix.de/ | Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 | -- ptxdist mailing list ptxdist@pengutronix.de ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [ptxdist] [PATCH 1/3] host-gettext: Fix build on Darwin 2012-06-10 9:30 ` [ptxdist] [PATCH 1/3] host-gettext: Fix build on Darwin Bernhard Walle 2012-06-10 9:30 ` [ptxdist] [PATCH 2/3] Add host-gettext-dummy package Bernhard Walle 2012-06-10 9:30 ` [ptxdist] [PATCH 3/3] host-glib: Add host-gettext dependency Bernhard Walle @ 2012-06-13 22:50 ` Michael Olbrich 2 siblings, 0 replies; 11+ messages in thread From: Michael Olbrich @ 2012-06-13 22:50 UTC (permalink / raw) To: ptxdist On Sun, Jun 10, 2012 at 11:30:36AM +0200, Bernhard Walle wrote: > See the comments of the patches for a description. > > Signed-off-by: Bernhard Walle <bernhard@bwalle.de> > --- > ...-Fix-build-if-stpncpy-is-defined-as-macro.patch | 44 ++++++++++++++++++++ > ...02-Fix-relocatable-installation-on-Darwin.patch | 44 ++++++++++++++++++++ > patches/gettext-0.18.1/series | 5 +++ > 3 Dateien geändert, 93 Zeilen hinzugefügt(+) > create mode 100644 patches/gettext-0.18.1/0001-Fix-build-if-stpncpy-is-defined-as-macro.patch > create mode 100644 patches/gettext-0.18.1/0002-Fix-relocatable-installation-on-Darwin.patch > create mode 100644 patches/gettext-0.18.1/series > > diff --git a/patches/gettext-0.18.1/0001-Fix-build-if-stpncpy-is-defined-as-macro.patch b/patches/gettext-0.18.1/0001-Fix-build-if-stpncpy-is-defined-as-macro.patch > new file mode 100644 > index 0000000..e5c45a9 > --- /dev/null > +++ b/patches/gettext-0.18.1/0001-Fix-build-if-stpncpy-is-defined-as-macro.patch > @@ -0,0 +1,44 @@ > +From 1e2d81ef811df58db004191d21b2d5e15ef4cf0d Mon Sep 17 00:00:00 2001 > +From: Bernhard Walle <bernhard@bwalle.de> > +Date: Sat, 5 May 2012 10:16:16 +0200 > +Subject: [PATCH] Fix build if stpncpy is defined as macro > + > +One such operating system where stpncpy is defined as macro is Mac OS X > +(Darwin). > + > +The problem is already fixed with following commit in gnulib: > + > + commit c5728261c324a75f8d23dd7d10cb42dde9420227 > + Author: Bruno Haible <bruno@clisp.org> > + Date: Mon Aug 16 02:09:11 2010 +0200 > + > + stpncpy: Allow stpncpy to be defined as a macro. > + > +However, applying that patch involves re-running autotools. As they rely > +on specific versions, this is a mess. This change is not nice but it > +avoids that problems. And from the bug tracker: "there will be a new minor gettext release soon". That was almost a year ago :-( > + > +Signed-off-by: Bernhard Walle <bernhard@bwalle.de> > +--- > + gettext-tools/gnulib-lib/stpncpy.c | 4 ++++ > + 1 Datei geändert, 4 Zeilen hinzugefügt(+) > + > +diff --git a/gettext-tools/gnulib-lib/stpncpy.c b/gettext-tools/gnulib-lib/stpncpy.c > +index ca53ebb..4ad6db5 100644 > +--- a/gettext-tools/gnulib-lib/stpncpy.c > ++++ b/gettext-tools/gnulib-lib/stpncpy.c > +@@ -24,6 +24,8 @@ > + /* Specification. */ > + #include <string.h> > + > ++#ifndef stpncpy > ++ > + #ifndef weak_alias > + # define __stpncpy stpncpy > + #endif > +@@ -90,3 +92,5 @@ __stpncpy (char *dest, const char *src, size_t n) > + #ifdef weak_alias > + weak_alias (__stpncpy, stpncpy) > + #endif > ++ > ++#endif /* stpncpy */ > diff --git a/patches/gettext-0.18.1/0002-Fix-relocatable-installation-on-Darwin.patch b/patches/gettext-0.18.1/0002-Fix-relocatable-installation-on-Darwin.patch > new file mode 100644 > index 0000000..289d030 > --- /dev/null > +++ b/patches/gettext-0.18.1/0002-Fix-relocatable-installation-on-Darwin.patch > @@ -0,0 +1,44 @@ > +From 5b6020579a18b0c81ad6a20ae87f9681e856151b Mon Sep 17 00:00:00 2001 > +From: Bernhard Walle <bernhard@bwalle.de> > +Date: Sun, 6 May 2012 20:32:56 +0200 > +Subject: [PATCH] Fix relocatable installation on Darwin > + > +Without the patch, I get following error when installing host-gettext: > + > +----------------------------- 8< ------------------------------------ > +.../platform-versatilepb/sysroot-host/include -g -O2 > + -L..../platform-versatilepb/sysroot-host/lib > + -Wl,-rpath -Wl,..../platform-versatilepb/sysroot-host/lib > + -Wl,-rpath -Wl,/this/is/a/long/path/to/make/host/tools/relocateable/with/chrpath/when/using/dev/packages > + -I../gnulib-lib -I../gnulib-lib -I.. -DHAVE_CONFIG_H -DIN_RELOCWRAPPER -DNO_XMALLOC -DINSTALLPREFIX="" > + -DINSTALLDIR="/bin" -DLIBPATHVAR="DYLD_LIBRARY_PATH" -DLIBDIRS="/lib", -DEXEEXT="" ../gnulib-lib/relocwrapper.c > + ../gnulib-lib/progname.c ../gnulib-lib/progreloc.c ../gnulib-lib/areadlink.c ../gnulib-lib/readlink.c > + ../gnulib-lib/canonicalize-lgpl.c ../gnulib-lib/malloca.c ../gnulib-lib/relocatable.c > + ../gnulib-lib/setenv.c ../gnulib-lib/strerror.c ../gnulib-lib/c-ctype.c > + -o ..../packages/host-gettext-0.18.1/bin/gettext.wrapper > +Undefined symbols for architecture x86_64: > + "_rpl_stat", referenced from: > + _rpl_readlink in ccx1kquY.o > + "_rpl_lstat", referenced from: > + _rpl_realpath in ccDavvkQ.o > +ld: symbol(s) not found for architecture x86_64 > +----------------------------- >8 ------------------------------------ > + > +Signed-off-by: Bernhard Walle <bernhard@bwalle.de> > +--- > + build-aux/install-reloc | 2 ++ > + 1 Datei geändert, 2 Zeilen hinzugefügt(+) > + > +diff --git a/build-aux/install-reloc b/build-aux/install-reloc > +index b5223a9..dd6fc51 100755 > +--- a/build-aux/install-reloc > ++++ b/build-aux/install-reloc > +@@ -157,6 +157,8 @@ func_verbose $compile_command \ > + "$srcdir"/progreloc.c \ > + "$srcdir"/areadlink.c \ > + "$srcdir"/readlink.c \ > ++ "$srcdir"/stat.c \ > ++ "$srcdir"/lstat.c \ Hmmm, I don't really like this. 'install-reloc' is a generated file. It seems this works here because these functions are only used for some workaround. Have you tried building gettext outside ptxdist? I've not seen any other bug reports this. Maybe we confuse the build system somewhere. Michael > + "$srcdir"/canonicalize-lgpl.c \ > + "$srcdir"/malloca.c \ > + "$srcdir"/relocatable.c \ > diff --git a/patches/gettext-0.18.1/series b/patches/gettext-0.18.1/series > new file mode 100644 > index 0000000..206380e > --- /dev/null > +++ b/patches/gettext-0.18.1/series > @@ -0,0 +1,5 @@ > +# generated by git-ptx-patches > +#tag:base --start-number 1 > +0001-Fix-build-if-stpncpy-is-defined-as-macro.patch > +0002-Fix-relocatable-installation-on-Darwin.patch > +# 0dc9ec23506a7d86f04d8566cdf8d62c - git-ptx-patches magic > -- > 1.7.10.4 > > > -- > ptxdist mailing list > ptxdist@pengutronix.de -- Pengutronix e.K. | | Industrial Linux Solutions | http://www.pengutronix.de/ | Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 | -- ptxdist mailing list ptxdist@pengutronix.de ^ permalink raw reply [flat|nested] 11+ messages in thread
* [ptxdist] [PATCH 4/4] host-gettext: Fix build on Darwin 2012-05-07 20:03 [ptxdist] Some more Mac OS fixes Bernhard Walle ` (2 preceding siblings ...) 2012-05-07 20:03 ` [ptxdist] [PATCH 3/4] host-glib: Add host-gettext dependency Bernhard Walle @ 2012-05-07 20:03 ` Bernhard Walle 3 siblings, 0 replies; 11+ messages in thread From: Bernhard Walle @ 2012-05-07 20:03 UTC (permalink / raw) To: ptxdist See the comments of the patches for a description. Signed-off-by: Bernhard Walle <bernhard@bwalle.de> --- ...-Fix-build-if-stpncpy-is-defined-as-macro.patch | 44 ++++++++++++++++++++ ...02-Fix-relocatable-installation-on-Darwin.patch | 44 ++++++++++++++++++++ patches/gettext-0.18.1/series | 5 +++ 3 Dateien geändert, 93 Zeilen hinzugefügt(+) create mode 100644 patches/gettext-0.18.1/0001-Fix-build-if-stpncpy-is-defined-as-macro.patch create mode 100644 patches/gettext-0.18.1/0002-Fix-relocatable-installation-on-Darwin.patch create mode 100644 patches/gettext-0.18.1/series diff --git a/patches/gettext-0.18.1/0001-Fix-build-if-stpncpy-is-defined-as-macro.patch b/patches/gettext-0.18.1/0001-Fix-build-if-stpncpy-is-defined-as-macro.patch new file mode 100644 index 0000000..e5c45a9 --- /dev/null +++ b/patches/gettext-0.18.1/0001-Fix-build-if-stpncpy-is-defined-as-macro.patch @@ -0,0 +1,44 @@ +From 1e2d81ef811df58db004191d21b2d5e15ef4cf0d Mon Sep 17 00:00:00 2001 +From: Bernhard Walle <bernhard@bwalle.de> +Date: Sat, 5 May 2012 10:16:16 +0200 +Subject: [PATCH] Fix build if stpncpy is defined as macro + +One such operating system where stpncpy is defined as macro is Mac OS X +(Darwin). + +The problem is already fixed with following commit in gnulib: + + commit c5728261c324a75f8d23dd7d10cb42dde9420227 + Author: Bruno Haible <bruno@clisp.org> + Date: Mon Aug 16 02:09:11 2010 +0200 + + stpncpy: Allow stpncpy to be defined as a macro. + +However, applying that patch involves re-running autotools. As they rely +on specific versions, this is a mess. This change is not nice but it +avoids that problems. + +Signed-off-by: Bernhard Walle <bernhard@bwalle.de> +--- + gettext-tools/gnulib-lib/stpncpy.c | 4 ++++ + 1 Datei geändert, 4 Zeilen hinzugefügt(+) + +diff --git a/gettext-tools/gnulib-lib/stpncpy.c b/gettext-tools/gnulib-lib/stpncpy.c +index ca53ebb..4ad6db5 100644 +--- a/gettext-tools/gnulib-lib/stpncpy.c ++++ b/gettext-tools/gnulib-lib/stpncpy.c +@@ -24,6 +24,8 @@ + /* Specification. */ + #include <string.h> + ++#ifndef stpncpy ++ + #ifndef weak_alias + # define __stpncpy stpncpy + #endif +@@ -90,3 +92,5 @@ __stpncpy (char *dest, const char *src, size_t n) + #ifdef weak_alias + weak_alias (__stpncpy, stpncpy) + #endif ++ ++#endif /* stpncpy */ diff --git a/patches/gettext-0.18.1/0002-Fix-relocatable-installation-on-Darwin.patch b/patches/gettext-0.18.1/0002-Fix-relocatable-installation-on-Darwin.patch new file mode 100644 index 0000000..289d030 --- /dev/null +++ b/patches/gettext-0.18.1/0002-Fix-relocatable-installation-on-Darwin.patch @@ -0,0 +1,44 @@ +From 5b6020579a18b0c81ad6a20ae87f9681e856151b Mon Sep 17 00:00:00 2001 +From: Bernhard Walle <bernhard@bwalle.de> +Date: Sun, 6 May 2012 20:32:56 +0200 +Subject: [PATCH] Fix relocatable installation on Darwin + +Without the patch, I get following error when installing host-gettext: + +----------------------------- 8< ------------------------------------ +.../platform-versatilepb/sysroot-host/include -g -O2 + -L..../platform-versatilepb/sysroot-host/lib + -Wl,-rpath -Wl,..../platform-versatilepb/sysroot-host/lib + -Wl,-rpath -Wl,/this/is/a/long/path/to/make/host/tools/relocateable/with/chrpath/when/using/dev/packages + -I../gnulib-lib -I../gnulib-lib -I.. -DHAVE_CONFIG_H -DIN_RELOCWRAPPER -DNO_XMALLOC -DINSTALLPREFIX="" + -DINSTALLDIR="/bin" -DLIBPATHVAR="DYLD_LIBRARY_PATH" -DLIBDIRS="/lib", -DEXEEXT="" ../gnulib-lib/relocwrapper.c + ../gnulib-lib/progname.c ../gnulib-lib/progreloc.c ../gnulib-lib/areadlink.c ../gnulib-lib/readlink.c + ../gnulib-lib/canonicalize-lgpl.c ../gnulib-lib/malloca.c ../gnulib-lib/relocatable.c + ../gnulib-lib/setenv.c ../gnulib-lib/strerror.c ../gnulib-lib/c-ctype.c + -o ..../packages/host-gettext-0.18.1/bin/gettext.wrapper +Undefined symbols for architecture x86_64: + "_rpl_stat", referenced from: + _rpl_readlink in ccx1kquY.o + "_rpl_lstat", referenced from: + _rpl_realpath in ccDavvkQ.o +ld: symbol(s) not found for architecture x86_64 +----------------------------- >8 ------------------------------------ + +Signed-off-by: Bernhard Walle <bernhard@bwalle.de> +--- + build-aux/install-reloc | 2 ++ + 1 Datei geändert, 2 Zeilen hinzugefügt(+) + +diff --git a/build-aux/install-reloc b/build-aux/install-reloc +index b5223a9..dd6fc51 100755 +--- a/build-aux/install-reloc ++++ b/build-aux/install-reloc +@@ -157,6 +157,8 @@ func_verbose $compile_command \ + "$srcdir"/progreloc.c \ + "$srcdir"/areadlink.c \ + "$srcdir"/readlink.c \ ++ "$srcdir"/stat.c \ ++ "$srcdir"/lstat.c \ + "$srcdir"/canonicalize-lgpl.c \ + "$srcdir"/malloca.c \ + "$srcdir"/relocatable.c \ diff --git a/patches/gettext-0.18.1/series b/patches/gettext-0.18.1/series new file mode 100644 index 0000000..206380e --- /dev/null +++ b/patches/gettext-0.18.1/series @@ -0,0 +1,5 @@ +# generated by git-ptx-patches +#tag:base --start-number 1 +0001-Fix-build-if-stpncpy-is-defined-as-macro.patch +0002-Fix-relocatable-installation-on-Darwin.patch +# 0dc9ec23506a7d86f04d8566cdf8d62c - git-ptx-patches magic -- 1.7.10.1 -- ptxdist mailing list ptxdist@pengutronix.de ^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2012-06-13 22:50 UTC | newest] Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2012-05-07 20:03 [ptxdist] Some more Mac OS fixes Bernhard Walle 2012-05-07 20:03 ` [ptxdist] [PATCH 1/4] host-gettext: Add host-iconv dependency Bernhard Walle 2012-05-07 20:03 ` [ptxdist] [PATCH 2/4] rules/pre/Rules.make: Add DYLD_FALLBACK_LIBRARY_PATH for Darwin Bernhard Walle 2012-05-07 20:03 ` [ptxdist] [PATCH 3/4] host-glib: Add host-gettext dependency Bernhard Walle 2012-05-30 7:19 ` Michael Olbrich 2012-06-10 9:30 ` [ptxdist] [PATCH 1/3] host-gettext: Fix build on Darwin Bernhard Walle 2012-06-10 9:30 ` [ptxdist] [PATCH 2/3] Add host-gettext-dummy package Bernhard Walle 2012-06-10 9:30 ` [ptxdist] [PATCH 3/3] host-glib: Add host-gettext dependency Bernhard Walle 2012-06-13 22:50 ` Michael Olbrich 2012-06-13 22:50 ` [ptxdist] [PATCH 1/3] host-gettext: Fix build on Darwin Michael Olbrich 2012-05-07 20:03 ` [ptxdist] [PATCH 4/4] " Bernhard Walle
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox