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> 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