Re: [PD-dev] compiler oopses compiling s_net.c on windoze

2020-05-28 Thread Miller Puckette via Pd-dev
I'm cross-compiling on linux and testing on WinXP, which is the newest
version I have.

It sounds like I should put out a WinXP version (using Iohannes's #ifdef
style) and another with IPv6 turned on for Vista+.

I'm not sure but I get the impression lots of folks are using WinXP - I hear it
described as the "last good version" from time to time.  I have to agree
personally, fwiw...

cheers
M

On Thu, May 28, 2020 at 01:49:58PM +0200, Christof Ressi wrote:
> @Miller: are you compiling on a Windows XP machine !?
> 
> The #ifdefs would fix the compilation error on Windows XP, but we still have
> to compile the release on a Windows Vista+ machine to make the IPv6
> functionality available. I think Windows XP doesn't even support IPv6 before
> service pack 3.
> 
> IMO, we should finally raise the default WINVER to Windows Vista, at least.
> Windows XP is *ancient* by now. Recently, even support for Windows 7 has
> ended...
> 
> On macOS, the minimum supported version is 10.6, which is from 2009. Windows
> XP was first released in 2001...
> 
> We might still allow people to compile for Windows XP by overriding WINVER,
> but it shouldn't be the default anymore.
> 
> Christof
> 
> On 28.05.2020 13:06, Dan Wilcox wrote:
> > That sounds good. What do you think Christof? Do you think it would
> > alter any of the default behavior? I have to run so I can't look into
> > this more until later today.
> > 
> > > it's easy: AI_ALL and AI_V4MAPPED are only available since Windows Vista.
> > > 
> > > the default settings compile for Windows2000 (or so).
> > > 
> > > to compile for windows vista (and aboce), use the following macros
> > > (preferably in the Makefile):
> > > > -DWINVER=0x0600 -D_WIN32_WINNT=0x0600
> > > 
> > > (this is already done in the autotools-Makefile; but afaik not in the
> > > src/makefile.mingw)
> > > 
> > > alternatively (and probably additionally), the use of these macros
> > > should probably be protected by ifdef clauses.
> > > 
> > > in iemnet (which has backported some of the new code from s_net.c) i use:
> > > 
> > > ~~~
> > > ?hints.ai_flags |= AI_PASSIVE
> > > #ifdef AI_ALL
> > > ???| AI_ALL /* both IPv4 and IPv6 addrs */
> > > #endif
> > > #ifdef AI_V4MAPPED
> > > ???| AI_V4MAPPED /* fallback to IPv4-mapped IPv6 addrs */
> > > #endif
> > > ???| 0;
> > > ~~~
> > 
> > 
> > Dan Wilcox
> > @danomatika 
> >  >  >
> > danomatika.com 
> >  >  >
> > robotcowboy.com 
> >  >  >
> > 
> > 
> > 
> > 
> > ___
> > Pd-dev mailing list
> > Pd-dev@lists.iem.at
> > https://urldefense.com/v3/__https://lists.puredata.info/listinfo/pd-dev__;!!Mih3wA!VQWHE8cZfk0pAJRqHei0uZBH4ebVdpguirm3soJTONQex-6lDDLsDHoiULLW$



___
Pd-dev mailing list
Pd-dev@lists.iem.at
https://lists.puredata.info/listinfo/pd-dev


Re: [PD-dev] compiler oopses compiling s_net.c on windoze

2020-05-28 Thread Martin Peach
On Thu, May 28, 2020 at 11:36 AM Miller Puckette via Pd-dev
 wrote:
>
> This will sound precious, but I have a policy of pushing back against the
> forced-upgrade pratcices of Microsoft and Apple.  I suspect many people 
> outside
> of Europe/North America are using very old machines.
>
> At any rate, I now plan to put out a 64-bit test version compiled with IPV6
>  support (-DWINVER=0x0600 -D_WIN32_WINNT=0x0600 as Iohannes suggests), and 
> later
> go back and provide XP versions in 64 and 32 bits.
>

