[PD-dev] Issues building PD 0.51.x

David Rush kumoyuki at gmail.com
Wed Dec 9 15:19:03 CET 2020


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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.puredata.info/pipermail/pd-dev/attachments/20201209/4bc51c7b/attachment.html>


More information about the Pd-dev mailing list