grame-cncm / faust

Functional programming language for signal processing and sound synthesis
http://faust.grame.fr
Other
2.6k stars 326 forks source link

Troubles in building faust on Windows (Win10 64bit) with MSYS2 MINGW64 #205

Closed maurocsound closed 5 years ago

maurocsound commented 6 years ago

Hi, I installed MSYS2, launched the "MSYS2 MinGW 64bit" batch file and then, from the command line, I installed the following packages with pacman: $ pacman -S mingw-w64-x86_64-llvm $ pacman -S mingw-w64-x86_64-gcc $ pacman -S git $ pacman -S make $ pacman -S cmake $ pacman -S mingw-w64-x86_64-libmicrohttpd

Then: $ git clone https://github.com/grame-cncm/faust.git $ cd faust $ git submodule update --init $ make

but the make process ends with a linking error:

[...]
[  0%] Linking CXX executable ../bin/faust.exe
CMakeFiles/faust.dir/home/Mauro/faust/compiler/parser/sourcefetcher.cpp.o:sourcefetcher.cpp:(.text+0x4db): undefined reference to `__imp_select'
CMakeFiles/faust.dir/home/Mauro/faust/compiler/parser/sourcefetcher.cpp.o:sourcefetcher.cpp:(.text+0x529): undefined reference to `__imp_recv'
CMakeFiles/faust.dir/home/Mauro/faust/compiler/parser/sourcefetcher.cpp.o:sourcefetcher.cpp:(.text+0x634): undefined reference to `__imp_gethostbyname'
CMakeFiles/faust.dir/home/Mauro/faust/compiler/parser/sourcefetcher.cpp.o:sourcefetcher.cpp:(.text+0x66c): undefined reference to `__imp_htons'
CMakeFiles/faust.dir/home/Mauro/faust/compiler/parser/sourcefetcher.cpp.o:sourcefetcher.cpp:(.text+0x683): undefined reference to `__imp_socket'
CMakeFiles/faust.dir/home/Mauro/faust/compiler/parser/sourcefetcher.cpp.o:sourcefetcher.cpp:(.text+0x69c): undefined reference to `__imp_connect'
CMakeFiles/faust.dir/home/Mauro/faust/compiler/parser/sourcefetcher.cpp.o:sourcefetcher.cpp:(.text+0xb19): undefined reference to `__imp_send'
CMakeFiles/faust.dir/home/Mauro/faust/compiler/parser/sourcefetcher.cpp.o:sourcefetcher.cpp:(.text+0xc68): undefined reference to `__imp_closesocket'
CMakeFiles/faust.dir/home/Mauro/faust/compiler/parser/sourcefetcher.cpp.o:sourcefetcher.cpp:(.text+0xd0a): undefined reference to `__imp_closesocket'
CMakeFiles/faust.dir/home/Mauro/faust/compiler/parser/sourcefetcher.cpp.o:sourcefetcher.cpp:(.text+0xe96): undefined reference to `__imp_select'
CMakeFiles/faust.dir/home/Mauro/faust/compiler/parser/sourcefetcher.cpp.o:sourcefetcher.cpp:(.text+0xe9d): undefined reference to `__imp_recv'
CMakeFiles/faust.dir/home/Mauro/faust/compiler/parser/sourcefetcher.cpp.o:sourcefetcher.cpp:(.text+0xf64): undefined reference to `__imp_closesocket'
CMakeFiles/faust.dir/home/Mauro/faust/compiler/parser/sourcefetcher.cpp.o:sourcefetcher.cpp:(.text+0x11f5): undefined reference to `__imp_closesocket'
CMakeFiles/faust.dir/home/Mauro/faust/compiler/parser/sourcefetcher.cpp.o:sourcefetcher.cpp:(.text+0x121a): undefined reference to `__imp_closesocket'
CMakeFiles/faust.dir/home/Mauro/faust/compiler/parser/sourcefetcher.cpp.o:sourcefetcher.cpp:(.text+0x122d): undefined reference to `__imp_closesocket'
CMakeFiles/faust.dir/home/Mauro/faust/compiler/parser/sourcefetcher.cpp.o:sourcefetcher.cpp:(.text+0x1254): undefined reference to `__imp_closesocket'
CMakeFiles/faust.dir/home/Mauro/faust/compiler/parser/sourcefetcher.cpp.o:sourcefetcher.cpp:(.text+0x127b): more undefined references to `__imp_closesocket' follow
collect2.exe: error: ld returned 1 exit status

What can it be?

dfober commented 6 years ago

Hi,

It looks like the Ws2_32.lib is missing (although it’s part of the project settings). To check, could you do the following: go to the build folder, activate the verbose mode and re-run the compilation:

$ cd build $ make verbose $ make

you should get the detailed command executed for the link. — Dominique

Le 19 août 2018 à 14:11, maurocsound notifications@github.com a écrit :

Hi, I installed MSYS2, launched the "MSYS2 MinGW 64bit" batch file and then, from the command line, I installed the following packages with pacman: $ pacman -S mingw-w64-x86_64-llvm $ pacman -S mingw-w64-x86_64-gcc $ pacman -S git $ pacman -S make $ pacman -S cmake $ pacman -S mingw-w64-x86_64-libmicrohttpd

Then: $ git clone https://github.com/grame-cncm/faust.git https://github.com/grame-cncm/faust.git $ cd faust $ git submodule update --init $ make

but the make process ends with a linking error:

[...] [ 0%] Linking CXX executable ../bin/faust.exe CMakeFiles/faust.dir/home/Mauro/faust/compiler/parser/sourcefetcher.cpp.o:sourcefetcher.cpp:(.text+0x4db): undefined reference to __imp_select' CMakeFiles/faust.dir/home/Mauro/faust/compiler/parser/sourcefetcher.cpp.o:sourcefetcher.cpp:(.text+0x529): undefined reference toimp_recv' CMakeFiles/faust.dir/home/Mauro/faust/compiler/parser/sourcefetcher.cpp.o:sourcefetcher.cpp:(.text+0x634): undefined reference to __imp_gethostbyname' CMakeFiles/faust.dir/home/Mauro/faust/compiler/parser/sourcefetcher.cpp.o:sourcefetcher.cpp:(.text+0x66c): undefined reference toimp_htons' CMakeFiles/faust.dir/home/Mauro/faust/compiler/parser/sourcefetcher.cpp.o:sourcefetcher.cpp:(.text+0x683): undefined reference to __imp_socket' CMakeFiles/faust.dir/home/Mauro/faust/compiler/parser/sourcefetcher.cpp.o:sourcefetcher.cpp:(.text+0x69c): undefined reference toimp_connect' CMakeFiles/faust.dir/home/Mauro/faust/compiler/parser/sourcefetcher.cpp.o:sourcefetcher.cpp:(.text+0xb19): undefined reference to __imp_send' CMakeFiles/faust.dir/home/Mauro/faust/compiler/parser/sourcefetcher.cpp.o:sourcefetcher.cpp:(.text+0xc68): undefined reference toimp_closesocket' CMakeFiles/faust.dir/home/Mauro/faust/compiler/parser/sourcefetcher.cpp.o:sourcefetcher.cpp:(.text+0xd0a): undefined reference to __imp_closesocket' CMakeFiles/faust.dir/home/Mauro/faust/compiler/parser/sourcefetcher.cpp.o:sourcefetcher.cpp:(.text+0xe96): undefined reference toimp_select' CMakeFiles/faust.dir/home/Mauro/faust/compiler/parser/sourcefetcher.cpp.o:sourcefetcher.cpp:(.text+0xe9d): undefined reference to __imp_recv' CMakeFiles/faust.dir/home/Mauro/faust/compiler/parser/sourcefetcher.cpp.o:sourcefetcher.cpp:(.text+0xf64): undefined reference toimp_closesocket' CMakeFiles/faust.dir/home/Mauro/faust/compiler/parser/sourcefetcher.cpp.o:sourcefetcher.cpp:(.text+0x11f5): undefined reference to __imp_closesocket' CMakeFiles/faust.dir/home/Mauro/faust/compiler/parser/sourcefetcher.cpp.o:sourcefetcher.cpp:(.text+0x121a): undefined reference toimp_closesocket' CMakeFiles/faust.dir/home/Mauro/faust/compiler/parser/sourcefetcher.cpp.o:sourcefetcher.cpp:(.text+0x122d): undefined reference to __imp_closesocket' CMakeFiles/faust.dir/home/Mauro/faust/compiler/parser/sourcefetcher.cpp.o:sourcefetcher.cpp:(.text+0x1254): undefined reference toimp_closesocket' CMakeFiles/faust.dir/home/Mauro/faust/compiler/parser/sourcefetcher.cpp.o:sourcefetcher.cpp:(.text+0x127b): more undefined references to `__imp_closesocket' follow collect2.exe: error: ld returned 1 exit status What can be?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/grame-cncm/faust/issues/205, or mute the thread https://github.com/notifications/unsubscribe-auth/AAaTw32Sz6kapSP5f22N4eFGS7X5svZ5ks5uSVX1gaJpZM4WC8TV.

