git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* git build on msys fails (and fix)
@ 2008-11-30 11:02 dhruva
  2008-11-30 11:52 ` dhruva
  2008-12-01  9:06 ` Johannes Sixt
  0 siblings, 2 replies; 10+ messages in thread
From: dhruva @ 2008-11-30 11:02 UTC (permalink / raw)
  To: Git

Hello,
 I build git on msys environment regularly. With the recent changes to
add cache preload facility (commit ID:
671c9b7e315db89081cc69f83a8f405e4aca37bc) brings in dependency on
pthreads. This is not available in the msys distribution which was
part of the git build distro. I installed libpthread for mingw to get
the related headers and libraries. I had to make some minor changes to
libpthread installation. I copied the 'setjmp.h' from my other mingw
installation and had to had edit it to remove some mingw specific
macros.

@:/e/users/dhruva/stub/repo/git/git
[520]$ diff -u /e/tools/gnu/include/setjmp.h /mingw/include/setjmp.h
--- /e/tools/gnu/include/setjmp.h       Sun Oct  5 04:01:15 2008
+++ /mingw/include/setjmp.h     Sun Nov 30 16:18:00 2008
@@ -36,7 +36,7 @@
  * The function provided by CRTDLL which appears to do the actual work
  * of setjmp.
  */
-_CRTIMP int __cdecl __MINGW_NOTHROW _setjmp (jmp_buf);
+int __cdecl _setjmp (jmp_buf);

 #define        setjmp(x)       _setjmp(x)

@@ -44,7 +44,7 @@
  * Return to the last setjmp call and act as if setjmp had returned
  * nVal (which had better be non-zero!).
  */
-_CRTIMP void __cdecl __MINGW_NOTHROW longjmp (jmp_buf, int)
__MINGW_ATTRIB_NORETURN;
+void __cdecl longjmp (jmp_buf, int);

 #ifdef __cplusplus
 }

Also,
 had to copy a pthread library with a dfferent name to the standard name:
$cp libpthreadGC2.a libpthread.a

The build went fine and am using the new binaries.

-dhruva

-- 
Contents reflect my personal views only!

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: git build on msys fails (and fix)
  2008-11-30 11:02 git build on msys fails (and fix) dhruva
@ 2008-11-30 11:52 ` dhruva
  2008-12-01  9:06 ` Johannes Sixt
  1 sibling, 0 replies; 10+ messages in thread
From: dhruva @ 2008-11-30 11:52 UTC (permalink / raw)
  To: Git

Hi,

On Sun, Nov 30, 2008 at 4:32 PM, dhruva <dhruvakm@gmail.com> wrote:
> Hello,
>  I build git on msys environment regularly. With the recent changes to
> add cache preload facility (commit ID:
> 671c9b7e315db89081cc69f83a8f405e4aca37bc) brings in dependency on
> pthreads. This is not available in the msys distribution which was
> part of the git build distro. I installed libpthread for mingw to get
> the related headers and libraries. I had to make some minor changes to
> libpthread installation. I copied the 'setjmp.h' from my other mingw
> installation and had to had edit it to remove some mingw specific
> macros.
>
> @:/e/users/dhruva/stub/repo/git/git
> [520]$ diff -u /e/tools/gnu/include/setjmp.h /mingw/include/setjmp.h
> --- /e/tools/gnu/include/setjmp.h       Sun Oct  5 04:01:15 2008
> +++ /mingw/include/setjmp.h     Sun Nov 30 16:18:00 2008
> @@ -36,7 +36,7 @@
>  * The function provided by CRTDLL which appears to do the actual work
>  * of setjmp.
>  */
> -_CRTIMP int __cdecl __MINGW_NOTHROW _setjmp (jmp_buf);
> +int __cdecl _setjmp (jmp_buf);
>
>  #define        setjmp(x)       _setjmp(x)
>
> @@ -44,7 +44,7 @@
>  * Return to the last setjmp call and act as if setjmp had returned
>  * nVal (which had better be non-zero!).
>  */
> -_CRTIMP void __cdecl __MINGW_NOTHROW longjmp (jmp_buf, int)
> __MINGW_ATTRIB_NORETURN;
> +void __cdecl longjmp (jmp_buf, int);
>
>  #ifdef __cplusplus
>  }
>
> Also,
>  had to copy a pthread library with a dfferent name to the standard name:
> $cp libpthreadGC2.a libpthread.a
>
> The build went fine and am using the new binaries.
>


