delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2016/11/30/14:10:59

X-Recipient: archive-cygwin AT delorie DOT com
DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id
:list-unsubscribe:list-subscribe:list-archive:list-post
:list-help:sender:subject:references:to:reply-to:from:message-id
:date:mime-version:in-reply-to:content-type
:content-transfer-encoding; q=dns; s=default; b=NeopGfLZyE0a+ifz
UpQYuvZ2xq/udEsUwPEZ0k01PyH2leUiYvWfwXDbkN+g6puhsy5X0v0eNJzCBknb
vSJzMFUaBmx9MooTynyBmlup5D/6/wlfw4QGOdpf1mnFxzktSCtPeJEy/b1vJhuc
lOVA9xb7JVnGJwpYvjqsa4JZK40=
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id
:list-unsubscribe:list-subscribe:list-archive:list-post
:list-help:sender:subject:references:to:reply-to:from:message-id
:date:mime-version:in-reply-to:content-type
:content-transfer-encoding; s=default; bh=PWseiCh7TtHEEZSPe2/8Ve
Ln17k=; b=lU/xozHKWlUlp4tZ2HQ73+EgeF4J0+bYg6/FhC0MZ1qL/QR3aNqK1j
gnpPN8OEDSuGTKo9Gm8ABodeKEJGdMdmmh+QShx5V2kUTEnLf7Fl18YEYmFT4q6V
Nqb05KfjPTAEo3KbXWEUfP7o7WS/c5n5ro603kKGMOF3yi5K4xEkM=
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
Authentication-Results: sourceware.org; auth=none
X-Virus-Found: No
X-Spam-SWARE-Status: No, score=-1.4 required=5.0 tests=AWL,BAYES_00,KAM_LAZY_DOMAIN_SECURITY,RCVD_IN_DNSWL_LOW autolearn=no version=3.3.2 spammy=Hx-spam-relays-external:shaw.ca, H*r:shaw.ca, H*RU:shaw.ca, H*R:D*ca
X-HELO: smtp-out-no.shaw.ca
X-Authority-Analysis: v=2.2 cv=JLBLi4Cb c=1 sm=1 tr=0 a=WqCeCkldcEjBO3QZneQsCg==:117 a=WqCeCkldcEjBO3QZneQsCg==:17 a=IkcTkHD0fZMA:10 a=Vt2AcnKqAAAA:8 a=NYoVjCcr-iVVSrUs_sgA:9 a=QEXdDO2ut3YA:10 a=v10HlyRyNeVhbzM4Lqgd:22
Subject: Re: Cygwin TCP slow
References: <CAO1c0AT52ZzCKc3yD_7eX6ri4VubrTb5L+X-4vHWoXBAX2jsfw AT mail DOT gmail DOT com> <5adc37f5-608b-6c1f-6d14-83343c82dc9f AT SystematicSw DOT ab DOT ca> <CAO1c0ARyXv76_7WO3mvZFjmZ1yYw8Q8bcz5e37YpuVmqhJwejg AT mail DOT gmail DOT com> <CABHT963SLLrcAxNgD+bUEarohJNj=M=HA34S_2mG86OfLCO3=A AT mail DOT gmail DOT com> <96dd675e-5b75-aced-0762-c67e96d33f67 AT SystematicSw DOT ab DOT ca> <CAD8GWsuytE300SCrqtmpOFqW92za1rftYBdWmyN1nDexyWMmFw AT mail DOT gmail DOT com>
To: cygwin AT cygwin DOT com
Reply-To: Brian DOT Inglis AT SystematicSw DOT ab DOT ca
From: Brian Inglis <Brian DOT Inglis AT SystematicSw DOT ab DOT ca>
Message-ID: <06fc1907-f9a9-d829-9d08-9bcbd953f472@SystematicSw.ab.ca>
Date: Wed, 30 Nov 2016 12:10:24 -0700
User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.5.0
MIME-Version: 1.0
In-Reply-To: <CAD8GWsuytE300SCrqtmpOFqW92za1rftYBdWmyN1nDexyWMmFw@mail.gmail.com>
X-CMAE-Envelope: MS4wfMw8mUZg4RYjnq/HSbZWU0JI1ftwWyZN1t+g8GaGjWk+3zEAHUKf/MImX8l0YfjAC0On/GovvaaZ2OazdQ9JZy5aULs6neduwf2JEhBHBgs66rHwbR7P X3iOeUqpFy0QWwyfj1qp7LTYE3re0/hzUS7Za2WcJU4YVho1lf/dGxNwwEAuhnyBDVAuCPugAgs2zA==
X-IsSubscribed: yes