maurocsound commented 6 years ago

Hi, now during the compilation I can see the following error:

make[3]: ingresso nella directory "/home/Mauro/faust/build/faustdir"
[  0%] Building CXX object osc/CMakeFiles/oscstatic.dir/home/Mauro/faust/architecture/osclib/oscpack/ip/posix/NetworkingUtils.cpp.o
cd /home/Mauro/faust/build/faustdir/osc && /mingw64/bin/c++.exe   -I/home/Mauro/faust/architecture/osclib/oscpack -I/home/Mauro/faust/architecture/osclib/faust -I/home/Mauro/faust/architecture/osclib/faust/src -I/home/Mauro/faust/architecture/osclib/faust/src/lib -I/home/Mauro/faust/architecture/osclib/faust/src/osc -I/home/Mauro/faust/architecture/osclib/faust/src/threads -I/home/Mauro/faust/architecture/osclib/..  -O3   -std=gnu++11 -o CMakeFiles/oscstatic.dir/home/Mauro/faust/architecture/osclib/oscpack/ip/posix/NetworkingUtils.cpp.o -c /home/Mauro/faust/architecture/osclib/oscpack/ip/posix/NetworkingUtils.cpp
make[3]: uscita dalla directory "/home/Mauro/faust/build/faustdir"
/usr/bin/make -f http/CMakeFiles/httpstatic.dir/build.make http/CMakeFiles/httpstatic.dir/build
C:/msys64/home/Mauro/faust/architecture/osclib/oscpack/ip/posix/NetworkingUtils.cpp:39:10: fatal error: netdb.h: No such file or directory
 #include <netdb.h>
          ^~~~~~~~~
compilation terminated.

But the netdb.h is for Linux, not for Windows, right? I think in Windows you should use "winsock2.h" instead of "netdb.h".

dfober commented 6 years ago

Really strange ! the build system behaves as if windows is not recognised! (posix/NetworkingUtils.cpp is not for windows that should be win32/NetworkingUtils.cpp).

Could you make sure you’re using the master-dev branch? $ git branch

Next, could you go to the build folder and send the cmake output: $ cd build # build is relative to the faust root folder $ make cmake # you should get a list of messages on output

— Dominique

Le 20 août 2018 à 18:54, maurocsound notifications@github.com a écrit :

Hi, now during the compilation I can see the following error:

make[3]: ingresso nella directory "/home/Mauro/faust/build/faustdir" [ 0%] Building CXX object osc/CMakeFiles/oscstatic.dir/home/Mauro/faust/architecture/osclib/oscpack/ip/posix/NetworkingUtils.cpp.o cd /home/Mauro/faust/build/faustdir/osc && /mingw64/bin/c++.exe -I/home/Mauro/faust/architecture/osclib/oscpack -I/home/Mauro/faust/architecture/osclib/faust -I/home/Mauro/faust/architecture/osclib/faust/src -I/home/Mauro/faust/architecture/osclib/faust/src/lib -I/home/Mauro/faust/architecture/osclib/faust/src/osc -I/home/Mauro/faust/architecture/osclib/faust/src/threads -I/home/Mauro/faust/architecture/osclib/.. -O3 -std=gnu++11 -o CMakeFiles/oscstatic.dir/home/Mauro/faust/architecture/osclib/oscpack/ip/posix/NetworkingUtils.cpp.o -c /home/Mauro/faust/architecture/osclib/oscpack/ip/posix/NetworkingUtils.cpp make[3]: uscita dalla directory "/home/Mauro/faust/build/faustdir" /usr/bin/make -f http/CMakeFiles/httpstatic.dir/build.make http/CMakeFiles/httpstatic.dir/build C:/msys64/home/Mauro/faust/architecture/osclib/oscpack/ip/posix/NetworkingUtils.cpp:39:10: fatal error: netdb.h: No such file or directory

include

      ^~~~~~~~~

compilation terminated. But the netdb.h is for Linux, not for Windows, right? I think in Windows you should use "winsock2.h" instead of "netdb.h".

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/grame-cncm/faust/issues/205#issuecomment-414387095, or mute the thread https://github.com/notifications/unsubscribe-auth/AAaTwyuFhPjD7E914AxchzjXfUyskz1fks5uSum2gaJpZM4WC8TV.

maurocsound commented 6 years ago

Yes, git branch reports that I'm on "master-dev". Following is the "make cmake" output:

$ make cmake
cd faustdir && cmake -C ../backends/regular.cmake -C ../targets/regular.cmake -DCMAKE_BUILD_TYPE=Release -G 'Unix Makefiles' ..
loading initial cache file ../backends/regular.cmake
loading initial cache file ../targets/regular.cmake
-- In target faust: include ASMJS backend
-- In target faust: include C backend
-- In target faust: include CPP backend
-- In target faust: include JAVA backend
-- In target faust: include JS backend
-- In target faust: include OCPP backend
-- In target faust: include WASM backend
-- In target wasmlib: include WASM backend
-- In target asmjslib: include ASMJS backend
-- Found libmicrohttpd 0.9.58
-- Install location is /usr/local
-- Include targets: faust osc;http
-- Configuring done
-- Generating done
-- Build files have been written to: /home/Mauro/faust/build/faustdir
dfober commented 6 years ago

looks correct…

and from the same location (build folder)

$ make verbose $ make

send me the output

Le 21 août 2018 à 09:45, maurocsound notifications@github.com a écrit :

Yes, git branch reports that I'm on "master-dev". Following is the "make cmake" output:

$ make cmake cd faustdir && cmake -C ../backends/regular.cmake -C ../targets/regular.cmake -DCMAKE_BUILD_TYPE=Release -G 'Unix Makefiles' .. loading initial cache file ../backends/regular.cmake loading initial cache file ../targets/regular.cmake -- In target faust: include ASMJS backend -- In target faust: include C backend -- In target faust: include CPP backend -- In target faust: include JAVA backend -- In target faust: include JS backend -- In target faust: include OCPP backend -- In target faust: include WASM backend -- In target wasmlib: include WASM backend -- In target asmjslib: include ASMJS backend -- Found libmicrohttpd 0.9.58 -- Install location is /usr/local -- Include targets: faust osc;http -- Configuring done -- Generating done -- Build files have been written to: /home/Mauro/faust/build/faustdir — You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/grame-cncm/faust/issues/205#issuecomment-414582034, or mute the thread https://github.com/notifications/unsubscribe-auth/AAaTw1Dp9Fd7UbWy_ZZ8XpgPYx_vLzG8ks5uS7q1gaJpZM4WC8TV.

maurocsound commented 6 years ago

This is the output until the error (I omitted what followed the fatal error on netdb.h... If you want I can attach all of the output). I noticed that it want to compile the posix version indeed... Maybe "MSYS2-MINGW64" environment fakes the applications in thinking that they are on a Unix/Linux platform?

$ make
cmake --build faustdir --config Release -- -j 4
make[1]: ingresso nella directory "/home/Mauro/faust/build/faustdir"
/usr/bin/cmake.exe -H/home/Mauro/faust/build -B/home/Mauro/faust/build/faustdir --check-build-system CMakeFiles/Makefile.cmake 0
/usr/bin/cmake.exe -E cmake_progress_start /home/Mauro/faust/build/faustdir/CMakeFiles /home/Mauro/faust/build/faustdir/CMakeFiles/progress.marks
/usr/bin/make -f CMakeFiles/Makefile2 all
make[2]: ingresso nella directory "/home/Mauro/faust/build/faustdir"
/usr/bin/make -f CMakeFiles/faust.dir/build.make CMakeFiles/faust.dir/depend
/usr/bin/make -f osc/CMakeFiles/oscstatic.dir/build.make osc/CMakeFiles/oscstatic.dir/depend
/usr/bin/make -f http/CMakeFiles/httpstatic.dir/build.make http/CMakeFiles/httpstatic.dir/depend
make[3]: ingresso nella directory "/home/Mauro/faust/build/faustdir"
cd /home/Mauro/faust/build/faustdir && /usr/bin/cmake.exe -E cmake_depends "Unix Makefiles" /home/Mauro/faust/build /home/Mauro/faust/build/osc /home/Mauro/faust/build/faustdir /home/Mauro/faust/build/faustdir/osc /home/Mauro/faust/build/faustdir/osc/CMakeFiles/oscstatic.dir/DependInfo.cmake --color=
make[3]: ingresso nella directory "/home/Mauro/faust/build/faustdir"
cd /home/Mauro/faust/build/faustdir && /usr/bin/cmake.exe -E cmake_depends "Unix Makefiles" /home/Mauro/faust/build /home/Mauro/faust/build/http /home/Mauro/faust/build/faustdir /home/Mauro/faust/build/faustdir/http /home/Mauro/faust/build/faustdir/http/CMakeFiles/httpstatic.dir/DependInfo.cmake --color=
make[3]: ingresso nella directory "/home/Mauro/faust/build/faustdir"
cd /home/Mauro/faust/build/faustdir && /usr/bin/cmake.exe -E cmake_depends "Unix Makefiles" /home/Mauro/faust/build /home/Mauro/faust/build /home/Mauro/faust/build/faustdir /home/Mauro/faust/build/faustdir /home/Mauro/faust/build/faustdir/CMakeFiles/faust.dir/DependInfo.cmake --color=
make[3]: uscita dalla directory "/home/Mauro/faust/build/faustdir"
/usr/bin/make -f http/CMakeFiles/httpstatic.dir/build.make http/CMakeFiles/httpstatic.dir/build
make[3]: uscita dalla directory "/home/Mauro/faust/build/faustdir"
/usr/bin/make -f osc/CMakeFiles/oscstatic.dir/build.make osc/CMakeFiles/oscstatic.dir/build
make[3]: ingresso nella directory "/home/Mauro/faust/build/faustdir"
make[3]: Nessuna operazione da eseguire per "http/CMakeFiles/httpstatic.dir/build".
make[3]: uscita dalla directory "/home/Mauro/faust/build/faustdir"
make[3]: ingresso nella directory "/home/Mauro/faust/build/faustdir"
[ 16%] Built target httpstatic
[ 16%] Building CXX object osc/CMakeFiles/oscstatic.dir/home/Mauro/faust/architecture/osclib/oscpack/ip/posix/NetworkingUtils.cpp.o
cd /home/Mauro/faust/build/faustdir/osc && /mingw64/bin/c++.exe   -I/home/Mauro/faust/architecture/osclib/oscpack -I/home/Mauro/faust/architecture/osclib/faust -I/home/Mauro/faust/architecture/osclib/faust/src -I/home/Mauro/faust/architecture/osclib/faust/src/lib -I/home/Mauro/faust/architecture/osclib/faust/src/osc -I/home/Mauro/faust/architecture/osclib/faust/src/threads -I/home/Mauro/faust/architecture/osclib/..  -O3   -std=gnu++11 -o CMakeFiles/oscstatic.dir/home/Mauro/faust/architecture/osclib/oscpack/ip/posix/NetworkingUtils.cpp.o -c /home/Mauro/faust/architecture/osclib/oscpack/ip/posix/NetworkingUtils.cpp
[ 16%] Building CXX object osc/CMakeFiles/oscstatic.dir/home/Mauro/faust/architecture/osclib/oscpack/ip/posix/UdpSocket.cpp.o
cd /home/Mauro/faust/build/faustdir/osc && /mingw64/bin/c++.exe   -I/home/Mauro/faust/architecture/osclib/oscpack -I/home/Mauro/faust/architecture/osclib/faust -I/home/Mauro/faust/architecture/osclib/faust/src -I/home/Mauro/faust/architecture/osclib/faust/src/lib -I/home/Mauro/faust/architecture/osclib/faust/src/osc -I/home/Mauro/faust/architecture/osclib/faust/src/threads -I/home/Mauro/faust/architecture/osclib/..  -O3   -std=gnu++11 -o CMakeFiles/oscstatic.dir/home/Mauro/faust/architecture/osclib/oscpack/ip/posix/UdpSocket.cpp.o -c /home/Mauro/faust/architecture/osclib/oscpack/ip/posix/UdpSocket.cpp
C:/msys64/home/Mauro/faust/architecture/osclib/oscpack/ip/posix/NetworkingUtils.cpp:39:10: fatal error: netdb.h: No such file or directory
 #include <netdb.h>
          ^~~~~~~~~
compilation terminated.
make[3]: *** [osc/CMakeFiles/oscstatic.dir/build.make:498: osc/CMakeFiles/oscstatic.dir/home/Mauro/faust/architecture/osclib/oscpack/ip/posix/NetworkingUtils.cpp.o] Error 1
make[3]: *** Attesa per i processi non terminati....
C:/msys64/home/Mauro/faust/architecture/osclib/oscpack/ip/posix/UdpSocket.cpp:43:10: fatal error: netdb.h: No such file or directory
 #include <netdb.h>
          ^~~~~~~~~
compilation terminated.
make[3]: *** [osc/CMakeFiles/oscstatic.dir/build.make:522: osc/CMakeFiles/oscstatic.dir/home/Mauro/faust/architecture/osclib/oscpack/ip/posix/UdpSocket.cpp.o] Error 1
make[3]: uscita dalla directory "/home/Mauro/faust/build/faustdir"
make[2]: *** [CMakeFiles/Makefile2:209: osc/CMakeFiles/oscstatic.dir/all] Error 2
dfober commented 6 years ago

another test… could you put the following into a file named CMakeLists.txt:

project(test) if (WIN32) message ("WIN32 defined") else() message ("NOT WIN32") endif()

do it in a dedicated folder (e.g. foo) and then : $ cd foo $ cmake . -G “Unix Makefiles"

and send me the output

Le 21 août 2018 à 10:30, maurocsound notifications@github.com a écrit :

This is the output until the error (I omitted what followed the fatal error on netdb.h... If you want I can attach all of the output). I noticed that it want to compile the posix version indeed... Maybe "MSYS2-MINGW64" environment fakes the applications in thinking that they are on a Unix/Linux platform?

$ make cmake --build faustdir --config Release -- -j 4 make[1]: ingresso nella directory "/home/Mauro/faust/build/faustdir" /usr/bin/cmake.exe -H/home/Mauro/faust/build -B/home/Mauro/faust/build/faustdir --check-build-system CMakeFiles/Makefile.cmake 0 /usr/bin/cmake.exe -E cmake_progress_start /home/Mauro/faust/build/faustdir/CMakeFiles /home/Mauro/faust/build/faustdir/CMakeFiles/progress.marks /usr/bin/make -f CMakeFiles/Makefile2 all make[2]: ingresso nella directory "/home/Mauro/faust/build/faustdir" /usr/bin/make -f CMakeFiles/faust.dir/build.make CMakeFiles/faust.dir/depend /usr/bin/make -f osc/CMakeFiles/oscstatic.dir/build.make osc/CMakeFiles/oscstatic.dir/depend /usr/bin/make -f http/CMakeFiles/httpstatic.dir/build.make http/CMakeFiles/httpstatic.dir/depend make[3]: ingresso nella directory "/home/Mauro/faust/build/faustdir" cd /home/Mauro/faust/build/faustdir && /usr/bin/cmake.exe -E cmake_depends "Unix Makefiles" /home/Mauro/faust/build /home/Mauro/faust/build/osc /home/Mauro/faust/build/faustdir /home/Mauro/faust/build/faustdir/osc /home/Mauro/faust/build/faustdir/osc/CMakeFiles/oscstatic.dir/DependInfo.cmake --color= make[3]: ingresso nella directory "/home/Mauro/faust/build/faustdir" cd /home/Mauro/faust/build/faustdir && /usr/bin/cmake.exe -E cmake_depends "Unix Makefiles" /home/Mauro/faust/build /home/Mauro/faust/build/http /home/Mauro/faust/build/faustdir /home/Mauro/faust/build/faustdir/http /home/Mauro/faust/build/faustdir/http/CMakeFiles/httpstatic.dir/DependInfo.cmake --color= make[3]: ingresso nella directory "/home/Mauro/faust/build/faustdir" cd /home/Mauro/faust/build/faustdir && /usr/bin/cmake.exe -E cmake_depends "Unix Makefiles" /home/Mauro/faust/build /home/Mauro/faust/build /home/Mauro/faust/build/faustdir /home/Mauro/faust/build/faustdir /home/Mauro/faust/build/faustdir/CMakeFiles/faust.dir/DependInfo.cmake --color= make[3]: uscita dalla directory "/home/Mauro/faust/build/faustdir" /usr/bin/make -f http/CMakeFiles/httpstatic.dir/build.make http/CMakeFiles/httpstatic.dir/build make[3]: uscita dalla directory "/home/Mauro/faust/build/faustdir" /usr/bin/make -f osc/CMakeFiles/oscstatic.dir/build.make osc/CMakeFiles/oscstatic.dir/build make[3]: ingresso nella directory "/home/Mauro/faust/build/faustdir" make[3]: Nessuna operazione da eseguire per "http/CMakeFiles/httpstatic.dir/build". make[3]: uscita dalla directory "/home/Mauro/faust/build/faustdir" make[3]: ingresso nella directory "/home/Mauro/faust/build/faustdir" [ 16%] Built target httpstatic [ 16%] Building CXX object osc/CMakeFiles/oscstatic.dir/home/Mauro/faust/architecture/osclib/oscpack/ip/posix/NetworkingUtils.cpp.o cd /home/Mauro/faust/build/faustdir/osc && /mingw64/bin/c++.exe -I/home/Mauro/faust/architecture/osclib/oscpack -I/home/Mauro/faust/architecture/osclib/faust -I/home/Mauro/faust/architecture/osclib/faust/src -I/home/Mauro/faust/architecture/osclib/faust/src/lib -I/home/Mauro/faust/architecture/osclib/faust/src/osc -I/home/Mauro/faust/architecture/osclib/faust/src/threads -I/home/Mauro/faust/architecture/osclib/.. -O3 -std=gnu++11 -o CMakeFiles/oscstatic.dir/home/Mauro/faust/architecture/osclib/oscpack/ip/posix/NetworkingUtils.cpp.o -c /home/Mauro/faust/architecture/osclib/oscpack/ip/posix/NetworkingUtils.cpp [ 16%] Building CXX object osc/CMakeFiles/oscstatic.dir/home/Mauro/faust/architecture/osclib/oscpack/ip/posix/UdpSocket.cpp.o cd /home/Mauro/faust/build/faustdir/osc && /mingw64/bin/c++.exe -I/home/Mauro/faust/architecture/osclib/oscpack -I/home/Mauro/faust/architecture/osclib/faust -I/home/Mauro/faust/architecture/osclib/faust/src -I/home/Mauro/faust/architecture/osclib/faust/src/lib -I/home/Mauro/faust/architecture/osclib/faust/src/osc -I/home/Mauro/faust/architecture/osclib/faust/src/threads -I/home/Mauro/faust/architecture/osclib/.. -O3 -std=gnu++11 -o CMakeFiles/oscstatic.dir/home/Mauro/faust/architecture/osclib/oscpack/ip/posix/UdpSocket.cpp.o -c /home/Mauro/faust/architecture/osclib/oscpack/ip/posix/UdpSocket.cpp C:/msys64/home/Mauro/faust/architecture/osclib/oscpack/ip/posix/NetworkingUtils.cpp:39:10: fatal error: netdb.h: No such file or directory