I also had to define  THREADED_DELTA_SEARCH.
$ export  THREADED_DELTA_SEARCH=1
$ make

This worked for me.

-dhruva

-- 
Contents reflect my personal views only!

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: git build on msys fails (and fix)
  2008-11-30 11:02 git build on msys fails (and fix) dhruva
  2008-11-30 11:52 ` dhruva
@ 2008-12-01  9:06 ` Johannes Sixt
  2008-12-01  9:32   ` dhruva
  1 sibling, 1 reply; 10+ messages in thread
From: Johannes Sixt @ 2008-12-01  9:06 UTC (permalink / raw)
  To: dhruva; +Cc: Git, msysGit


dhruva schrieb:
> Hello,
>  I build git on msys environment regularly. With the recent changes to
> add cache preload facility (commit ID:
> 671c9b7e315db89081cc69f83a8f405e4aca37bc) brings in dependency on
> pthreads. This is not available in the msys distribution which was
> part of the git build distro. I installed libpthread for mingw to get
> the related headers and libraries. I had to make some minor changes to
> libpthread installation. I copied the 'setjmp.h' from my other mingw
> installation and had to had edit it to remove some mingw specific
> macros.
> 
> @:/e/users/dhruva/stub/repo/git/git
> [520]$ diff -u /e/tools/gnu/include/setjmp.h /mingw/include/setjmp.h
> --- /e/tools/gnu/include/setjmp.h       Sun Oct  5 04:01:15 2008
> +++ /mingw/include/setjmp.h     Sun Nov 30 16:18:00 2008
> @@ -36,7 +36,7 @@
>   * The function provided by CRTDLL which appears to do the actual work
>   * of setjmp.
>   */
> -_CRTIMP int __cdecl __MINGW_NOTHROW _setjmp (jmp_buf);
> +int __cdecl _setjmp (jmp_buf);
> 
>  #define        setjmp(x)       _setjmp(x)
> 
> @@ -44,7 +44,7 @@
>   * Return to the last setjmp call and act as if setjmp had returned
>   * nVal (which had better be non-zero!).
>   */
> -_CRTIMP void __cdecl __MINGW_NOTHROW longjmp (jmp_buf, int)
> __MINGW_ATTRIB_NORETURN;
> +void __cdecl longjmp (jmp_buf, int);
> 
>  #ifdef __cplusplus
>  }
> 
> Also,
>  had to copy a pthread library with a dfferent name to the standard name:
> $cp libpthreadGC2.a libpthread.a
> 
> The build went fine and am using the new binaries.

Would you please push your addition to the mob branch of
git://repo.or.cz/msysgit.git? The push URL is repo.or.cz:/srv/git/msysgit.git

(But notice that some commits are on the mob branch currently that are not
in any other branch; hence, you better build on top of them so that they
are not lost when you push to mob.)

-- Hannes

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: git build on msys fails (and fix)
  2008-12-01  9:06 ` Johannes Sixt
@ 2008-12-01  9:32   ` dhruva
  2008-12-01 10:52     ` dhruva
  0 siblings, 1 reply; 10+ messages in thread
From: dhruva @ 2008-12-01  9:32 UTC (permalink / raw)
  To: Johannes Sixt; +Cc: Git, msysGit

