* [PATCH] Undefine strlcpy if needed.
@ 2014-08-24 4:32 Benoit Sigoure
2014-08-24 4:35 ` Benoit Sigoure
0 siblings, 1 reply; 10+ messages in thread
From: Benoit Sigoure @ 2014-08-24 4:32 UTC (permalink / raw)
To: git; +Cc: Benoit Sigoure
On OS X, strlcpy is already #define'd, which causes warnings
in all the files that include `git-compat-util.h'. Note that
this only occurs when building without running ./configure.
---
git-compat-util.h | 3 +++
1 file changed, 3 insertions(+)
diff --git a/git-compat-util.h b/git-compat-util.h
index f587749..8c001e2 100644
--- a/git-compat-util.h
+++ b/git-compat-util.h
@@ -495,6 +495,9 @@ extern char *gitstrcasestr(const char *haystack, const char *needle);
#endif
#ifdef NO_STRLCPY
+#ifdef strlcpy
+#undef strlcpy
+#endif
#define strlcpy gitstrlcpy
extern size_t gitstrlcpy(char *, const char *, size_t);
#endif
--
1.9.2.460.gfb82504
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [PATCH] Undefine strlcpy if needed.
2014-08-24 4:32 [PATCH] Undefine strlcpy if needed Benoit Sigoure
@ 2014-08-24 4:35 ` Benoit Sigoure
2014-08-24 11:10 ` Ramsay Jones
0 siblings, 1 reply; 10+ messages in thread
From: Benoit Sigoure @ 2014-08-24 4:35 UTC (permalink / raw)
To: git; +Cc: Benoit Sigoure
On OS X, strlcpy is already #define'd, which causes warnings
in all the files that include `git-compat-util.h'. Note that
this only occurs when building without running ./configure.
Signed-off-by: Benoit Sigoure <tsunanet@gmail.com>
---
Resending with the SOB line I forgot.
git-compat-util.h | 3 +++
1 file changed, 3 insertions(+)
diff --git a/git-compat-util.h b/git-compat-util.h
index f587749..8c001e2 100644
--- a/git-compat-util.h
+++ b/git-compat-util.h
@@ -495,6 +495,9 @@ extern char *gitstrcasestr(const char *haystack, const char *needle);
#endif
#ifdef NO_STRLCPY
+#ifdef strlcpy
+#undef strlcpy
+#endif
#define strlcpy gitstrlcpy
extern size_t gitstrlcpy(char *, const char *, size_t);
#endif
--
1.9.2.460.gfb82504
^ permalink raw reply related [flat|nested] 10+ messages in thread
* Re: [PATCH] Undefine strlcpy if needed.
2014-08-24 4:35 ` Benoit Sigoure
@ 2014-08-24 11:10 ` Ramsay Jones
2014-08-24 11:13 ` tsuna
0 siblings, 1 reply; 10+ messages in thread
From: Ramsay Jones @ 2014-08-24 11:10 UTC (permalink / raw)
To: Benoit Sigoure, git
On 24/08/14 05:35, Benoit Sigoure wrote:
> On OS X, strlcpy is already #define'd, which causes warnings
> in all the files that include `git-compat-util.h'. Note that
> this only occurs when building without running ./configure.
>
> Signed-off-by: Benoit Sigoure <tsunanet@gmail.com>
> ---
>
> Resending with the SOB line I forgot.
>
> git-compat-util.h | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/git-compat-util.h b/git-compat-util.h
> index f587749..8c001e2 100644
> --- a/git-compat-util.h
> +++ b/git-compat-util.h
> @@ -495,6 +495,9 @@ extern char *gitstrcasestr(const char *haystack, const char *needle);
> #endif
>
> #ifdef NO_STRLCPY
> +#ifdef strlcpy
> +#undef strlcpy
> +#endif
If strlcpy is #defined, then presumably NO_STRLCPY should not be set, no?
> #define strlcpy gitstrlcpy
> extern size_t gitstrlcpy(char *, const char *, size_t);
> #endif
>
Hmm, which version of OS X are we talking about?
config.mak.uname contains this:
ifeq ($(shell expr "$(uname_R)" : '[15]\.'),2)
NO_STRLCPY = YesPlease
What does ./configure put in config.mak.autogen for NO_STRLCPY?
(sorry, I don't have access to any version of OS X, so I can't
offer much help on this).
ATB,
Ramsay Jones
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH] Undefine strlcpy if needed.
2014-08-24 11:10 ` Ramsay Jones
@ 2014-08-24 11:13 ` tsuna
2014-08-24 16:18 ` Ramsay Jones
0 siblings, 1 reply; 10+ messages in thread
From: tsuna @ 2014-08-24 11:13 UTC (permalink / raw)
To: Ramsay Jones; +Cc: git
On Sun, Aug 24, 2014 at 4:10 AM, Ramsay Jones
<ramsay@ramsay1.demon.co.uk> wrote:
> Hmm, which version of OS X are we talking about?
OS X 10.9.4:
$ uname -a
Darwin damogran.local 13.3.0 Darwin Kernel Version 13.3.0: Tue Jun 3
21:27:35 PDT 2014; root:xnu-2422.110.17~1/RELEASE_X86_64 x86_64
> config.mak.uname contains this:
>
> ifeq ($(shell expr "$(uname_R)" : '[15]\.'),2)
> NO_STRLCPY = YesPlease
>
> What does ./configure put in config.mak.autogen for NO_STRLCPY?
NO_STRLCPY=
I guess I saw all the warnings because I did just a “git pull —rebase
&& make -j8” without running “make configure && ./configure”.
--
Benoit "tsuna" Sigoure
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH] Undefine strlcpy if needed.
2014-08-24 11:13 ` tsuna
@ 2014-08-24 16:18 ` Ramsay Jones
2014-08-24 19:49 ` Torsten Bögershausen
0 siblings, 1 reply; 10+ messages in thread
From: Ramsay Jones @ 2014-08-24 16:18 UTC (permalink / raw)
To: tsuna; +Cc: git
On 24/08/14 12:13, tsuna wrote:
> On Sun, Aug 24, 2014 at 4:10 AM, Ramsay Jones
> <ramsay@ramsay1.demon.co.uk> wrote:
>> Hmm, which version of OS X are we talking about?
>
> OS X 10.9.4:
>
> $ uname -a
> Darwin damogran.local 13.3.0 Darwin Kernel Version 13.3.0: Tue Jun 3
> 21:27:35 PDT 2014; root:xnu-2422.110.17~1/RELEASE_X86_64 x86_64
Hmm, does 'uname -r' return 13.3.0 or 13.4.0? (or something else!)
>> config.mak.uname contains this:
>>
>> ifeq ($(shell expr "$(uname_R)" : '[15]\.'),2)
>> NO_STRLCPY = YesPlease
>>
>> What does ./configure put in config.mak.autogen for NO_STRLCPY?
>
> NO_STRLCPY=
OK, so I've got to my limit here! ;-) The conditional shown above
(from config.mak.uname) should not have set NO_STRLCPY (assuming
that 'uname -r' is returning 13.3.0 or 13.4.0). So, unless NO_STRLCPY
is being set somewhere else (command-line, environment), this should
just work. puzzled. :(
>
> I guess I saw all the warnings because I did just a “git pull —rebase
> && make -j8” without running “make configure && ./configure”.
>
Yes, but use of configure is supposed to be optional ...
Hopefully, someone who actually knows OS X can solve the mystery.
ATB,
Ramsay Jones
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH] Undefine strlcpy if needed.
2014-08-24 16:18 ` Ramsay Jones
@ 2014-08-24 19:49 ` Torsten Bögershausen
2014-08-24 21:09 ` tsuna
0 siblings, 1 reply; 10+ messages in thread
From: Torsten Bögershausen @ 2014-08-24 19:49 UTC (permalink / raw)
To: Ramsay Jones, tsuna; +Cc: git
On 2014-08-24 18.18, Ramsay Jones wrote:
> On 24/08/14 12:13, tsuna wrote:
>> On Sun, Aug 24, 2014 at 4:10 AM, Ramsay Jones
>> <ramsay@ramsay1.demon.co.uk> wrote:
>>> Hmm, which version of OS X are we talking about?
>>
>> OS X 10.9.4:
>>
>> $ uname -a
>> Darwin damogran.local 13.3.0 Darwin Kernel Version 13.3.0: Tue Jun 3
>> 21:27:35 PDT 2014; root:xnu-2422.110.17~1/RELEASE_X86_64 x86_64
>
> Hmm, does 'uname -r' return 13.3.0 or 13.4.0? (or something else!)
>
>>> config.mak.uname contains this:
>>>
>>> ifeq ($(shell expr "$(uname_R)" : '[15]\.'),2)
>>> NO_STRLCPY = YesPlease
>>>
>>> What does ./configure put in config.mak.autogen for NO_STRLCPY?
>>
>> NO_STRLCPY=
>
> OK, so I've got to my limit here! ;-) The conditional shown above
> (from config.mak.uname) should not have set NO_STRLCPY (assuming
> that 'uname -r' is returning 13.3.0 or 13.4.0). So, unless NO_STRLCPY
> is being set somewhere else (command-line, environment), this should
> just work. puzzled. :(
>
>>
>> I guess I saw all the warnings because I did just a “git pull —rebase
>> && make -j8” without running “make configure && ./configure”.
>>
>
> Yes, but use of configure is supposed to be optional ...
>
> Hopefully, someone who actually knows OS X can solve the mystery.
>
> ATB,
> Ramsay Jones
I need to admit that I can not reproduce the warning here,
uname -r gives "13.3.0"
Could it be that something is special on your machine ?
Something in the environment ?
Does a fresh clone help ?
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH] Undefine strlcpy if needed.
2014-08-24 19:49 ` Torsten Bögershausen
@ 2014-08-24 21:09 ` tsuna
2014-08-25 0:32 ` Ramsay Jones
0 siblings, 1 reply; 10+ messages in thread
From: tsuna @ 2014-08-24 21:09 UTC (permalink / raw)
To: Torsten Bögershausen; +Cc: Ramsay Jones, git
On Sun, Aug 24, 2014 at 12:49 PM, Torsten Bögershausen <tboegi@web.de> wrote:
> On 2014-08-24 18.18, Ramsay Jones wrote:
>> On 24/08/14 12:13, tsuna wrote:
>>> On Sun, Aug 24, 2014 at 4:10 AM, Ramsay Jones
>>> <ramsay@ramsay1.demon.co.uk> wrote:
>>>> Hmm, which version of OS X are we talking about?
>>>
>>> OS X 10.9.4:
>>>
>>> $ uname -a
>>> Darwin damogran.local 13.3.0 Darwin Kernel Version 13.3.0: Tue Jun 3
>>> 21:27:35 PDT 2014; root:xnu-2422.110.17~1/RELEASE_X86_64 x86_64
>>
>> Hmm, does 'uname -r' return 13.3.0 or 13.4.0? (or something else!)
$ uname -r
13.3.0
>>>> config.mak.uname contains this:
>>>>
>>>> ifeq ($(shell expr "$(uname_R)" : '[15]\.'),2)
>>>> NO_STRLCPY = YesPlease
>>>>
>>>> What does ./configure put in config.mak.autogen for NO_STRLCPY?
>>>
>>> NO_STRLCPY=
>>
>> OK, so I've got to my limit here! ;-) The conditional shown above
>> (from config.mak.uname) should not have set NO_STRLCPY (assuming
>> that 'uname -r' is returning 13.3.0 or 13.4.0). So, unless NO_STRLCPY
>> is being set somewhere else (command-line, environment), this should
>> just work. puzzled. :(
>>
>>>
>>> I guess I saw all the warnings because I did just a “git pull —rebase
>>> && make -j8” without running “make configure && ./configure”.
>>>
>>
>> Yes, but use of configure is supposed to be optional ...
>>
>> Hopefully, someone who actually knows OS X can solve the mystery.
>>
>> ATB,
>> Ramsay Jones
>
> I need to admit that I can not reproduce the warning here,
> uname -r gives "13.3.0"
>
> Could it be that something is special on your machine ?
> Something in the environment ?
Not that I can think of, the only "non-standard” thing I have
installed is Homebrew (http://brew.sh/), but otherwise it’s all the
standard OS X stuff and Developer tools. I write code on this machine
on a daily basis.
> Does a fresh clone help ?
A fresh clone doesn’t even build :-/
$ git clone git://github.com/git/git.git
Cloning into 'git'...
remote: Counting objects: 176423, done.
remote: Compressing objects: 100% (47201/47201), done.
remote: Total 176423 (delta 127349), reused 176233 (delta 127209)
Receiving objects: 100% (176423/176423), 64.05 MiB | 6.13 MiB/s, done.
Resolving deltas: 100% (127349/127349), done.
Checking connectivity... done.
$ cd git
$
make
GIT_VERSION = 2.1.0
* new build flags
CC credential-store.o
In file included from credential-store.c:1:
In file included from ./cache.h:8:
./gettext.h:17:11: fatal error: 'libintl.h' file not found
# include <libintl.h>
^
1 error generated.
make: *** [credential-store.o] Error 1
I need to run configure first:
$ make configure
GEN configure
$ ./configure
configure: Setting lib to 'lib' (the default)
[…]
$ make
tsuna@damogran /tmp/git $ make
* new build flags
CC credential-store.o
* new link flags
CC abspath.o
[…]
Then the build succeeds.
$ grep NO_STRLCPY config.mak.autogen
NO_STRLCPY=
$ which cc
/usr/bin/cc
$ cc --version
Apple LLVM version 5.1 (clang-503.0.40) (based on LLVM 3.4svn)
Target: x86_64-apple-darwin13.3.0
Thread model: posix
--
Benoit "tsuna” Sigoure
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH] Undefine strlcpy if needed.
2014-08-24 21:09 ` tsuna
@ 2014-08-25 0:32 ` Ramsay Jones
2014-08-25 1:54 ` tsuna
0 siblings, 1 reply; 10+ messages in thread
From: Ramsay Jones @ 2014-08-25 0:32 UTC (permalink / raw)
To: tsuna, Torsten Bögershausen; +Cc: git
On 24/08/14 22:09, tsuna wrote:
> On Sun, Aug 24, 2014 at 12:49 PM, Torsten Bögershausen <tboegi@web.de> wrote:
>> On 2014-08-24 18.18, Ramsay Jones wrote:
>>> On 24/08/14 12:13, tsuna wrote:
>>>> On Sun, Aug 24, 2014 at 4:10 AM, Ramsay Jones
>>>> <ramsay@ramsay1.demon.co.uk> wrote:
>>>>> Hmm, which version of OS X are we talking about?
>>>>
>>>> OS X 10.9.4:
>>>>
>>>> $ uname -a
>>>> Darwin damogran.local 13.3.0 Darwin Kernel Version 13.3.0: Tue Jun 3
>>>> 21:27:35 PDT 2014; root:xnu-2422.110.17~1/RELEASE_X86_64 x86_64
>>>
>>> Hmm, does 'uname -r' return 13.3.0 or 13.4.0? (or something else!)
>
> $ uname -r
> 13.3.0
>
>>>>> config.mak.uname contains this:
>>>>>
>>>>> ifeq ($(shell expr "$(uname_R)" : '[15]\.'),2)
>>>>> NO_STRLCPY = YesPlease
>>>>>
>>>>> What does ./configure put in config.mak.autogen for NO_STRLCPY?
>>>>
>>>> NO_STRLCPY=
>>>
>>> OK, so I've got to my limit here! ;-) The conditional shown above
>>> (from config.mak.uname) should not have set NO_STRLCPY (assuming
>>> that 'uname -r' is returning 13.3.0 or 13.4.0). So, unless NO_STRLCPY
>>> is being set somewhere else (command-line, environment), this should
>>> just work. puzzled. :(
>>>
>>>>
>>>> I guess I saw all the warnings because I did just a “git pull —rebase
>>>> && make -j8” without running “make configure && ./configure”.
>>>>
>>>
>>> Yes, but use of configure is supposed to be optional ...
>>>
>>> Hopefully, someone who actually knows OS X can solve the mystery.
>>>
>>> ATB,
>>> Ramsay Jones
>>
>> I need to admit that I can not reproduce the warning here,
>> uname -r gives "13.3.0"
>>
>> Could it be that something is special on your machine ?
>> Something in the environment ?
>
> Not that I can think of, the only "non-standard” thing I have
> installed is Homebrew (http://brew.sh/), but otherwise it’s all the
> standard OS X stuff and Developer tools. I write code on this machine
> on a daily basis.
>
>> Does a fresh clone help ?
>
> A fresh clone doesn’t even build :-/
>
> $ git clone git://github.com/git/git.git
> Cloning into 'git'...
> remote: Counting objects: 176423, done.
> remote: Compressing objects: 100% (47201/47201), done.
> remote: Total 176423 (delta 127349), reused 176233 (delta 127209)
> Receiving objects: 100% (176423/176423), 64.05 MiB | 6.13 MiB/s, done.
> Resolving deltas: 100% (127349/127349), done.
> Checking connectivity... done.
> $ cd git
>
> $
> make
> GIT_VERSION = 2.1.0
> * new build flags
> CC credential-store.o
> In file included from credential-store.c:1:
> In file included from ./cache.h:8:
> ./gettext.h:17:11: fatal error: 'libintl.h' file not found
> # include <libintl.h>
> ^
> 1 error generated.
> make: *** [credential-store.o] Error 1
Again, I don't have access to an OS X system, so I don't know
which package provides libintl/gettext, but it seems to be missing
on your system.
You can avoid the build failure, without running configure, by
setting NO_GETTEXT=YesPlease in your config.mak file.
>
>
> I need to run configure first:
>
> $ make configure
> GEN configure
> $ ./configure
> configure: Setting lib to 'lib' (the default)
> […]
So, presumably, configure has set NO_GETEXT=YesPlease in your
config.mak.autogen file.
ATB,
Ramsay Jones
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH] Undefine strlcpy if needed.
2014-08-25 0:32 ` Ramsay Jones
@ 2014-08-25 1:54 ` tsuna
2014-08-25 11:16 ` Ramsay Jones
0 siblings, 1 reply; 10+ messages in thread
From: tsuna @ 2014-08-25 1:54 UTC (permalink / raw)
To: Ramsay Jones; +Cc: Torsten Bögershausen, git
On Sun, Aug 24, 2014 at 5:32 PM, Ramsay Jones
<ramsay@ramsay1.demon.co.uk> wrote:
> Again, I don't have access to an OS X system, so I don't know
> which package provides libintl/gettext, but it seems to be missing
> on your system.
Probably yeah, those libraries don’t seem to be provided in standard
with OS X or OS X’s development tools, so maybe the Makefile should
also default to having NO_GETTEXT=YesPlease when on OS X.
> You can avoid the build failure, without running configure, by
> setting NO_GETTEXT=YesPlease in your config.mak file.
>
>>
>>
>> I need to run configure first:
>>
>> $ make configure
>> GEN configure
>> $ ./configure
>> configure: Setting lib to 'lib' (the default)
>> […]
>
> So, presumably, configure has set NO_GETEXT=YesPlease in your
> config.mak.autogen file.
Yes it did.
I don’t mind running configure, but so far Git has compiled fine
without doing it. Should we fix the default values of NO_STRLCPY /
NO_GETEXT on OS X?
--
Benoit "tsuna" Sigoure
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH] Undefine strlcpy if needed.
2014-08-25 1:54 ` tsuna
@ 2014-08-25 11:16 ` Ramsay Jones
0 siblings, 0 replies; 10+ messages in thread
From: Ramsay Jones @ 2014-08-25 11:16 UTC (permalink / raw)
To: tsuna; +Cc: Torsten Bögershausen, git
On 25/08/14 02:54, tsuna wrote:
> On Sun, Aug 24, 2014 at 5:32 PM, Ramsay Jones
> <ramsay@ramsay1.demon.co.uk> wrote:
>> Again, I don't have access to an OS X system, so I don't know
>> which package provides libintl/gettext, but it seems to be missing
>> on your system.
>
> Probably yeah, those libraries don’t seem to be provided in standard
> with OS X or OS X’s development tools, so maybe the Makefile should
> also default to having NO_GETTEXT=YesPlease when on OS X.
>
>> You can avoid the build failure, without running configure, by
>> setting NO_GETTEXT=YesPlease in your config.mak file.
>>
>>>
>>>
>>> I need to run configure first:
>>>
>>> $ make configure
>>> GEN configure
>>> $ ./configure
>>> configure: Setting lib to 'lib' (the default)
>>> […]
>>
>> So, presumably, configure has set NO_GETEXT=YesPlease in your
>> config.mak.autogen file.
>
> Yes it did.
>
> I don’t mind running configure, but so far Git has compiled fine
> without doing it. Should we fix the default values of NO_STRLCPY /
> NO_GETEXT on OS X?
>
Is NO_STRLCPY still a problem with a fresh clone (and putting
NO_GETEXT=YesPlease in your config.mak)? I still do not understand
why you were getting those warnings; AFAICT it should not be happening!
Also, Torsten could not reproduce.
As far as NO_GETTEXT is concerned, I have to defer to someone who has
experience on that platform (I have _zero_ experience on OS X).
ATB,
Ramsay Jones
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2014-08-25 11:16 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-08-24 4:32 [PATCH] Undefine strlcpy if needed Benoit Sigoure
2014-08-24 4:35 ` Benoit Sigoure
2014-08-24 11:10 ` Ramsay Jones
2014-08-24 11:13 ` tsuna
2014-08-24 16:18 ` Ramsay Jones
2014-08-24 19:49 ` Torsten Bögershausen
2014-08-24 21:09 ` tsuna
2014-08-25 0:32 ` Ramsay Jones
2014-08-25 1:54 ` tsuna
2014-08-25 11:16 ` Ramsay Jones
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.