include

      ^~~~~~~~~

compilation terminated. make[3]: [osc/CMakeFiles/oscstatic.dir/build.make:498: osc/CMakeFiles/oscstatic.dir/home/Mauro/faust/architecture/osclib/oscpack/ip/posix/NetworkingUtils.cpp.o] Error 1 make[3]: Attesa per i processi non terminati.... C:/msys64/home/Mauro/faust/architecture/osclib/oscpack/ip/posix/UdpSocket.cpp:43:10: fatal error: netdb.h: No such file or directory

include

      ^~~~~~~~~

compilation terminated. make[3]: [osc/CMakeFiles/oscstatic.dir/build.make:522: osc/CMakeFiles/oscstatic.dir/home/Mauro/faust/architecture/osclib/oscpack/ip/posix/UdpSocket.cpp.o] Error 1 make[3]: uscita dalla directory "/home/Mauro/faust/build/faustdir" make[2]: [CMakeFiles/Makefile2:209: osc/CMakeFiles/oscstatic.dir/all] Error 2

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/grame-cncm/faust/issues/205#issuecomment-414594701, or mute the thread https://github.com/notifications/unsubscribe-auth/AAaTw5z3eA6XBM7G2qgC-mraWD8nSQhsks5uS8UOgaJpZM4WC8TV.

maurocsound commented 6 years ago

Indeed, it doesn't detect my system as WIN32:

$ cmake . -G "Unix Makefiles"
-- The C compiler identification is GNU 7.3.0
-- The CXX compiler identification is GNU 7.3.0
System is unknown to cmake, create:
Platform/MINGW64_NT-10.0 to use this system, please send your config file to cmake@www.cmake.org so it can be added to cmake
-- Check for working C compiler: /mingw64/bin/cc.exe
System is unknown to cmake, create:
Platform/MINGW64_NT-10.0 to use this system, please send your config file to cmake@www.cmake.org so it can be added to cmake
-- Check for working C compiler: /mingw64/bin/cc.exe -- works
-- Detecting C compiler ABI info
System is unknown to cmake, create:
Platform/MINGW64_NT-10.0 to use this system, please send your config file to cmake@www.cmake.org so it can be added to cmake
-- Detecting C compiler ABI info - done
-- Detecting C compile features
System is unknown to cmake, create:
Platform/MINGW64_NT-10.0 to use this system, please send your config file to cmake@www.cmake.org so it can be added to cmake
System is unknown to cmake, create:
Platform/MINGW64_NT-10.0 to use this system, please send your config file to cmake@www.cmake.org so it can be added to cmake
System is unknown to cmake, create:
Platform/MINGW64_NT-10.0 to use this system, please send your config file to cmake@www.cmake.org so it can be added to cmake
-- Detecting C compile features - done
-- Check for working CXX compiler: /mingw64/bin/CC.exe
System is unknown to cmake, create:
Platform/MINGW64_NT-10.0 to use this system, please send your config file to cmake@www.cmake.org so it can be added to cmake
-- Check for working CXX compiler: /mingw64/bin/CC.exe -- works
-- Detecting CXX compiler ABI info
System is unknown to cmake, create:
Platform/MINGW64_NT-10.0 to use this system, please send your config file to cmake@www.cmake.org so it can be added to cmake
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
System is unknown to cmake, create:
Platform/MINGW64_NT-10.0 to use this system, please send your config file to cmake@www.cmake.org so it can be added to cmake
System is unknown to cmake, create:
Platform/MINGW64_NT-10.0 to use this system, please send your config file to cmake@www.cmake.org so it can be added to cmake
System is unknown to cmake, create:
Platform/MINGW64_NT-10.0 to use this system, please send your config file to cmake@www.cmake.org so it can be added to cmake
System is unknown to cmake, create:
Platform/MINGW64_NT-10.0 to use this system, please send your config file to cmake@www.cmake.org so it can be added to cmake
-- Detecting CXX compile features - done
NOT WIN32
-- Configuring done
-- Generating done
-- Build files have been written to: /home/Mauro/faust/build/foo

I'm using the last MSYS2 windows release from its official site (the installer file is "msys2-x86_64-20180531.exe").

dfober commented 6 years ago

and what is your cmake version?

$ cmake —version

Le 21 août 2018 à 14:39, maurocsound notifications@github.com a écrit :

Indeed, it doesn't detect my system as WIN32:

$ cmake . -G "Unix Makefiles" -- The C compiler identification is GNU 7.3.0 -- The CXX compiler identification is GNU 7.3.0 System is unknown to cmake, create: Platform/MINGW64_NT-10.0 to use this system, please send your config file to cmake@www.cmake.org so it can be added to cmake -- Check for working C compiler: /mingw64/bin/cc.exe System is unknown to cmake, create: Platform/MINGW64_NT-10.0 to use this system, please send your config file to cmake@www.cmake.org so it can be added to cmake -- Check for working C compiler: /mingw64/bin/cc.exe -- works -- Detecting C compiler ABI info System is unknown to cmake, create: Platform/MINGW64_NT-10.0 to use this system, please send your config file to cmake@www.cmake.org so it can be added to cmake -- Detecting C compiler ABI info - done -- Detecting C compile features System is unknown to cmake, create: Platform/MINGW64_NT-10.0 to use this system, please send your config file to cmake@www.cmake.org so it can be added to cmake System is unknown to cmake, create: Platform/MINGW64_NT-10.0 to use this system, please send your config file to cmake@www.cmake.org so it can be added to cmake System is unknown to cmake, create: Platform/MINGW64_NT-10.0 to use this system, please send your config file to cmake@www.cmake.org so it can be added to cmake -- Detecting C compile features - done -- Check for working CXX compiler: /mingw64/bin/CC.exe System is unknown to cmake, create: Platform/MINGW64_NT-10.0 to use this system, please send your config file to cmake@www.cmake.org so it can be added to cmake -- Check for working CXX compiler: /mingw64/bin/CC.exe -- works -- Detecting CXX compiler ABI info System is unknown to cmake, create: Platform/MINGW64_NT-10.0 to use this system, please send your config file to cmake@www.cmake.org so it can be added to cmake -- Detecting CXX compiler ABI info - done -- Detecting CXX compile features System is unknown to cmake, create: Platform/MINGW64_NT-10.0 to use this system, please send your config file to cmake@www.cmake.org so it can be added to cmake System is unknown to cmake, create: Platform/MINGW64_NT-10.0 to use this system, please send your config file to cmake@www.cmake.org so it can be added to cmake System is unknown to cmake, create: Platform/MINGW64_NT-10.0 to use this system, please send your config file to cmake@www.cmake.org so it can be added to cmake System is unknown to cmake, create: Platform/MINGW64_NT-10.0 to use this system, please send your config file to cmake@www.cmake.org so it can be added to cmake -- Detecting CXX compile features - done NOT WIN32 -- Configuring done -- Generating done -- Build files have been written to: /home/Mauro/faust/build/foo I'm using the last MSYS2 windows release from its official site (the installer file is "msys2-x86_64-20180531.exe").

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/grame-cncm/faust/issues/205#issuecomment-414659320, or mute the thread https://github.com/notifications/unsubscribe-auth/AAaTwwcP9dNgAb7p8t5a6_fSKD9TrcT9ks5uS_-CgaJpZM4WC8TV.

maurocsound commented 6 years ago
$ cmake --version
cmake version 3.10.2

CMake suite maintained and supported by Kitware (kitware.com/cmake).

Now I have a doubt about MSYS2... When you install MSYS2 you can launch it from 3 different profiles:

I think I could have installed some packages (maybe gcc, make and cmake) in the default environment that is launched after the package installation: the MSYS2 MSYS profile (that I think should be used for compiling POSIX compliant source code that doesn't have a Windows target). After that I always launched the MSYS2 MinGW 64bit profile. I didn't think it could be a problem, being that gcc, make and cmake appear to work regularly from the MSYS2-MINGW64 profile too, but maybe now I have some misconfigured options... So, now I'm reinstalling all from scratch to be sure that I do all the passages using always the MSYS2 MinGW 64bit profile.

maurocsound commented 6 years ago

Nothing... After a new clean MSYS2 installation and redownloading and reinstalling of all the required packages (this time using always the MSYS2 MinGW 64bit profile), the result is always the same, with that fatal error on the unfound "netdb.h"...

dfober commented 6 years ago

The problem is identified: "CMake no longer defines WIN32 on MSYS!" and solved (I hope so!).

You can update your repository and try again. Let me know how it works on your side.

Best — Dom

Le 21 août 2018 à 17:04, maurocsound notifications@github.com a écrit :

Nothing... After a new clean MSYS2 installation and redownloading and reinstalling of all the required packages, the result is always the same, with that fatal error on the unfound "netdb.h"...

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/grame-cncm/faust/issues/205#issuecomment-414707319, or mute the thread https://github.com/notifications/unsubscribe-auth/AAaTw8KpPzXaKQpkngveLXeqCiLr0b1rks5uTCGMgaJpZM4WC8TV.

maurocsound commented 6 years ago

I made a git pull and it updated some cmake files, but unfortunately make doesn't work yet... Always netdb.h not found... Now I'm trying to git clone in another dir e then I will redo "make". I have to do 'make' in the main faust folder, or I have to enter first in the build dir?

dfober commented 6 years ago

cmake is a state machine and has likely put the settings of your previous attempts in a cache. You don’t need to restart from a new clone. Just remove the "build/faustdir” folder and make again. Just before doing that, did you execute a 'make cmake’ command before trying again (it regenerates the project using the new cmake files)

Doing make from the root folder or from the build folder is (normally) equivalent. However and in case of trouble, you have more control on the build process from the build folder.

Le 21 août 2018 à 18:27, maurocsound notifications@github.com a écrit :

I made a git pull and it updated some cmake files, but unfortunately make doesn't work yet... Always netdb.h not found... Now I'm trying to git clone in another dir e then I will redo "make". I have to do 'make' in the main faust folder, or I have to enter first in the build dir?

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/grame-cncm/faust/issues/205#issuecomment-414736302, or mute the thread https://github.com/notifications/unsubscribe-auth/AAaTw3dmSXh09mJgWUAfsEaAHwKPhNgXks5uTDTvgaJpZM4WC8TV.

maurocsound commented 6 years ago

Hi, from a new git cloned faust dir I made:

$ make cmake
cd faustdir && cmake -C ../backends/backends.cmake -C ../targets/regular.cmake -DCMAKE_BUILD_TYPE=Release -G 'MSYS Makefiles' ..
CMake Error: Could not create named generator MSYS Makefiles

Generators
  Unix Makefiles               = Generates standard UNIX makefiles.
  Ninja                        = Generates build.ninja files.
  CodeBlocks - Ninja           = Generates CodeBlocks project files.
  CodeBlocks - Unix Makefiles  = Generates CodeBlocks project files.
  CodeLite - Ninja             = Generates CodeLite project files.
  CodeLite - Unix Makefiles    = Generates CodeLite project files.
  Sublime Text 2 - Ninja       = Generates Sublime Text 2 project files.
  Sublime Text 2 - Unix Makefiles
                               = Generates Sublime Text 2 project files.
  Kate - Ninja                 = Generates Kate project files.
  Kate - Unix Makefiles        = Generates Kate project files.
  Eclipse CDT4 - Ninja         = Generates Eclipse CDT 4.0 project files.
  Eclipse CDT4 - Unix Makefiles= Generates Eclipse CDT 4.0 project files.
  KDevelop3                    = Generates KDevelop 3 project files.
  KDevelop3 - Unix Makefiles   = Generates KDevelop 3 project files.

make: *** [Makefile:203: cmake] Error 1

Note that I'm in the build dir, because if I do 'make cmake' from the main faust dir it complains that there are no rules for "cmake" target.

What does "CMake Error: Could not create named generator MSYS Makefiles" means?

maurocsound commented 6 years ago

I found the problem! The cmake package I installed with pacman was the generic one for MSYS environment. For the mingw64 environment I had to install the following:

$ pacman -S mingw-w64-x86_64-cmake

instead of:

$ pacman -S cmake <--- THIS DOESN'T WORK WITH MINGW64!!!

Finally now it works!! Many thanks for your great support!! 👍

Now, I have a faust.exe in the faust/build/bin dir, but where is the libfaust file? I would need it for building Csound with Faust support on Windows...

EDIT: I don't know if it's the correct way, but I managed to generate libfaust.a by editing the file "faust/build/targets/regular.cmake". I set INCLUDE_STATIC flag to ON. :-)

dfober commented 6 years ago

fine! If you want the libaust to be compiled too, you’ll have to use another target file or to modify an existing one. According to your cmake output, you’re using targets/regular.cmake for the targets and backends/regular.cmake for the backends. (all that is relative to the build folder) I guess you’ll want to use also the LLVM backend (not included in backends/regular.cmake). Running the following from the build folder : $ make cmake BACKENDS=world.cmake TARGETS=world.cmake will regenerate the projet with everything (all the possible targets and all the backends), but maybe that’s a bit too much and you’ll have to write your own config files. — Dom

Le 21 août 2018 à 19:09, maurocsound notifications@github.com a écrit :

I found the problem! The cmake package I installed with pacman was the generic one for MSYS environment. For the mingw64 environment I had to install the following:

$ pacman -S mingw-w64-x86_64-cmake

instead of:

$ pacman -S cmake <--- THIS DOESN'T WORK WITH MINGW64!!!

Finally now it works!! Many thanks for your great support!! 👍

Now, I have a faust.exe in the faust/build/bin dir, but where is the libfaust file? I would need it for building Csound with Faust support on Windows...

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/grame-cncm/faust/issues/205#issuecomment-414750176, or mute the thread https://github.com/notifications/unsubscribe-auth/AAaTw8Bhp05U6qQJ0M81aSlUzOnsOIv_ks5uTD7dgaJpZM4WC8TV.

maurocsound commented 6 years ago

