Re: compile error building newest release on Cygwin

"David O'Toole" <[email protected]> Sat, 4 Jan 2020 11:24:11 -0500
Newsgroups gmane.comp.audio.ecasound.general
Message-ID <CAAz1J53cxhPgOGNfJAVshjsFf_TrH5f_NESVjx-Cj4dWCEJynw@mail.gmail.com>
--===============3968760685981833289==
Content-Type: multipart/alternative; boundary="000000000000f55b39059b52dbd4"

--000000000000f55b39059b52dbd4
Content-Type: text/plain; charset="UTF-8"

Hello there and thanks so much for your response. I ended up working around
the issue by backing up to the previous version of ecasound, but I will try
your work around with a newer version and get back to you when I can. Thank
you so much for your help.

On Sat, Jan 4, 2020, 11:01 AM Kai Vehmanen <[email protected]> wrote:

> Hi David,
>
> sorry for late reply.
>
> On Mon, 18 Nov 2019, David O'Toole wrote:
> > Hi, I'm having trouble getting Ecasound 2.9.2 release to compile on
> Cygwin. Below is a transcript of configuration and make, which fails with
> 'usleep not
> > declared in this scope'. Thanks in advance for any help or advice you
> can offer, let me know if I can help with more information.
>
> This might be not useful to you anymore, but in case you still have the
> Cygwin environment ready, maybe you can give this a try.
>
> kvutils: fix compilation errors for nanosleep/usleep
>
> https://github.com/kaivehmanen/ecasound/commit/4a802eb2b5f96d7aa521d83baa2698fec5ccc7e0
>
> This is a bit odd problem as configure found usleep:
>
> > checking for usleep... yes
>
> ... but when compiling, it fails:
>
> > libtool: compile:  g++ -DHAVE_CONFIG_H -I. -I. -I.. -ffast-math
> -fstrict-aliasing -std=c++98 -DNDEBUG -DENABLE_DBC -g -O2 -MT kvu_utils.lo
> -MD -MP -MF
> > .deps/kvu_utils.Tpo -c kvu_utils.cpp  -DDLL_EXPORT -DPIC -o
> .libs/kvu_utils.o
> > kvu_utils.cpp: In function 'int kvu_sleep(long int, long int)':
> > kvu_utils.cpp:680:9: error: 'usleep' was not declared in this scope
> >    ret = usleep(seconds * 1000000 + nanoseconds / 1000);
> >          ^~~~~~
>
> What I suspect happens it that -std=c++98 caused the compiler to take
> the namespaces more striclly and as the file has a "using namepsace std"
> at start, it fails to find usleep. The above commit attempts at a fix
> based on this hypothesis.
>
> Br, Kai

--000000000000f55b39059b52dbd4
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"auto">Hello there and thanks so much for your response. I ended=
 up working around the issue by backing up to the previous version of ecaso=
und, but I will try your work around with a newer version and get back to y=
ou when I can. Thank you so much for your help.</div><br><div class=3D"gmai=
l_quote"><div dir=3D"ltr" class=3D"gmail_attr">On Sat, Jan 4, 2020, 11:01 A=
M Kai Vehmanen &lt;<a href=3D"mailto:[email protected]">kvlists@nosignal.=
fi</a>&gt; wrote:<br></div><blockquote class=3D"gmail_quote" style=3D"margi=
n:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi David,<br>
<br>
sorry for late reply.<br>
<br>
On Mon, 18 Nov 2019, David O&#39;Toole wrote:<br>
&gt; Hi, I&#39;m having trouble getting Ecasound 2.9.2 release to compile o=
n Cygwin. Below is a transcript of configuration and make, which fails with=
 &#39;usleep not<br>
&gt; declared in this scope&#39;. Thanks in advance for any help or advice =
you can offer, let me know if I can help with more information.<br>
<br>
This might be not useful to you anymore, but in case you still have the <br=
>
Cygwin environment ready, maybe you can give this a try.<br>
<br>
kvutils: fix compilation errors for nanosleep/usleep <br>
<a href=3D"https://github.com/kaivehmanen/ecasound/commit/4a802eb2b5f96d7aa=
521d83baa2698fec5ccc7e0" rel=3D"noreferrer noreferrer" target=3D"_blank">ht=
tps://github.com/kaivehmanen/ecasound/commit/4a802eb2b5f96d7aa521d83baa2698=
fec5ccc7e0</a><br>
<br>
This is a bit odd problem as configure found usleep:<br>
<br>
&gt; checking for usleep... yes<br>
<br>
... but when compiling, it fails:<br>
<br>
&gt; libtool: compile: =C2=A0g++ -DHAVE_CONFIG_H -I. -I. -I.. -ffast-math -=
fstrict-aliasing -std=3Dc++98 -DNDEBUG -DENABLE_DBC -g -O2 -MT kvu_utils.lo=
 -MD -MP -MF<br>
&gt; .deps/kvu_utils.Tpo -c kvu_utils.cpp =C2=A0-DDLL_EXPORT -DPIC -o .libs=
/kvu_utils.o<br>
&gt; kvu_utils.cpp: In function &#39;int kvu_sleep(long int, long int)&#39;=
:<br>
&gt; kvu_utils.cpp:680:9: error: &#39;usleep&#39; was not declared in this =
scope<br>
&gt; =C2=A0 =C2=A0ret =3D usleep(seconds * 1000000 + nanoseconds / 1000);<b=
r>
&gt; =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0^~~~~~<br>
<br>
What I suspect happens it that -std=3Dc++98 caused the compiler to take<br>
the namespaces more striclly and as the file has a &quot;using namepsace st=
d&quot;<br>
at start, it fails to find usleep. The above commit attempts at a fix<br>
based on this hypothesis.<br>
<br>
Br, Kai</blockquote></div>

--000000000000f55b39059b52dbd4--


--===============3968760685981833289==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline


--===============3968760685981833289==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

_______________________________________________
Ecasound-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ecasound-list

--===============3968760685981833289==--