Csound Csound-dev Csound-tekno Search About

[Cs-dev] Build issue on Windows - remote.c

Date2009-12-26 22:04
FromSteven Yi
Subject[Cs-dev] Build issue on Windows - remote.c
Hi All,

I'm trying to build Csound on WinXP for my netbook and am running into
an issue in remote.c looking for sockets.h.  Has anyone run into this
problem before and know of a solution? (Error log below)

Any help appreciated!
steven

gcc -o OOps\remote.o -c -Wall -Wno-format -O3 -mtune=nocona -ftree-vectorize -ff
ast-math -fomit-frame-pointer -freorder-blocks -D_WIN32 -DWIN32 -DPIPES -DOS_IS_
WIN32 -mthreads -fno-strict-aliasing -DHAVE_LIBSNDFILE=1016 -DBETA -DUSE_DOUBLE
-DHAVE_PTHREAD_BARRIER_INIT -DHAVE_SYNC_LOCK_TEST_AND_SET -DHAVE_IO_H -DHAVE_FCN
TL_H -DHAVE_UNISTD_H -DHAVE_STDINT_H -DHAVE_SYS_TIME_H -DHAVE_SYS_TYPES_H -DHAVE
_VALUES_H -DHAVE_SOCKETS -DHAVE_DIRENT_H -DENABLE_NEW_PARSER -D__BUILDING_LIBCSO
UND -I. -IH -IC:\msys\1.0\local\include -IC:\MinGW\include -IC:\work\libsndfile-
1_0_17 -IC:\work\pthreads.2\Pre-built.2\include -ID:\utah\opt\portaudio_varga\in
clude -ID:\utah\opt\portmidi\pm_common -ID:\utah\opt\portmidi\pm_win -ID:\utah\o
pt\portmidi\porttime -IC:\work\fltk-1.1.7 -ID:\utah\opt\Python24\include -IC:\Py
thon26\include -ID:\utah\home\mkg\projects\csoundd\frontends\CsoundVST -ID:\utah
\opt\lua-5.1.1\src -ID:\utah\opt\Tcl\include -IC:\work\boost -IC:\work\fluidsynt
h-1.0.3-win32\include -ID:\utah\opt\jdk1.5.0\include -ID:\utah\opt\jdk1.5.0\incl
ude\win32 -ID:\utah\opt\pd-0.38-4-devel-2\src -ID:\utah\opt\fftw-3.0.1\api -IC:\
usr\local\include -IC:\usr\include OOps\remote.c
OOps\remote.c:28:24: error: sys/socket.h: No such file or directory

------------------------------------------------------------------------------
This SF.Net email is sponsored by the Verizon Developer Community
Take advantage of Verizon's best-in-class app development support
A streamlined, 14 day to market process makes app distribution fast and easy
Join now and get one step closer to millions of Verizon customers
http://p.sf.net/sfu/verizon-dev2dev 
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net

Date2009-12-26 23:48
FromVictor Lazzarini
SubjectRe: [Cs-dev] Build issue on Windows - remote.c
For some reason WIN32 is not defined for you. Try adding it to your  
customCPFLAGS or whatnot.
(mind you the compiler should define this token...).

Victor
On 26 Dec 2009, at 22:04, Steven Yi wrote:

> Hi All,
>
> I'm trying to build Csound on WinXP for my netbook and am running into
> an issue in remote.c looking for sockets.h.  Has anyone run into this
> problem before and know of a solution? (Error log below)
>
> Any help appreciated!
> steven
>
> gcc -o OOps\remote.o -c -Wall -Wno-format -O3 -mtune=nocona -ftree- 
> vectorize -ff
> ast-math -fomit-frame-pointer -freorder-blocks -D_WIN32 -DWIN32 - 
> DPIPES -DOS_IS_
> WIN32 -mthreads -fno-strict-aliasing -DHAVE_LIBSNDFILE=1016 -DBETA - 
> DUSE_DOUBLE
> -DHAVE_PTHREAD_BARRIER_INIT -DHAVE_SYNC_LOCK_TEST_AND_SET - 
> DHAVE_IO_H -DHAVE_FCN
> TL_H -DHAVE_UNISTD_H -DHAVE_STDINT_H -DHAVE_SYS_TIME_H - 
> DHAVE_SYS_TYPES_H -DHAVE
> _VALUES_H -DHAVE_SOCKETS -DHAVE_DIRENT_H -DENABLE_NEW_PARSER - 
> D__BUILDING_LIBCSO
> UND -I. -IH -IC:\msys\1.0\local\include -IC:\MinGW\include -IC:\work 
> \libsndfile-
> 1_0_17 -IC:\work\pthreads.2\Pre-built.2\include -ID:\utah\opt 
> \portaudio_varga\in
> clude -ID:\utah\opt\portmidi\pm_common -ID:\utah\opt\portmidi\pm_win  
> -ID:\utah\o
> pt\portmidi\porttime -IC:\work\fltk-1.1.7 -ID:\utah\opt 
> \Python24\include -IC:\Py
> thon26\include -ID:\utah\home\mkg\projects\csoundd\frontends 
> \CsoundVST -ID:\utah
> \opt\lua-5.1.1\src -ID:\utah\opt\Tcl\include -IC:\work\boost -IC: 
> \work\fluidsynt
> h-1.0.3-win32\include -ID:\utah\opt\jdk1.5.0\include -ID:\utah\opt 
> \jdk1.5.0\incl
> ude\win32 -ID:\utah\opt\pd-0.38-4-devel-2\src -ID:\utah\opt 
> \fftw-3.0.1\api -IC:\
> usr\local\include -IC:\usr\include OOps\remote.c
> OOps\remote.c:28:24: error: sys/socket.h: No such file or directory
>
> ------------------------------------------------------------------------------
> This SF.Net email is sponsored by the Verizon Developer Community
> Take advantage of Verizon's best-in-class app development support
> A streamlined, 14 day to market process makes app distribution fast  
> and easy
> Join now and get one step closer to millions of Verizon customers
> http://p.sf.net/sfu/verizon-dev2dev
> _______________________________________________
> Csound-devel mailing list
> Csound-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/csound-devel


------------------------------------------------------------------------------
This SF.Net email is sponsored by the Verizon Developer Community
Take advantage of Verizon's best-in-class app development support
A streamlined, 14 day to market process makes app distribution fast and easy
Join now and get one step closer to millions of Verizon customers
http://p.sf.net/sfu/verizon-dev2dev 
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net

Date2009-12-28 22:33
FromSteven Yi
SubjectRe: [Cs-dev] Build issue on Windows - remote.c
Hi Victor,

That doesn't seem to be it as the excerpt I pasted shows -DWIN32. I'll
have to investigate futher.

Thanks!
Steven

