[Csnd-dev] Failed to build on MSYS/Windows
Date | 2017-05-05 22:40 |
From | Oeyvind Brandtsegg |
Subject | [Csnd-dev] Failed to build on MSYS/Windows |
Hi,
I've been able to build fine under MSYS, but it's been some time since I did a clean build. Today I tried to do 1 - pull from repo 2 - build 3 - delete my /csound-mingw64 to get a clean build 4 - build again I could build fine in step 2, but it failed on the clean build (step 4) Should I be able to build on MSYS now, or is only the Microsoft compiler supported? Here's the tail end of my output [ 74%] Linking C shared library csound64.dll [ 74%] Linking C static library libcsound64.a CMakeFiles/csound64.dir/objects.a(threads.c.obj): In function `csoundCreateBarri er': C:/Source/csound/Top/threads.c:749: undefined reference to `InitializeSynchroniz ationBarrier' CMakeFiles/csound64.dir/objects.a(threads.c.obj): In function `csoundDestroyBarr ier': C:/Source/csound/Top/threads.c:755: undefined reference to `DeleteSynchronizatio nBarrier' CMakeFiles/csound64.dir/objects.a(threads.c.obj): In function `csoundWaitBarrier ': C:/Source/csound/Top/threads.c:761: undefined reference to `EnterSynchronization Barrier' collect2.exe: error: ld returned 1 exit status CMakeFiles/csound64.dir/build.make:5950: recipe for target 'csound64.dll' failed make[2]: *** [csound64.dll] Error 1 CMakeFiles/Makefile2:67: recipe for target 'CMakeFiles/csound64.dir/all' failed make[1]: *** [CMakeFiles/csound64.dir/all] Error 2 [ 74%] Built target csound64-static Makefile:160: recipe for target 'all' failed make: *** [all] Error 2 make: INTERNAL: Exiting with 5 jobserver tokens available; should be 6! Failed to run make. Oeyvind Brandtsegg Professor of Music Technology NTNU 7491 Trondheim Norway Cell: +47 92 203 205 http://www.partikkelaudio.com/ http://crossadaptive.hf.ntnu.no http://gdsp.hf.ntnu.no/ http://soundcloud.com/brandtsegg http://flyndresang.no/ http://soundcloud.com/t-emp |
Date | 2017-05-06 00:27 |
From | Rory Walsh |
Subject | Re: [Csnd-dev] Failed to build on MSYS/Windows |
As far as I know the msys build is still very much the recommended way of building for Windows. But I can't help with the errors. No doubt others can and will. On 5 May 2017 10:50 pm, "Oeyvind Brandtsegg" <oyvind.brandtsegg@ntnu.no> wrote:
|
Date | 2017-05-06 02:03 |
From | Michael Gogins |
Subject | Re: [Csnd-dev] Failed to build on MSYS/Windows |
As Rory said mingw64 is the standard way to build for Windows. Your error looks like a configuration error about threading. It helps to set up a batch file (not a custom cmake file) to run your build. Mine is below. At a guess, you need to tell CMake where to find your WIndows pthreads library. I'm doing a clean rebuild now to see if it's still OK, I'll let you know. #!/bin/bash echo "Overrides for Csound's CMake build system, for building Csound for the Windows x64 installer." echo echo "Building Csound..." mkdir csound-mingw64 cd csound-mingw64 pwd rm -rf dist # -DFIND_CMAKE_SYSTEM_PATH=//mingw64 \ # --trace-expand \ cmake ../.. -G "MSYS Makefiles" \ -DABLETON_LINK_HOME:PATH="D:\msys64\home\restore\link" \ -DBUILD_ABLETON_LINK_OPCODES:BOOL=Yes \ -DBUILD_CSOUNDVST=1 \ -DBUILD_PD_CLASS=0 \ -DBUILD_STATIC_LIBRARY=1 \ -DBUILD_TESTS=0 \ -DBUILD_VST4CS_OPCODES=1 \ -DCMAKE_BUILD_TYPE=RelWithDebInfo \ -DCMAKE_VERBOSE_MAKEFILE=1 \ -DMUSICXML_LIBRARY:FILEPATH=/mingw64/bin/libmusicxml2.dll \ -DNEED_PORTTIME=0 \ -DPTHREAD_LIBRARY:FILEPATH=/mingw64/x86_64-w64-mingw32/lib/libpthread.a \ -DTCL_VERSION=8.5 \ -DUSE_CURL=0 \ -DUSE_GETTEXT=0 \ -DUSE_OPEN_MP=0 \ -D_WIN32=1 \ -DPYTHON_INCLUDE_DIRS:PATH="C:/Program Files/Anaconda2/include" \ -DPYTHON_LIBRARIES:FILEPATH="C:/Program Files/Anaconda2/libs/python27.a" \ -DSTK_LIBRARY:FILEPATH=/mingw64/lib/libstk.a \ -DLIBSNDFILE_LIBRARY:FILEPATH="C:\Program Files\Mega-Nerd\libsndfile\bin\libsndfile-1.dll" \ -DSNDFILE_H_PATH:PATH="C:\Program Files\Mega-Nerd\libsndfile\include" \ -DBUILD_WEBSOCKET_OPCODE=0 if [ $? -ne 0 ]; then echo "Failed to run CMake." exit fi make -j6 $@ if [ $? -ne 0 ]; then echo "Failed to run make." exit fi echo "Compiling csound.node..." echo "Compiling NSIS list of targets and dependencies..." C:/Program_Files/Anaconda2/python ../find_csound_dependencies.py echo "Compiling Doxygen API documentation..." if [ $? -ne 0 ]; then echo "Failed to identify Csound targets and dependencies." exit fi cd ../../doc pwd doxygen Doxyfile if [ $? -ne 0 ]; then echo "Failed to create Csound API documentation." exit fi doxygen Doxyfile-CsoundAC if [ $? -ne 0 ]; then echo "Failed to create CsoundAC API documentation." exit fi echo "Compiling Inno Setup installer..." cd ../installer/windows pwd "C:\Program Files (x86)\Inno Setup 5\iscc.exe" csound6_x64.iss if [ $? -ne 0 ]; then echo "Failed to compile Inno Setup installer." exit fi echo "Uninstalling Csound x64..." "C:\Program Files\Csound6_x64\unins000.exe" /SILENT if [ $? -ne 0 ]; then echo "Failed to uninstall Csound x64, but continuing." fi echo "Installing Csound x64..." ./Setup_Csound6_x64_6.07.0.exe /SILENT if [ $? -ne 0 ]; then echo "Failed to install Csound x64." exit fi echo "Finished building and installing Csound x64." ----------------------------------------------------- Michael Gogins Irreducible Productions http://michaelgogins.tumblr.com Michael dot Gogins at gmail dot com On Fri, May 5, 2017 at 7:27 PM, Rory Walsh |
Date | 2017-05-06 02:25 |
From | Michael Gogins |
Subject | Re: [Csnd-dev] Failed to build on MSYS/Windows |
OK, builds and runs fine for me on Windows 8 with: $ gcc -v Using built-in specs. COLLECT_GCC=D:\msys64\mingw64\bin\gcc.exe COLLECT_LTO_WRAPPER=D:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/5.3.0/lto-wrapper.exe Target: x86_64-w64-mingw32 Configured with: ../gcc-5.3.0/configure --prefix=/mingw64 --with-local-prefix=/mingw64/local --build=x86_64-w64-mingw32 --host=x86_64-w64-mingw32 --target=x86_64-w64-mingw32 --with-native-system-header-dir=/mingw64/x86_64-w64-mingw32/include --libexecdir=/mingw64/lib --with-gxx-include-dir=/mingw64/include/c++/5.3.0 --enable-bootstrap --with-arch=x86-64 --with-tune=generic --enable-languages=c,lto,c++,objc,obj-c++,fortran,ada --enable-shared --enable-static --enable-libatomic --enable-threads=posix --enable-graphite --enable-fully-dynamic-string --enable-libstdcxx-time=yes --disable-libstdcxx-pch --disable-libstdcxx-debug --enable-version-specific-runtime-libs --disable-isl-version-check --enable-lto --enable-libgomp --disable-multilib --enable-checking=release --disable-rpath --disable-win32-registry --disable-nls --disable-werror --disable-symvers --with-libiconv --with-system-zlib --with-gmp=/mingw64 --with-mpfr=/mingw64 --with-mpc=/mingw64 --with-isl=/mingw64 --with-pkgversion='Rev5, Built by MSYS2 project' --with-bugurl=https://sourceforge.net/projects/msys2 --with-gnu-as --with-gnu-ld Thread model: posix gcc version 5.3.0 (Rev5, Built by MSYS2 project) ----------------------------------------------------- Michael Gogins Irreducible Productions http://michaelgogins.tumblr.com Michael dot Gogins at gmail dot com On Fri, May 5, 2017 at 9:03 PM, Michael Gogins |
Date | 2017-05-06 06:36 |
From | Oeyvind Brandtsegg |
Subject | Re: [Csnd-dev] Failed to build on MSYS/Windows |
Thanks so much for the help. It seems that mingw64/build.sh had been overwritten from the repo, yes. I keep forgetting to replace it with my own version. Builds fine now. Btw. the build.sh in the repo seems to have some explicit paths in it, maybe stemming from your system, Michael(?) For example -DMUSICXML_LIBRARY=D:/msys64/mingw64/bin/libmusicxml2.dll \ Would it be a good idea to put build.sh in the .gitignore, to avoid accidentally replacing it? Or, what strategy do you guys follow to to avoid having to remember to not push your copy and then also to keep your edits for that file? 2017-05-05 18:25 GMT-07:00 Michael Gogins <michael.gogins@gmail.com>: OK, builds and runs fine for me on Windows 8 with: Oeyvind Brandtsegg Professor of Music Technology NTNU 7491 Trondheim Norway Cell: +47 92 203 205 http://www.partikkelaudio.com/ http://crossadaptive.hf.ntnu.no http://gdsp.hf.ntnu.no/ http://soundcloud.com/brandtsegg http://flyndresang.no/ http://soundcloud.com/t-emp |
Date | 2017-05-06 09:23 |
From | Rory Walsh |
Subject | Re: [Csnd-dev] Failed to build on MSYS/Windows |
Just rename it. That way it won't get overwritten. On 6 May 2017 6:46 am, "Oeyvind Brandtsegg" <oyvind.brandtsegg@ntnu.no> wrote:
|
Date | 2017-05-07 01:09 |
From | Oeyvind Brandtsegg |
Subject | Re: [Csnd-dev] Failed to build on MSYS/Windows |
Yes, ok. I thought maybe there was some neat way of doing it. Like, if we put it in the .gitignore, it could still be part of the repo when someone clones, then any local changes will not be overwritten. Or maybe I'm wrong about how that would work(?). Anyway, it is a small thing, but thought it might perhaps save someone some trouble sometime later. 2017-05-06 1:23 GMT-07:00 Rory Walsh <rorywalsh@ear.ie>:
Oeyvind Brandtsegg Professor of Music Technology NTNU 7491 Trondheim Norway Cell: +47 92 203 205 http://www.partikkelaudio.com/ http://crossadaptive.hf.ntnu.no http://gdsp.hf.ntnu.no/ http://soundcloud.com/brandtsegg http://flyndresang.no/ http://soundcloud.com/t-emp |