On Mon, Dec 1, 2008 at 2:36 PM, Johannes Sixt <j.sixt@viscovery.net> wrote:
> dhruva schrieb:
>> Hello,
>>  I build git on msys environment regularly. With the recent changes to
>> add cache preload facility (commit ID:
>> 671c9b7e315db89081cc69f83a8f405e4aca37bc) brings in dependency on
>> pthreads. This is not available in the msys distribution which was
>> part of the git build distro. I installed libpthread for mingw to get
>> the related headers and libraries. I had to make some minor changes to
>> libpthread installation. I copied the 'setjmp.h' from my other mingw
>> installation and had to had edit it to remove some mingw specific
>> macros.
>>
>> @:/e/users/dhruva/stub/repo/git/git
>> [520]$ diff -u /e/tools/gnu/include/setjmp.h /mingw/include/setjmp.h
>> --- /e/tools/gnu/include/setjmp.h       Sun Oct  5 04:01:15 2008
>> +++ /mingw/include/setjmp.h     Sun Nov 30 16:18:00 2008
>> @@ -36,7 +36,7 @@
>>   * The function provided by CRTDLL which appears to do the actual work
>>   * of setjmp.
>>   */
>> -_CRTIMP int __cdecl __MINGW_NOTHROW _setjmp (jmp_buf);
>> +int __cdecl _setjmp (jmp_buf);
>>
>>  #define        setjmp(x)       _setjmp(x)
>>
>> @@ -44,7 +44,7 @@
>>   * Return to the last setjmp call and act as if setjmp had returned
>>   * nVal (which had better be non-zero!).
>>   */
>> -_CRTIMP void __cdecl __MINGW_NOTHROW longjmp (jmp_buf, int)
>> __MINGW_ATTRIB_NORETURN;
>> +void __cdecl longjmp (jmp_buf, int);
>>
>>  #ifdef __cplusplus
>>  }
>>
>> Also,
>>  had to copy a pthread library with a dfferent name to the standard name:
>> $cp libpthreadGC2.a libpthread.a
>>
>> The build went fine and am using the new binaries.
>
> Would you please push your addition to the mob branch of
> git://repo.or.cz/msysgit.git? The push URL is repo.or.cz:/srv/git/msysgit.git
>
> (But notice that some commits are on the mob branch currently that are not
> in any other branch; hence, you better build on top of them so that they
> are not lost when you push to mob.)
>
> -- Hannes
>

I am not using git from the above repo. I am using it from:
git://git2.kernel.org/pub/scm/git/git.git

I will clone from the repo you have mentioned and push my changes,
that will take some time. I have started the clone now...

-dhruva