On 2016-11-30 07:49, Lee wrote:
>> If you also provided a Cygwin port of iperf3
> Any hints on how to do that?

If you are running under Cygwin, first install cygport (and let setup 
install all its dependencies), and any iperf3 dependencies, then read 
the cygport html doc, and create a minimal package .cygport file (or 
download iperf source package and modify its .cygport for iperf3).
It defaults to build with autotools, so not much more needs to be 
done if that is used.
Otherwise you may have to inherit one or more other cygclasses, 
or modify default high level shell functions to override the 
behaviour, obeying the rules about which directory variables to use 
and in which to perform work.

If you only have Linux, you will have to check the setup.ini entry 
for cygport and install it and the appropriate (cross) tools, 
packages, and libraries, and the same for iperf3, for the host/target 
platform.

Check the Source*Ware* cygwin-apps and Source*Forge* 
cygwin-ports-general mailing lists archives, also available on 
mail-archive.com and other ml mirrors, for more info on cygports and 
cross-compiling.

> Trying to build using the i686-w64-mingw32-gcc cross-compiler dies 
> because nanosleep is missing. How to figure out what needs to be 
> installed to get that function?
> $ ./configure --prefix=/usr/local  --build=i686-pc-cygwin
> --host=i686-w64-mingw32
>   <.. snip ..>
> checking for ANSI C header files... (cached) yes
> checking for library containing floor... none required
> checking for library containing nanosleep... no
> nanosleep() required for timing operations.

For nanosleep, there appear to be two different interfaces in time.h, 
depending on whether _POSIX_TIMERS or _POSIX_CLOCK_SELECTION are 
defined: check the .h for which interface is used and set the 
appropriate definition to a POSIX release date e.g. 200809L.
The headers, newlib, and gcc support a variety of standards and 
flavours of platform extensions, not all of which are compatible.

> Trying to build using the cygwin gcc compiler does because of
> "conflicting types for 'iprintf'"
> 
> aside: Why would one redefine a standard routine instead of making
> their own routine that calls the standard routine??  The conflicting
> bit is in iperf_api.h:
> /* Custom printf routine. */
> int iprintf(struct iperf_test *test, const char *format, ...)
> __attribute__ ((format(printf,2,3)));
> 
> In any case, how does one reconcile
>   int iprintf( ...
> with
>   int	_EXFUN(iprintf, ( ...

Original iperf predates POSIX additions, and they did not heed the C 
and POSIX standards notes to avoid defining functions containing 
certain substrings.
One strategic #define iprintf iperf_printf in the right app header, 
included after all standard headers, before other app headers, may 
fix things up, or you may have to dink around with #undefs as well to 
avoid problems.

If your source defines no specific feature test macros, and you 
compile with no standard language version, or a gnu version, _GNU_SOURCE 
and many POSIX and glibc-compatible interfaces to newlib will be defined.

The same header may be included in the builds of the Windows cygwin 
dll, the newlib library for Cygwin and many embedded platforms, tools 
for many host platforms, and apps for many target platforms, so there 
are macros which provide the appropriate decorations depending on 
platform.

-- 
Take care. Thanks, Brian Inglis, Calgary, Alberta, Canada

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019