On 12/26/09, Victor Lazzarini  wrote:
> For some reason WIN32 is not defined for you. Try adding it to your
> customCPFLAGS or whatnot.
> (mind you the compiler should define this token...).
>
> Victor
> On 26 Dec 2009, at 22:04, Steven Yi wrote:
>
>> Hi All,
>>
>> I'm trying to build Csound on WinXP for my netbook and am running into
>> an issue in remote.c looking for sockets.h.  Has anyone run into this
>> problem before and know of a solution? (Error log below)
>>
>> Any help appreciated!
>> steven
>>
>> gcc -o OOps\remote.o -c -Wall -Wno-format -O3 -mtune=nocona -ftree-
>> vectorize -ff
>> ast-math -fomit-frame-pointer -freorder-blocks -D_WIN32 -DWIN32 -
>> DPIPES -DOS_IS_
>> WIN32 -mthreads -fno-strict-aliasing -DHAVE_LIBSNDFILE=1016 -DBETA -
>> DUSE_DOUBLE
>> -DHAVE_PTHREAD_BARRIER_INIT -DHAVE_SYNC_LOCK_TEST_AND_SET -
>> DHAVE_IO_H -DHAVE_FCN
>> TL_H -DHAVE_UNISTD_H -DHAVE_STDINT_H -DHAVE_SYS_TIME_H -
>> DHAVE_SYS_TYPES_H -DHAVE
>> _VALUES_H -DHAVE_SOCKETS -DHAVE_DIRENT_H -DENABLE_NEW_PARSER -
>> D__BUILDING_LIBCSO
>> UND -I. -IH -IC:\msys\1.0\local\include -IC:\MinGW\include -IC:\work
>> \libsndfile-
>> 1_0_17 -IC:\work\pthreads.2\Pre-built.2\include -ID:\utah\opt
>> \portaudio_varga\in
>> clude -ID:\utah\opt\portmidi\pm_common -ID:\utah\opt\portmidi\pm_win
>> -ID:\utah\o
>> pt\portmidi\porttime -IC:\work\fltk-1.1.7 -ID:\utah\opt
>> \Python24\include -IC:\Py
>> thon26\include -ID:\utah\home\mkg\projects\csoundd\frontends
>> \CsoundVST -ID:\utah
>> \opt\lua-5.1.1\src -ID:\utah\opt\Tcl\include -IC:\work\boost -IC:
>> \work\fluidsynt
>> h-1.0.3-win32\include -ID:\utah\opt\jdk1.5.0\include -ID:\utah\opt
>> \jdk1.5.0\incl
>> ude\win32 -ID:\utah\opt\pd-0.38-4-devel-2\src -ID:\utah\opt
>> \fftw-3.0.1\api -IC:\
>> usr\local\include -IC:\usr\include OOps\remote.c
>> OOps\remote.c:28:24: error: sys/socket.h: No such file or directory
>>
>> ------------------------------------------------------------------------------
>> This SF.Net email is sponsored by the Verizon Developer Community
>> Take advantage of Verizon's best-in-class app development support
>> A streamlined, 14 day to market process makes app distribution fast
>> and easy
>> Join now and get one step closer to millions of Verizon customers
>> http://p.sf.net/sfu/verizon-dev2dev
>> _______________________________________________
>> Csound-devel mailing list
>> Csound-devel@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>
>
> ------------------------------------------------------------------------------
> This SF.Net email is sponsored by the Verizon Developer Community
> Take advantage of Verizon's best-in-class app development support
> A streamlined, 14 day to market process makes app distribution fast and easy
> Join now and get one step closer to millions of Verizon customers
> http://p.sf.net/sfu/verizon-dev2dev
> _______________________________________________
> Csound-devel mailing list
> Csound-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/csound-devel
>

-- 
Sent from my mobile device

------------------------------------------------------------------------------
This SF.Net email is sponsored by the Verizon Developer Community
Take advantage of Verizon's best-in-class app development support
A streamlined, 14 day to market process makes app distribution fast and easy
Join now and get one step closer to millions of Verizon customers
http://p.sf.net/sfu/verizon-dev2dev 
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net

Date2009-12-28 22:51
FromVictor Lazzarini
SubjectRe: [Cs-dev] Build issue on Windows - remote.c
The funny thing is that in my sources, sys/socket.h is included in  
remote.h and not in remote.c.

Victor
On 28 Dec 2009, at 22:33, Steven Yi wrote:

> Hi Victor,
>
> That doesn't seem to be it as the excerpt I pasted shows -DWIN32. I'll
> have to investigate futher.
>
> Thanks!
> Steven
>
> On 12/26/09, Victor Lazzarini  wrote:
>> For some reason WIN32 is not defined for you. Try adding it to your
>> customCPFLAGS or whatnot.
>> (mind you the compiler should define this token...).
>>
>> Victor
>> On 26 Dec 2009, at 22:04, Steven Yi wrote:
>>
>>> Hi All,
>>>
>>> I'm trying to build Csound on WinXP for my netbook and am running  
>>> into
>>> an issue in remote.c looking for sockets.h.  Has anyone run into  
>>> this
>>> problem before and know of a solution? (Error log below)
>>>
>>> Any help appreciated!
>>> steven
>>>
>>> gcc -o OOps\remote.o -c -Wall -Wno-format -O3 -mtune=nocona -ftree-
>>> vectorize -ff
>>> ast-math -fomit-frame-pointer -freorder-blocks -D_WIN32 -DWIN32 -
>>> DPIPES -DOS_IS_
>>> WIN32 -mthreads -fno-strict-aliasing -DHAVE_LIBSNDFILE=1016 -DBETA -
>>> DUSE_DOUBLE
>>> -DHAVE_PTHREAD_BARRIER_INIT -DHAVE_SYNC_LOCK_TEST_AND_SET -
>>> DHAVE_IO_H -DHAVE_FCN
>>> TL_H -DHAVE_UNISTD_H -DHAVE_STDINT_H -DHAVE_SYS_TIME_H -
>>> DHAVE_SYS_TYPES_H -DHAVE
>>> _VALUES_H -DHAVE_SOCKETS -DHAVE_DIRENT_H -DENABLE_NEW_PARSER -
>>> D__BUILDING_LIBCSO
>>> UND -I. -IH -IC:\msys\1.0\local\include -IC:\MinGW\include -IC:\work
>>> \libsndfile-
>>> 1_0_17 -IC:\work\pthreads.2\Pre-built.2\include -ID:\utah\opt
>>> \portaudio_varga\in
>>> clude -ID:\utah\opt\portmidi\pm_common -ID:\utah\opt\portmidi\pm_win
>>> -ID:\utah\o
>>> pt\portmidi\porttime -IC:\work\fltk-1.1.7 -ID:\utah\opt
>>> \Python24\include -IC:\Py
>>> thon26\include -ID:\utah\home\mkg\projects\csoundd\frontends
>>> \CsoundVST -ID:\utah
>>> \opt\lua-5.1.1\src -ID:\utah\opt\Tcl\include -IC:\work\boost -IC:
>>> \work\fluidsynt
>>> h-1.0.3-win32\include -ID:\utah\opt\jdk1.5.0\include -ID:\utah\opt
>>> \jdk1.5.0\incl
>>> ude\win32 -ID:\utah\opt\pd-0.38-4-devel-2\src -ID:\utah\opt
>>> \fftw-3.0.1\api -IC:\
>>> usr\local\include -IC:\usr\include OOps\remote.c
>>> OOps\remote.c:28:24: error: sys/socket.h: No such file or directory
>>>
>>> ------------------------------------------------------------------------------
>>> This SF.Net email is sponsored by the Verizon Developer Community
>>> Take advantage of Verizon's best-in-class app development support
>>> A streamlined, 14 day to market process makes app distribution fast
>>> and easy
>>> Join now and get one step closer to millions of Verizon customers
>>> http://p.sf.net/sfu/verizon-dev2dev
>>> _______________________________________________
>>> Csound-devel mailing list
>>> Csound-devel@lists.sourceforge.net
>>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>>
>>
>> ------------------------------------------------------------------------------
>> This SF.Net email is sponsored by the Verizon Developer Community
>> Take advantage of Verizon's best-in-class app development support
>> A streamlined, 14 day to market process makes app distribution fast  
>> and easy
>> Join now and get one step closer to millions of Verizon customers
>> http://p.sf.net/sfu/verizon-dev2dev
>> _______________________________________________
>> Csound-devel mailing list
>> Csound-devel@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>>
>
> -- 
> Sent from my mobile device
>
> ------------------------------------------------------------------------------
> This SF.Net email is sponsored by the Verizon Developer Community
> Take advantage of Verizon's best-in-class app development support
> A streamlined, 14 day to market process makes app distribution fast  
> and easy
> Join now and get one step closer to millions of Verizon customers
> http://p.sf.net/sfu/verizon-dev2dev
> _______________________________________________
> Csound-devel mailing list
> Csound-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/csound-devel


------------------------------------------------------------------------------
This SF.Net email is sponsored by the Verizon Developer Community
Take advantage of Verizon's best-in-class app development support
A streamlined, 14 day to market process makes app distribution fast and easy
Join now and get one step closer to millions of Verizon customers
http://p.sf.net/sfu/verizon-dev2dev 
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net

Date2010-01-05 22:52
FromSteven Yi
SubjectRe: [Cs-dev] Build issue on Windows - remote.c
HI Victor,

Following up now that I'm back to Rochester and getting back into the
swing of things, I think your source may be out of date. :)  In the
CVS history, it looks like:

#include 

was added by Felipe Sateler on 11/26/2009 as part of revision 1.34.
However, sys/socket.h does exist in the remote.h file.  There seems to
be a duplication of headers being included in both remote.c and
remote.h.  I am not sure who wrote all of this originally so am asking
for others to take a look.

I have deleted the #include from remote.c locally and it is now
building on MinGW (WinXP).

Can we revert that commit? (Felipe?)

Thanks!
steven

p.s. - I'm making some fixes to pitch.c now (csound->InitError instead
of csoundInitError) and will commit those in a moment

On Mon, Dec 28, 2009 at 5:51 PM, Victor Lazzarini
 wrote:
> The funny thing is that in my sources, sys/socket.h is included in
> remote.h and not in remote.c.
>
> Victor
> On 28 Dec 2009, at 22:33, Steven Yi wrote:
>
>> Hi Victor,
>>
>> That doesn't seem to be it as the excerpt I pasted shows -DWIN32. I'll
>> have to investigate futher.
>>
>> Thanks!
>> Steven
>>
>> On 12/26/09, Victor Lazzarini  wrote:
>>> For some reason WIN32 is not defined for you. Try adding it to your
>>> customCPFLAGS or whatnot.
>>> (mind you the compiler should define this token...).
>>>
>>> Victor
>>> On 26 Dec 2009, at 22:04, Steven Yi wrote:
>>>
>>>> Hi All,
>>>>
>>>> I'm trying to build Csound on WinXP for my netbook and am running
>>>> into
>>>> an issue in remote.c looking for sockets.h.  Has anyone run into
>>>> this
>>>> problem before and know of a solution? (Error log below)
>>>>
>>>> Any help appreciated!
>>>> steven
>>>>
>>>> gcc -o OOps\remote.o -c -Wall -Wno-format -O3 -mtune=nocona -ftree-
>>>> vectorize -ff
>>>> ast-math -fomit-frame-pointer -freorder-blocks -D_WIN32 -DWIN32 -
>>>> DPIPES -DOS_IS_
>>>> WIN32 -mthreads -fno-strict-aliasing -DHAVE_LIBSNDFILE=1016 -DBETA -
>>>> DUSE_DOUBLE
>>>> -DHAVE_PTHREAD_BARRIER_INIT -DHAVE_SYNC_LOCK_TEST_AND_SET -
>>>> DHAVE_IO_H -DHAVE_FCN
>>>> TL_H -DHAVE_UNISTD_H -DHAVE_STDINT_H -DHAVE_SYS_TIME_H -
>>>> DHAVE_SYS_TYPES_H -DHAVE
>>>> _VALUES_H -DHAVE_SOCKETS -DHAVE_DIRENT_H -DENABLE_NEW_PARSER -
>>>> D__BUILDING_LIBCSO
>>>> UND -I. -IH -IC:\msys\1.0\local\include -IC:\MinGW\include -IC:\work
>>>> \libsndfile-
>>>> 1_0_17 -IC:\work\pthreads.2\Pre-built.2\include -ID:\utah\opt
>>>> \portaudio_varga\in
>>>> clude -ID:\utah\opt\portmidi\pm_common -ID:\utah\opt\portmidi\pm_win
>>>> -ID:\utah\o
>>>> pt\portmidi\porttime -IC:\work\fltk-1.1.7 -ID:\utah\opt
>>>> \Python24\include -IC:\Py
>>>> thon26\include -ID:\utah\home\mkg\projects\csoundd\frontends
>>>> \CsoundVST -ID:\utah
>>>> \opt\lua-5.1.1\src -ID:\utah\opt\Tcl\include -IC:\work\boost -IC:
>>>> \work\fluidsynt
>>>> h-1.0.3-win32\include -ID:\utah\opt\jdk1.5.0\include -ID:\utah\opt
>>>> \jdk1.5.0\incl
>>>> ude\win32 -ID:\utah\opt\pd-0.38-4-devel-2\src -ID:\utah\opt
>>>> \fftw-3.0.1\api -IC:\
>>>> usr\local\include -IC:\usr\include OOps\remote.c
>>>> OOps\remote.c:28:24: error: sys/socket.h: No such file or directory
>>>>
>>>> ------------------------------------------------------------------------------
>>>> This SF.Net email is sponsored by the Verizon Developer Community
>>>> Take advantage of Verizon's best-in-class app development support
>>>> A streamlined, 14 day to market process makes app distribution fast
>>>> and easy
>>>> Join now and get one step closer to millions of Verizon customers
>>>> http://p.sf.net/sfu/verizon-dev2dev
>>>> _______________________________________________
>>>> Csound-devel mailing list
>>>> Csound-devel@lists.sourceforge.net
>>>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>>>
>>>
>>> ------------------------------------------------------------------------------
>>> This SF.Net email is sponsored by the Verizon Developer Community
>>> Take advantage of Verizon's best-in-class app development support
>>> A streamlined, 14 day to market process makes app distribution fast
>>> and easy
>>> Join now and get one step closer to millions of Verizon customers
>>> http://p.sf.net/sfu/verizon-dev2dev
>>> _______________________________________________
>>> Csound-devel mailing list
>>> Csound-devel@lists.sourceforge.net
>>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>>>
>>
>> --
>> Sent from my mobile device
>>
>> ------------------------------------------------------------------------------
>> This SF.Net email is sponsored by the Verizon Developer Community
>> Take advantage of Verizon's best-in-class app development support
>> A streamlined, 14 day to market process makes app distribution fast
>> and easy
>> Join now and get one step closer to millions of Verizon customers
>> http://p.sf.net/sfu/verizon-dev2dev
>> _______________________________________________
>> Csound-devel mailing list
>> Csound-devel@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>
>
> ------------------------------------------------------------------------------
> This SF.Net email is sponsored by the Verizon Developer Community
> Take advantage of Verizon's best-in-class app development support
> A streamlined, 14 day to market process makes app distribution fast and easy
> Join now and get one step closer to millions of Verizon customers
> http://p.sf.net/sfu/verizon-dev2dev
> _______________________________________________
> Csound-devel mailing list
> Csound-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/csound-devel
>

------------------------------------------------------------------------------
This SF.Net email is sponsored by the Verizon Developer Community
Take advantage of Verizon's best-in-class app development support
A streamlined, 14 day to market process makes app distribution fast and easy
Join now and get one step closer to millions of Verizon customers
http://p.sf.net/sfu/verizon-dev2dev 
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net

Date2010-01-06 00:03
FromFelipe Sateler
SubjectRe: [Cs-dev] Build issue on Windows - remote.c
AttachmentsNone  None  
On Tue, 2010-01-05 at 17:52 -0500, Steven Yi wrote:
> HI Victor,
> 
> Following up now that I'm back to Rochester and getting back into the
> swing of things, I think your source may be out of date. :)  In the
> CVS history, it looks like:
> 
> #include 
> 
> was added by Felipe Sateler on 11/26/2009 as part of revision 1.34.
> However, sys/socket.h does exist in the remote.h file.  There seems to
> be a duplication of headers being included in both remote.c and
> remote.h.  I am not sure who wrote all of this originally so am asking
> for others to take a look.
> 
> I have deleted the #include from remote.c locally and it is now
> building on MinGW (WinXP).
> 
> Can we revert that commit? (Felipe?)

I think it can... I added the include because I missed that remote.h
already includes it. The thing is that I added it because gcc is warning
about an implicit declaration of inet_aton, and for it to be defined
POSIX says one should include 3 headers, of which sys/socket.h was
missing in remote.c (but is present in remote.h, which I missed). The
warning persists, and the reason seems to be that _BSD_SOURCE must be
defined (but defining that causes other build failures). Removing the
net includes from remote.c fixes that.

I suggest defining _BSD_SOURCE, and removing the #ifdef LINUX section in
remote.c (since it is a duplicate of what is in remote.h). I will apply
the following diff if you find it acceptable:

diff -u -r1.34 remote.c
--- OOps/remote.c	26 Nov 2009 21:48:38 -0000	1.34
+++ OOps/remote.c	6 Jan 2010 00:01:57 -0000
@@ -22,16 +22,17 @@
 */
 
 #include "csoundCore.h"
+
+/* We need inet_aton, which requires _BSD_SOURCE */
+#ifndef _BSD_SOURCE
+#define _BSD_SOURCE
+#endif
+
 #include "remote.h"
 
 #ifdef HAVE_SOCKETS
-#include 
 #ifndef WIN32
 #include 
-#ifdef LINUX
-#include 
-#include 
-#endif
 #include 
 #endif
 #endif /* HAVE_SOCKETS */

-- 
Saludos,
Felipe Sateler

Date2010-01-06 00:23
FromSteven Yi
SubjectRe: [Cs-dev] Build issue on Windows - remote.c
Hi Felipe,

That seems fine to me, though shouldn't the _BSD_SOURCE be added to
remote.h instead of remote.c?  It seems then we can isolate it to the
#else clause near the include of sys/socket.h as that isn't necessary
for Windows?  Whichever way you decide, please feel free to commit and
I'll test on Windows after the commit and perhaps someone can test on
OSX to make sure that it is fine there too.

Many thanks!
Steven

On Tue, Jan 5, 2010 at 7:03 PM, Felipe Sateler  wrote:
> On Tue, 2010-01-05 at 17:52 -0500, Steven Yi wrote:
>> HI Victor,
>>
>> Following up now that I'm back to Rochester and getting back into the
>> swing of things, I think your source may be out of date. :)  In the
>> CVS history, it looks like:
>>
>> #include 
>>
>> was added by Felipe Sateler on 11/26/2009 as part of revision 1.34.
>> However, sys/socket.h does exist in the remote.h file.  There seems to
>> be a duplication of headers being included in both remote.c and
>> remote.h.  I am not sure who wrote all of this originally so am asking
>> for others to take a look.
>>
>> I have deleted the #include from remote.c locally and it is now
>> building on MinGW (WinXP).
>>
>> Can we revert that commit? (Felipe?)
>
> I think it can... I added the include because I missed that remote.h
> already includes it. The thing is that I added it because gcc is warning
> about an implicit declaration of inet_aton, and for it to be defined
> POSIX says one should include 3 headers, of which sys/socket.h was
> missing in remote.c (but is present in remote.h, which I missed). The
> warning persists, and the reason seems to be that _BSD_SOURCE must be
> defined (but defining that causes other build failures). Removing the
> net includes from remote.c fixes that.
>
> I suggest defining _BSD_SOURCE, and removing the #ifdef LINUX section in
> remote.c (since it is a duplicate of what is in remote.h). I will apply
> the following diff if you find it acceptable:
>
> diff -u -r1.34 remote.c
> --- OOps/remote.c       26 Nov 2009 21:48:38 -0000      1.34
> +++ OOps/remote.c       6 Jan 2010 00:01:57 -0000
> @@ -22,16 +22,17 @@
>  */
>
>  #include "csoundCore.h"
> +
> +/* We need inet_aton, which requires _BSD_SOURCE */
> +#ifndef _BSD_SOURCE
> +#define _BSD_SOURCE
> +#endif
> +
>  #include "remote.h"
>
>  #ifdef HAVE_SOCKETS
> -#include 
>  #ifndef WIN32
>  #include 
> -#ifdef LINUX
> -#include 
> -#include 
> -#endif
>  #include 
>  #endif
>  #endif /* HAVE_SOCKETS */
>
> --
> Saludos,
> Felipe Sateler
>
> ------------------------------------------------------------------------------
> This SF.Net email is sponsored by the Verizon Developer Community
> Take advantage of Verizon's best-in-class app development support
> A streamlined, 14 day to market process makes app distribution fast and easy
> Join now and get one step closer to millions of Verizon customers
> http://p.sf.net/sfu/verizon-dev2dev
> _______________________________________________
> Csound-devel mailing list
> Csound-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/csound-devel
>
>

------------------------------------------------------------------------------
This SF.Net email is sponsored by the Verizon Developer Community
Take advantage of Verizon's best-in-class app development support
A streamlined, 14 day to market process makes app distribution fast and easy
Join now and get one step closer to millions of Verizon customers
http://p.sf.net/sfu/verizon-dev2dev 
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net

Date2010-01-06 11:27
FromVictor Lazzarini
SubjectRe: [Cs-dev] Build issue on Windows - remote.c
yes, you are right, I need to update my sources ;)
On 5 Jan 2010, at 22:52, Steven Yi wrote:

> HI Victor,
>
> Following up now that I'm back to Rochester and getting back into the
> swing of things, I think your source may be out of date. :)  In the
> CVS history, it looks like:
>
> #include 
>
> was added by Felipe Sateler on 11/26/2009 as part of revision 1.34.
> However, sys/socket.h does exist in the remote.h file.  There seems to
> be a duplication of headers being included in both remote.c and
> remote.h.  I am not sure who wrote all of this originally so am asking
> for others to take a look.
>
> I have deleted the #include from remote.c locally and it is now
> building on MinGW (WinXP).
>
> Can we revert that commit? (Felipe?)
>
> Thanks!
> steven
>
> p.s. - I'm making some fixes to pitch.c now (csound->InitError instead
> of csoundInitError) and will commit those in a moment
>
> On Mon, Dec 28, 2009 at 5:51 PM, Victor Lazzarini
>  wrote:
>> The funny thing is that in my sources, sys/socket.h is included in
>> remote.h and not in remote.c.
>>
>> Victor
>> On 28 Dec 2009, at 22:33, Steven Yi wrote:
>>
>>> Hi Victor,
>>>
>>> That doesn't seem to be it as the excerpt I pasted shows -DWIN32.  
>>> I'll
>>> have to investigate futher.
>>>
>>> Thanks!
>>> Steven
>>>
>>> On 12/26/09, Victor Lazzarini  wrote:
>>>> For some reason WIN32 is not defined for you. Try adding it to your
>>>> customCPFLAGS or whatnot.
>>>> (mind you the compiler should define this token...).
>>>>
>>>> Victor
>>>> On 26 Dec 2009, at 22:04, Steven Yi wrote:
>>>>
>>>>> Hi All,
>>>>>
>>>>> I'm trying to build Csound on WinXP for my netbook and am running
>>>>> into
>>>>> an issue in remote.c looking for sockets.h.  Has anyone run into
>>>>> this
>>>>> problem before and know of a solution? (Error log below)
>>>>>
>>>>> Any help appreciated!
>>>>> steven
>>>>>
>>>>> gcc -o OOps\remote.o -c -Wall -Wno-format -O3 -mtune=nocona - 
>>>>> ftree-
>>>>> vectorize -ff
>>>>> ast-math -fomit-frame-pointer -freorder-blocks -D_WIN32 -DWIN32 -
>>>>> DPIPES -DOS_IS_
>>>>> WIN32 -mthreads -fno-strict-aliasing -DHAVE_LIBSNDFILE=1016 - 
>>>>> DBETA -
>>>>> DUSE_DOUBLE
>>>>> -DHAVE_PTHREAD_BARRIER_INIT -DHAVE_SYNC_LOCK_TEST_AND_SET -
>>>>> DHAVE_IO_H -DHAVE_FCN
>>>>> TL_H -DHAVE_UNISTD_H -DHAVE_STDINT_H -DHAVE_SYS_TIME_H -
>>>>> DHAVE_SYS_TYPES_H -DHAVE
>>>>> _VALUES_H -DHAVE_SOCKETS -DHAVE_DIRENT_H -DENABLE_NEW_PARSER -
>>>>> D__BUILDING_LIBCSO
>>>>> UND -I. -IH -IC:\msys\1.0\local\include -IC:\MinGW\include -IC: 
>>>>> \work
>>>>> \libsndfile-
>>>>> 1_0_17 -IC:\work\pthreads.2\Pre-built.2\include -ID:\utah\opt
>>>>> \portaudio_varga\in
>>>>> clude -ID:\utah\opt\portmidi\pm_common -ID:\utah\opt\portmidi 
>>>>> \pm_win
>>>>> -ID:\utah\o
>>>>> pt\portmidi\porttime -IC:\work\fltk-1.1.7 -ID:\utah\opt
>>>>> \Python24\include -IC:\Py
>>>>> thon26\include -ID:\utah\home\mkg\projects\csoundd\frontends
>>>>> \CsoundVST -ID:\utah
>>>>> \opt\lua-5.1.1\src -ID:\utah\opt\Tcl\include -IC:\work\boost -IC:
>>>>> \work\fluidsynt
>>>>> h-1.0.3-win32\include -ID:\utah\opt\jdk1.5.0\include -ID:\utah\opt
>>>>> \jdk1.5.0\incl
>>>>> ude\win32 -ID:\utah\opt\pd-0.38-4-devel-2\src -ID:\utah\opt
>>>>> \fftw-3.0.1\api -IC:\
>>>>> usr\local\include -IC:\usr\include OOps\remote.c
>>>>> OOps\remote.c:28:24: error: sys/socket.h: No such file or  
>>>>> directory
>>>>>
>>>>> ------------------------------------------------------------------------------
>>>>> This SF.Net email is sponsored by the Verizon Developer Community
>>>>> Take advantage of Verizon's best-in-class app development support
>>>>> A streamlined, 14 day to market process makes app distribution  
>>>>> fast
>>>>> and easy
>>>>> Join now and get one step closer to millions of Verizon customers
>>>>> http://p.sf.net/sfu/verizon-dev2dev
>>>>> _______________________________________________
>>>>> Csound-devel mailing list
>>>>> Csound-devel@lists.sourceforge.net
>>>>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>>>>
>>>>
>>>> ------------------------------------------------------------------------------
>>>> This SF.Net email is sponsored by the Verizon Developer Community
>>>> Take advantage of Verizon's best-in-class app development support
>>>> A streamlined, 14 day to market process makes app distribution fast
>>>> and easy
>>>> Join now and get one step closer to millions of Verizon customers
>>>> http://p.sf.net/sfu/verizon-dev2dev
>>>> _______________________________________________
>>>> Csound-devel mailing list
>>>> Csound-devel@lists.sourceforge.net
>>>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>>>>
>>>
>>> --
>>> Sent from my mobile device
>>>
>>> ------------------------------------------------------------------------------
>>> This SF.Net email is sponsored by the Verizon Developer Community
>>> Take advantage of Verizon's best-in-class app development support
>>> A streamlined, 14 day to market process makes app distribution fast
>>> and easy
>>> Join now and get one step closer to millions of Verizon customers
>>> http://p.sf.net/sfu/verizon-dev2dev
>>> _______________________________________________
>>> Csound-devel mailing list
>>> Csound-devel@lists.sourceforge.net
>>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>>
>>
>> ------------------------------------------------------------------------------
>> This SF.Net email is sponsored by the Verizon Developer Community
>> Take advantage of Verizon's best-in-class app development support
>> A streamlined, 14 day to market process makes app distribution fast  
>> and easy
>> Join now and get one step closer to millions of Verizon customers
>> http://p.sf.net/sfu/verizon-dev2dev
>> _______________________________________________
>> Csound-devel mailing list
>> Csound-devel@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>>
>
> ------------------------------------------------------------------------------
> This SF.Net email is sponsored by the Verizon Developer Community
> Take advantage of Verizon's best-in-class app development support
> A streamlined, 14 day to market process makes app distribution fast  
> and easy
> Join now and get one step closer to millions of Verizon customers
> http://p.sf.net/sfu/verizon-dev2dev
> _______________________________________________
> Csound-devel mailing list
> Csound-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/csound-devel


------------------------------------------------------------------------------
This SF.Net email is sponsored by the Verizon Developer Community
Take advantage of Verizon's best-in-class app development support
A streamlined, 14 day to market process makes app distribution fast and easy
Join now and get one step closer to millions of Verizon customers
http://p.sf.net/sfu/verizon-dev2dev 
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net

Date2010-01-06 17:32
FromFelipe Sateler
SubjectRe: [Cs-dev] Build issue on Windows - remote.c
AttachmentsNone  None  
Hmm, I'm starting to get annoyed by this maze of #includes. If I define
_BSD_SOURCE via a -D flag or just at the top of remote.c, everything is
OK. However, if I define it in remote.h just before #including the
socket files, I get the warning about inet_aton. This means that somehow
these files are being included before remote.h, via csoundCore.h.

I'm still searching for that. In the meanwhile, I reverted 1.34.


On Tue, 2010-01-05 at 19:23 -0500, Steven Yi wrote:
> Hi Felipe,
> 
> That seems fine to me, though shouldn't the _BSD_SOURCE be added to
> remote.h instead of remote.c?  It seems then we can isolate it to the
> #else clause near the include of sys/socket.h as that isn't necessary
> for Windows?  Whichever way you decide, please feel free to commit and
> I'll test on Windows after the commit and perhaps someone can test on
> OSX to make sure that it is fine there too.
> 
> Many thanks!
> Steven
> 
> On Tue, Jan 5, 2010 at 7:03 PM, Felipe Sateler  wrote:
> > On Tue, 2010-01-05 at 17:52 -0500, Steven Yi wrote:
> >> HI Victor,
> >>
> >> Following up now that I'm back to Rochester and getting back into the
> >> swing of things, I think your source may be out of date. :)  In the
> >> CVS history, it looks like:
> >>
> >> #include 
> >>
> >> was added by Felipe Sateler on 11/26/2009 as part of revision 1.34.
> >> However, sys/socket.h does exist in the remote.h file.  There seems to
> >> be a duplication of headers being included in both remote.c and
> >> remote.h.  I am not sure who wrote all of this originally so am asking
> >> for others to take a look.
> >>
> >> I have deleted the #include from remote.c locally and it is now
> >> building on MinGW (WinXP).
> >>
> >> Can we revert that commit? (Felipe?)
> >
> > I think it can... I added the include because I missed that remote.h
> > already includes it. The thing is that I added it because gcc is warning
> > about an implicit declaration of inet_aton, and for it to be defined
> > POSIX says one should include 3 headers, of which sys/socket.h was
> > missing in remote.c (but is present in remote.h, which I missed). The
> > warning persists, and the reason seems to be that _BSD_SOURCE must be
> > defined (but defining that causes other build failures). Removing the
> > net includes from remote.c fixes that.
> >
> > I suggest defining _BSD_SOURCE, and removing the #ifdef LINUX section in
> > remote.c (since it is a duplicate of what is in remote.h). I will apply
> > the following diff if you find it acceptable:
> >
> > diff -u -r1.34 remote.c
> > --- OOps/remote.c       26 Nov 2009 21:48:38 -0000      1.34
> > +++ OOps/remote.c       6 Jan 2010 00:01:57 -0000
> > @@ -22,16 +22,17 @@
> >  */
> >
> >  #include "csoundCore.h"
> > +
> > +/* We need inet_aton, which requires _BSD_SOURCE */
> > +#ifndef _BSD_SOURCE
> > +#define _BSD_SOURCE
> > +#endif
> > +
> >  #include "remote.h"
> >
> >  #ifdef HAVE_SOCKETS
> > -#include 
> >  #ifndef WIN32
> >  #include 
> > -#ifdef LINUX
> > -#include 
> > -#include 
> > -#endif
> >  #include 
> >  #endif
> >  #endif /* HAVE_SOCKETS */
> >
> > --
> > Saludos,
> > Felipe Sateler
> >
> > ------------------------------------------------------------------------------
> > This SF.Net email is sponsored by the Verizon Developer Community
> > Take advantage of Verizon's best-in-class app development support
> > A streamlined, 14 day to market process makes app distribution fast and easy
> > Join now and get one step closer to millions of Verizon customers
> > http://p.sf.net/sfu/verizon-dev2dev
> > _______________________________________________
> > Csound-devel mailing list
> > Csound-devel@lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/csound-devel
> >
> >
> 
> ------------------------------------------------------------------------------
> This SF.Net email is sponsored by the Verizon Developer Community
> Take advantage of Verizon's best-in-class app development support
> A streamlined, 14 day to market process makes app distribution fast and easy
> Join now and get one step closer to millions of Verizon customers
> http://p.sf.net/sfu/verizon-dev2dev 
> _______________________________________________
> Csound-devel mailing list
> Csound-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/csound-devel

-- 
Saludos,
Felipe Sateler

Date2010-01-06 17:52
FromSteven Yi
SubjectRe: [Cs-dev] Build issue on Windows - remote.c
That is annoying!

I did a grep and found:

C:\work\workspace\csound5>grep socket.h * -n -r
H/remote.h:31:#include 
Opcodes/sockrecv.c:32:#include 
Opcodes/socksend.c:30:#include 
SConstruct:843:elif configure.CheckHeader("sys/socket.h", language = "C"):
SConstruct2:785:elif configure.CheckHeader("sys/socket.h", language = "C"):

Perhaps socket.h is getting included from some system header?  Do you
have output from SCons that has the warning?

On Wed, Jan 6, 2010 at 12:32 PM, Felipe Sateler  wrote:
> Hmm, I'm starting to get annoyed by this maze of #includes. If I define
> _BSD_SOURCE via a -D flag or just at the top of remote.c, everything is
> OK. However, if I define it in remote.h just before #including the
> socket files, I get the warning about inet_aton. This means that somehow
> these files are being included before remote.h, via csoundCore.h.
>
> I'm still searching for that. In the meanwhile, I reverted 1.34.
>
>
> On Tue, 2010-01-05 at 19:23 -0500, Steven Yi wrote:
>> Hi Felipe,
>>
>> That seems fine to me, though shouldn't the _BSD_SOURCE be added to
>> remote.h instead of remote.c?  It seems then we can isolate it to the
>> #else clause near the include of sys/socket.h as that isn't necessary
>> for Windows?  Whichever way you decide, please feel free to commit and
>> I'll test on Windows after the commit and perhaps someone can test on
>> OSX to make sure that it is fine there too.
>>
>> Many thanks!
>> Steven
>>
>> On Tue, Jan 5, 2010 at 7:03 PM, Felipe Sateler  wrote:
>> > On Tue, 2010-01-05 at 17:52 -0500, Steven Yi wrote:
>> >> HI Victor,
>> >>
>> >> Following up now that I'm back to Rochester and getting back into the
>> >> swing of things, I think your source may be out of date. :)  In the
>> >> CVS history, it looks like:
>> >>
>> >> #include 
>> >>
>> >> was added by Felipe Sateler on 11/26/2009 as part of revision 1.34.
>> >> However, sys/socket.h does exist in the remote.h file.  There seems to
>> >> be a duplication of headers being included in both remote.c and
>> >> remote.h.  I am not sure who wrote all of this originally so am asking
>> >> for others to take a look.
>> >>
>> >> I have deleted the #include from remote.c locally and it is now
>> >> building on MinGW (WinXP).
>> >>
>> >> Can we revert that commit? (Felipe?)
>> >
>> > I think it can... I added the include because I missed that remote.h
>> > already includes it. The thing is that I added it because gcc is warning
>> > about an implicit declaration of inet_aton, and for it to be defined
>> > POSIX says one should include 3 headers, of which sys/socket.h was
>> > missing in remote.c (but is present in remote.h, which I missed). The
>> > warning persists, and the reason seems to be that _BSD_SOURCE must be
>> > defined (but defining that causes other build failures). Removing the
>> > net includes from remote.c fixes that.
>> >
>> > I suggest defining _BSD_SOURCE, and removing the #ifdef LINUX section in
>> > remote.c (since it is a duplicate of what is in remote.h). I will apply
>> > the following diff if you find it acceptable:
>> >
>> > diff -u -r1.34 remote.c
>> > --- OOps/remote.c       26 Nov 2009 21:48:38 -0000      1.34
>> > +++ OOps/remote.c       6 Jan 2010 00:01:57 -0000
>> > @@ -22,16 +22,17 @@
>> >  */
>> >
>> >  #include "csoundCore.h"
>> > +
>> > +/* We need inet_aton, which requires _BSD_SOURCE */
>> > +#ifndef _BSD_SOURCE
>> > +#define _BSD_SOURCE
>> > +#endif
>> > +
>> >  #include "remote.h"
>> >
>> >  #ifdef HAVE_SOCKETS
>> > -#include 
>> >  #ifndef WIN32
>> >  #include 
>> > -#ifdef LINUX
>> > -#include 
>> > -#include 
>> > -#endif
>> >  #include 
>> >  #endif
>> >  #endif /* HAVE_SOCKETS */
>> >
>> > --
>> > Saludos,
>> > Felipe Sateler
>> >
>> > ------------------------------------------------------------------------------
>> > This SF.Net email is sponsored by the Verizon Developer Community
>> > Take advantage of Verizon's best-in-class app development support
>> > A streamlined, 14 day to market process makes app distribution fast and easy
>> > Join now and get one step closer to millions of Verizon customers
>> > http://p.sf.net/sfu/verizon-dev2dev
>> > _______________________________________________
>> > Csound-devel mailing list
>> > Csound-devel@lists.sourceforge.net
>> > https://lists.sourceforge.net/lists/listinfo/csound-devel
>> >
>> >
>>
>> ------------------------------------------------------------------------------
>> This SF.Net email is sponsored by the Verizon Developer Community
>> Take advantage of Verizon's best-in-class app development support
>> A streamlined, 14 day to market process makes app distribution fast and easy
>> Join now and get one step closer to millions of Verizon customers
>> http://p.sf.net/sfu/verizon-dev2dev
>> _______________________________________________
>> Csound-devel mailing list
>> Csound-devel@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>
> --
> Saludos,
> Felipe Sateler
>
> ------------------------------------------------------------------------------
> This SF.Net email is sponsored by the Verizon Developer Community
> Take advantage of Verizon's best-in-class app development support
> A streamlined, 14 day to market process makes app distribution fast and easy
> Join now and get one step closer to millions of Verizon customers
> http://p.sf.net/sfu/verizon-dev2dev
> _______________________________________________
> Csound-devel mailing list
> Csound-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/csound-devel
>
>

------------------------------------------------------------------------------
This SF.Net email is sponsored by the Verizon Developer Community
Take advantage of Verizon's best-in-class app development support
A streamlined, 14 day to market process makes app distribution fast and easy
Join now and get one step closer to millions of Verizon customers
http://p.sf.net/sfu/verizon-dev2dev 
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net

Date2010-01-07 15:00
FromFelipe Sateler
SubjectRe: [Cs-dev] Build issue on Windows - remote.c
AttachmentsNone  None  
gcc -o OOps/remote.o -c -Wno-format -DGNU_GETTEXT -Wall -g
-fomit-frame-pointer -freorder-blocks -DLINUX -DPIPES -fPIC -fPIC
-DHAVE_LIBSNDFILE=1016 -DHAVE_FLTK -DBETA -DHAVE_SOCKETS
-DHAVE_PTHREAD_BARRIER_INIT -DHAVE_SYNC_LOCK_TEST_AND_SET -DHAVE_FCNTL_H
-DHAVE_UNISTD_H -DHAVE_STDINT_H -DHAVE_SYS_TIME_H -DHAVE_SYS_TYPES_H
-DHAVE_TERMIOS_H -DHAVE_VALUES_H -DHAVE_SOCKETS -DHAVE_DIRENT_H
-D__BUILDING_LIBCSOUND -I. -IH -I/usr/include/python2.5
-I/usr/include/fltk-1.1 -I/usr/local/include -I/usr/include
-I/usr/include -I/usr/X11R6/include  OOps/remote.c
OOps/remote.c: In function ‘CLopen’:
OOps/remote.c:230: warning: implicit declaration of function ‘inet_aton’


This warning is harmless as long as inet_aton returns an int, which is
unlikely to change.

I won't have time to delve into this for the next 4-6 weeks, but when I
get back I will try to fix this. It might be simpler to just #include
directly in remote.c before #including csoundCore.h.

PS: the actual header is arpa/inet.h, not socket.h (but POSIX requires 3
headers for that function, I do not know why).


On Wed, 2010-01-06 at 12:52 -0500, Steven Yi wrote:
> That is annoying!
> 
> I did a grep and found:
> 
> C:\work\workspace\csound5>grep socket.h * -n -r
> H/remote.h:31:#include 
> Opcodes/sockrecv.c:32:#include 
> Opcodes/socksend.c:30:#include 
> SConstruct:843:elif configure.CheckHeader("sys/socket.h", language = "C"):
> SConstruct2:785:elif configure.CheckHeader("sys/socket.h", language = "C"):
> 
> Perhaps socket.h is getting included from some system header?  Do you
> have output from SCons that has the warning?
> 
> On Wed, Jan 6, 2010 at 12:32 PM, Felipe Sateler  wrote:
> > Hmm, I'm starting to get annoyed by this maze of #includes. If I define
> > _BSD_SOURCE via a -D flag or just at the top of remote.c, everything is
> > OK. However, if I define it in remote.h just before #including the
> > socket files, I get the warning about inet_aton. This means that somehow
> > these files are being included before remote.h, via csoundCore.h.
> >
> > I'm still searching for that. In the meanwhile, I reverted 1.34.
> >
> >
> > On Tue, 2010-01-05 at 19:23 -0500, Steven Yi wrote:
> >> Hi Felipe,
> >>
> >> That seems fine to me, though shouldn't the _BSD_SOURCE be added to
> >> remote.h instead of remote.c?  It seems then we can isolate it to the
> >> #else clause near the include of sys/socket.h as that isn't necessary
> >> for Windows?  Whichever way you decide, please feel free to commit and
> >> I'll test on Windows after the commit and perhaps someone can test on
> >> OSX to make sure that it is fine there too.
> >>
> >> Many thanks!
> >> Steven
> >>
> >> On Tue, Jan 5, 2010 at 7:03 PM, Felipe Sateler  wrote:
> >> > On Tue, 2010-01-05 at 17:52 -0500, Steven Yi wrote:
> >> >> HI Victor,
> >> >>
> >> >> Following up now that I'm back to Rochester and getting back into the
> >> >> swing of things, I think your source may be out of date. :)  In the
> >> >> CVS history, it looks like:
> >> >>
> >> >> #include 
> >> >>
> >> >> was added by Felipe Sateler on 11/26/2009 as part of revision 1.34.
> >> >> However, sys/socket.h does exist in the remote.h file.  There seems to
> >> >> be a duplication of headers being included in both remote.c and
> >> >> remote.h.  I am not sure who wrote all of this originally so am asking
> >> >> for others to take a look.
> >> >>
> >> >> I have deleted the #include from remote.c locally and it is now
> >> >> building on MinGW (WinXP).
> >> >>
> >> >> Can we revert that commit? (Felipe?)
> >> >
> >> > I think it can... I added the include because I missed that remote.h
> >> > already includes it. The thing is that I added it because gcc is warning
> >> > about an implicit declaration of inet_aton, and for it to be defined
> >> > POSIX says one should include 3 headers, of which sys/socket.h was
> >> > missing in remote.c (but is present in remote.h, which I missed). The
> >> > warning persists, and the reason seems to be that _BSD_SOURCE must be
> >> > defined (but defining that causes other build failures). Removing the
> >> > net includes from remote.c fixes that.
> >> >
> >> > I suggest defining _BSD_SOURCE, and removing the #ifdef LINUX section in
> >> > remote.c (since it is a duplicate of what is in remote.h). I will apply
> >> > the following diff if you find it acceptable:
> >> >
> >> > diff -u -r1.34 remote.c
> >> > --- OOps/remote.c       26 Nov 2009 21:48:38 -0000      1.34
> >> > +++ OOps/remote.c       6 Jan 2010 00:01:57 -0000
> >> > @@ -22,16 +22,17 @@
> >> >  */
> >> >
> >> >  #include "csoundCore.h"
> >> > +
> >> > +/* We need inet_aton, which requires _BSD_SOURCE */
> >> > +#ifndef _BSD_SOURCE
> >> > +#define _BSD_SOURCE
> >> > +#endif
> >> > +
> >> >  #include "remote.h"
> >> >
> >> >  #ifdef HAVE_SOCKETS
> >> > -#include 
> >> >  #ifndef WIN32
> >> >  #include 
> >> > -#ifdef LINUX
> >> > -#include 
> >> > -#include 
> >> > -#endif
> >> >  #include 
> >> >  #endif
> >> >  #endif /* HAVE_SOCKETS */
> >> >
> >> > --
> >> > Saludos,
> >> > Felipe Sateler
> >> >
> >> > ------------------------------------------------------------------------------
> >> > This SF.Net email is sponsored by the Verizon Developer Community
> >> > Take advantage of Verizon's best-in-class app development support
> >> > A streamlined, 14 day to market process makes app distribution fast and easy
> >> > Join now and get one step closer to millions of Verizon customers
> >> > http://p.sf.net/sfu/verizon-dev2dev
> >> > _______________________________________________
> >> > Csound-devel mailing list
> >> > Csound-devel@lists.sourceforge.net
> >> > https://lists.sourceforge.net/lists/listinfo/csound-devel
> >> >
> >> >
> >>
> >> ------------------------------------------------------------------------------
> >> This SF.Net email is sponsored by the Verizon Developer Community
> >> Take advantage of Verizon's best-in-class app development support
> >> A streamlined, 14 day to market process makes app distribution fast and easy
> >> Join now and get one step closer to millions of Verizon customers
> >> http://p.sf.net/sfu/verizon-dev2dev
> >> _______________________________________________
> >> Csound-devel mailing list
> >> Csound-devel@lists.sourceforge.net
> >> https://lists.sourceforge.net/lists/listinfo/csound-devel
> >
> > --
> > Saludos,
> > Felipe Sateler
> >
> > ------------------------------------------------------------------------------
> > This SF.Net email is sponsored by the Verizon Developer Community
> > Take advantage of Verizon's best-in-class app development support
> > A streamlined, 14 day to market process makes app distribution fast and easy
> > Join now and get one step closer to millions of Verizon customers
> > http://p.sf.net/sfu/verizon-dev2dev
> > _______________________________________________
> > Csound-devel mailing list
> > Csound-devel@lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/csound-devel
> >
> >
> 
> ------------------------------------------------------------------------------
> This SF.Net email is sponsored by the Verizon Developer Community
> Take advantage of Verizon's best-in-class app development support
> A streamlined, 14 day to market process makes app distribution fast and easy
> Join now and get one step closer to millions of Verizon customers
> http://p.sf.net/sfu/verizon-dev2dev 
> _______________________________________________
> Csound-devel mailing list
> Csound-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/csound-devel

-- 
Saludos,
Felipe Sateler

Date2010-01-07 15:10
FromSteven Yi
SubjectRe: [Cs-dev] Build issue on Windows - remote.c
Thanks for the info!  I think since it's just a warning it's a low
priority so no big worries for now.

Thanks!
steven

On Thu, Jan 7, 2010 at 10:00 AM, Felipe Sateler  wrote:
> gcc -o OOps/remote.o -c -Wno-format -DGNU_GETTEXT -Wall -g
> -fomit-frame-pointer -freorder-blocks -DLINUX -DPIPES -fPIC -fPIC
> -DHAVE_LIBSNDFILE=1016 -DHAVE_FLTK -DBETA -DHAVE_SOCKETS
> -DHAVE_PTHREAD_BARRIER_INIT -DHAVE_SYNC_LOCK_TEST_AND_SET -DHAVE_FCNTL_H
> -DHAVE_UNISTD_H -DHAVE_STDINT_H -DHAVE_SYS_TIME_H -DHAVE_SYS_TYPES_H
> -DHAVE_TERMIOS_H -DHAVE_VALUES_H -DHAVE_SOCKETS -DHAVE_DIRENT_H
> -D__BUILDING_LIBCSOUND -I. -IH -I/usr/include/python2.5
> -I/usr/include/fltk-1.1 -I/usr/local/include -I/usr/include
> -I/usr/include -I/usr/X11R6/include  OOps/remote.c
> OOps/remote.c: In function ‘CLopen’:
> OOps/remote.c:230: warning: implicit declaration of function ‘inet_aton’
>
>
> This warning is harmless as long as inet_aton returns an int, which is
> unlikely to change.
>
> I won't have time to delve into this for the next 4-6 weeks, but when I
> get back I will try to fix this. It might be simpler to just #include
> directly in remote.c before #including csoundCore.h.
>
> PS: the actual header is arpa/inet.h, not socket.h (but POSIX requires 3
> headers for that function, I do not know why).
>
>
> On Wed, 2010-01-06 at 12:52 -0500, Steven Yi wrote:
>> That is annoying!
>>
>> I did a grep and found:
>>
>> C:\work\workspace\csound5>grep socket.h * -n -r
>> H/remote.h:31:#include 
>> Opcodes/sockrecv.c:32:#include 
>> Opcodes/socksend.c:30:#include 
>> SConstruct:843:elif configure.CheckHeader("sys/socket.h", language = "C"):
>> SConstruct2:785:elif configure.CheckHeader("sys/socket.h", language = "C"):
>>
>> Perhaps socket.h is getting included from some system header?  Do you
>> have output from SCons that has the warning?
>>
>> On Wed, Jan 6, 2010 at 12:32 PM, Felipe Sateler  wrote:
>> > Hmm, I'm starting to get annoyed by this maze of #includes. If I define
>> > _BSD_SOURCE via a -D flag or just at the top of remote.c, everything is
>> > OK. However, if I define it in remote.h just before #including the
>> > socket files, I get the warning about inet_aton. This means that somehow
>> > these files are being included before remote.h, via csoundCore.h.
>> >
>> > I'm still searching for that. In the meanwhile, I reverted 1.34.
>> >
>> >
>> > On Tue, 2010-01-05 at 19:23 -0500, Steven Yi wrote:
>> >> Hi Felipe,
>> >>
>> >> That seems fine to me, though shouldn't the _BSD_SOURCE be added to
>> >> remote.h instead of remote.c?  It seems then we can isolate it to the
>> >> #else clause near the include of sys/socket.h as that isn't necessary
>> >> for Windows?  Whichever way you decide, please feel free to commit and
>> >> I'll test on Windows after the commit and perhaps someone can test on
>> >> OSX to make sure that it is fine there too.
>> >>
>> >> Many thanks!
>> >> Steven
>> >>
>> >> On Tue, Jan 5, 2010 at 7:03 PM, Felipe Sateler  wrote:
>> >> > On Tue, 2010-01-05 at 17:52 -0500, Steven Yi wrote:
>> >> >> HI Victor,
>> >> >>
>> >> >> Following up now that I'm back to Rochester and getting back into the
>> >> >> swing of things, I think your source may be out of date. :)  In the
>> >> >> CVS history, it looks like:
>> >> >>
>> >> >> #include 
>> >> >>
>> >> >> was added by Felipe Sateler on 11/26/2009 as part of revision 1.34.
>> >> >> However, sys/socket.h does exist in the remote.h file.  There seems to
>> >> >> be a duplication of headers being included in both remote.c and
>> >> >> remote.h.  I am not sure who wrote all of this originally so am asking
>> >> >> for others to take a look.
>> >> >>
>> >> >> I have deleted the #include from remote.c locally and it is now
>> >> >> building on MinGW (WinXP).
>> >> >>
>> >> >> Can we revert that commit? (Felipe?)
>> >> >
>> >> > I think it can... I added the include because I missed that remote.h
>> >> > already includes it. The thing is that I added it because gcc is warning
>> >> > about an implicit declaration of inet_aton, and for it to be defined
>> >> > POSIX says one should include 3 headers, of which sys/socket.h was
>> >> > missing in remote.c (but is present in remote.h, which I missed). The
>> >> > warning persists, and the reason seems to be that _BSD_SOURCE must be
>> >> > defined (but defining that causes other build failures). Removing the
>> >> > net includes from remote.c fixes that.
>> >> >
>> >> > I suggest defining _BSD_SOURCE, and removing the #ifdef LINUX section in
>> >> > remote.c (since it is a duplicate of what is in remote.h). I will apply
>> >> > the following diff if you find it acceptable:
>> >> >
>> >> > diff -u -r1.34 remote.c
>> >> > --- OOps/remote.c       26 Nov 2009 21:48:38 -0000      1.34
>> >> > +++ OOps/remote.c       6 Jan 2010 00:01:57 -0000
>> >> > @@ -22,16 +22,17 @@
>> >> >  */
>> >> >
>> >> >  #include "csoundCore.h"
>> >> > +
>> >> > +/* We need inet_aton, which requires _BSD_SOURCE */
>> >> > +#ifndef _BSD_SOURCE
>> >> > +#define _BSD_SOURCE
>> >> > +#endif
>> >> > +
>> >> >  #include "remote.h"
>> >> >
>> >> >  #ifdef HAVE_SOCKETS
>> >> > -#include 
>> >> >  #ifndef WIN32
>> >> >  #include 
>> >> > -#ifdef LINUX
>> >> > -#include 
>> >> > -#include 
>> >> > -#endif
>> >> >  #include 
>> >> >  #endif
>> >> >  #endif /* HAVE_SOCKETS */
>> >> >
>> >> > --
>> >> > Saludos,
>> >> > Felipe Sateler
>> >> >
>> >> > ------------------------------------------------------------------------------
>> >> > This SF.Net email is sponsored by the Verizon Developer Community
>> >> > Take advantage of Verizon's best-in-class app development support
>> >> > A streamlined, 14 day to market process makes app distribution fast and easy
>> >> > Join now and get one step closer to millions of Verizon customers
>> >> > http://p.sf.net/sfu/verizon-dev2dev
>> >> > _______________________________________________
>> >> > Csound-devel mailing list
>> >> > Csound-devel@lists.sourceforge.net
>> >> > https://lists.sourceforge.net/lists/listinfo/csound-devel
>> >> >
>> >> >
>> >>
>> >> ------------------------------------------------------------------------------
>> >> This SF.Net email is sponsored by the Verizon Developer Community
>> >> Take advantage of Verizon's best-in-class app development support
>> >> A streamlined, 14 day to market process makes app distribution fast and easy
>> >> Join now and get one step closer to millions of Verizon customers
>> >> http://p.sf.net/sfu/verizon-dev2dev
>> >> _______________________________________________
>> >> Csound-devel mailing list
>> >> Csound-devel@lists.sourceforge.net
>> >> https://lists.sourceforge.net/lists/listinfo/csound-devel
>> >
>> > --
>> > Saludos,
>> > Felipe Sateler
>> >
>> > ------------------------------------------------------------------------------
>> > This SF.Net email is sponsored by the Verizon Developer Community
>> > Take advantage of Verizon's best-in-class app development support
>> > A streamlined, 14 day to market process makes app distribution fast and easy
>> > Join now and get one step closer to millions of Verizon customers
>> > http://p.sf.net/sfu/verizon-dev2dev
>> > _______________________________________________
>> > Csound-devel mailing list
>> > Csound-devel@lists.sourceforge.net
>> > https://lists.sourceforge.net/lists/listinfo/csound-devel
>> >
>> >
>>
>> ------------------------------------------------------------------------------
>> This SF.Net email is sponsored by the Verizon Developer Community
>> Take advantage of Verizon's best-in-class app development support
>> A streamlined, 14 day to market process makes app distribution fast and easy
>> Join now and get one step closer to millions of Verizon customers
>> http://p.sf.net/sfu/verizon-dev2dev
>> _______________________________________________
>> Csound-devel mailing list
>> Csound-devel@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>
> --
> Saludos,
> Felipe Sateler
>
> ------------------------------------------------------------------------------
> This SF.Net email is sponsored by the Verizon Developer Community
> Take advantage of Verizon's best-in-class app development support
> A streamlined, 14 day to market process makes app distribution fast and easy
> Join now and get one step closer to millions of Verizon customers
> http://p.sf.net/sfu/verizon-dev2dev
> _______________________________________________
> Csound-devel mailing list
> Csound-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/csound-devel
>
>

------------------------------------------------------------------------------
This SF.Net email is sponsored by the Verizon Developer Community
Take advantage of Verizon's best-in-class app development support
A streamlined, 14 day to market process makes app distribution fast and easy
Join now and get one step closer to millions of Verizon customers
http://p.sf.net/sfu/verizon-dev2dev 
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net