[PD] - need some assistance compiling an external for Windows

Scott R. Looney scottrlooney at gmail.com
Thu Jul 11 03:38:46 CEST 2019


well, i decided to go the cross compiler route, as i was at least getting
make to run on my Mac, and i still was not able to find the make
mingw64-make binary even after installing it. just too many weird variables
to have to keep track of. so i went with installing this cross compiler
https://blog.filippo.io/easy-windows-and-linux-cross-compilers-for-macos/

i have edited the Makefile.pdlibbuilder file to override uname to MINGW to
force it to identify system as Windows, according to Katja's comments in
the file.

typing 'gmake all PDINCLUDEDIR=../pd-plaits-master2 vars'
still having issues it seems, but it's at least passing the target check:

++++ info: using Makefile.pdlibbuilder version 0.5.1
++++ info: using Pd API ../pd-plaits-master2/m_pd.h
++++ info: making target all in lib plts~
++++ info: evaluating implicit prerequisites in lib plts~.....
clang: error: no such file or directory: 'plaits/dsp/engine/chord_engine.cc
'
clang: error: no input files
Makefile.pdlibbuilder:979: *** missing separator.  Stop.

so, i'm imagining the clang errors are path related (the files are clearly
at the right path in the repo and match the Makefile paths) but not sure
where to set the proper base path which obviously must be different for
Windows targets, since i don't get this error on a macOS/Linux build.
curious why it fails at the chord_engine.cc, as it's not the first file
listed in the source includes in the Makefile file under common.sources. i
think possibly the Windows the 'flags and paths for Windows' section on
Makefile.pdlibbuilder might be helpful here:

ifeq ($(system), Windows)
  pkglibdir := $(APPDATA)/Pd
  ifeq ($(MINGW_CHOST), i686-w64-mingw32)
    programfiles := ${ProgramFiles(x86)}
  else
    programfiles := $(PROGRAMFILES)
  endif
  pdbinpath := $(programfiles)/Pd/bin
  pdincludepath := $(programfiles)/Pd/src
endif

so, all i can think is that make is looking for all of its source includes
at a different path than PDINCLUDE specifies, since i've clearly overridden
it at the command line.

all the environment variables seem to point to the correct path as far as i
can tell but there are obviously a lot if i use the 'allvars' flag. also
not sure about the separator error there. the code shows it to be a
wildcard check as part of these lines:

# evaluate implicit prerequisite rules when rebuilding everything
ifdef must-build-everything
  $(if $(wildcard $(all.objects)), \
  $(info ++++ info: evaluating implicit prerequisites in lib $(lib.name).....)
\
  $(foreach v, $(all.sources), $(eval $(call declare-object-target, $v))))
endif

having some kind of realtime chat with someone would be ideal since there's
a lot of changing variables and trying different approaches, but any input
or feedback would be helpful. thanks!

best,
scott

On Wed, Jul 10, 2019 at 2:09 PM Scott R. Looney <scottrlooney at gmail.com>
wrote:

> okay i've installed msys2 and what should be gcc into mingw64 on a
> Windows10 laptop. this is not terribly clear as there are dozens of
> packages for gcc the one i installed was mingw-w64-x86_64-gcc 9.1.0-3 which
> i hope should be the one i need since it seemed the most generic, also
> gcc-libs as well.
>
> doing the exact same actions (cd into active build directory then 'make
> all' results in 'bash make: command not found') so either the path has to
> be set or i need to navigate to where make is located. again i'm sure this
> is easy, but i don't know what to do to get make to run. looking in the
> /bin directory of c:\msys64\mingw64\bin i don't see a make binary but i
> really have no idea what to do at this point. i've edited the
> msys64/etc/fstab
> file to include the path to the mingw64 folder but that has no effect on
> the bash path issue. further help appreciated!
>
> also - i did find a cross compiler to install on my Mac so depending on
> how difficult this is to do in Windows i may just go that route.
>
> best,
> scott
>
> On Wed, Jul 10, 2019 at 12:06 AM IOhannes m zmölnig <zmoelnig at iem.at>
> wrote:
>
>>
>>
>> Am 10. Juli 2019 08:05:40 MESZ schrieb "Scott R. Looney" <
>> scottrlooney at gmail.com>:
>>
>> > i'm on macOS and have installed GCC and mingw-64 via
>> >Homebrew
>> >so i should have what i need.
>> >
>> >after blundering around i was able to figure out how to build by just
>> >typing 'make all' in the directory, but it just made a linux .o and a
>> >.pd_darwin library. there must be a way to override the system
>> >architecture
>> >and force it to build a DLL.
>>
>> If you want to build binaries for Windows on your mac, you'd need a cross
>> compiler.
>>
>> If you dont know what that is, you probably should geht hold on a Windows
>> machine with msys2/mingw64 installed and build natively *there*.
>>
>> mdg.zdr.sfj
>> IOhannes
>>
>>
>>
>> _______________________________________________
>> Pd-list at lists.iem.at mailing list
>> UNSUBSCRIBE and account-management ->
>> https://lists.puredata.info/listinfo/pd-list
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.puredata.info/pipermail/pd-list/attachments/20190710/cf26a109/attachment.html>


More information about the Pd-list mailing list