Is there any way for a user to know if their version of Pd is 32 or 64
bit while it's running? Attempting to load externals of the wrong type
just gives those vague 'unable to load' errors. If the 'About PD'
window would say which address size it uses that could help. (I use
different versions on a few different machines and I can't remember
which is which)
Help->About Pd gives: "Pd version 0.50.0", maybe it could say "Pd
version 0.50.0 (64-bit addressing)".


Martin



___
Pd-dev mailing list
Pd-dev@lists.iem.at
https://lists.puredata.info/listinfo/pd-dev


Re: [PD-dev] compiler oopses compiling s_net.c on windoze

2020-05-28 Thread Miller Puckette via Pd-dev
This will sound precious, but I have a policy of pushing back against the
forced-upgrade pratcices of Microsoft and Apple.  I suspect many people outside
of Europe/North America are using very old machines.

At any rate, I now plan to put out a 64-bit test version compiled with IPV6
 support (-DWINVER=0x0600 -D_WIN32_WINNT=0x0600 as Iohannes suggests), and later
go back and provide XP versions in 64 and 32 bits.

Thanks for the very quick responses!

Miller

On Thu, May 28, 2020 at 04:57:54PM +0200, IOhannes m zm??lnig wrote:
> On 5/28/20 4:37 PM, Christof Ressi wrote:
> >> which is the newest
> >> version I have.
> > You might want to consider an upgrade ;-)
> 
> note that the cross-compilers compile newer versions of Windows just fine.
> they just have a very conservative default setting.
> 
> gfamdsr
> IOhannes
> 




> ___
> Pd-dev mailing list
> Pd-dev@lists.iem.at
> https://lists.puredata.info/listinfo/pd-dev




___
Pd-dev mailing list
Pd-dev@lists.iem.at
https://lists.puredata.info/listinfo/pd-dev


Re: [PD-dev] compiler oopses compiling s_net.c on windoze

2020-05-28 Thread IOhannes m zmölnig
On 5/28/20 4:37 PM, Christof Ressi wrote:
>> which is the newest
>> version I have.
> You might want to consider an upgrade ;-)

note that the cross-compilers compile newer versions of Windows just fine.
they just have a very conservative default setting.

gfamdsr
IOhannes



signature.asc
Description: OpenPGP digital signature
___
Pd-dev mailing list
Pd-dev@lists.iem.at
https://lists.puredata.info/listinfo/pd-dev


Re: [PD-dev] compiler oopses compiling s_net.c on windoze

2020-05-28 Thread Christof Ressi

which is the newest
version I have.

You might want to consider an upgrade ;-)


I'm not sure but I get the impression lots of folks are using WinXP - I hear it
described as the "last good version" from time to time.
Nah, I think Windows 7 holds that position. And people will probably say 
that about Windows 10 in 20 years...


IMO, no one should use Windows XP in 2020 unless they absolutely have to 
(e.g. they can't upgrade). It's just too outdated.



It sounds like I should put out a WinXP version (using Iohannes's #ifdef
style) and another with IPv6 turned on for Vista+.

That could be a solution. After all, you still ship a OSX PPC version :-)

Christof

On 28.05.2020 15:56, Miller Puckette wrote:

I'm cross-compiling on linux and testing on WinXP, which is the newest
version I have.

It sounds like I should put out a WinXP version (using Iohannes's #ifdef
style) and another with IPv6 turned on for Vista+.

I'm not sure but I get the impression lots of folks are using WinXP - I hear it
described as the "last good version" from time to time.  I have to agree
personally, fwiw...

cheers
M

On Thu, May 28, 2020 at 01:49:58PM +0200, Christof Ressi wrote:

@Miller: are you compiling on a Windows XP machine !?

The #ifdefs would fix the compilation error on Windows XP, but we still have
to compile the release on a Windows Vista+ machine to make the IPv6
functionality available. I think Windows XP doesn't even support IPv6 before
service pack 3.

IMO, we should finally raise the default WINVER to Windows Vista, at least.
Windows XP is *ancient* by now. Recently, even support for Windows 7 has
ended...

On macOS, the minimum supported version is 10.6, which is from 2009. Windows
XP was first released in 2001...

We might still allow people to compile for Windows XP by overriding WINVER,
but it shouldn't be the default anymore.

Christof

On 28.05.2020 13:06, Dan Wilcox wrote:

That sounds good. What do you think Christof? Do you think it would
alter any of the default behavior? I have to run so I can't look into
this more until later today.


it's easy: AI_ALL and AI_V4MAPPED are only available since Windows Vista.

the default settings compile for Windows2000 (or so).

to compile for windows vista (and aboce), use the following macros
(preferably in the Makefile):

-DWINVER=0x0600 -D_WIN32_WINNT=0x0600

(this is already done in the autotools-Makefile; but afaik not in the
src/makefile.mingw)

alternatively (and probably additionally), the use of these macros
should probably be protected by ifdef clauses.

in iemnet (which has backported some of the new code from s_net.c) i use:

~~~
?hints.ai_flags |= AI_PASSIVE
#ifdef AI_ALL
???| AI_ALL /* both IPv4 and IPv6 addrs */
#endif
#ifdef AI_V4MAPPED
???| AI_V4MAPPED /* fallback to IPv4-mapped IPv6 addrs */
#endif
???| 0;
~~~


Dan Wilcox
@danomatika 

danomatika.com 

robotcowboy.com 





___
Pd-dev mailing list
Pd-dev@lists.iem.at
https://urldefense.com/v3/__https://lists.puredata.info/listinfo/pd-dev__;!!Mih3wA!VQWHE8cZfk0pAJRqHei0uZBH4ebVdpguirm3soJTONQex-6lDDLsDHoiULLW$




___
Pd-dev mailing list
Pd-dev@lists.iem.at
https://lists.puredata.info/listinfo/pd-dev


Re: [PD-dev] compiler oopses compiling s_net.c on windoze

2020-05-28 Thread IOhannes m zmölnig
On 5/28/20 1:49 PM, Christof Ressi wrote:
> @Miller: are you compiling on a Windows XP machine !?

no. he is cross-compiling.

on my system (Debian/sid, Mingw-7.0.0, gcc:9.3-win32), i had the same
problem (that's why i had the answer ready):

compiling the following source with the cross-compiler:

~~~
#include 
int main() {
#ifdef WINVER
  printf("WINVER=0x%X\n", WINVER);
#endif
#ifdef _WIN32_WINNT
  printf("_WIN32_WINNT=0x%X\n", _WIN32_WINNT);
#endif
 return 0;
}
~~~

prints:
_WIN32_WINNT=0x502

(for both i686 and x86_64)

> The #ifdefs would fix the compilation error on Windows XP, but we still
> have to compile the release on a Windows Vista+ machine to make the IPv6

that's why i proposed *both* fixes (the ifdefs and raising the WINVER)

> On macOS, the minimum supported version is 10.6, which is from 2009.
> Windows XP was first released in 2001...

although i think that these days more people are using XP than OSX-10.6

> 
> We might still allow people to compile for Windows XP by overriding
> WINVER, but it shouldn't be the default anymore.

+1.

there should be a configure option to select the WINVER from the cmdline.

gadsr
IOhannes



signature.asc
Description: OpenPGP digital signature
___
Pd-dev mailing list
Pd-dev@lists.iem.at
https://lists.puredata.info/listinfo/pd-dev


Re: [PD-dev] compiler oopses compiling s_net.c on windoze

2020-05-28 Thread Christof Ressi

@Miller: are you compiling on a Windows XP machine !?

The #ifdefs would fix the compilation error on Windows XP, but we still 
have to compile the release on a Windows Vista+ machine to make the IPv6 
functionality available. I think Windows XP doesn't even support IPv6 
before service pack 3.


IMO, we should finally raise the default WINVER to Windows Vista, at 
least. Windows XP is *ancient* by now. Recently, even support for 
Windows 7 has ended...


On macOS, the minimum supported version is 10.6, which is from 2009. 
Windows XP was first released in 2001...


We might still allow people to compile for Windows XP by overriding 
WINVER, but it shouldn't be the default anymore.


Christof

On 28.05.2020 13:06, Dan Wilcox wrote:
That sounds good. What do you think Christof? Do you think it would 
alter any of the default behavior? I have to run so I can't look into 
this more until later today.



it's easy: AI_ALL and AI_V4MAPPED are only available since Windows Vista.

the default settings compile for Windows2000 (or so).

to compile for windows vista (and aboce), use the following macros
(preferably in the Makefile):

-DWINVER=0x0600 -D_WIN32_WINNT=0x0600


(this is already done in the autotools-Makefile; but afaik not in the
src/makefile.mingw)

alternatively (and probably additionally), the use of these macros
should probably be protected by ifdef clauses.

in iemnet (which has backported some of the new code from s_net.c) i use:

~~~
 hints.ai_flags |= AI_PASSIVE
#ifdef AI_ALL
   | AI_ALL /* both IPv4 and IPv6 addrs */
#endif
#ifdef AI_V4MAPPED
   | AI_V4MAPPED /* fallback to IPv4-mapped IPv6 addrs */
#endif
   | 0;
~~~



Dan Wilcox
@danomatika 
danomatika.com 
robotcowboy.com 




___
Pd-dev mailing list
Pd-dev@lists.iem.at
https://lists.puredata.info/listinfo/pd-dev
___
Pd-dev mailing list
Pd-dev@lists.iem.at
https://lists.puredata.info/listinfo/pd-dev


Re: [PD-dev] compiler oopses compiling s_net.c on windoze

2020-05-28 Thread Dan Wilcox
That sounds good. What do you think Christof? Do you think it would alter any 
of the default behavior? I have to run so I can't look into this more until 
later today.

> it's easy: AI_ALL and AI_V4MAPPED are only available since Windows Vista.
> 
> the default settings compile for Windows2000 (or so).
> 
> to compile for windows vista (and aboce), use the following macros
> (preferably in the Makefile):
>> -DWINVER=0x0600 -D_WIN32_WINNT=0x0600
> 
> (this is already done in the autotools-Makefile; but afaik not in the
> src/makefile.mingw)
> 
> alternatively (and probably additionally), the use of these macros
> should probably be protected by ifdef clauses.
> 
> in iemnet (which has backported some of the new code from s_net.c) i use:
> 
> ~~~
>  hints.ai_flags |= AI_PASSIVE
> #ifdef AI_ALL
>| AI_ALL /* both IPv4 and IPv6 addrs */
> #endif
> #ifdef AI_V4MAPPED
>| AI_V4MAPPED /* fallback to IPv4-mapped IPv6 addrs */
> #endif
>| 0;
> ~~~


Dan Wilcox
@danomatika 
danomatika.com 
robotcowboy.com 



___
Pd-dev mailing list
Pd-dev@lists.iem.at
https://lists.puredata.info/listinfo/pd-dev


Re: [PD-dev] compiler oopses compiling s_net.c on windoze

2020-05-28 Thread Dan Wilcox
Although looking at this again, s_net.h is already using

#include 

which should be sufficient.

What is your build environment? Windows XP?

> On May 28, 2020, at 1:00 PM, Dan Wilcox  wrote:
> 
> Howdy Miller,
> 
> It seems those flags are defined in different headers depending on the 
> Windows version:
> 
> https://docs.microsoft.com/en-us/windows/win32/api/ws2tcpip/nf-ws2tcpip-getaddrinfo#use-of-ai-flags-in-the-phints-parameter
>  
> <https://docs.microsoft.com/en-us/windows/win32/api/ws2tcpip/nf-ws2tcpip-getaddrinfo#use-of-ai-flags-in-the-phints-parameter>
> 
> I think we just need PP a version check and relevant include at the top of 
> s_net.c and/or s_net.h. Most people testing were using Windows 7+ which is 
> probably why we didn't see this issue before.
> 
>> On May 28, 2020, at 12:00 PM, pd-dev-requ...@lists.iem.at 
>> <mailto:pd-dev-requ...@lists.iem.at> wrote:
>> 
>> Message: 2
>> Date: Wed, 27 May 2020 22:14:44 -0700
>> From: Miller Puckette mailto:m...@ucsd.edu>>
>> To: pd-...@iem.at <mailto:pd-...@iem.at>
>> Subject: [PD-dev] compiler oopses compiling s_net.c on windoze
>> Message-ID: <20200528051444.gd18...@ucsd.edu 
>> <mailto:20200528051444.gd18...@ucsd.edu>>
>> Content-Type: text/plain; charset=us-ascii
>> 
>> Compiling on Windows using mingw32 I get this:
>> 
>> x86_64-w64-mingw32-gcc -DPACKAGE_NAME=\"pd\" -DPACKAGE_TARNAME=\"pd\" 
>> -DPACKAGE_VERSION=\"0.51.0\" -DPACKAGE_STRING=\"pd\ 0.51.0\" 
>> -DPACKAGE_BUGREPORT=\"\" -DPACKAGE_URL=\"\" -DPACKAGE=\"pd\" 
>> -DVERSION=\"0.51.0\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 
>> -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 
>> -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 
>> -DLT_OBJDIR=\".libs/\" -DSTDC_HEADERS=1 -DHAVE_FCNTL_H=1 -DHAVE_LIMITS_H=1 
>> -DHAVE_MALLOC_H=1 -DHAVE_STDDEF_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 
>> -DHAVE_SYS_PARAM_H=1 -DHAVE_SYS_TIME_H=1 -DHAVE_SYS_TIMEB_H=1 
>> -DHAVE_UNISTD_H=1 -DHAVE_ALLOCA=1 -Dvfork=fork -DHAVE_STDLIB_H=1 
>> -DHAVE_MALLOC=1 -DHAVE_STDLIB_H=1 -DHAVE_REALLOC=1 -DRETSIGTYPE=void 
>> -DHAVE_DUP2=1 -DHAVE_FLOOR=1 -DHAVE_GETCWD=1 -DHAVE_GETTIMEOFDAY=1 
>> -DHAVE_MEMMOVE=1 -DHAVE_MEMSET=1 -DHAVE_POW=1 -DHAVE_SQRT=1 -DHAVE_STRCHR=1 
>> -DHAVE_STRERROR=1 -DHAVE_STRRCHR=1 -DHAVE_STRSTR=1 -DHAVE_STRTOL=1 -I.  
>> -I../portaudio/portaudio/include -I../portmidi/portmidi/pm_common 
>> -I../portmidi/portmidi/porttime -DWISH=\"wish86.exe\"  -g -O2 -ffast-math 
>> -funroll-loops -fomit-frame-pointer -O3 -MT pdsend-s_net.o -MD -MP -MF 
>> .deps/pdsend-s_net.Tpo -c -o pdsend-s_net.o `test -f 's_net.c' || echo 
>> './'`s_net.c
>> s_net.c: In function 'addrinfo_get_list':
>> s_net.c:55:22: error: 'AI_ALL' undeclared (first use in this function); did 
>> you mean 'SIF_ALL'?
>> hints.ai_flags = AI_ALL |   /* both IPv4 and IPv6 addrs */
>>  ^~
>>  SIF_ALL
>> s_net.c:55:22: note: each undeclared identifier is reported only once for 
>> each function it appears in
>> s_net.c:56:22: error: 'AI_V4MAPPED' undeclared (first use in this function); 
>> did you mean 'MIDI_MAPPER'?
>>  AI_V4MAPPED |  /* fallback to IPv4-mapped IPv6 addrs */
>>  ^~~
>>  MIDI_MAPPER
>> make[2]: *** [Makefile:2318: pdsend-s_net.o] Error 1
>> 
>> 
>> I'l try to fix this Thursday but if anyone who understands the new networking
>> code gets there before I do you might do a better job than I can...
>> 
>> thanks
>> Miller
> 
> 


Dan Wilcox
@danomatika <http://twitter.com/danomatika>
danomatika.com <http://danomatika.com/>
robotcowboy.com <http://robotcowboy.com/>



___
Pd-dev mailing list
Pd-dev@lists.iem.at
https://lists.puredata.info/listinfo/pd-dev


Re: [PD-dev] compiler oopses compiling s_net.c on windoze

2020-05-28 Thread Dan Wilcox
Howdy Miller,

It seems those flags are defined in different headers depending on the Windows 
version:

https://docs.microsoft.com/en-us/windows/win32/api/ws2tcpip/nf-ws2tcpip-getaddrinfo#use-of-ai-flags-in-the-phints-parameter
 
<https://docs.microsoft.com/en-us/windows/win32/api/ws2tcpip/nf-ws2tcpip-getaddrinfo#use-of-ai-flags-in-the-phints-parameter>

I think we just need PP a version check and relevant include at the top of 
s_net.c and/or s_net.h. Most people testing were using Windows 7+ which is 
probably why we didn't see this issue before.

> On May 28, 2020, at 12:00 PM, pd-dev-requ...@lists.iem.at wrote:
> 
> Message: 2
> Date: Wed, 27 May 2020 22:14:44 -0700
> From: Miller Puckette mailto:m...@ucsd.edu>>
> To: pd-...@iem.at <mailto:pd-...@iem.at>
> Subject: [PD-dev] compiler oopses compiling s_net.c on windoze
> Message-ID: <20200528051444.gd18...@ucsd.edu 
> <mailto:20200528051444.gd18...@ucsd.edu>>
> Content-Type: text/plain; charset=us-ascii
> 
> Compiling on Windows using mingw32 I get this:
> 
> x86_64-w64-mingw32-gcc -DPACKAGE_NAME=\"pd\" -DPACKAGE_TARNAME=\"pd\" 
> -DPACKAGE_VERSION=\"0.51.0\" -DPACKAGE_STRING=\"pd\ 0.51.0\" 
> -DPACKAGE_BUGREPORT=\"\" -DPACKAGE_URL=\"\" -DPACKAGE=\"pd\" 
> -DVERSION=\"0.51.0\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 
> -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 
> -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 
> -DLT_OBJDIR=\".libs/\" -DSTDC_HEADERS=1 -DHAVE_FCNTL_H=1 -DHAVE_LIMITS_H=1 
> -DHAVE_MALLOC_H=1 -DHAVE_STDDEF_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 
> -DHAVE_SYS_PARAM_H=1 -DHAVE_SYS_TIME_H=1 -DHAVE_SYS_TIMEB_H=1 
> -DHAVE_UNISTD_H=1 -DHAVE_ALLOCA=1 -Dvfork=fork -DHAVE_STDLIB_H=1 
> -DHAVE_MALLOC=1 -DHAVE_STDLIB_H=1 -DHAVE_REALLOC=1 -DRETSIGTYPE=void 
> -DHAVE_DUP2=1 -DHAVE_FLOOR=1 -DHAVE_GETCWD=1 -DHAVE_GETTIMEOFDAY=1 
> -DHAVE_MEMMOVE=1 -DHAVE_MEMSET=1 -DHAVE_POW=1 -DHAVE_SQRT=1 -DHAVE_STRCHR=1 
> -DHAVE_STRERROR=1 -DHAVE_STRRCHR=1 -DHAVE_STRSTR=1 -DHAVE_STRTOL=1 -I.  
> -I../portaudio/portaudio/include -I../portmidi/portmidi/pm_common 
> -I../portmidi/portmidi/porttime -DWISH=\"wish86.exe\"  -g -O2 -ffast-math 
> -funroll-loops -fomit-frame-pointer -O3 -MT pdsend-s_net.o -MD -MP -MF 
> .deps/pdsend-s_net.Tpo -c -o pdsend-s_net.o `test -f 's_net.c' || echo 
> './'`s_net.c
> s_net.c: In function 'addrinfo_get_list':
> s_net.c:55:22: error: 'AI_ALL' undeclared (first use in this function); did 
> you mean 'SIF_ALL'?
> hints.ai_flags = AI_ALL |   /* both IPv4 and IPv6 addrs */
>  ^~
>  SIF_ALL
> s_net.c:55:22: note: each undeclared identifier is reported only once for 
> each function it appears in
> s_net.c:56:22: error: 'AI_V4MAPPED' undeclared (first use in this function); 
> did you mean 'MIDI_MAPPER'?
>  AI_V4MAPPED |  /* fallback to IPv4-mapped IPv6 addrs */
>  ^~~
>  MIDI_MAPPER
> make[2]: *** [Makefile:2318: pdsend-s_net.o] Error 1
> 
> 
> I'l try to fix this Thursday but if anyone who understands the new networking
> code gets there before I do you might do a better job than I can...
> 
> thanks
> Miller


Dan Wilcox
@danomatika <http://twitter.com/danomatika>
danomatika.com <http://danomatika.com/>
robotcowboy.com <http://robotcowboy.com/>



___
Pd-dev mailing list
Pd-dev@lists.iem.at
https://lists.puredata.info/listinfo/pd-dev


Re: [PD-dev] compiler oopses compiling s_net.c on windoze

2020-05-28 Thread IOhannes m zmölnig
On 5/28/20 7:14 AM, Miller Puckette via Pd-dev wrote:
> Compiling on Windows using mingw32 I get this:
> 
> x86_64-w64-mingw32-gcc -DPACKAGE_NAME=\"pd\" -DPACKAGE_TARNAME=\"pd\" 
> -DPACKAGE_VERSION=\"0.51.0\" -DPACKAGE_STRING=\"pd\ 0.51.0\" 
> -DPACKAGE_BUGREPORT=\"\" -DPACKAGE_URL=\"\" -DPACKAGE=\"pd\" 
> -DVERSION=\"0.51.0\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 
> -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 
> -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 
> -DLT_OBJDIR=\".libs/\" -DSTDC_HEADERS=1 -DHAVE_FCNTL_H=1 -DHAVE_LIMITS_H=1 
> -DHAVE_MALLOC_H=1 -DHAVE_STDDEF_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 
> -DHAVE_SYS_PARAM_H=1 -DHAVE_SYS_TIME_H=1 -DHAVE_SYS_TIMEB_H=1 
> -DHAVE_UNISTD_H=1 -DHAVE_ALLOCA=1 -Dvfork=fork -DHAVE_STDLIB_H=1 
> -DHAVE_MALLOC=1 -DHAVE_STDLIB_H=1 -DHAVE_REALLOC=1 -DRETSIGTYPE=void 
> -DHAVE_DUP2=1 -DHAVE_FLOOR=1 -DHAVE_GETCWD=1 -DHAVE_GETTIMEOFDAY=1 
> -DHAVE_MEMMOVE=1 -DHAVE_MEMSET=1 -DHAVE_POW=1 -DHAVE_SQRT=1 -DHAVE_STRCHR=1 
> -DHAVE_STRERROR=1 -DHAVE_STRRCHR=1 -DHAVE_STRSTR=1 -DHAVE_STRTOL=1 -I.  
> -I../portaudio/portaudio/include -I../portmidi/portmidi/pm_common 
> -I../portmidi/portmidi/porttime -DWISH=\"wish86.exe\"  -g -O2 -ffast-math 
> -funroll-loops -fomit-frame-pointer -O3 -MT pdsend-s_net.o -MD -MP -MF 
> .deps/pdsend-s_net.Tpo -c -o pdsend-s_net.o `test -f 's_net.c' || echo 
> './'`s_net.c
> s_net.c: In function 'addrinfo_get_list':
> s_net.c:55:22: error: 'AI_ALL' undeclared (first use in this function); did 
> you mean 'SIF_ALL'?
>  hints.ai_flags = AI_ALL |   /* both IPv4 and IPv6 addrs */
>   ^~
>   SIF_ALL
> s_net.c:55:22: note: each undeclared identifier is reported only once for 
> each function it appears in
> s_net.c:56:22: error: 'AI_V4MAPPED' undeclared (first use in this function); 
> did you mean 'MIDI_MAPPER'?
>   AI_V4MAPPED |  /* fallback to IPv4-mapped IPv6 addrs */
>   ^~~
>   MIDI_MAPPER
> make[2]: *** [Makefile:2318: pdsend-s_net.o] Error 1
> 
> 
> I'l try to fix this Thursday but if anyone who understands the new networking
> code gets there before I do you might do a better job than I can...


it's easy: AI_ALL and AI_V4MAPPED are only available since Windows Vista.

the default settings compile for Windows2000 (or so).

to compile for windows vista (and aboce), use the following macros
(preferably in the Makefile):
> -DWINVER=0x0600 -D_WIN32_WINNT=0x0600

(this is already done in the autotools-Makefile; but afaik not in the
src/makefile.mingw)

alternatively (and probably additionally), the use of these macros
should probably be protected by ifdef clauses.

in iemnet (which has backported some of the new code from s_net.c) i use:

~~~
  hints.ai_flags |= AI_PASSIVE
#ifdef AI_ALL
| AI_ALL /* both IPv4 and IPv6 addrs */
#endif
#ifdef AI_V4MAPPED
| AI_V4MAPPED /* fallback to IPv4-mapped IPv6 addrs */
#endif
| 0;
~~~

mgfrdsa
IOhanne



signature.asc
Description: OpenPGP digital signature
___
Pd-dev mailing list
Pd-dev@lists.iem.at
https://lists.puredata.info/listinfo/pd-dev


[PD-dev] compiler oopses compiling s_net.c on windoze

2020-05-27 Thread Miller Puckette via Pd-dev
Compiling on Windows using mingw32 I get this:

x86_64-w64-mingw32-gcc -DPACKAGE_NAME=\"pd\" -DPACKAGE_TARNAME=\"pd\" 
-DPACKAGE_VERSION=\"0.51.0\" -DPACKAGE_STRING=\"pd\ 0.51.0\" 
-DPACKAGE_BUGREPORT=\"\" -DPACKAGE_URL=\"\" -DPACKAGE=\"pd\" 
-DVERSION=\"0.51.0\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 
-DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 
-DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DLT_OBJDIR=\".libs/\" 
-DSTDC_HEADERS=1 -DHAVE_FCNTL_H=1 -DHAVE_LIMITS_H=1 -DHAVE_MALLOC_H=1 
-DHAVE_STDDEF_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_SYS_PARAM_H=1 
-DHAVE_SYS_TIME_H=1 -DHAVE_SYS_TIMEB_H=1 -DHAVE_UNISTD_H=1 -DHAVE_ALLOCA=1 
-Dvfork=fork -DHAVE_STDLIB_H=1 -DHAVE_MALLOC=1 -DHAVE_STDLIB_H=1 
-DHAVE_REALLOC=1 -DRETSIGTYPE=void -DHAVE_DUP2=1 -DHAVE_FLOOR=1 -DHAVE_GETCWD=1 
-DHAVE_GETTIMEOFDAY=1 -DHAVE_MEMMOVE=1 -DHAVE_MEMSET=1 -DHAVE_POW=1 
-DHAVE_SQRT=1 -DHAVE_STRCHR=1 -DHAVE_STRERROR=1 -DHAVE_STRRCHR=1 
-DHAVE_STRSTR=1 -DHAVE_STRTOL=1 -I.  -I../portaudio/portaudio/include 
-I../portmidi/portmidi/pm_common -I../portmidi/portmidi/porttime 
-DWISH=\"wish86.exe\"  -g -O2 -ffast-math -funroll-loops -fomit-frame-pointer 
-O3 -MT pdsend-s_net.o -MD -MP -MF .deps/pdsend-s_net.Tpo -c -o pdsend-s_net.o 
`test -f 's_net.c' || echo './'`s_net.c
s_net.c: In function 'addrinfo_get_list':
s_net.c:55:22: error: 'AI_ALL' undeclared (first use in this function); did you 
mean 'SIF_ALL'?
 hints.ai_flags = AI_ALL |   /* both IPv4 and IPv6 addrs */
  ^~
  SIF_ALL
s_net.c:55:22: note: each undeclared identifier is reported only once for each 
function it appears in
s_net.c:56:22: error: 'AI_V4MAPPED' undeclared (first use in this function); 
did you mean 'MIDI_MAPPER'?
  AI_V4MAPPED |  /* fallback to IPv4-mapped IPv6 addrs */
  ^~~
  MIDI_MAPPER
make[2]: *** [Makefile:2318: pdsend-s_net.o] Error 1


I'l try to fix this Thursday but if anyone who understands the new networking
code gets there before I do you might do a better job than I can...

thanks
Miller



___
Pd-dev mailing list
Pd-dev@lists.iem.at
https://lists.puredata.info/listinfo/pd-dev