* Git on QNX
@ 2009-12-15 21:23 Tarmigan
2009-12-15 21:42 ` Junio C Hamano
0 siblings, 1 reply; 7+ messages in thread
From: Tarmigan @ 2009-12-15 21:23 UTC (permalink / raw)
To: Git Mailing List; +Cc: mkraai
Is anyone running git on QNX?
I have compiled and installed it (see config below) but it is failing
a number of the tests. I suspect that many of the later failures are
related to the earlier ones, so I think the earlier ones are probably
more interesting. Am I missing some makefile options?
Despite the test failures, I have been running the binaries
successfully for a couple days. I'm not planning on using git on QNX
very heavily or for very long, but as long as I'm on QNX I figured I
try to get git to work on it.
Here's the tests that are currently failing:
t0000.42 absolute path works as expected
t0006.14 parse date (2008-02-14 20:30:45)
t1002-read-tree-m-u-2way.sh lots of failures
t1100.4 compare commit
t1400.22,27,38,41
t1410.8 reflog delete
t2300.4,5 cd-to-toplevel
t3200.5,30 branch (maybe same as date in t0006.14?)
t3900.10,18 NO_ICONV?
t3901 NO_ICONV?
t4013-diff-various.sh lots of failures
t4201.3 shortlog encoding (NO_ICONV?)
t5000.13 tar tree validate file modification time
t5100-mailinfo.sh
t5510-fetch.sh
I got impatient after about t5600 because QNX in a virtual machine is
very slow. If anyone else wants to try it, you can download a QNX
.iso, get a free 30-day evaluation license and install and run in a
virtual machine.
I have started to look into t0000.42 a little. The symlinks seem to
get setup properly but make_absolute_path gives incorrect results:
# ls -l second/other
lrwxrwxrwx 1 root root 8 Dec 15 12:27 second/other -> ../first
# ../../test-path-utils make_absolute_path third/../second/other/.git/syml
/root/git/t/trash directory.t0000-basic/second/other/.git/syml
# ../../test-path-utils make_absolute_path second/other/.git/syml
/root/git/t/trash directory.t0000-basic/second/other/.git/syml
# ../../test-path-utils make_absolute_path second/other
/root/git/t/trash directory.t0000-basic/second/first <---- THIS LOOKS WRONG
# ../../test-path-utils make_absolute_path second/other/
/root/git/t/trash directory.t0000-basic/second/first <---- THIS LOOKS WRONG
# ../../test-path-utils make_absolute_path second/other/.git
../.git <---- THIS LOOKS WRONG
If anyone has any ideas or interest in the other failing tests, I can
provide more specific information.
Here's the diff that I applied to make git compile (cut-n-paste +
gmail warning) and it's on top of 9a424b27. I would like to properly
submit some bits of it once the tests are passing.
Thanks,
Tarmigan
--------
diff --git a/Makefile b/Makefile
index 4a1e5bc..ca78dcd 100644
--- a/Makefile
+++ b/Makefile
@@ -934,6 +934,30 @@ ifeq ($(uname_S),HP-UX)
NO_SYS_SELECT_H = YesPlease
SNPRINTF_RETURNS_BOGUS = YesPlease
endif
+ifeq ($(uname_S),QNX)
+ NO_OPENSSL=YesPlease
+ NO_CURL=YesPlease
+ NEEDS_SOCKET=YesPlease
+ NO_D_TYPE_IN_DIRENT=YesPlease
+ NO_STRCASESTR=YesPlease
+ NO_MEMMEM = YesPlease
+ NO_STRLCPY = YesPlease
+ NO_MKDTEMP = YesPlease
+ NO_MKSTEMPS = YesPlease
+ #NO_ICONV=YesPlease
+ OLD_ICONV=UnfortunatelyYes
+ NEEDS_LIBICONV=yes
+ ICONVDIR=/opt
+ NO_R_TO_GCC_LINKER=UnfortunatelyYes
+ NO_DEFLATE_BOUND=yes
+ FREAD_READS_DIRECTORIES=UnfortunatelyYes
+ NO_PTHREADS=UnfortunatelyYes
+ NO_MMAP=YesPlease
+ NO_NSEC=YesPlease
+ PERL_PATH=/opt/bin/perl
+ #NO_HSTRERROR = YesPlease
+ #NO_SYS_SELECT_H = YesPlease
+endif
ifeq ($(uname_S),Windows)
GIT_VERSION := $(GIT_VERSION).MSVC
pathsep = ;
diff --git a/builtin-fetch-pack.c b/builtin-fetch-pack.c
index 8ed4a6f..5cbc16c 100644
--- a/builtin-fetch-pack.c
+++ b/builtin-fetch-pack.c
@@ -778,7 +778,7 @@ static int fetch_pack_config(const char *var,
const char *value, void *cb)
return git_default_config(var, value, cb);
}
-static struct lock_file lock;
+static struct lock_file lockfile;
static void fetch_pack_setup(void)
{
@@ -958,14 +958,14 @@ struct ref *fetch_pack(struct fetch_pack_args *my_args,
)
die("shallow file was changed during fetch");
- fd = hold_lock_file_for_update(&lock, shallow,
+ fd = hold_lock_file_for_update(&lockfile, shallow,
LOCK_DIE_ON_ERROR);
if (!write_shallow_commits(&sb, 0)
|| write_in_full(fd, sb.buf, sb.len) != sb.len) {
unlink_or_warn(shallow);
- rollback_lock_file(&lock);
+ rollback_lock_file(&lockfile);
} else {
- commit_lock_file(&lock);
+ commit_lock_file(&lockfile);
}
strbuf_release(&sb);
}
diff --git a/git-compat-util.h b/git-compat-util.h
index 5c59687..857e938 100644
--- a/git-compat-util.h
+++ b/git-compat-util.h
@@ -42,6 +42,11 @@
/* Approximation of the length of the decimal representation of this type. */
#define decimal_length(x) ((int)(sizeof(x) * 2.56 + 0.5) + 1)
+#if defined(__QNX__)
+#define getpagesize() sysconf(_SC_PAGESIZE)
+#define SA_RESTART 0
+#endif
+
#if defined(__sun__)
/*
* On Solaris, when _XOPEN_EXTENDED is set, its header file
@@ -55,7 +60,7 @@
# else
# define _XOPEN_SOURCE 500
# endif
-#elif !defined(__APPLE__) && !defined(__FreeBSD__) &&
!defined(__USLC__) && !defined(_M_UNIX) && !defined(sgi)
+#elif !defined(__APPLE__) && !defined(__FreeBSD__) &&
!defined(__USLC__) && !defined(_M_UNIX) && !defined(sgi) &&
!defined(__QNX__)
#define _XOPEN_SOURCE 600 /* glibc2 and AIX 5.3L need 500, OpenBSD
needs 600 for S_ISLNK() */
#define _XOPEN_SOURCE_EXTENDED 1 /* AIX 5.3L needs this */
#endif
@@ -79,6 +84,7 @@
#include <stdlib.h>
#include <stdarg.h>
#include <string.h>
+#include <strings.h>
#include <errno.h>
#include <limits.h>
#include <sys/param.h>
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: Git on QNX
2009-12-15 21:23 Git on QNX Tarmigan
@ 2009-12-15 21:42 ` Junio C Hamano
2009-12-15 22:13 ` Tarmigan
0 siblings, 1 reply; 7+ messages in thread
From: Junio C Hamano @ 2009-12-15 21:42 UTC (permalink / raw)
To: Tarmigan; +Cc: Git Mailing List, mkraai
Tarmigan <tarmigan+git@gmail.com> writes:
> diff --git a/builtin-fetch-pack.c b/builtin-fetch-pack.c
> index 8ed4a6f..5cbc16c 100644
> --- a/builtin-fetch-pack.c
> +++ b/builtin-fetch-pack.c
> @@ -778,7 +778,7 @@ static int fetch_pack_config(const char *var,
> const char *value, void *cb)
> return git_default_config(var, value, cb);
> }
>
> -static struct lock_file lock;
> +static struct lock_file lockfile;
>
> static void fetch_pack_setup(void)
> {
> @@ -958,14 +958,14 @@ struct ref *fetch_pack(struct fetch_pack_args *my_args,
> )
> die("shallow file was changed during fetch");
>
> - fd = hold_lock_file_for_update(&lock, shallow,
> + fd = hold_lock_file_for_update(&lockfile, shallow,
> LOCK_DIE_ON_ERROR);
> if (!write_shallow_commits(&sb, 0)
> || write_in_full(fd, sb.buf, sb.len) != sb.len) {
> unlink_or_warn(shallow);
> - rollback_lock_file(&lock);
> + rollback_lock_file(&lockfile);
> } else {
> - commit_lock_file(&lock);
> + commit_lock_file(&lockfile);
> }
> strbuf_release(&sb);
> }
Is this because QNX uses "lock" as some global identifier for some other
purpose? I think moving the file-scope-static definition to the scope
it is used in without renaming would make a cleaner patch.
> diff --git a/git-compat-util.h b/git-compat-util.h
> index 5c59687..857e938 100644
> --- a/git-compat-util.h
> +++ b/git-compat-util.h
> @@ -79,6 +84,7 @@
> #include <stdlib.h>
> #include <stdarg.h>
> #include <string.h>
> +#include <strings.h>
> #include <errno.h>
> #include <limits.h>
> #include <sys/param.h>
Other hunks are QNX specific enough but this hunk is worrisome; you cannot
tell how you are hurting other platforms with this change. Can you tell
declarations of which functions are missing on QNX without this change?
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Git on QNX
2009-12-15 21:42 ` Junio C Hamano
@ 2009-12-15 22:13 ` Tarmigan
2009-12-16 14:20 ` Alex Riesen
2009-12-16 22:38 ` Sean Boudreau
0 siblings, 2 replies; 7+ messages in thread
From: Tarmigan @ 2009-12-15 22:13 UTC (permalink / raw)
To: Junio C Hamano; +Cc: Git Mailing List, mkraai
On Tue, Dec 15, 2009 at 1:42 PM, Junio C Hamano <gitster@pobox.com> wrote:
> Tarmigan <tarmigan+git@gmail.com> writes:
>
>> diff --git a/builtin-fetch-pack.c b/builtin-fetch-pack.c
>> index 8ed4a6f..5cbc16c 100644
>> --- a/builtin-fetch-pack.c
>> +++ b/builtin-fetch-pack.c
>> @@ -778,7 +778,7 @@ static int fetch_pack_config(const char *var,
>> const char *value, void *cb)
>> return git_default_config(var, value, cb);
>> }
>>
>> -static struct lock_file lock;
>> +static struct lock_file lockfile;
>>
>> static void fetch_pack_setup(void)
>> {
>> @@ -958,14 +958,14 @@ struct ref *fetch_pack(struct fetch_pack_args *my_args,
>> )
>> die("shallow file was changed during fetch");
>>
>> - fd = hold_lock_file_for_update(&lock, shallow,
>> + fd = hold_lock_file_for_update(&lockfile, shallow,
>> LOCK_DIE_ON_ERROR);
>> if (!write_shallow_commits(&sb, 0)
>> || write_in_full(fd, sb.buf, sb.len) != sb.len) {
>> unlink_or_warn(shallow);
>> - rollback_lock_file(&lock);
>> + rollback_lock_file(&lockfile);
>> } else {
>> - commit_lock_file(&lock);
>> + commit_lock_file(&lockfile);
>> }
>> strbuf_release(&sb);
>> }
>
> Is this because QNX uses "lock" as some global identifier for some other
> purpose? I think moving the file-scope-static definition to the scope
> it is used in without renaming would make a cleaner patch.
Yes, exactly that reason. I agree the declaration should just move
into fetch_pack() as a static, but I didn't realize that until after I
had renamed all of the uses, and I was lazy as this was not for
submission.
>
>> diff --git a/git-compat-util.h b/git-compat-util.h
>> index 5c59687..857e938 100644
>> --- a/git-compat-util.h
>> +++ b/git-compat-util.h
>> @@ -79,6 +84,7 @@
>> #include <stdlib.h>
>> #include <stdarg.h>
>> #include <string.h>
>> +#include <strings.h>
>> #include <errno.h>
>> #include <limits.h>
>> #include <sys/param.h>
>
> Other hunks are QNX specific enough but this hunk is worrisome; you cannot
> tell how you are hurting other platforms with this change. Can you tell
> declarations of which functions are missing on QNX without this change?
strcasecmp()
http://www.opengroup.org/onlinepubs/000095399/functions/strcasecmp.html
I agree that this change could affect other platforms and they've
gotten along fine without it so far. I'm surprised no others have
needed it. Would it be better wrapped in a #ifdef?
Thanks,
Tarmigan
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Git on QNX
2009-12-15 22:13 ` Tarmigan
@ 2009-12-16 14:20 ` Alex Riesen
2009-12-16 22:38 ` Sean Boudreau
1 sibling, 0 replies; 7+ messages in thread
From: Alex Riesen @ 2009-12-16 14:20 UTC (permalink / raw)
To: Tarmigan; +Cc: Junio C Hamano, Git Mailing List, mkraai
On Tue, Dec 15, 2009 at 23:13, Tarmigan <tarmigan+git@gmail.com> wrote:
> On Tue, Dec 15, 2009 at 1:42 PM, Junio C Hamano <gitster@pobox.com> wrote:
>> Tarmigan <tarmigan+git@gmail.com> writes:
>>> diff --git a/git-compat-util.h b/git-compat-util.h
>>> index 5c59687..857e938 100644
>>> --- a/git-compat-util.h
>>> +++ b/git-compat-util.h
>>> @@ -79,6 +84,7 @@
>>> #include <stdlib.h>
>>> #include <stdarg.h>
>>> #include <string.h>
>>> +#include <strings.h>
>>> #include <errno.h>
>>> #include <limits.h>
>>> #include <sys/param.h>
>>
>> Other hunks are QNX specific enough but this hunk is worrisome; you cannot
>> tell how you are hurting other platforms with this change. Can you tell
>> declarations of which functions are missing on QNX without this change?
>
> strcasecmp()
> http://www.opengroup.org/onlinepubs/000095399/functions/strcasecmp.html
Just for completeness:
http://www.qnx.com/developers/docs/6.4.1/neutrino/lib_ref/s/strcasecmp.html
http://www.qnx.com/developers/docs/6.4.1/neutrino/lib_ref/s/strcmpi.html
> I agree that this change could affect other platforms and they've
> gotten along fine without it so far. I'm surprised no others have
> needed it. Would it be better wrapped in a #ifdef?
If you put the ifdef in git-compat-util.h
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Git on QNX
2009-12-15 22:13 ` Tarmigan
2009-12-16 14:20 ` Alex Riesen
@ 2009-12-16 22:38 ` Sean Boudreau
2009-12-17 1:03 ` Tarmigan
1 sibling, 1 reply; 7+ messages in thread
From: Sean Boudreau @ 2009-12-16 22:38 UTC (permalink / raw)
To: git
Tarmigan <tarmigan+git <at> gmail.com> writes:
> >
> > Other hunks are QNX specific enough but this hunk is worrisome; you cannot
> > tell how you are hurting other platforms with this change. Can you tell
> > declarations of which functions are missing on QNX without this change?
>
> strcasecmp()
> http://www.opengroup.org/onlinepubs/000095399/functions/strcasecmp.html
>
> I agree that this change could affect other platforms and they've
> gotten along fine without it so far. I'm surprised no others have
> needed it. Would it be better wrapped in a #ifdef?
>
> Thanks,
> Tarmigan
>
What version of qnx is this on. <strings.h> is
now brought in by <string.h> and the lock() /
unlock() prototypes have been removed from <unistd.h>
AS OF 6.4.1 (the current release).
There's a package for git-4.3.20 here that also has a work around
for the SA_RESTART issue.
ftp://ftp.netbsd.org/pub/pkgsrc/packages/QNX/i386/6.4.1_head_20090724/All
-seanb
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Git on QNX
2009-12-16 22:38 ` Sean Boudreau
@ 2009-12-17 1:03 ` Tarmigan
2009-12-17 1:37 ` Sean Boudreau
0 siblings, 1 reply; 7+ messages in thread
From: Tarmigan @ 2009-12-17 1:03 UTC (permalink / raw)
To: git; +Cc: Alex Riesen, Sean Boudreau, mkraai
On Wed, Dec 16, 2009 at 2:38 PM, Sean Boudreau <seanb@qnx.com> wrote:
> What version of qnx is this on. <strings.h> is
> now brought in by <string.h> and the lock() /
> unlock() prototypes have been removed from <unistd.h>
> AS OF 6.4.1 (the current release).
Ahh, that's nice. At a client's request, I have been working on QNX 6.3.2.
I just installed 6.4.1 in another VM, and it's a bit different. The
common way to handle binary packages (iconv and perl) seems to have
changed to pkg_add so the PATHs I had set might not make sense
anymore.
Also the weird failing test at t0000.42 seems to be fixed. Funny.
As I might be the only person to run git on 6.3.2 instead of a more
modern QNX, it might make sense for me to just submit the minimum
patches needed for QNX 6.4.1 and then carry the strings.h,
getpagesize, and lock() changes for 6.3.2 on my own.
> There's a package for git-4.3.20 here that also has a work around
> for the SA_RESTART issue.
I think that might be a different program that also used to be named
"git". I think it has now been renamed gnuit.
Thanks,
Tarmigan
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Git on QNX
2009-12-17 1:03 ` Tarmigan
@ 2009-12-17 1:37 ` Sean Boudreau
0 siblings, 0 replies; 7+ messages in thread
From: Sean Boudreau @ 2009-12-17 1:37 UTC (permalink / raw)
To: Tarmigan; +Cc: git, Alex Riesen, mkraai
On Wed, Dec 16, 2009 at 05:03:16PM -0800, Tarmigan wrote:
> On Wed, Dec 16, 2009 at 2:38 PM, Sean Boudreau <seanb@qnx.com> wrote:
> > What version of qnx is this on. <strings.h> is
> > now brought in by <string.h> and the lock() /
> > unlock() prototypes have been removed from <unistd.h>
> > AS OF 6.4.1 (the current release).
>
> Ahh, that's nice. At a client's request, I have been working on QNX 6.3.2.
>
> I just installed 6.4.1 in another VM, and it's a bit different. The
> common way to handle binary packages (iconv and perl) seems to have
> changed to pkg_add so the PATHs I had set might not make sense
> anymore.
>
> Also the weird failing test at t0000.42 seems to be fixed. Funny.
>
> As I might be the only person to run git on 6.3.2 instead of a more
> modern QNX, it might make sense for me to just submit the minimum
> patches needed for QNX 6.4.1 and then carry the strings.h,
> getpagesize, and lock() changes for 6.3.2 on my own.
That's why I spoke up :)
>
> > There's a package for git-4.3.20 here that also has a work around
> > for the SA_RESTART issue.
>
> I think that might be a different program that also used to be named
> "git". I think it has now been renamed gnuit.
You're probably right, try this one:
ftp://ftp.netbsd.org/pub/pkgsrc/packages/QNX/i386/6.4.1_head_20090724/All/scmgit-base-1.6.2.5.tgz
-seanb
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2009-12-17 1:44 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-12-15 21:23 Git on QNX Tarmigan
2009-12-15 21:42 ` Junio C Hamano
2009-12-15 22:13 ` Tarmigan
2009-12-16 14:20 ` Alex Riesen
2009-12-16 22:38 ` Sean Boudreau
2009-12-17 1:03 ` Tarmigan
2009-12-17 1:37 ` Sean Boudreau
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox