-
-
Notifications
You must be signed in to change notification settings - Fork 143
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Python's configure searches for a usable libintl, which is provided by gettext. If you have a libintl shared library on your system, configure will pick it up and add a dynamic library dependency on it, making binaries non-portable. To work around this, we build gettext from source and have Python statically link against its libintl. The configure workaround feels a bit shady to me. I'm not sure why the test program finding the textdomain symbol fails to build. But we can link against libintl.a and Python functions calling into it seem to work. So who knows.
- Loading branch information
Showing
5 changed files
with
76 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
#!/usr/bin/env bash | ||
# This Source Code Form is subject to the terms of the Mozilla Public | ||
# License, v. 2.0. If a copy of the MPL was not distributed with this | ||
# file, You can obtain one at https://mozilla.org/MPL/2.0/. | ||
|
||
set -ex | ||
|
||
ROOT=`pwd` | ||
|
||
export PATH=${TOOLS_PATH}/${TOOLCHAIN}/bin:${TOOLS_PATH}/host/bin:$PATH | ||
|
||
tar -xf gettext-${GETTEXT_VERSION}.tar.gz | ||
|
||
pushd gettext-${GETTEXT_VERSION} | ||
|
||
# If libunistring exists on the system, it can get picked up and introduce | ||
# an added dependency. So we force use of the bundled version. | ||
CLFAGS="${EXTRA_TARGET_CFLAGS} -fPIC" CPPFLAGS="${EXTRA_TARGET_CFLAGS} -fPIC" ./configure \ | ||
--build=${BUILD_TRIPLE} \ | ||
--target=${TARGET_TRIPLE} \ | ||
--prefix=/tools/deps \ | ||
--disable-shared \ | ||
--disable-java \ | ||
--disable-dependency-tracking \ | ||
--with-included-libcroco \ | ||
--with-included-gettext \ | ||
--with-included-glib \ | ||
--with-included-libunistring \ | ||
--with-included-libxml \ | ||
--without-libiconv-prefix \ | ||
--without-libintl-prefix \ | ||
--without-libncurses-prefix \ | ||
--without-libtermcap-prefix \ | ||
--without-libxcurses-prefix \ | ||
--without-libcurses-prefix \ | ||
--without-libtextstyle-prefix \ | ||
--without-libunistring-prefix \ | ||
--without-libxml2-prefix \ | ||
--without-git | ||
|
||
make -j ${NUM_CPUS} | ||
make -j ${NUM_CPUS} install DESTDIR=${ROOT}/out |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters