threads / patch / 40856

v7, 2 partsconfig.mak.uname: Darwin: define NO_GETTEXT for OS X 10.9 and later

Subject: [PATCH v7 1/2] config.mak.uname: Darwin: define NO_GETTEXT for OS X 10.9 and later

## tl;dr

7 messages between Nov 23, 2015 and Nov 24, 2015. Diffs are folded; open one to read it.

replies: 6people: 3as markdown or json

larsxschneider@gmail.com· Nov 23, 2015, 08:25 UTC · lore

[PATCH v7 0/2] Add Travis CI support

From: Lars Schneider <larsxschneider@gmail.com>
diff to v6 (thanks Peff for the review):
* removed sub topics "de-flaking test_must_fail" and "p4 test improvements"
  as suggested by Peff
* fixed Perforce spelling
* disabled t9810 and t9816 in .travis.yml as they are instable
* removed commented flags in .travis.yml
* removed GETTEXT_* flags in .travis.yml
* removed NO_* build configration in .travis.yml
* removed autoconf usage
* fixed OS X 10.9 build and later with NO_GETTEXT flag
* added cflags "-Wall -Werror" to detect all kinds of warnings (see [1])
* updated Git-LFS and P4D to the latest version

Cheers, Lars

[1] http://thread.gmane.org/gmane.comp.version-control.git/281140
Lars Schneider (2):
  config.mak.uname: Darwin: define NO_GETTEXT for OS X 10.9 and later
  Add Travis CI support
 .travis.yml      | 90 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 config.mak.uname |  5 ++++
 2 files changed, 95 insertions(+)
 create mode 100644 .travis.yml

-- 2.5.1

larsxschneider@gmail.com· Nov 23, 2015, 08:25 UTC · re: larsxschneider@gmail.com · lore
From: Lars Schneider <larsxschneider@gmail.com>

At least since OS X 10.9 Mavericks "libintl.h" is not available on OS X anymore. Disable the support with the NO_GETTEXT flag.

Signed-off-by: Lars Schneider <larsxschneider@gmail.com>
---
 config.mak.uname | 5 +++++
 1 file changed, 5 insertions(+)
Show changes to config.mak.uname +5 −0
diff --git a/config.mak.uname b/config.mak.uname
index f34dcaa..f3d98bb 100644
--- a/config.mak.uname
+++ b/config.mak.uname
@@ -102,9 +102,14 @@ ifeq ($(uname_S),Darwin)
 	ifeq ($(shell expr "$(uname_R)" : '[15]\.'),2)
 		NO_STRLCPY = YesPlease
 	endif
+	# MacOS 10.7 Lion and higher
 	ifeq ($(shell test "`expr "$(uname_R)" : '\([0-9][0-9]*\)\.'`" -ge 11 && echo 1),1)
 		HAVE_GETDELIM = YesPlease
 	endif
+	# MacOS 10.9 Mavericks and higher
+	ifeq ($(shell test "`expr "$(uname_R)" : '\([0-9][0-9]*\)\.'`" -ge 13 && echo 1),1)
+		NO_GETTEXT = YesPlease
+	endif
 	NO_MEMMEM = YesPlease
 	USE_ST_TIMESPEC = YesPlease
 	HAVE_DEV_TTY = YesPlease
-- 
2.5.1
Torsten Bögershausen· Nov 23, 2015, 11:57 UTC · re: larsxschneider@gmail.com · lore

Re: [PATCH v7 1/2] config.mak.uname: Darwin: define NO_GETTEXT for OS X 10.9 and later

On 11/23/2015 09:25 AM, larsxschneider@gmail.com wrote:
Show 29 quoted lines
> From: Lars Schneider <larsxschneider@gmail.com>
>
> At least since OS X 10.9 Mavericks "libintl.h" is not available on OS X
> anymore. Disable the support with the NO_GETTEXT flag.
>
> Signed-off-by: Lars Schneider <larsxschneider@gmail.com>
> ---
>   config.mak.uname | 5 +++++
>   1 file changed, 5 insertions(+)
>
> diff --git a/config.mak.uname b/config.mak.uname
> index f34dcaa..f3d98bb 100644
> --- a/config.mak.uname
> +++ b/config.mak.uname
> @@ -102,9 +102,14 @@ ifeq ($(uname_S),Darwin)
>   	ifeq ($(shell expr "$(uname_R)" : '[15]\.'),2)
>   		NO_STRLCPY = YesPlease
>   	endif
> +	# MacOS 10.7 Lion and higher
>   	ifeq ($(shell test "`expr "$(uname_R)" : '\([0-9][0-9]*\)\.'`" -ge 11 && echo 1),1)
>   		HAVE_GETDELIM = YesPlease
>   	endif
> +	# MacOS 10.9 Mavericks and higher
> +	ifeq ($(shell test "`expr "$(uname_R)" : '\([0-9][0-9]*\)\.'`" -ge 13 && echo 1),1)
> +		NO_GETTEXT = YesPlease
> +	endif
>   	NO_MEMMEM = YesPlease
>   	USE_ST_TIMESPEC = YesPlease
>   	HAVE_DEV_TTY = YesPlease

Unless I'm wrong, no Mac OS X had libintl.h, and the "unwritten agreement (?)" was that either a) libintl ist installed in some way (fink, mac ports, brew, other ways) or b) people use NO_GETTEXT=yes make

Doesn't this patch close the door for b), making it impossible to build Git against libintl ? A better test may if libintl is installed may help, or better documentation.

Jeff King· Nov 24, 2015, 20:34 UTC · re: Torsten Bögershausen · lore

Re: [PATCH v7 1/2] config.mak.uname: Darwin: define NO_GETTEXT for OS X 10.9 and later

On Mon, Nov 23, 2015 at 12:57:12PM +0100, Torsten Bögershausen wrote:
Show 21 quoted lines
> >+	# MacOS 10.7 Lion and higher
> >  	ifeq ($(shell test "`expr "$(uname_R)" : '\([0-9][0-9]*\)\.'`" -ge 11 && echo 1),1)
> >  		HAVE_GETDELIM = YesPlease
> >  	endif
> >+	# MacOS 10.9 Mavericks and higher
> >+	ifeq ($(shell test "`expr "$(uname_R)" : '\([0-9][0-9]*\)\.'`" -ge 13 && echo 1),1)
> >+		NO_GETTEXT = YesPlease
> >+	endif
> >  	NO_MEMMEM = YesPlease
> >  	USE_ST_TIMESPEC = YesPlease
> >  	HAVE_DEV_TTY = YesPlease
> Unless I'm wrong, no Mac OS X had libintl.h, and the "unwritten agreement
> (?)" was
> that either
> a) libintl ist installed in some way (fink, mac ports, brew, other ways)
> or
> b) people use
> NO_GETTEXT=yes make
> 
> Doesn't this patch close the door for b), making it impossible to build Git
> against libintl ?
I think the right way to do (b) is:
  make NO_GETTEXT=Yes

which will override anything we do in config.mak.uname (and likewise, anything from autoconf will override it, if we have a test there).

Still, it will be a surprise to packagers in (a), who assume that installing libintl and then building git is enough to have gettext support (now they would actively need to override NO_GETTEXT).

-Peff
larsxschneider@gmail.com· Nov 23, 2015, 08:25 UTC · re: larsxschneider@gmail.com · lore

[PATCH v7 2/2] Add Travis CI support

From: Lars Schneider <larsxschneider@gmail.com>

The tests are currently executed on "Ubuntu 12.04 LTS Server Edition 64 bit" and on "OS X Mavericks" using gcc and clang.

Perforce and Git-LFS are installed and therefore available for the respective tests.

Signed-off-by: Lars Schneider <larsxschneider@gmail.com>
---
 .travis.yml | 90 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 90 insertions(+)
 create mode 100644 .travis.yml