Hi, with 'world.cmake' it compiles all correctly except the linking pass of "libHTTPDFaust.dll" (that for now I don't think I need, but I thought I should report this to you).

[...]
[ 48%] Linking CXX shared library ../../lib/libHTTPDFaust.dll
CMakeFiles/httpdynamic.dir/objects.a(HTTPDControler.cpp.obj):HTTPDControler.cpp:(.text+0x3fb): undefined reference to `__imp_gethostname'
CMakeFiles/httpdynamic.dir/objects.a(HTTPDControler.cpp.obj):HTTPDControler.cpp:(.text+0x476): undefined reference to `__imp_gethostbyname'
CMakeFiles/httpdynamic.dir/objects.a(HTTPDServer.cpp.obj):HTTPDServer.cpp:(.text+0x4c): undefined reference to `MHD_stop_daemon'
CMakeFiles/httpdynamic.dir/objects.a(HTTPDServer.cpp.obj):HTTPDServer.cpp:(.text+0xc0): undefined reference to `MHD_start_daemon'
CMakeFiles/httpdynamic.dir/objects.a(HTTPDServer.cpp.obj):HTTPDServer.cpp:(.text+0x109): undefined reference to `MHD_create_response_from_buffer'
CMakeFiles/httpdynamic.dir/objects.a(HTTPDServer.cpp.obj):HTTPDServer.cpp:(.text+0x12e): undefined reference to `MHD_add_response_header'
CMakeFiles/httpdynamic.dir/objects.a(HTTPDServer.cpp.obj):HTTPDServer.cpp:(.text+0x144): undefined reference to `MHD_add_response_header'
CMakeFiles/httpdynamic.dir/objects.a(HTTPDServer.cpp.obj):HTTPDServer.cpp:(.text+0x151): undefined reference to `MHD_queue_response'
CMakeFiles/httpdynamic.dir/objects.a(HTTPDServer.cpp.obj):HTTPDServer.cpp:(.text+0x15b): undefined reference to `MHD_destroy_response'
CMakeFiles/httpdynamic.dir/objects.a(HTTPDServer.cpp.obj):HTTPDServer.cpp:(.text+0x3c7): undefined reference to `MHD_create_response_from_fd'
CMakeFiles/httpdynamic.dir/objects.a(HTTPDServer.cpp.obj):HTTPDServer.cpp:(.text+0x3f0): undefined reference to `MHD_add_response_header'
CMakeFiles/httpdynamic.dir/objects.a(HTTPDServer.cpp.obj):HTTPDServer.cpp:(.text+0x406): undefined reference to `MHD_add_response_header'
CMakeFiles/httpdynamic.dir/objects.a(HTTPDServer.cpp.obj):HTTPDServer.cpp:(.text+0x416): undefined reference to `MHD_queue_response'
CMakeFiles/httpdynamic.dir/objects.a(HTTPDServer.cpp.obj):HTTPDServer.cpp:(.text+0x420): undefined reference to `MHD_destroy_response'
CMakeFiles/httpdynamic.dir/objects.a(HTTPDServer.cpp.obj):HTTPDServer.cpp:(.text+0x45a): undefined reference to `MHD_create_response_from_buffer'
CMakeFiles/httpdynamic.dir/objects.a(HTTPDServer.cpp.obj):HTTPDServer.cpp:(.text+0x478): undefined reference to `MHD_add_response_header'
CMakeFiles/httpdynamic.dir/objects.a(HTTPDServer.cpp.obj):HTTPDServer.cpp:(.text+0x48e): undefined reference to `MHD_add_response_header'
CMakeFiles/httpdynamic.dir/objects.a(HTTPDServer.cpp.obj):HTTPDServer.cpp:(.text+0x49e): undefined reference to `MHD_queue_response'
CMakeFiles/httpdynamic.dir/objects.a(HTTPDServer.cpp.obj):HTTPDServer.cpp:(.text+0xa41): undefined reference to `MHD_create_response_from_buffer'
CMakeFiles/httpdynamic.dir/objects.a(HTTPDServer.cpp.obj):HTTPDServer.cpp:(.text+0xa6a): undefined reference to `MHD_add_response_header'
CMakeFiles/httpdynamic.dir/objects.a(HTTPDServer.cpp.obj):HTTPDServer.cpp:(.text+0xa80): undefined reference to `MHD_add_response_header'
CMakeFiles/httpdynamic.dir/objects.a(HTTPDServer.cpp.obj):HTTPDServer.cpp:(.text+0xa95): undefined reference to `MHD_queue_response'
CMakeFiles/httpdynamic.dir/objects.a(HTTPDServer.cpp.obj):HTTPDServer.cpp:(.text+0xa9d): undefined reference to `MHD_destroy_response'
CMakeFiles/httpdynamic.dir/objects.a(HTTPDServer.cpp.obj):HTTPDServer.cpp:(.text+0xfd0): undefined reference to `MHD_create_response_from_buffer'
CMakeFiles/httpdynamic.dir/objects.a(HTTPDServer.cpp.obj):HTTPDServer.cpp:(.text+0xff9): undefined reference to `MHD_add_response_header'
CMakeFiles/httpdynamic.dir/objects.a(HTTPDServer.cpp.obj):HTTPDServer.cpp:(.text+0x100f): undefined reference to `MHD_add_response_header'
CMakeFiles/httpdynamic.dir/objects.a(HTTPDServer.cpp.obj):HTTPDServer.cpp:(.text+0x1024): undefined reference to `MHD_queue_response'
CMakeFiles/httpdynamic.dir/objects.a(HTTPDServer.cpp.obj):HTTPDServer.cpp:(.text+0x102e): undefined reference to `MHD_destroy_response'
CMakeFiles/httpdynamic.dir/objects.a(HTTPDServer.cpp.obj):HTTPDServer.cpp:(.text+0x17f4): undefined reference to `MHD_get_connection_values'
CMakeFiles/httpdynamic.dir/objects.a(HTTPDServer.cpp.obj):HTTPDServer.cpp:(.text+0x1a38): undefined reference to `MHD_create_response_from_buffer'
CMakeFiles/httpdynamic.dir/objects.a(HTTPDServer.cpp.obj):HTTPDServer.cpp:(.text+0x1a5a): undefined reference to `MHD_add_response_header'
CMakeFiles/httpdynamic.dir/objects.a(HTTPDServer.cpp.obj):HTTPDServer.cpp:(.text+0x1a70): undefined reference to `MHD_add_response_header'
CMakeFiles/httpdynamic.dir/objects.a(HTTPDServer.cpp.obj):HTTPDServer.cpp:(.text+0x1a85): undefined reference to `MHD_queue_response'
CMakeFiles/httpdynamic.dir/objects.a(HTTPDServer.cpp.obj):HTTPDServer.cpp:(.text+0x1a8f): undefined reference to `MHD_destroy_response'
CMakeFiles/httpdynamic.dir/objects.a(HTTPDServer.cpp.obj):HTTPDServer.cpp:(.text+0x14): undefined reference to `MHD_stop_daemon'
CMakeFiles/httpdynamic.dir/objects.a(HTTPDSetup.cpp.obj):HTTPDSetup.cpp:(.text+0x36): undefined reference to `MHD_stop_daemon'
CMakeFiles/httpdynamic.dir/objects.a(HTTPDSetup.cpp.obj):HTTPDSetup.cpp:(.text+0x96): undefined reference to `MHD_stop_daemon'
CMakeFiles/httpdynamic.dir/objects.a(HTTPDSetup.cpp.obj):HTTPDSetup.cpp:(.text+0x19c): undefined reference to `MHD_stop_daemon'
CMakeFiles/httpdynamic.dir/objects.a(sourcefetcher.cpp.obj):sourcefetcher.cpp:(.text+0x4db): undefined reference to `__imp_select'
CMakeFiles/httpdynamic.dir/objects.a(sourcefetcher.cpp.obj):sourcefetcher.cpp:(.text+0x529): undefined reference to `__imp_recv'
CMakeFiles/httpdynamic.dir/objects.a(sourcefetcher.cpp.obj):sourcefetcher.cpp:(.text+0x634): undefined reference to `__imp_gethostbyname'
CMakeFiles/httpdynamic.dir/objects.a(sourcefetcher.cpp.obj):sourcefetcher.cpp:(.text+0x66c): undefined reference to `__imp_htons'
CMakeFiles/httpdynamic.dir/objects.a(sourcefetcher.cpp.obj):sourcefetcher.cpp:(.text+0x683): undefined reference to `__imp_socket'
CMakeFiles/httpdynamic.dir/objects.a(sourcefetcher.cpp.obj):sourcefetcher.cpp:(.text+0x69c): undefined reference to `__imp_connect'
CMakeFiles/httpdynamic.dir/objects.a(sourcefetcher.cpp.obj):sourcefetcher.cpp:(.text+0xb19): undefined reference to `__imp_send'
CMakeFiles/httpdynamic.dir/objects.a(sourcefetcher.cpp.obj):sourcefetcher.cpp:(.text+0xc68): undefined reference to `__imp_closesocket'
CMakeFiles/httpdynamic.dir/objects.a(sourcefetcher.cpp.obj):sourcefetcher.cpp:(.text+0xd0a): undefined reference to `__imp_closesocket'
CMakeFiles/httpdynamic.dir/objects.a(sourcefetcher.cpp.obj):sourcefetcher.cpp:(.text+0xe96): undefined reference to `__imp_select'
CMakeFiles/httpdynamic.dir/objects.a(sourcefetcher.cpp.obj):sourcefetcher.cpp:(.text+0xe9d): undefined reference to `__imp_recv'
CMakeFiles/httpdynamic.dir/objects.a(sourcefetcher.cpp.obj):sourcefetcher.cpp:(.text+0xf64): undefined reference to `__imp_closesocket'
CMakeFiles/httpdynamic.dir/objects.a(sourcefetcher.cpp.obj):sourcefetcher.cpp:(.text+0x11f5): undefined reference to `__imp_closesocket'
CMakeFiles/httpdynamic.dir/objects.a(sourcefetcher.cpp.obj):sourcefetcher.cpp:(.text+0x121a): undefined reference to `__imp_closesocket'
CMakeFiles/httpdynamic.dir/objects.a(sourcefetcher.cpp.obj):sourcefetcher.cpp:(.text+0x122d): undefined reference to `__imp_closesocket'
CMakeFiles/httpdynamic.dir/objects.a(sourcefetcher.cpp.obj):sourcefetcher.cpp:(.text+0x1254): undefined reference to `__imp_closesocket'
CMakeFiles/httpdynamic.dir/objects.a(sourcefetcher.cpp.obj):sourcefetcher.cpp:(.text+0x127b): more undefined references to `__imp_closesocket' follow
collect2.exe: error: ld returned 1 exit status
make[3]: *** [http/CMakeFiles/httpdynamic.dir/build.make:385: ../lib/libHTTPDFaust.dll] Error 1
make[3]: uscita dalla directory "/home/Mauro/faust/build/faustdir"
make[2]: *** [CMakeFiles/Makefile2:376: http/CMakeFiles/httpdynamic.dir/all] Error 2
[...]

Thanks again.

dfober commented 6 years ago

that’s fixed! Thanks for the report.

Le 22 août 2018 à 11:20, maurocsound notifications@github.com a écrit :

Hi, with 'world.cmake' it compiles all correctly except the linking pass of "libHTTPDFaust.dll" (that for now I don't think I need, but I thought I should report this to you).

[...] [ 48%] Linking CXX shared library ../../lib/libHTTPDFaust.dll CMakeFiles/httpdynamic.dir/objects.a(HTTPDControler.cpp.obj):HTTPDControler.cpp:(.text+0x3fb): undefined reference to __imp_gethostname' CMakeFiles/httpdynamic.dir/objects.a(HTTPDControler.cpp.obj):HTTPDControler.cpp:(.text+0x476): undefined reference toimp_gethostbyname' CMakeFiles/httpdynamic.dir/objects.a(HTTPDServer.cpp.obj):HTTPDServer.cpp:(.text+0x4c): undefined reference to MHD_stop_daemon' CMakeFiles/httpdynamic.dir/objects.a(HTTPDServer.cpp.obj):HTTPDServer.cpp:(.text+0xc0): undefined reference toMHD_start_daemon' CMakeFiles/httpdynamic.dir/objects.a(HTTPDServer.cpp.obj):HTTPDServer.cpp:(.text+0x109): undefined reference to MHD_create_response_from_buffer' CMakeFiles/httpdynamic.dir/objects.a(HTTPDServer.cpp.obj):HTTPDServer.cpp:(.text+0x12e): undefined reference toMHD_add_response_header' CMakeFiles/httpdynamic.dir/objects.a(HTTPDServer.cpp.obj):HTTPDServer.cpp:(.text+0x144): undefined reference to MHD_add_response_header' CMakeFiles/httpdynamic.dir/objects.a(HTTPDServer.cpp.obj):HTTPDServer.cpp:(.text+0x151): undefined reference toMHD_queue_response' CMakeFiles/httpdynamic.dir/objects.a(HTTPDServer.cpp.obj):HTTPDServer.cpp:(.text+0x15b): undefined reference to MHD_destroy_response' CMakeFiles/httpdynamic.dir/objects.a(HTTPDServer.cpp.obj):HTTPDServer.cpp:(.text+0x3c7): undefined reference toMHD_create_response_from_fd' CMakeFiles/httpdynamic.dir/objects.a(HTTPDServer.cpp.obj):HTTPDServer.cpp:(.text+0x3f0): undefined reference to MHD_add_response_header' CMakeFiles/httpdynamic.dir/objects.a(HTTPDServer.cpp.obj):HTTPDServer.cpp:(.text+0x406): undefined reference toMHD_add_response_header' CMakeFiles/httpdynamic.dir/objects.a(HTTPDServer.cpp.obj):HTTPDServer.cpp:(.text+0x416): undefined reference to MHD_queue_response' CMakeFiles/httpdynamic.dir/objects.a(HTTPDServer.cpp.obj):HTTPDServer.cpp:(.text+0x420): undefined reference toMHD_destroy_response' CMakeFiles/httpdynamic.dir/objects.a(HTTPDServer.cpp.obj):HTTPDServer.cpp:(.text+0x45a): undefined reference to MHD_create_response_from_buffer' CMakeFiles/httpdynamic.dir/objects.a(HTTPDServer.cpp.obj):HTTPDServer.cpp:(.text+0x478): undefined reference toMHD_add_response_header' CMakeFiles/httpdynamic.dir/objects.a(HTTPDServer.cpp.obj):HTTPDServer.cpp:(.text+0x48e): undefined reference to MHD_add_response_header' CMakeFiles/httpdynamic.dir/objects.a(HTTPDServer.cpp.obj):HTTPDServer.cpp:(.text+0x49e): undefined reference toMHD_queue_response' CMakeFiles/httpdynamic.dir/objects.a(HTTPDServer.cpp.obj):HTTPDServer.cpp:(.text+0xa41): undefined reference to MHD_create_response_from_buffer' CMakeFiles/httpdynamic.dir/objects.a(HTTPDServer.cpp.obj):HTTPDServer.cpp:(.text+0xa6a): undefined reference toMHD_add_response_header' CMakeFiles/httpdynamic.dir/objects.a(HTTPDServer.cpp.obj):HTTPDServer.cpp:(.text+0xa80): undefined reference to MHD_add_response_header' CMakeFiles/httpdynamic.dir/objects.a(HTTPDServer.cpp.obj):HTTPDServer.cpp:(.text+0xa95): undefined reference toMHD_queue_response' CMakeFiles/httpdynamic.dir/objects.a(HTTPDServer.cpp.obj):HTTPDServer.cpp:(.text+0xa9d): undefined reference to MHD_destroy_response' CMakeFiles/httpdynamic.dir/objects.a(HTTPDServer.cpp.obj):HTTPDServer.cpp:(.text+0xfd0): undefined reference toMHD_create_response_from_buffer' CMakeFiles/httpdynamic.dir/objects.a(HTTPDServer.cpp.obj):HTTPDServer.cpp:(.text+0xff9): undefined reference to MHD_add_response_header' CMakeFiles/httpdynamic.dir/objects.a(HTTPDServer.cpp.obj):HTTPDServer.cpp:(.text+0x100f): undefined reference toMHD_add_response_header' CMakeFiles/httpdynamic.dir/objects.a(HTTPDServer.cpp.obj):HTTPDServer.cpp:(.text+0x1024): undefined reference to MHD_queue_response' CMakeFiles/httpdynamic.dir/objects.a(HTTPDServer.cpp.obj):HTTPDServer.cpp:(.text+0x102e): undefined reference toMHD_destroy_response' CMakeFiles/httpdynamic.dir/objects.a(HTTPDServer.cpp.obj):HTTPDServer.cpp:(.text+0x17f4): undefined reference to MHD_get_connection_values' CMakeFiles/httpdynamic.dir/objects.a(HTTPDServer.cpp.obj):HTTPDServer.cpp:(.text+0x1a38): undefined reference toMHD_create_response_from_buffer' CMakeFiles/httpdynamic.dir/objects.a(HTTPDServer.cpp.obj):HTTPDServer.cpp:(.text+0x1a5a): undefined reference to MHD_add_response_header' CMakeFiles/httpdynamic.dir/objects.a(HTTPDServer.cpp.obj):HTTPDServer.cpp:(.text+0x1a70): undefined reference toMHD_add_response_header' CMakeFiles/httpdynamic.dir/objects.a(HTTPDServer.cpp.obj):HTTPDServer.cpp:(.text+0x1a85): undefined reference to MHD_queue_response' CMakeFiles/httpdynamic.dir/objects.a(HTTPDServer.cpp.obj):HTTPDServer.cpp:(.text+0x1a8f): undefined reference toMHD_destroy_response' CMakeFiles/httpdynamic.dir/objects.a(HTTPDServer.cpp.obj):HTTPDServer.cpp:(.text+0x14): undefined reference to MHD_stop_daemon' CMakeFiles/httpdynamic.dir/objects.a(HTTPDSetup.cpp.obj):HTTPDSetup.cpp:(.text+0x36): undefined reference toMHD_stop_daemon' CMakeFiles/httpdynamic.dir/objects.a(HTTPDSetup.cpp.obj):HTTPDSetup.cpp:(.text+0x96): undefined reference to MHD_stop_daemon' CMakeFiles/httpdynamic.dir/objects.a(HTTPDSetup.cpp.obj):HTTPDSetup.cpp:(.text+0x19c): undefined reference toMHD_stop_daemon' CMakeFiles/httpdynamic.dir/objects.a(sourcefetcher.cpp.obj):sourcefetcher.cpp:(.text+0x4db): undefined reference to `imp_select' CMakeFiles/httpdynamic.dir/objects.a(sourcefetcher.cpp.obj):sourcefetcher.cpp:(.text+0x529): undefined reference to __imp_recv' CMakeFiles/httpdynamic.dir/objects.a(sourcefetcher.cpp.obj):sourcefetcher.cpp:(.text+0x634): undefined reference toimp_gethostbyname' CMakeFiles/httpdynamic.dir/objects.a(sourcefetcher.cpp.obj):sourcefetcher.cpp:(.text+0x66c): undefined reference to __imp_htons' CMakeFiles/httpdynamic.dir/objects.a(sourcefetcher.cpp.obj):sourcefetcher.cpp:(.text+0x683): undefined reference toimp_socket' CMakeFiles/httpdynamic.dir/objects.a(sourcefetcher.cpp.obj):sourcefetcher.cpp:(.text+0x69c): undefined reference to __imp_connect' CMakeFiles/httpdynamic.dir/objects.a(sourcefetcher.cpp.obj):sourcefetcher.cpp:(.text+0xb19): undefined reference toimp_send' CMakeFiles/httpdynamic.dir/objects.a(sourcefetcher.cpp.obj):sourcefetcher.cpp:(.text+0xc68): undefined reference to __imp_closesocket' CMakeFiles/httpdynamic.dir/objects.a(sourcefetcher.cpp.obj):sourcefetcher.cpp:(.text+0xd0a): undefined reference toimp_closesocket' CMakeFiles/httpdynamic.dir/objects.a(sourcefetcher.cpp.obj):sourcefetcher.cpp:(.text+0xe96): undefined reference to __imp_select' CMakeFiles/httpdynamic.dir/objects.a(sourcefetcher.cpp.obj):sourcefetcher.cpp:(.text+0xe9d): undefined reference toimp_recv' CMakeFiles/httpdynamic.dir/objects.a(sourcefetcher.cpp.obj):sourcefetcher.cpp:(.text+0xf64): undefined reference to __imp_closesocket' CMakeFiles/httpdynamic.dir/objects.a(sourcefetcher.cpp.obj):sourcefetcher.cpp:(.text+0x11f5): undefined reference toimp_closesocket' CMakeFiles/httpdynamic.dir/objects.a(sourcefetcher.cpp.obj):sourcefetcher.cpp:(.text+0x121a): undefined reference to __imp_closesocket' CMakeFiles/httpdynamic.dir/objects.a(sourcefetcher.cpp.obj):sourcefetcher.cpp:(.text+0x122d): undefined reference toimp_closesocket' CMakeFiles/httpdynamic.dir/objects.a(sourcefetcher.cpp.obj):sourcefetcher.cpp:(.text+0x1254): undefined reference to __imp_closesocket' CMakeFiles/httpdynamic.dir/objects.a(sourcefetcher.cpp.obj):sourcefetcher.cpp:(.text+0x127b): more undefined references toimp_closesocket' follow collect2.exe: error: ld returned 1 exit status make[3]: [http/CMakeFiles/httpdynamic.dir/build.make:385: ../lib/libHTTPDFaust.dll] Error 1 make[3]: uscita dalla directory "/home/Mauro/faust/build/faustdir" make[2]: [CMakeFiles/Makefile2:376: http/CMakeFiles/httpdynamic.dir/all] Error 2 [...] Thanks again.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/grame-cncm/faust/issues/205#issuecomment-414969012, or mute the thread https://github.com/notifications/unsubscribe-auth/AAaTw_XmQCDK8QqzVAudC8TAcYNoXCeXks5uTSJXgaJpZM4WC8TV.

maurocsound commented 6 years ago

Yes, now 'make' compiles all without problems. :-) A last thing, being that many Windows users could have the same problems, I think you could update the relevant parts of https://github.com/grame-cncm/faust/blob/master-dev/build/README.md#compiling-on-windows with something I wrote as a reference to avoid headaches in future compiling:

