All of lore.kernel.org
 help / color / mirror / Atom feed
* Windows Make Broken
@ 2016-01-21 21:43 Jeff Furlong
  2016-01-21 21:53 ` Bruce Cran
  0 siblings, 1 reply; 14+ messages in thread
From: Jeff Furlong @ 2016-01-21 21:43 UTC (permalink / raw)
  To: fio@vger.kernel.org

Hi All,
Building version 2.5 on Windows appears broken:


server.c:272:11: error: 'MSG_DONTWAIT' undeclared (first use in this function)
   flags = MSG_DONTWAIT;
           ^
server.c:272:11: note: each undeclared identifier is reported only once for each function it appears in
Makefile:294: recipe for target 'server.o' failed
make: *** [server.o] Error 1


Regards,
Jeff

HGST E-mail Confidentiality Notice & Disclaimer:
This e-mail and any files transmitted with it may contain confidential or legally privileged information of HGST and are intended solely for the use of the individual or entity to which they are addressed. If you are not the intended recipient, any disclosure, copying, distribution or any action taken or omitted to be taken in reliance on it, is prohibited.  If you have received this e-mail in error, please notify the sender immediately and delete the e-mail in its entirety from your system.


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

* Re: Windows Make Broken
  2016-01-21 21:43 Windows Make Broken Jeff Furlong
@ 2016-01-21 21:53 ` Bruce Cran
  2016-01-22  4:18   ` Jens Axboe
  0 siblings, 1 reply; 14+ messages in thread
From: Bruce Cran @ 2016-01-21 21:53 UTC (permalink / raw)
  To: Jeff Furlong, fio@vger.kernel.org

On 01/21/2016 02:43 PM, Jeff Furlong wrote:
> Building version 2.5 on Windows appears broken:
>
>
> server.c:272:11: error: 'MSG_DONTWAIT' undeclared (first use in this function)
>     flags = MSG_DONTWAIT;
>             ^
> server.c:272:11: note: each undeclared identifier is reported only once for each function it appears in

Yeah, there's also a problem with strcasestr.c. I'm working on fixing 
both problems just now.

---
Bruce

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

* Re: Windows Make Broken
  2016-01-21 21:53 ` Bruce Cran
@ 2016-01-22  4:18   ` Jens Axboe
  2016-01-22 13:30     ` Bruce Cran
  2016-01-22 18:16     ` Bruce Cran
  0 siblings, 2 replies; 14+ messages in thread
From: Jens Axboe @ 2016-01-22  4:18 UTC (permalink / raw)
  To: Bruce Cran, Jeff Furlong, fio@vger.kernel.org

On 01/21/2016 02:53 PM, Bruce Cran wrote:
> On 01/21/2016 02:43 PM, Jeff Furlong wrote:
>> Building version 2.5 on Windows appears broken:
>>
>>
>> server.c:272:11: error: 'MSG_DONTWAIT' undeclared (first use in this
>> function)
>>     flags = MSG_DONTWAIT;
>>             ^
>> server.c:272:11: note: each undeclared identifier is reported only
>> once for each function it appears in
>
> Yeah, there's also a problem with strcasestr.c. I'm working on fixing
> both problems just now.

We'll just spin a 2.6 once that's fixed.

I never heard back on the mutex issue, I'm assuming it's fixed for you?

-- 
Jens Axboe



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

* Re: Windows Make Broken
  2016-01-22  4:18   ` Jens Axboe
@ 2016-01-22 13:30     ` Bruce Cran
  2016-01-22 18:16     ` Bruce Cran
  1 sibling, 0 replies; 14+ messages in thread
From: Bruce Cran @ 2016-01-22 13:30 UTC (permalink / raw)
  To: Jens Axboe, Jeff Furlong, fio@vger.kernel.org

On 1/21/16 9:18 PM, Jens Axboe wrote:

> I never heard back on the mutex issue, I'm assuming it's fixed for you?

Sorry - yes, your changeset fixed it.

-- 
Bruce



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

* Re: Windows Make Broken
  2016-01-22  4:18   ` Jens Axboe
  2016-01-22 13:30     ` Bruce Cran
@ 2016-01-22 18:16     ` Bruce Cran
  2016-01-22 18:50       ` Jens Axboe
  1 sibling, 1 reply; 14+ messages in thread
From: Bruce Cran @ 2016-01-22 18:16 UTC (permalink / raw)
  To: Jens Axboe, Jeff Furlong, fio@vger.kernel.org

