BelaPlatform / supercollider

an environment and programming language for real time audio synthesis and algorithmic composition
GNU General Public License v3.0
14 stars 8 forks source link

cannot build #23

Closed giuliomoro closed 7 years ago

giuliomoro commented 7 years ago

Just now I cannot build. All the object files are generated, but both sclang and scsynth fail to link properly. I followed the instructions in the README, anything else I should do?

I am on 2bbfa5f21e406388fc40e14274214bed29635231

scsynth fails to link as follows:

root@bela ~/supercollider/build/lang$ /usr/lib/ccache/g++-4.8    -march=native -std=c++11 -mfloat-abi=hard -mfpu=neon -O2 -g -DNDEBUG  -std=c++11   CMakeFiles/sclang.dir/LangSource/cmdLineFuncs.cpp.o  -o sclang -rdynamic libsclang.a -lpthread ../external_libraries/hidapi/linux/libhidapi.a -ludev ../external_libraries/hidapi/hidapi_parser/libhidapi_parser.a ../external_libraries/libboost_thread.a ../server/scsynth/libscsynth.a ../external_libraries/libtlsf.a ../external_libraries/libboost_system.a -ldl /usr/xenomai/lib/libxenomai.so -L/usr/xenomai/lib -L/usr/lib/arm-linux-gnueabihf -lrt -lnative -lxenomai -lprussdrv -lpthread_rt -lfftw3f -lreadline -lasound /usr/local/lib/libsndfile.so -lrt ../external_libraries/libyaml.a -Wl,-rpath,/usr/xenomai/lib:/usr/local/lib:
libsclang.a(OSCData.cpp.o): In function `prBootInProcessServer(VMGlobals*, int)':
/root/supercollider/lang/LangPrimSource/OSCData.cpp:989: undefined reference to `SetPrintFunc'
/root/supercollider/lang/LangPrimSource/OSCData.cpp:1069: undefined reference to `World_New'
libsclang.a(OSCData.cpp.o): In function `getScopeBuf(unsigned int, SndBuf*, bool&)':
/root/supercollider/lang/LangPrimSource/OSCData.cpp:1078: undefined reference to `World_CopySndBuf'
libsclang.a(OSCData.cpp.o): In function `_Bind':
/usr/include/c++/4.8/functional:1342: undefined reference to `World_WaitForQuit'
/usr/include/c++/4.8/functional:1342: undefined reference to `World_WaitForQuit'
libsclang.a(OSCData.cpp.o): In function `netAddrSend':
/root/supercollider/lang/LangPrimSource/OSCData.cpp:336: undefined reference to `World_SendPacket'
    collect2: error: ld returned 1 exit status

sclang fails to link as follows:

Linking CXX executable sclang
cd /root/supercollider/build/lang && /usr/bin/cmake -E cmake_link_script CMakeFiles/sclang.dir/link.txt --verbose=true
/usr/lib/ccache/g++-4.8    -march=native -std=c++11 -mfloat-abi=hard -mfpu=neon -O2 -g -DNDEBUG  -std=c++11   CMakeFiles/sclang.dir/LangSource/cmdLineFuncs.cpp.o  -o sclang -rdynamic libsclang.a -lpthread ../external_libraries/hidapi/linux/libhidapi.a -ludev ../external_libraries/hidapi/hidapi_parser/libhidapi_parser.a ../external_libraries/libboost_thread.a ../server/scsynth/libscsynth.a ../external_libraries/libtlsf.a ../external_libraries/libboost_system.a -ldl /usr/xenomai/lib/libxenomai.so -L/usr/xenomai/lib -L/usr/lib/arm-linux-gnueabihf -lrt -lnative -lxenomai -lprussdrv -lpthread_rt -lfftw3f -lreadline -lasound /usr/local/lib/libsndfile.so -lrt ../external_libraries/libyaml.a -Wl,-rpath,/usr/xenomai/lib:/usr/local/lib:
libsclang.a(OSCData.cpp.o): In function `prBootInProcessServer(VMGlobals*, int)':
/root/supercollider/lang/LangPrimSource/OSCData.cpp:989: undefined reference to `SetPrintFunc'
/root/supercollider/lang/LangPrimSource/OSCData.cpp:1069: undefined reference to `World_New'
libsclang.a(OSCData.cpp.o): In function `getScopeBuf(unsigned int, SndBuf*, bool&)':
/root/supercollider/lang/LangPrimSource/OSCData.cpp:1078: undefined reference to `World_CopySndBuf'
libsclang.a(OSCData.cpp.o): In function `_Bind':
/usr/include/c++/4.8/functional:1342: undefined reference to `World_WaitForQuit'
/usr/include/c++/4.8/functional:1342: undefined reference to `World_WaitForQuit'
libsclang.a(OSCData.cpp.o): In function `netAddrSend':
/root/supercollider/lang/LangPrimSource/OSCData.cpp:336: undefined reference to `World_SendPacket'
collect2: error: ld returned 1 exit status
make[3]: *** [lang/sclang] Error 1
make[3]: Leaving directory `/root/supercollider/build'
make[2]: *** [lang/CMakeFiles/sclang.dir/all] Error 2
make[2]: Leaving directory `/root/supercollider/build'
make[1]: *** [lang/CMakeFiles/sclang.dir/rule] Error 2
make[1]: Leaving directory `/root/supercollider/build'
make: *** [sclang] Error 2
sensestage commented 7 years ago

Hmm... this is strange... I have for sure built that version and tested (although it was a rebuilt, not a fresh one). Are you sure it is not trying to link to an older library (like one preinstalled on the image)?

giuliomoro commented 7 years ago

Fixed: I think something went wrong while during the build, so server/scsynth/libscsynth.a existed but was empty. So that was considered up-to-date by make, but then it would not be able to find any symbols in it when using it for linking. I deleted it and now it works!