[PD-dev] autotools on MinGW/MSYS
hans at at.or.at
Wed Sep 15 15:20:04 CEST 2010
On Sep 15, 2010, at 6:02 AM, IOhannes m zmoelnig wrote:
> On 2010-09-14 17:42, Hans-Christoph Steiner wrote:
>>> i believe the patch i attached to the ticket to solve the problem
>>> have not been able to test on the very platform.
> ok, i managed to log in, and my patch indeed solves the reported
> however, there are more issues, coming from parts of the new build
> system which i never touched.
> so i would like to discuss them, before i remove them:
> #1 when building with msys, the new build system includes pd-watchdog
> unfortunately, the watchdog uses signals and other quite linux
> stuff. i don't know whether this can be ported, and whether this
> actually make sense.
> conclusion: i would exclude pd-watchdog from all w32 builds (if people
> need signals and whatnot, why don't they use an os that has signals
I am pretty sure that Cygwin has signals, so pd-watchdog should just
be removed for MinGW/Windows builds.
> #2 when building with msys, the compiler is forced to "g++".
> there are several problems with this:
> -- the user cannot chose the compiler themselves anymore, as the CC
> variable is silently ignored and reset to "g++"
> -- no check is done whether there actually is an executable named "g+
> it is just assumed. this kind of leads autoconf ad absurdum, as we can
> simply check for a valid c++ compiler if needed.
> -- most important however: compiling Pd with a c++ compiler can be a
> idea! the Pd source uses C++ keywords (e.g. "template" is often used).
> throwing this code onto a c++ compiler leads to errors.
> conclusion: don't force autoconf to use g++ as the c-compiler, but
> rather let it choose the right compiler automagically
> if we need a c++-aware linker, then we should ask for a c++-aware
> (rather than force a c++ compiler). afaik, automake can handle this
> a 1-liner.
Try building with the ASIO sources, which are C++ and need to be built
with g++. gcc won't link C++ code into a C binary from what I could
tell. So at least the final linking needs to be done with g++. In
makefile.mingw, all C is built with gcc and all C++ is built with g++,
then the whole thing is linked with g++.
As we enjoy great advantages from inventions of others, we should be
glad of an opportunity to serve others by any invention of ours; and
this we should do freely and generously. - Benjamin Franklin
More information about the Pd-dev