A little note on MSYS2 for beginners: after installing MSYS2, in the Start menu MSYS2 folder you will see links to the following 3 pre-configured environments: A) MSYS2 MSYS B) MSYS2 MinGW 32-bit C) MSYS2 MinGW 64-bit

To make native Windows binaries that don't rely on POSIX emulative sublayers, you should use (B) or (C) of the above environments. Let's suppose we are on a 64-bit Windows system... Then you should launch "MSYS2 MinGW 64-bit". If you use the MSYS environments (A), you will easily incur in many problems during the compiling process.

To build Faust from the "MSYS2 MinGW 64-bit" environment, install the following packages:

$ pacman -S mingw-w64-x86_64-gcc $ pacman -S mingw-w64-x86_64-llvm $ pacman -S mingw-w64-x86_64-libmicrohttpd $ pacman -S mingw-w64-x86_64-make $ pacman -S mingw-w64-x86_64-cmake $ pacman -S git

P.S.: apart from 'git', make sure you use the "mingw-w64-x86_64-..." version of the above packages, because the development tools and libraries installed from packages without the mingw-w64-x86_64 prefix are intended to work correctly only in the MSYS environment, not in the MinGW32/64 one.

Then: $ git clone https://github.com/grame-cncm/faust.git $ cd faust $ git submodule update --init