-- 
Contents reflect my personal views only!

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: git build on msys fails (and fix)
  2008-12-01  9:32   ` dhruva
@ 2008-12-01 10:52     ` dhruva
  2008-12-01 11:48       ` dhruva
  0 siblings, 1 reply; 10+ messages in thread
From: dhruva @ 2008-12-01 10:52 UTC (permalink / raw)
  To: Johannes Sixt; +Cc: Git, msysGit


Hi,

On Mon, Dec 1, 2008 at 3:02 PM, dhruva <dhruvakm@gmail.com> wrote:
> On Mon, Dec 1, 2008 at 2:36 PM, Johannes Sixt <j.sixt@viscovery.net> wrote:
>> dhruva schrieb:
>>> Hello,
>>>  I build git on msys environment regularly. With the recent changes to
>>> add cache preload facility (commit ID:
>>> 671c9b7e315db89081cc69f83a8f405e4aca37bc) brings in dependency on
>>> pthreads. This is not available in the msys distribution which was
>>> part of the git build distro. I installed libpthread for mingw to get
>>> the related headers and libraries. I had to make some minor changes to
>>> libpthread installation. I copied the 'setjmp.h' from my other mingw
>>> installation and had to had edit it to remove some mingw specific
>>> macros.
>>>
>>> @:/e/users/dhruva/stub/repo/git/git
>>> [520]$ diff -u /e/tools/gnu/include/setjmp.h /mingw/include/setjmp.h
>>> --- /e/tools/gnu/include/setjmp.h       Sun Oct  5 04:01:15 2008
>>> +++ /mingw/include/setjmp.h     Sun Nov 30 16:18:00 2008
>>> @@ -36,7 +36,7 @@
>>>   * The function provided by CRTDLL which appears to do the actual work
>>>   * of setjmp.
>>>   */
>>> -_CRTIMP int __cdecl __MINGW_NOTHROW _setjmp (jmp_buf);
>>> +int __cdecl _setjmp (jmp_buf);
>>>
>>>  #define        setjmp(x)       _setjmp(x)
>>>
>>> @@ -44,7 +44,7 @@
>>>   * Return to the last setjmp call and act as if setjmp had returned
>>>   * nVal (which had better be non-zero!).
>>>   */
>>> -_CRTIMP void __cdecl __MINGW_NOTHROW longjmp (jmp_buf, int)
>>> __MINGW_ATTRIB_NORETURN;
>>> +void __cdecl longjmp (jmp_buf, int);
>>>
>>>  #ifdef __cplusplus
>>>  }
>>>
>>> Also,
>>>  had to copy a pthread library with a dfferent name to the standard name:
>>> $cp libpthreadGC2.a libpthread.a
>>>
>>> The build went fine and am using the new binaries.
>>
>> Would you please push your addition to the mob branch of
>> git://repo.or.cz/msysgit.git? The push URL is repo.or.cz:/srv/git/msysgit.git
>>
>> (But notice that some commits are on the mob branch currently that are not
>> in any other branch; hence, you better build on top of them so that they
>> are not lost when you push to mob.)
>>
>> -- Hannes
>>
>
> I am not using git from the above repo. I am using it from:
> git://git2.kernel.org/pub/scm/git/git.git
>
> I will clone from the repo you have mentioned and push my changes,
> that will take some time. I have started the clone now...

I added a new remote to pull changes from the msys repo and it is
taking a long time (bad network). In the meantime for some wanting to
play:

1. I downloaded pthreads for windows from:
ftp://sourceware.org/pub/pthreads-win32/pthreads-w32-2-8-0-release.exe
2. Extracted and copied the headers, libraries to
msysgit/mingw/include and msysgit/mingw/lib folders. I made a copy of
DLL in bin folder too so that runtime can pick it.
3. I copied msysgit/mingw/lib/libpthreadGC2.a as
msysgit/mingw/lib/libpthread.a as -lpthread needs a lib with that name
4. Copied the setjmp.h header referred by pthread.h from my native
mingw installation and modified it (refer my earlier mail). The
modified contents of the new file that needs to go under
msysgit/mingw/include/setjmp.h:

/*
 * setjmp.h
 * This file has no copyright assigned and is placed in the Public Domain.
 * This file is a part of the mingw-runtime package.
 * No warranty is given; refer to the file DISCLAIMER within the package.
 *
 * Declarations supporting setjmp and longjump, a method for avoiding
 * the normal function call return sequence. (Bleah!)
 *
 */

#ifndef _SETJMP_H_
#define _SETJMP_H_

/* All the headers include this file. */
#include <_mingw.h>

#ifndef RC_INVOKED

#ifdef __cplusplus
extern "C" {
#endif

/*
 * The buffer used by setjmp to store the information used by longjmp
 * to perform it's evil goto-like work. The size of this buffer was
 * determined through experimentation; it's contents are a mystery.
 * NOTE: This was determined on an i386 (actually a Pentium). The
 *       contents could be different on an Alpha or something else.
 */
#define _JBLEN 16
#define _JBTYPE int
typedef _JBTYPE jmp_buf[_JBLEN];

/*
 * The function provided by CRTDLL which appears to do the actual work
 * of setjmp.
 */
int __cdecl _setjmp (jmp_buf);

#define setjmp(x)       _setjmp(x)

/*
 * Return to the last setjmp call and act as if setjmp had returned
 * nVal (which had better be non-zero!).
 */
void __cdecl longjmp (jmp_buf, int);

#ifdef __cplusplus
}
#endif

#endif  /* Not RC_INVOKED */

#endif  /* Not _SETJMP_H_ */

5. I modified git Makefile as:
diff --git a/Makefile b/Makefile
index 649cfb8..71f995d 100644
--- a/Makefile
+++ b/Makefile
@@ -776,6 +776,7 @@ ifneq (,$(findstring MINGW,$(uname_S)))
        NO_PERL_MAKEMAKER = YesPlease
        NO_POSIX_ONLY_PROGRAMS = YesPlease
        NO_ST_BLOCKS_IN_STRUCT_STAT = YesPlease
+       THREADED_DELTA_SEARCH = YesPlease
        COMPAT_CFLAGS += -D__USE_MINGW_ACCESS -DNOGDI -Icompat
-Icompat/regex -Icompat/fnmatch
        COMPAT_CFLAGS += -DSNPRINTF_SIZE_CORR=1
        COMPAT_CFLAGS += -DSTRIP_EXTENSION=\".exe\"

-dhruva

-- 
Contents reflect my personal views only!

^ permalink raw reply related	[flat|nested] 10+ messages in thread

* Re: git build on msys fails (and fix)
  2008-12-01 10:52     ` dhruva
@ 2008-12-01 11:48       ` dhruva
  2008-12-01 11:57         ` Johannes Sixt
  0 siblings, 1 reply; 10+ messages in thread
From: dhruva @ 2008-12-01 11:48 UTC (permalink / raw)
  To: Johannes Sixt; +Cc: Git, msysGit

Hi,
 I got the mob branch and I fail to see the Makefile. I decided to
just add the pthread related files and push so that someone could
build, I get authentication failures. I had tried to push perl
sometime back when I had a gcc compiler perl (before strawberry perl)
and had similar problems. I am fairly certain I am doing something
wrong but cannot figure it out!

I have kept the minimum pthread files needed to build in the following location:
http://dhruvakm.googlepages.com/pthread.tar.gz (40kb)
You need to modify Makefile to add for MinGW:
THREADED_DELTA_SEARCH = YesPlease

-dhruva

-- 
Contents reflect my personal views only!

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: git build on msys fails (and fix)
  2008-12-01 11:48       ` dhruva
@ 2008-12-01 11:57         ` Johannes Sixt
  2008-12-01 12:02           ` dhruva
  0 siblings, 1 reply; 10+ messages in thread
From: Johannes Sixt @ 2008-12-01 11:57 UTC (permalink / raw)
  To: dhruvakm; +Cc: Git, msysGit


dhruva schrieb:
>  I got the mob branch and I fail to see the Makefile. I decided to
> just add the pthread related files and push so that someone could
> build, I get authentication failures. I had tried to push perl
> sometime back when I had a gcc compiler perl (before strawberry perl)
> and had similar problems. I am fairly certain I am doing something
> wrong but cannot figure it out!

msysgit.git is *not* a git.git clone; it is the MSYS/MinGW environment to
build git.git on Windows.

You should apply the steps 1. to 4. that you mentioned in an earlier mail
and push the result; but you cannot apply 5. because that is a change to
git itself.

-- Hannes

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: git build on msys fails (and fix)
  2008-12-01 11:57         ` Johannes Sixt
@ 2008-12-01 12:02           ` dhruva
  2008-12-01 13:07             ` dhruva
  0 siblings, 1 reply; 10+ messages in thread
From: dhruva @ 2008-12-01 12:02 UTC (permalink / raw)
  To: Johannes Sixt; +Cc: Git, msysGit


Hello,

On Mon, Dec 1, 2008 at 5:27 PM, Johannes Sixt <j.sixt@viscovery.net> wrote:
> dhruva schrieb:
>>  I got the mob branch and I fail to see the Makefile. I decided to
>> just add the pthread related files and push so that someone could
>> build, I get authentication failures. I had tried to push perl
>> sometime back when I had a gcc compiler perl (before strawberry perl)
>> and had similar problems. I am fairly certain I am doing something
>> wrong but cannot figure it out!
>
> msysgit.git is *not* a git.git clone; it is the MSYS/MinGW environment to
> build git.git on Windows.
>
> You should apply the steps 1. to 4. that you mentioned in an earlier mail
> and push the result; but you cannot apply 5. because that is a change to
> git itself.

I request someone to just pull the archive I have placed just this
time, I will try again for other patches. I will create a clone in a
separate folder for msysgit and keep it ready. Unknowingly, I just
cleaned up the remote and lost all the changes I had pulled earlier :(

-dhruva

-- 
Contents reflect my personal views only!

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: git build on msys fails (and fix)
  2008-12-01 12:02           ` dhruva
@ 2008-12-01 13:07             ` dhruva
  2008-12-01 13:30               ` [msysGit] " dhruva
  0 siblings, 1 reply; 10+ messages in thread
From: dhruva @ 2008-12-01 13:07 UTC (permalink / raw)
  To: Johannes Sixt; +Cc: Git, msysGit


Hi,
I am trying to push to 'mob'.

$ git branch --track mob origin/mob
$ tar -zxvf ~/pthread.tar.gz
$ make prefix= html all install
$ git push repo.or.cz:/srv/git/msysgit.git
fatal: protocol error: bad line length charact
@:/
[531]$ Access denied
Access denied
Access denied
Access denied
Access denied
Access denied
FATAL ERROR: Server sent disconnect message
type 2 (protocol error):
"Too many authentication failures for dhruva"

Could someone help me out with this?

-dhruva

On Mon, Dec 1, 2008 at 5:32 PM, dhruva <dhruvakm@gmail.com> wrote:
> Hello,
>
> On Mon, Dec 1, 2008 at 5:27 PM, Johannes Sixt <j.sixt@viscovery.net> wrote:
>> dhruva schrieb:
>>>  I got the mob branch and I fail to see the Makefile. I decided to
>>> just add the pthread related files and push so that someone could
>>> build, I get authentication failures. I had tried to push perl
>>> sometime back when I had a gcc compiler perl (before strawberry perl)
>>> and had similar problems. I am fairly certain I am doing something
>>> wrong but cannot figure it out!
>>
>> msysgit.git is *not* a git.git clone; it is the MSYS/MinGW environment to
>> build git.git on Windows.
>>
>> You should apply the steps 1. to 4. that you mentioned in an earlier mail
>> and push the result; but you cannot apply 5. because that is a change to
>> git itself.
>
> I request someone to just pull the archive I have placed just this
> time, I will try again for other patches. I will create a clone in a
> separate folder for msysgit and keep it ready. Unknowingly, I just
> cleaned up the remote and lost all the changes I had pulled earlier :(
>
> -dhruva
>
> --
> Contents reflect my personal views only!
>



-- 
Contents reflect my personal views only!

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [msysGit] Re: git build on msys fails (and fix)
  2008-12-01 13:07             ` dhruva
@ 2008-12-01 13:30               ` dhruva
  0 siblings, 0 replies; 10+ messages in thread
From: dhruva @ 2008-12-01 13:30 UTC (permalink / raw)
  To: Johannes Sixt; +Cc: Git, msysGit

Hi,
 Sorry for all the noise, I pushed the files. I had to use:
$ git push mob@repo.or.cz:/srv/git/msysgit.git

-dhruva

-- 
Contents reflect my personal views only!

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2008-12-01 13:32 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-11-30 11:02 git build on msys fails (and fix) dhruva
2008-11-30 11:52 ` dhruva
2008-12-01  9:06 ` Johannes Sixt
2008-12-01  9:32   ` dhruva
2008-12-01 10:52     ` dhruva
2008-12-01 11:48       ` dhruva
2008-12-01 11:57         ` Johannes Sixt
2008-12-01 12:02           ` dhruva
2008-12-01 13:07             ` dhruva
2008-12-01 13:30               ` [msysGit] " dhruva

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).