[-- Attachment #1: Type: text/plain, Size: 388 bytes --]

On 1/21/16 9:18 PM, Jens Axboe wrote:
> On 01/21/2016 02:53 PM, Bruce Cran wrote:
>> Yeah, there's also a problem with strcasestr.c. I'm working on fixing
>> both problems just now.
>
> We'll just spin a 2.6 once that's fixed.

I've attached a patch that should fix it.  The removal of strcasestr.o 
is because I was getting a error saying strcasestr had already been defined.

-- 
Bruce

[-- Attachment #2: 0001-Fix-Windows-build-define-MSG_DONTWAIT-and-avoid-dupl.patch --]
[-- Type: text/plain, Size: 1372 bytes --]

From 6ab23ee572ee4ad9562318d9168293df177a5c59 Mon Sep 17 00:00:00 2001
From: Bruce Cran <bruce.cran@gmail.com>
Date: Fri, 22 Jan 2016 10:54:47 -0700
Subject: [PATCH] Fix Windows build: define MSG_DONTWAIT and avoid duplicate
 strcasestr definition

---
 Makefile        | 2 +-
 os/os-windows.h | 7 ++++++-
 2 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/Makefile b/Makefile
index b6ebf2f..febc8f8 100644
--- a/Makefile
+++ b/Makefile
@@ -200,7 +200,7 @@ T_IEEE_PROGS = t/ieee754
 
 T_ZIPF_OBS = t/genzipf.o
 T_ZIPF_OBJS += t/log.o lib/ieee754.o lib/rand.o lib/pattern.o lib/zipf.o \
-		lib/strntol.o lib/gauss.o t/genzipf.o oslib/strcasestr.o
+		lib/strntol.o lib/gauss.o t/genzipf.o
 T_ZIPF_PROGS = t/fio-genzipf
 
 T_AXMAP_OBJS = t/axmap.o
diff --git a/os/os-windows.h b/os/os-windows.h
index 159c086..7305dd0 100644
--- a/os/os-windows.h
+++ b/os/os-windows.h
@@ -20,6 +20,11 @@
 
 #include "windows/posix.h"
 
+/* Cygwin doesn't define rand_r if C99 or newer is being used */
+#if defined(WIN32) && !defined(rand_r)
+int rand_r(unsigned *);
+#endif
+
 #ifndef PTHREAD_STACK_MIN
 #define PTHREAD_STACK_MIN 65535
 #endif
@@ -69,7 +74,7 @@ typedef DWORD_PTR os_cpu_mask_t;
 #define O_NONBLOCK		FIONBIO
 
 /* Winsock doesn't support MSG_WAIT */
-#define OS_MSG_DONTWAIT	0
+#define MSG_DONTWAIT 0
 
 #define POLLOUT	1
 #define POLLIN	2
-- 
2.5.2.windows.2


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

* Re: Windows Make Broken
  2016-01-22 18:16     ` Bruce Cran
@ 2016-01-22 18:50       ` Jens Axboe
  2016-01-22 22:02         ` Bruce Cran
  0 siblings, 1 reply; 14+ messages in thread
From: Jens Axboe @ 2016-01-22 18:50 UTC (permalink / raw)
  To: Bruce Cran, Jeff Furlong, fio@vger.kernel.org

On 01/22/2016 11:16 AM, Bruce Cran wrote:
> On 1/21/16 9:18 PM, Jens Axboe wrote:
>> On 01/21/2016 02:53 PM, Bruce Cran wrote:
>>> Yeah, there's also a problem with strcasestr.c. I'm working on fixing
>>> both problems just now.
>>
>> We'll just spin a 2.6 once that's fixed.
>
> I've attached a patch that should fix it.  The removal of strcasestr.o
> is because I was getting a error saying strcasestr had already been
> defined.

Two comments:

- I think we should just use OS_MSG_DONTWAIT in the server.c code, then 
it'd work fine. That's an oversight on my behalf.

- On the strcasestr, since you have STRCASESTR on Windows, don't you 
just need to add   output_sym "CONFIG_STRCASESTR" to configure for windows?

-- 
Jens Axboe



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

* Re: Windows Make Broken
  2016-01-22 18:50       ` Jens Axboe
@ 2016-01-22 22:02         ` Bruce Cran
  2016-01-22 22:12           ` Jens Axboe
  0 siblings, 1 reply; 14+ messages in thread
From: Bruce Cran @ 2016-01-22 22:02 UTC (permalink / raw)
  To: Jens Axboe, Jeff Furlong, fio@vger.kernel.org

On 1/22/16 11:50 AM, Jens Axboe wrote:

> - I think we should just use OS_MSG_DONTWAIT in the server.c code, then
> it'd work fine. That's an oversight on my behalf.
>
> - On the strcasestr, since you have STRCASESTR on Windows, don't you
> just need to add   output_sym "CONFIG_STRCASESTR" to configure for windows?
>

I tried defining CONFIG_STRCASESTR but it didn't work - so I think 
strcasestr.o is being linked in twice?

-- 
Bruce

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

* Re: Windows Make Broken
  2016-01-22 22:02         ` Bruce Cran
@ 2016-01-22 22:12           ` Jens Axboe
  2016-01-22 22:18             ` Bruce Cran
  2016-01-22 22:21             ` Bruce Cran
  0 siblings, 2 replies; 14+ messages in thread
From: Jens Axboe @ 2016-01-22 22:12 UTC (permalink / raw)
  To: Bruce Cran, Jeff Furlong, fio@vger.kernel.org

On 01/22/2016 03:02 PM, Bruce Cran wrote:
> On 1/22/16 11:50 AM, Jens Axboe wrote:
>
>> - I think we should just use OS_MSG_DONTWAIT in the server.c code, then
>> it'd work fine. That's an oversight on my behalf.
>>
>> - On the strcasestr, since you have STRCASESTR on Windows, don't you
>> just need to add   output_sym "CONFIG_STRCASESTR" to configure for
>> windows?
>>
>
> I tried defining CONFIG_STRCASESTR but it didn't work - so I think
> strcasestr.o is being linked in twice?

I think you earlier added it in the cygwin section. We need to kill that 
one, not the generic one, since that would fail on systems not providing 
strcasestr().

http://git.kernel.dk/cgit/fio/commit/?id=ada83043abcb94dde7c603ce60ae8de9693a022f

-- 
Jens Axboe



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

* Re: Windows Make Broken
  2016-01-22 22:12           ` Jens Axboe
@ 2016-01-22 22:18             ` Bruce Cran
  2016-01-22 22:21             ` Bruce Cran
  1 sibling, 0 replies; 14+ messages in thread
From: Bruce Cran @ 2016-01-22 22:18 UTC (permalink / raw)
  To: Jens Axboe, Jeff Furlong, fio@vger.kernel.org

On 1/22/16 3:12 PM, Jens Axboe wrote:

> I think you earlier added it in the cygwin section. We need to kill that
> one, not the generic one, since that would fail on systems not providing
> strcasestr().
>
> http://git.kernel.dk/cgit/fio/commit/?id=ada83043abcb94dde7c603ce60ae8de9693a022f

Ah, that's it - thanks!

-- 
Bruce



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

* Re: Windows Make Broken
  2016-01-22 22:12           ` Jens Axboe
  2016-01-22 22:18             ` Bruce Cran
@ 2016-01-22 22:21             ` Bruce Cran
  2016-01-22 22:25               ` Jens Axboe
  1 sibling, 1 reply; 14+ messages in thread
From: Bruce Cran @ 2016-01-22 22:21 UTC (permalink / raw)
  To: Jens Axboe, Jeff Furlong, fio@vger.kernel.org

On 1/22/16 3:12 PM, Jens Axboe wrote:

> I think you earlier added it in the cygwin section. We need to kill that
> one, not the generic one, since that would fail on systems not providing
> strcasestr().
>
> http://git.kernel.dk/cgit/fio/commit/?id=ada83043abcb94dde7c603ce60ae8de9693a022f

There's one other fix in my patch that would be good to be committed: 
Cygwin doesn't define rand_r since it's not in C99 
(https://cygwin.com/ml/cygwin/2009-05/msg00432.html). I've instead 
changed os-windows.h to avoid the compiler warnings.

-- 
Bruce

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

* Re: Windows Make Broken
  2016-01-22 22:21             ` Bruce Cran
@ 2016-01-22 22:25               ` Jens Axboe
  2016-01-22 22:37                 ` Bruce Cran
  0 siblings, 1 reply; 14+ messages in thread
From: Jens Axboe @ 2016-01-22 22:25 UTC (permalink / raw)
  To: Bruce Cran, Jeff Furlong, fio@vger.kernel.org

On 01/22/2016 03:21 PM, Bruce Cran wrote:
> On 1/22/16 3:12 PM, Jens Axboe wrote:
>
>> I think you earlier added it in the cygwin section. We need to kill that
>> one, not the generic one, since that would fail on systems not providing
>> strcasestr().
>>
>> http://git.kernel.dk/cgit/fio/commit/?id=ada83043abcb94dde7c603ce60ae8de9693a022f
>>
>
> There's one other fix in my patch that would be good to be committed:
> Cygwin doesn't define rand_r since it's not in C99
> (https://cygwin.com/ml/cygwin/2009-05/msg00432.html). I've instead
> changed os-windows.h to avoid the compiler warnings.

Added, thanks. Are we good on Windows now?

-- 
Jens Axboe



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

* Re: Windows Make Broken
  2016-01-22 22:25               ` Jens Axboe
@ 2016-01-22 22:37                 ` Bruce Cran
  2016-01-22 22:40                   ` Jens Axboe
  2016-01-22 22:58                   ` Jeff Furlong
  0 siblings, 2 replies; 14+ messages in thread
From: Bruce Cran @ 2016-01-22 22:37 UTC (permalink / raw)
  To: Jens Axboe, Jeff Furlong, fio@vger.kernel.org

On 1/22/16 3:25 PM, Jens Axboe wrote:

> Added, thanks. Are we good on Windows now?

I just verified both 32-bit and 64-bit builds, and both work with no 
compiler warnings - so yes, Windows is good now.

-- 
Bruce


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

* Re: Windows Make Broken
  2016-01-22 22:37                 ` Bruce Cran
@ 2016-01-22 22:40                   ` Jens Axboe
  2016-01-22 22:58                   ` Jeff Furlong
  1 sibling, 0 replies; 14+ messages in thread
From: Jens Axboe @ 2016-01-22 22:40 UTC (permalink / raw)
  To: Bruce Cran, Jeff Furlong, fio@vger.kernel.org

On 01/22/2016 03:37 PM, Bruce Cran wrote:
> On 1/22/16 3:25 PM, Jens Axboe wrote:
>
>> Added, thanks. Are we good on Windows now?
>
> I just verified both 32-bit and 64-bit builds, and both work with no
> compiler warnings - so yes, Windows is good now.

Perfect. I'll roll 2.6 sometime next week.

-- 
Jens Axboe



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

* RE: Windows Make Broken
  2016-01-22 22:37                 ` Bruce Cran
  2016-01-22 22:40                   ` Jens Axboe
@ 2016-01-22 22:58                   ` Jeff Furlong
  1 sibling, 0 replies; 14+ messages in thread
From: Jeff Furlong @ 2016-01-22 22:58 UTC (permalink / raw)
  To: Bruce Cran, Jens Axboe, fio@vger.kernel.org

Builds fine here as well.  Thanks.

Regards,
Jeff


-----Original Message-----
From: Bruce Cran [mailto:bruce@cran.org.uk] 
Sent: Friday, January 22, 2016 2:38 PM
To: Jens Axboe <axboe@kernel.dk>; Jeff Furlong <jeff.furlong@hgst.com>; fio@vger.kernel.org
Subject: Re: Windows Make Broken

On 1/22/16 3:25 PM, Jens Axboe wrote:

> Added, thanks. Are we good on Windows now?

I just verified both 32-bit and 64-bit builds, and both work with no compiler warnings - so yes, Windows is good now.

--
Bruce

HGST E-mail Confidentiality Notice & Disclaimer:
This e-mail and any files transmitted with it may contain confidential or legally privileged information of HGST and are intended solely for the use of the individual or entity to which they are addressed. If you are not the intended recipient, any disclosure, copying, distribution or any action taken or omitted to be taken in reliance on it, is prohibited.  If you have received this e-mail in error, please notify the sender immediately and delete the e-mail in its entirety from your system.

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

end of thread, other threads:[~2016-01-22 22:58 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-01-21 21:43 Windows Make Broken Jeff Furlong
2016-01-21 21:53 ` Bruce Cran
2016-01-22  4:18   ` Jens Axboe
2016-01-22 13:30     ` Bruce Cran
2016-01-22 18:16     ` Bruce Cran
2016-01-22 18:50       ` Jens Axboe
2016-01-22 22:02         ` Bruce Cran
2016-01-22 22:12           ` Jens Axboe
2016-01-22 22:18             ` Bruce Cran
2016-01-22 22:21             ` Bruce Cran
2016-01-22 22:25               ` Jens Axboe
2016-01-22 22:37                 ` Bruce Cran
2016-01-22 22:40                   ` Jens Axboe
2016-01-22 22:58                   ` Jeff Furlong

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.