Show changes to .travis.yml +90 −0
diff --git a/.travis.yml b/.travis.yml
new file mode 100644
index 0000000..1c3fa06
--- /dev/null
+++ b/.travis.yml
@@ -0,0 +1,90 @@
+language: c
+
+os:
+  - linux
+  - osx
+
+compiler:
+  - clang
+  - gcc
+
+addons:
+  apt:
+    packages:
+    - language-pack-is
+
+env:
+  global:
+    - P4_VERSION="15.4"
+    - GIT_LFS_VERSION="1.1.0"
+    - DEFAULT_TEST_TARGET=prove
+    - GIT_PROVE_OPTS="--timer --jobs 3"
+    - GIT_TEST_OPTS="--verbose --tee"
+    - CFLAGS="-g -O2 -Wall -Werror"
+    - GIT_TEST_CLONE_2GB=YesPlease
+    # t9810 occasionally fails on Travis CI OS X
+    # t9816 occasionally fails with "TAP out of sequence errors" on Travis CI OS X
+    - GIT_SKIP_TESTS="t9810 t9816"
+
+before_install:
+  - >
+    case "${TRAVIS_OS_NAME:-linux}" in
+    linux)
+      mkdir --parents custom/p4
+      pushd custom/p4
+        wget --quiet http://filehost.perforce.com/perforce/r$P4_VERSION/bin.linux26x86_64/p4d
+        wget --quiet http://filehost.perforce.com/perforce/r$P4_VERSION/bin.linux26x86_64/p4
+        chmod u+x p4d
+        chmod u+x p4
+        export PATH="$(pwd):$PATH"
+      popd
+      mkdir --parents custom/git-lfs
+      pushd custom/git-lfs
+        wget --quiet https://github.com/github/git-lfs/releases/download/v$GIT_LFS_VERSION/git-lfs-linux-amd64-$GIT_LFS_VERSION.tar.gz
+        tar --extract --gunzip --file "git-lfs-linux-amd64-$GIT_LFS_VERSION.tar.gz"
+        cp git-lfs-$GIT_LFS_VERSION/git-lfs .
+        export PATH="$(pwd):$PATH"
+      popd
+      ;;
+    osx)
+      brew_force_set_latest_binary_hash () {
+        FORMULA=$1
+        SHA=$(brew fetch --force $FORMULA 2>&1 | grep ^SHA256: | cut -d ' ' -f 2)
+        sed -E -i.bak "s/sha256 \"[0-9a-f]{64}\"/sha256 \"$SHA\"/g" \
+          /usr/local/Library/Taps/homebrew/homebrew-binary/$FORMULA.rb
+      }
+      brew update --quiet
+      brew tap homebrew/binary --quiet
+      brew_force_set_latest_binary_hash perforce
+      brew_force_set_latest_binary_hash perforce-server
+      brew install git-lfs perforce-server perforce
+      ;;
+    esac;
+    echo "$(tput setaf 6)Perforce Server Version$(tput sgr0)";
+    p4d -V | grep Rev.;
+    echo "$(tput setaf 6)Perforce Client Version$(tput sgr0)";
+    p4 -V | grep Rev.;
+    echo "$(tput setaf 6)Git-LFS Version$(tput sgr0)";
+    git-lfs version;
+
+before_script: make --jobs=2
+
+script: make --quiet test
+
+after_failure:
+  - >
+    : '<-- Click here to see detailed test output!                                                        ';
+    for TEST_EXIT in t/test-results/*.exit;
+    do
+      if [ "$(cat "$TEST_EXIT")" != "0" ];
+      then
+        TEST_OUT="${TEST_EXIT%exit}out";
+        echo "------------------------------------------------------------------------";
+        echo "$(tput setaf 1)${TEST_OUT}...$(tput sgr0)";
+        echo "------------------------------------------------------------------------";
+        cat "${TEST_OUT}";
+      fi;
+    done;
+
+notifications:
+  email: false
-- 
2.5.1
Jeff King· Nov 24, 2015, 20:40 UTC · re: larsxschneider@gmail.com · lore

Re: [PATCH v7 2/2] Add Travis CI support

On Mon, Nov 23, 2015 at 09:25:08AM +0100, larsxschneider@gmail.com wrote:
Show 7 quoted lines
> From: Lars Schneider <larsxschneider@gmail.com>
> 
> The tests are currently executed on "Ubuntu 12.04 LTS Server Edition
> 64 bit" and on "OS X Mavericks" using gcc and clang.
> 
> Perforce and Git-LFS are installed and therefore available for the
> respective tests.
Thanks, I find this one a little easier to digest.

I'm iffy on the NO_GETTEXT change from patch 1. I had hoped we could just build out of the box everywhere, but I think the "do we have libintl" decision is a hard one. Most people _do_ have it and want it, but it sounds like the Travis environment does not. So maybe it is a place where it is worth doing the tweak inside travis.yml and leaving the stock build alone.

-Peff
Lars Schneider· Nov 24, 2015, 21:03 UTC · re: Jeff King · lore

Re: [PATCH v7 2/2] Add Travis CI support

Show 20 quoted lines
> On 24 Nov 2015, at 21:40, Jeff King <peff@peff.net> wrote:
> 
> On Mon, Nov 23, 2015 at 09:25:08AM +0100, larsxschneider@gmail.com wrote:
> 
>> From: Lars Schneider <larsxschneider@gmail.com>
>> 
>> The tests are currently executed on "Ubuntu 12.04 LTS Server Edition
>> 64 bit" and on "OS X Mavericks" using gcc and clang.
>> 
>> Perforce and Git-LFS are installed and therefore available for the
>> respective tests.
> 
> Thanks, I find this one a little easier to digest.
> 
> I'm iffy on the NO_GETTEXT change from patch 1. I had hoped we could
> just build out of the box everywhere, but I think the "do we have
> libintl" decision is a hard one. Most people _do_ have it and want it,
> but it sounds like the Travis environment does not. So maybe it is a
> place where it is worth doing the tweak inside travis.yml and leaving
> the stock build alone.
OK, I'll try to fix it in the next roll.

Thanks, Lars

← back to recent threads