# Re: [PATCH 0/4] Make MINGW port cross-compilable from Linux

5 messages from 2007-05-30 to 2007-05-30. Participants: Johannes Sixt, Nguyen Thai Ngoc Duy, Johannes Schindelin.
Thread: https://gitlist.dev/t/8362

## Johannes Sixt, 2007-05-30 06:51

Subject: Re: [PATCH 0/4] Make MINGW port cross-compilable from Linux
Message-ID: <465D1EDD.658483B4@eudaptics.com>
URL: https://gitlist.dev/e/465D1EDD.658483B4%40eudaptics.com
In-Reply-To: <11804928354163-git-send-email-pclouds@gmail.com>

```
"Nguyá»n ThÃ¡i Ngá»c Duy" wrote:
> 
> The following patches allow to cross compile mingw port from Linux less painful.

Thank you. Could you please push this to the mob branch?

git push mob@repo.or.cz:/srv/git/git/mingw.git +mybranch:mob

The series should be based on mingw.git's master branch (not devel)!

-- Hannes

```

## Johannes Sixt, 2007-05-30 12:01

Subject: Re: [PATCH 4/4] Don't link with libsocket in MINGW port
Message-ID: <465D6796.27B65043@eudaptics.com>
URL: https://gitlist.dev/e/465D6796.27B65043%40eudaptics.com
In-Reply-To: <1180492848275-git-send-email-pclouds@gmail.com>

```
"Nguyá»n ThÃ¡i Ngá»c Duy" wrote:
> 
> From: Nguyá»n ThÃ¡i Ngá»c Duy <pclouds@gmail.com>
> 
> There is a check in configure.ac to determine if libc has function
> socket(). It is used to link with libsocket on SunOS.
> 
> On Windows, libc does not have socket() as well but it is provided
> by winsock, not libsocket. So don't link with libsocket if you are
> on Windows.

>  ifdef NEEDS_SOCKET
> +ifndef MINGW
>         EXTLIBS += -lsocket
>  endif
> +endif

This looks wrong. NEEDS_SOCKET is set in the architecture sections of
Makefile where necessary, but the MinGW section doesn't want it and
doesn't set it. If ./configure sets it, then you should fix
configure.ac, not work around in Makefile.

-- Hannes

PS: Appologies for the mangled name - this MUA is from the stone age.

```

## Nguyen Thai Ngoc Duy, 2007-05-30 13:08

Subject: Re: [PATCH 4/4] Don't link with libsocket in MINGW port
Message-ID: <fcaeb9bf0705300608y6ae9eb12i71635746defbec10@mail.gmail.com>
URL: https://gitlist.dev/e/fcaeb9bf0705300608y6ae9eb12i71635746defbec10%40mail.gmail.com
In-Reply-To: <465D6796.27B65043@eudaptics.com>

```
On 5/30/07, Johannes Sixt <J.Sixt@eudaptics.com> wrote:
> This looks wrong. NEEDS_SOCKET is set in the architecture sections of
> Makefile where necessary, but the MinGW section doesn't want it and
> doesn't set it. If ./configure sets it, then you should fix
> configure.ac, not work around in Makefile.

I did so because I didn't have SunOS to test so I'd rather not touch
the code detecting NEEDS_SOCKET in configure.ac. How about this patch:

diff --git a/configure.ac b/configure.ac
index 4a12cb0..0516fdb 100644
--- a/configure.ac
+++ b/configure.ac
@@ -173,6 +173,12 @@ test -n "$NEEDS_LIBICONV" && LIBS="$LIBS -liconv"
 AC_CHECK_LIB([c], [socket],
 [NEEDS_SOCKET=],
 [NEEDS_SOCKET=YesPlease])
+if test "$NEEDS_SOCKET" = YesPlease; then # more check
+	AC_CHECK_LIB([socket], [socket],
+	[LIBSOCKET_HAS_SOCKET=],
+	[LIBSOCKET_HAS_SOCKET=1])
+	test -n "$LIBSOCKET_HAS_SOCKET" && NEEDS_SOCKET=
+fi
 AC_SUBST(NEEDS_SOCKET)
 test -n "$NEEDS_SOCKET" && LIBS="$LIBS -lsocket"

If someone has a SunOS, please test the above patch. Thanks
-- 
Duy

```

## Johannes Schindelin, 2007-05-30 13:11

Subject: Re: [PATCH 0/4] Make MINGW port cross-compilable from Linux
Message-ID: <Pine.LNX.4.64.0705301411190.4011@racer.site>
URL: https://gitlist.dev/e/Pine.LNX.4.64.0705301411190.4011%40racer.site
In-Reply-To: <465D1EDD.658483B4@eudaptics.com>

```
Hi,

On Wed, 30 May 2007, Johannes Sixt wrote:

> "Nguyá»n ThÃ¡i Ngá»c Duy" wrote:
> > 
> > The following patches allow to cross compile mingw port from Linux less painful.
> 
> Thank you. Could you please push this to the mob branch?
> 
> git push mob@repo.or.cz:/srv/git/git/mingw.git +mybranch:mob
> 
> The series should be based on mingw.git's master branch (not devel)!

Is there any good reason why you do that in such a secretive manner? I 
have not seen this series on the list, just your replies.

Ciao,
Dscho

```

## Johannes Schindelin, 2007-05-30 13:43

Subject: Re: [PATCH 0/4] Make MINGW port cross-compilable from Linux
Message-ID: <Pine.LNX.4.64.0705301442100.4011@racer.site>
URL: https://gitlist.dev/e/Pine.LNX.4.64.0705301442100.4011%40racer.site
In-Reply-To: <fcaeb9bf0705300618s712be8auf29ba7bd3579bd16@mail.gmail.com>

```
Hi,

On Wed, 30 May 2007, Nguyen Thai Ngoc Duy wrote:

> On 5/30/07, Johannes Schindelin <Johannes.Schindelin@gmx.de> wrote:
> > 
> > On Wed, 30 May 2007, Johannes Sixt wrote:
> > 
> > > "Nguyễn Thái Ngọc Duy" wrote:
> > > >
> > > > The following patches allow to cross compile mingw port from Linux less
> > painful.
> > >
> > > Thank you. Could you please push this to the mob branch?
> > >
> > > git push mob@repo.or.cz:/srv/git/git/mingw.git +mybranch:mob
> > >
> > > The series should be based on mingw.git's master branch (not devel)!
> > 
> > Is there any good reason why you do that in such a secretive manner? I
> > have not seen this series on the list, just your replies.
> 
> It's vger that should be blamed, not me :) I sent the series to
> Johannes Sixt and CC git@vger but they never came.

That explains it. I notice that your mail did not come through again... 
Maybe vger should grow a facility where you can check _why_ a mail does 
not go through. Sort of frustrating otherwise.

Ciao,
Dscho

```
