libpd / abl_link

Ableton Link integration for Pure Data on desktop and Android.
Other
80 stars 15 forks source link

can´t compile abl_link~ for Windows #25

Closed emviveros closed 3 years ago

emviveros commented 3 years ago

abl_link won't compile in Windows 10 x64. I'm trying to compile it with msys2. Using pd 0.51-4 source files.

Compilation try with repository pdlibbuilder make file fail at all. But replacing with the last version of pd-lib-builder I can go forward, but now I have an error with ntohll

follow the build log: log_abl_link_compilation_fail_msys2.txt

Thanks any advance

danomatika commented 3 years ago

That's a function included by winsock.h. Perhaps there is a missing include somewhere? As this is a compilation issue with the ableton sources, I would check their GitHub issues first and/or try updating the abl_link/external/link submodule to a newer commit as this is probably fixed in newer versions.

emviveros commented 3 years ago

I changed the title to not need to open a new issue on the atempt to compile abl_link~ to windows.

I tried to crosscompile in VM with Ubuntu 12.04 (the same environment I use to compile all non mac archs to ELSE and Cyclone libs). And I have new error which can be usefull.

Compiling for win32 or win64 archs I have the same error:

pi@pi-VirtualBox:~/src/abl_link/external$ make PLATFORM=i686-w64-mingw32 PDDIR='/home/pi/src/abl_link/external/pd-0.51-4-i386.msw/pd-0.51-4-i386'  install objectsdir=./build
++++ info: using Makefile.pdlibbuilder version 0.6.0
++++ info: making target install in lib abl_link~
++++ info: installpath is './build/abl_link~'
++++ info: making abl_link~.o in lib abl_link~
i686-w64-mingw32-g++ -DPD -I "/home/pi/src/abl_link/external/pd-0.51-4-i386.msw/pd-0.51-4-i386/src" -DMSW -DNT  -fcheck-new -std=c++11 -I./link/include -I./link/modules/asio-standalone/asio/include -Wno-multichar -DLINK_PLATFORM_WINDOWS=1 -Wall -Wextra -Wshadow -Winline -Wstrict-aliasing -Wno-unused-function -Wno-unused-parameter -Wno-unused-value -Wno-unused-variable -O3 -ffast-math -funroll-loops -fomit-frame-pointer -march=pentium4 -msse -msse2 -mfpmath=sse -o abl_link~.o -c abl_link~.cpp
In file included from ./link/include/ableton/link/Timeline.hpp:22:0,
                 from ./link/include/ableton/link/ClientSessionTimelines.hpp:23,
                 from ./link/include/ableton/link/Controller.hpp:24,
                 from ./link/include/ableton/platforms/Config.hpp:22,
                 from ./link/include/ableton/Link.hpp:25,
                 from abl_link_instance.hpp:12,
                 from abl_link~.cpp:13:
./link/include/ableton/discovery/NetworkByteStreamSerializable.hpp:36:10: fatal error: WS2tcpip.h: Arquivo ou diretório inexistente
 #include <WS2tcpip.h>
          ^~~~~~~~~~~~
compilation terminated.
Makefile.pdlibbuilder:959: recipe for target 'abl_link~.o' failed
make: *** [abl_link~.o] Error 1
pi@pi-VirtualBox:~/src/abl_link/external$ make PLATFORM=x86_64-w64-mingw32 PDDIR='/home/pi/src/abl_link/external/pd-0.51-4.msw/pd-0.51-4' install objectsdir=./build
++++ info: using Makefile.pdlibbuilder version 0.6.0
++++ info: making target install in lib abl_link~
++++ info: installpath is './build/abl_link~'
++++ info: making abl_link~.o in lib abl_link~
x86_64-w64-mingw32-g++ -DPD -I "/home/pi/src/abl_link/external/pd-0.51-4.msw/pd-0.51-4/src" -DMSW -DNT -DPD_LONGINTTYPE=__int64  -fcheck-new -std=c++11 -I./link/include -I./link/modules/asio-standalone/asio/include -Wno-multichar -DLINK_PLATFORM_WINDOWS=1 -Wall -Wextra -Wshadow -Winline -Wstrict-aliasing -Wno-unused-function -Wno-unused-parameter -Wno-unused-value -Wno-unused-variable -O3 -ffast-math -funroll-loops -fomit-frame-pointer -march=core2 -msse -msse2 -msse3 -mfpmath=sse -o abl_link~.o -c abl_link~.cpp
In file included from ./link/include/ableton/link/Timeline.hpp:22:0,
                 from ./link/include/ableton/link/ClientSessionTimelines.hpp:23,
                 from ./link/include/ableton/link/Controller.hpp:24,
                 from ./link/include/ableton/platforms/Config.hpp:22,
                 from ./link/include/ableton/Link.hpp:25,
                 from abl_link_instance.hpp:12,
                 from abl_link~.cpp:13:
./link/include/ableton/discovery/NetworkByteStreamSerializable.hpp:36:10: fatal error: WS2tcpip.h: Arquivo ou diretório inexistente
 #include <WS2tcpip.h>
          ^~~~~~~~~~~~
compilation terminated.
Makefile.pdlibbuilder:959: recipe for target 'abl_link~.o' failed
make: *** [abl_link~.o] Error 1

If we can compile it successfully with lib-pd-builder, I can compile and upload to deken for all Win, Linux (RPi, Linux32, LInux64) archs without problem.

umlaeute commented 3 years ago

the new build error is actually a bug in the ableton_link upstream sources, that use wrong capitalisation: the header file tries to include a file named WS2tcpip.h, but there is only a file ws2tcpip.h.

on windows this usually doesn't do any harm as the filesystems there are case-insensitive, so WS2tcpip.h and ws2tcpip.h refer to the same file. On linux, most filesystems are case-sensitive, so this fails.

please file a bug with ableton_link.

as @danomatika said, we probably should close this issue here.


If we can compile it successfully with lib-pd-builder, I can compile and upload to deken for all [...] Linux (RPi, Linux32, Linux64) archs without problem.

also note that there are Debian packages for these architectures (and some more), so i guess the need here is less prominent (although: see #24)

emviveros commented 3 years ago

I reporte what happened here in ableton/link repository(https://github.com/Ableton/link/issues/93). Soon as I get a response, I go back here to give a chance to the issue or close it. ok!?


also note that there are Debian packages for these architectures (and some more), so i guess the need here is less prominent (although: see #24)

Thanks again and again @umlaeute! I let this information pass. :)

danomatika commented 3 years ago

Fixed by merging #28 from @Lucarda. Please test and reopen if needed.