From: Michael Olbrich <m.olbrich@pengutronix.de>
To: ptxdist@pengutronix.de
Subject: Re: [ptxdist] [PATCH 1/3] host-gettext: Fix build on Darwin
Date: Thu, 14 Jun 2012 00:50:27 +0200 [thread overview]
Message-ID: <20120613225027.GB14446@pengutronix.de> (raw)
In-Reply-To: <1339320638-1534-1-git-send-email-bernhard@bwalle.de>
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
next prev parent reply other threads:[~2012-06-13 22:50 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
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 ` Michael Olbrich [this message]
2012-05-07 20:03 ` [ptxdist] [PATCH 4/4] host-gettext: Fix build on Darwin Bernhard Walle
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20120613225027.GB14446@pengutronix.de \
--to=m.olbrich@pengutronix.de \
--cc=ptxdist@pengutronix.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox