Hi -
I imagine that this is somehow my mistake, but I am having persistent problems with building PD 0.51.x from git under the latest MSys2/Mingw64 gcc
$ gcc --version gcc (GCC) 10.2.0 Copyright (C) 2020 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
$ gcc -dumpmachine x86_64-pc-msys
The issues seem to center around various WIN32 compatibility hacks. If I use the usual
$ ./autogen.sh $ ./configure $ make clean $ make all
the build fails while linking pd.exe
/usr/lib/gcc/x86_64-pc-msys/10.2.0/../../../../x86_64-pc-msys/bin/ld: pd-s_audio_oss.o: in function `oss_open_audio': /c/Users/User/git/pure-data/src/s_audio_oss.c:305: undefined reference to `sys_setalarm' /c/Users/User/git/pure-data/src/s_audio_oss.c:305:(.text+0xee3): relocation truncated to fit: R_X86_64_PC32 against undefined symbol `sys_setalarm' /usr/lib/gcc/x86_64-pc-msys/10.2.0/../../../../x86_64-pc-msys/bin/ld: /c/Users/User/git/pure-data/src/s_audio_oss.c:394: undefined reference to `sys_setalarm'
&cet
interestingly, that build also generates a warning message while compiling s_inter.c (which defines sys_setalarm() under the right set of compiler flags) indicating that _WIN32 is not defined.
s_inter.c: In function ‘sys_init_deken’: s_inter.c:998:4: warning: #warning unknown OS [-Wcpp] 998 | # warning unknown OS
So if I instead build with CFLAGS=-D_WIN32, I get a different set of errors while building s_inter.c
/usr/include/w32api/psdk_inc/_fd_types.h:100:2: warning: #warning "fd_set and associated macros have been defined in sys/types. This can cause runtime problems with W32 sockets" [-Wcpp] /usr/include/w32api/winsock2.h:1025:34: error: conflicting types for ‘select’ s_inter.c:217:52: warning: passing argument 5 of ‘select’ from incompatible pointer type [-Wincompatible-pointer-types] /usr/include/w32api/winsock2.h:1025:116: note: expected ‘PTIMEVAL’ {aka ‘struct __ms_timeval * const’} but argument is of type ‘struct timeval *’ s_inter.c:490:17: warning: implicit declaration of function ‘write’; did you mean ‘fwrite’? [-Wimplicit-function-declaration] s_inter.c:1305:20: warning: implicit declaration of function ‘_spawnl’; did you mean ‘spawnl’? [-Wimplicit-function-declaration] s_inter.c:1305:28: error: ‘P_NOWAIT’ undeclared (first use in this function) s_inter.c:1493:10: warning: implicit declaration of function ‘_exit’ [-Wimplicit-function-declaration] s_inter.c:1493:10: warning: incompatible implicit declaration of built-in function ‘_exit’
Could someone please enlighten me? Or point me to relevant documentation? ig gcc 10.2.0 known to be problematic?
TIA
indicating that _WIN32 is not defined. So if I instead build with CFLAGS=-D_WIN32, I get a different set of errors while building s_inter.c
If "_WIN32" is not defined by the compiler, something is going very wrong...
usr/lib/gcc/x86_64-pc-msys/10.2.0/../../../../x86_64-pc-msys/bin/ld: pd-s_audio_oss.o: in function `oss_open_audio':
This files should never be built on Windows in the first place. Can you post the full output of the "./configure" and "make" command and attach them as text files?
Just for the record, can you successfully build other software with Msys2? Just to rule out a general problem with your Msys2 installation.
Christof
On 09.12.2020 15:19, David Rush wrote:
Hi -
I imagine that this is somehow my mistake, but I am having persistent problems with building PD 0.51.x from git under the latest MSys2/Mingw64 gcc
$ gcc --version gcc (GCC) 10.2.0 Copyright (C) 2020 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
$ gcc -dumpmachine x86_64-pc-msys
The issues seem to center around various WIN32 compatibility hacks. If I use the usual
$ ./autogen.sh $ ./configure $ make clean $ make all
the build fails while linking pd.exe
/usr/lib/gcc/x86_64-pc-msys/10.2.0/../../../../x86_64-pc-msys/bin/ld: pd-s_audio_oss.o: in function `oss_open_audio': /c/Users/User/git/pure-data/src/s_audio_oss.c:305: undefined reference to `sys_setalarm' /c/Users/User/git/pure-data/src/s_audio_oss.c:305:(.text+0xee3): relocation truncated to fit: R_X86_64_PC32 against undefined symbol `sys_setalarm' /usr/lib/gcc/x86_64-pc-msys/10.2.0/../../../../x86_64-pc-msys/bin/ld: /c/Users/User/git/pure-data/src/s_audio_oss.c:394: undefined reference to `sys_setalarm'
&cet
interestingly, that build also generates a warning message while compiling s_inter.c (which defines sys_setalarm() under the right set of compiler flags) indicating that _WIN32 is not defined.
s_inter.c: In function ‘sys_init_deken’: s_inter.c:998:4: warning: #warning unknown OS [-Wcpp] 998 | # warning unknown OS
So if I instead build with CFLAGS=-D_WIN32, I get a different set of errors while building s_inter.c
/usr/include/w32api/psdk_inc/_fd_types.h:100:2: warning: #warning "fd_set and associated macros have been defined in sys/types. This can cause runtime problems with W32 sockets" [-Wcpp] /usr/include/w32api/winsock2.h:1025:34: error: conflicting types for ‘select’ s_inter.c:217:52: warning: passing argument 5 of ‘select’ from incompatible pointer type [-Wincompatible-pointer-types] /usr/include/w32api/winsock2.h:1025:116: note: expected ‘PTIMEVAL’ {aka ‘struct __ms_timeval * const’} but argument is of type ‘struct timeval *’ s_inter.c:490:17: warning: implicit declaration of function ‘write’; did you mean ‘fwrite’? [-Wimplicit-function-declaration] s_inter.c:1305:20: warning: implicit declaration of function ‘_spawnl’; did you mean ‘spawnl’? [-Wimplicit-function-declaration] s_inter.c:1305:28: error: ‘P_NOWAIT’ undeclared (first use in this function) s_inter.c:1493:10: warning: implicit declaration of function ‘_exit’ [-Wimplicit-function-declaration] s_inter.c:1493:10: warning: incompatible implicit declaration of built-in function ‘_exit’
Could someone please enlighten me? Or point me to relevant documentation? ig gcc 10.2.0 known to be problematic?
TIA
GPG Public key at http://cyber-rush.org/drr/gpg-public-key.txt http://cyber-rush.org/drr/gpg-public-key.txt
Pd-dev mailing list Pd-dev@lists.iem.at https://lists.puredata.info/listinfo/pd-dev
Also note/try:
$ ./autogen.sh $ ./configure $ make app
I'd never used:
$ make all
--
Mensaje telepatico asistido por maquinas.
On 12/9/2020 11:53 AM, Christof Ressi wrote:
indicating that _WIN32 is not defined. So if I instead build with CFLAGS=-D_WIN32, I get a different set of errors while building s_inter.c
If "_WIN32" is not defined by the compiler, something is going very wrong...
usr/lib/gcc/x86_64-pc-msys/10.2.0/../../../../x86_64-pc-msys/bin/ld: pd-s_audio_oss.o: in function `oss_open_audio':
This files should never be built on Windows in the first place. Can you post the full output of the "./configure" and "make" command and attach them as text files?
Just for the record, can you successfully build other software with Msys2? Just to rule out a general problem with your Msys2 installation.
Christof
On 09.12.2020 15:19, David Rush wrote:
Hi -
I imagine that this is somehow my mistake, but I am having persistent problems with building PD 0.51.x from git under the latest MSys2/Mingw64 gcc
$ gcc --version gcc (GCC) 10.2.0 Copyright (C) 2020 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
$ gcc -dumpmachine x86_64-pc-msys
The issues seem to center around various WIN32 compatibility hacks. If I use the usual
$ ./autogen.sh $ ./configure $ make clean $ make all
the build fails while linking pd.exe
/usr/lib/gcc/x86_64-pc-msys/10.2.0/../../../../x86_64-pc-msys/bin/ld: pd-s_audio_oss.o: in function `oss_open_audio': /c/Users/User/git/pure-data/src/s_audio_oss.c:305: undefined reference to `sys_setalarm' /c/Users/User/git/pure-data/src/s_audio_oss.c:305:(.text+0xee3): relocation truncated to fit: R_X86_64_PC32 against undefined symbol `sys_setalarm' /usr/lib/gcc/x86_64-pc-msys/10.2.0/../../../../x86_64-pc-msys/bin/ld: /c/Users/User/git/pure-data/src/s_audio_oss.c:394: undefined reference to `sys_setalarm'
&cet
interestingly, that build also generates a warning message while compiling s_inter.c (which defines sys_setalarm() under the right set of compiler flags) indicating that _WIN32 is not defined.
s_inter.c: In function ‘sys_init_deken’: s_inter.c:998:4: warning: #warning unknown OS [-Wcpp] 998 | # warning unknown OS
So if I instead build with CFLAGS=-D_WIN32, I get a different set of errors while building s_inter.c
/usr/include/w32api/psdk_inc/_fd_types.h:100:2: warning: #warning "fd_set and associated macros have been defined in sys/types. This can cause runtime problems with W32 sockets" [-Wcpp] /usr/include/w32api/winsock2.h:1025:34: error: conflicting types for ‘select’ s_inter.c:217:52: warning: passing argument 5 of ‘select’ from incompatible pointer type [-Wincompatible-pointer-types] /usr/include/w32api/winsock2.h:1025:116: note: expected ‘PTIMEVAL’ {aka ‘struct __ms_timeval * const’} but argument is of type ‘struct timeval *’ s_inter.c:490:17: warning: implicit declaration of function ‘write’; did you mean ‘fwrite’? [-Wimplicit-function-declaration] s_inter.c:1305:20: warning: implicit declaration of function ‘_spawnl’; did you mean ‘spawnl’? [-Wimplicit-function-declaration] s_inter.c:1305:28: error: ‘P_NOWAIT’ undeclared (first use in this function) s_inter.c:1493:10: warning: implicit declaration of function ‘_exit’ [-Wimplicit-function-declaration] s_inter.c:1493:10: warning: incompatible implicit declaration of built-in function ‘_exit’
Could someone please enlighten me? Or point me to relevant documentation? ig gcc 10.2.0 known to be problematic?
TIA
GPG Public key at http://cyber-rush.org/drr/gpg-public-key.txt http://cyber-rush.org/drr/gpg-public-key.txt
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
On Wed, 9 Dec 2020 at 14:53, Christof Ressi info@christofressi.com wrote:
indicating that _WIN32 is not defined.
So if I instead build with CFLAGS=-D_WIN32, I get a different set of errors while building s_inter.c
If "_WIN32" is not defined by the compiler, something is going very wrong...
Well...-ish. I've seen these compiler defining constants come and go and mutate over the decades and versions. Even u$oft did it in VS a couple of versions ago. I had to go back and twiddle SO MANY bits of code that all had slightly different ways of detecting OS and machine details.
usr/lib/gcc/x86_64-pc-msys/10.2.0/../../../../x86_64-pc-msys/bin/ld: pd-s_audio_oss.o: in function `oss_open_audio':
This files should never be built on Windows in the first place. Can you post the full output of the "./configure" and "make" command and attach them as text files?
However, I did find this odd. My configure output ends with
configure:
pd 0.51.3 is now configured
Platform: Unknown Debug build: no Universal build: no Localizations: yes Source directory: . Installation prefix: /usr
Compiler: gcc CPPFLAGS: CFLAGS: -ffast-math -funroll-loops -fomit-frame-pointer -O3 LDFLAGS: INCLUDES: LIBS: -lpthread -ldl
External extension: External CFLAGS: External LDFLAGS:
fftw: no wish(tcl/tk): wish audio APIs: OSS midi APIs: OSS
and yet, I still see portaudio/portmidi being built. I wonder if the configure process is actually what is going wrong here?
Just for the record, can you successfully build other software with Msys2? Just to rule out a general problem with your Msys2 installation.
PD (and my externals) are the only software of substance I am currently building with Msys2. Mostly I work in Scheme and Haskell when doing my own hacking, and VS C++ for money.
Logs &cet attached
I've seen these compiler defining constants come and go and mutate over the decades
Nah, _WIN32 and _WIN64 have always been the standard definitions. _WIN32 is always defined, and _WIN64 is additionally defined for 64-bit targets. But some toolchains used their own non-standard definitions (e.g. MinGW defined "WIN32")
Platform: Unknown
I think there might be a problem ;-)
usr/lib/gcc/x86_64-pc-msys/10.2.0/
These paths are wrong. The toolchain should be in the "mingw32" resp. "mingw64" folder.
Just a quick check: did you follow all the steps in https://github.com/pure-data/pure-data/blob/master/INSTALL.txt?
Especially, did you install the necessary toolchains and do you run your commands from the "MINGW32" shell resp. the "MINGW64" shell? Don't use the "MSYS" shell for compiling!
Christof
On 09.12.2020 16:22, David Rush wrote:
On Wed, 9 Dec 2020 at 14:53, Christof Ressi <info@christofressi.com mailto:info@christofressi.com> wrote:
indicating that _WIN32 is not defined. So if I instead build with CFLAGS=-D_WIN32, I get a different set of errors while building s_inter.c
If "_WIN32" is not defined by the compiler, something is going very wrong...
Well...-ish. I've seen these compiler defining constants come and go and mutate over the decades and versions. Even u$oft did it in VS a couple of versions ago. I had to go back and twiddle SO MANY bits of code that all had slightly different ways of detecting OS and machine details.
usr/lib/gcc/x86_64-pc-msys/10.2.0/../../../../x86_64-pc-msys/bin/ld: pd-s_audio_oss.o: in function `oss_open_audio':
This files should never be built on Windows in the first place. Can you post the full output of the "./configure" and "make" command and attach them as text files?
However, I did find this odd. My configure output ends with
configure:
pd 0.51.3 is now configured
Platform: Unknown Debug build: no Universal build: no Localizations: yes Source directory: . Installation prefix: /usr
Compiler: gcc CPPFLAGS: CFLAGS: -ffast-math -funroll-loops -fomit-frame-pointer -O3 LDFLAGS: INCLUDES: LIBS: -lpthread -ldl
External extension: External CFLAGS: External LDFLAGS:
fftw: no wish(tcl/tk): wish audio APIs: OSS midi APIs: OSS
and yet, I still see portaudio/portmidi being built. I wonder if the configure process is actually what is going wrong here?
Just for the record, can you successfully build other software with Msys2? Just to rule out a general problem with your Msys2 installation.
PD (and my externals) are the only software of substance I am currently building with Msys2. Mostly I work in Scheme and Haskell when doing my own hacking, and VS C++ for money.
Logs &cet attached
Pd-dev mailing list Pd-dev@lists.iem.at https://lists.puredata.info/listinfo/pd-dev
On Wed, 9 Dec 2020 at 16:03, Christof Ressi info@christofressi.com wrote:
These paths are wrong. The toolchain should be in the "mingw32" resp. "mingw64" folder.
Just a quick check: did you follow all the steps in https://github.com/pure-data/pure-data/blob/master/INSTALL.txt?
Yes, in May, and in October, each time to upgrade and build my externals. However, I did just an MSys2 upgrade yesterday out of an excess urge of up-to-date-ness. Having tried all the combinations now, I don;t seem to have a PD-buildable environment anywhere, so I guess it's time for the standard Windows solution of deleting everything and reinstalling.
Thank you for the help. If I still have problems after the clean-down, I'll let you know.
GPG Public key at http://cyber-rush.org/drr/gpg-public-key.txt