Then, to make the default building of Faust (faust.exe + OSC and HTTPD static libs with following backends included: ASMJS, C, CPP, JAVA, JS, OLDCPP, WASM): $ make

or, to build Faust for all the targets (executable, static and dynamic libraries of the compiler, OSC and HTTPD with all the backends included: ASMJS, C, CPP, FIR, JAVA, JS, LLVM, OLDCPP, RUST, WASM):

$ make cmake BACKENDS=world.cmake TARGETS=world.cmake $ make

I'm not an english native speaker, so of course you are free to modify the above notes and insert them in the README file. Thanks again!

dfober commented 6 years ago

thanks for your contribution. A specific readme for msys2 is now part of the repository https://github.com/grame-cncm/faust/blob/master-dev/build/README.md#compiling-on-windows https://github.com/grame-cncm/faust/blob/master-dev/build/README.md#compiling-on-windows

and https://github.com/grame-cncm/faust/blob/master-dev/build/README-MSYS2.md https://github.com/grame-cncm/faust/blob/master-dev/build/README-MSYS2.md

Le 22 août 2018 à 17:33, maurocsound notifications@github.com a écrit :

Yes, now 'make' compiles all without problems. :-) A last thing, being that many Windows users could have the same problems, I think you could update the relevant parts of https://github.com/grame-cncm/faust/blob/master-dev/build/README.md#compiling-on-windows https://github.com/grame-cncm/faust/blob/master-dev/build/README.md#compiling-on-windows with something I wrote as a reference to avoid headaches in future compiling:

A little note on MSYS2 for beginners: after installing MSYS2, in the Start menu MSYS2 folder you will see links to the following 3 pre-configured environments: A) MSYS2 MSYS B) MSYS2 MinGW 32-bit C) MSYS2 MinGW 64-bit

To make native Windows binaries that don't rely on POSIX emulative sublayers, you should use (B) or (C) of the above environments. Let's suppose we are on a 64-bit Windows system... Then you should launch "MSYS2 MinGW 64-bit". If you use the MSYS environments (A), you will easily incur in many problems during the compiling process.

To build Faust from the "MSYS2 MinGW 64-bit" environment, install the following packages:

$ pacman -S mingw-w64-x86_64-gcc $ pacman -S mingw-w64-x86_64-llvm $ pacman -S mingw-w64-x86_64-libmicrohttpd $ pacman -S mingw-w64-x86_64-make $ pacman -S mingw-w64-x86_64-cmake $ pacman -S git

P.S.: apart from 'git', make sure you use the "mingw-w64-x86_64-..." version of the above packages, because the development tools and libraries installed from packages without the mingw-w64-x86_64 prefix are intended to work correctly only in the MSYS environment, not in the MinGW32/64 one.

Then: $ git clone https://github.com/grame-cncm/faust.git https://github.com/grame-cncm/faust.git $ cd faust $ git submodule update --init

Then, to make the default building of Faust (faust.exe + OSC and HTTPD static libs with following backends included: ASMJS, C, CPP, JAVA, JS, OLDCPP, WASM): $ make

or, to build Faust for all the targets (executable, static and dynamic libraries of the compiler, OSC and HTTPD with all the backends included: ASMJS, C, CPP, FIR, JAVA, JS, LLVM, OLDCPP, RUST, WASM):

$ make cmake BACKENDS=world.cmake TARGETS=world.cmake $ make

I'm not an english native speaker, so of course you are free to modify the above notes and insert them in the README file. Thanks again!

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/grame-cncm/faust/issues/205#issuecomment-415075046, or mute the thread https://github.com/notifications/unsubscribe-auth/AAaTw0ur-t4OUVvGZDqo2eQLT1FzoGS6ks5uTXnFgaJpZM4WC8TV.