Author Topic: Compilation issues on Kubuntu (RT kernel) 64-bit  (Read 5955 times)

dmlandrum

  • Newbie
  • *
  • Posts: 2
    • View Profile
Compilation issues on Kubuntu (RT kernel) 64-bit
« on: September 16, 2008, 13:12:59 »
Hello, everyone! I'm having a most unusual problem compiling the Vamp-SDK on my machine. This has actually been an on-going problem for some time now. Looking over the forums, I see one other person seems to have successfully compiled and installed Vamp on his 64-bit Ubuntu install, so I'm wondering what keeps going wrong here.

The first thing I did was to edit the Makefile to install to /usr instead of /usr/local. That was simple enough. Then when I run make, I get the following output (notice the error at the end):

Code: [Select]
g++  -O2 -Wall -I. -fPIC   -c -o vamp-sdk/PluginAdapter.o vamp-sdk/PluginAdapter.cpp
g++  -O2 -Wall -I. -fPIC   -c -o vamp-sdk/RealTime.o vamp-sdk/RealTime.cpp
ar r vamp-sdk/libvamp-sdk.a vamp-sdk/PluginAdapter.o vamp-sdk/RealTime.o
g++  -O2 -Wall -I. -fPIC   -c -o vamp-sdk/PluginHostAdapter.o vamp-sdk/PluginHostAdapter.cpp
g++  -O2 -Wall -I. -fPIC   -c -o vamp-sdk/hostext/PluginBufferingAdapter.o vamp-sdk/hostext/PluginBufferingAdapter.cpp
g++  -O2 -Wall -I. -fPIC   -c -o vamp-sdk/hostext/PluginChannelAdapter.o vamp-sdk/hostext/PluginChannelAdapter.cpp
g++  -O2 -Wall -I. -fPIC   -c -o vamp-sdk/hostext/PluginInputDomainAdapter.o vamp-sdk/hostext/PluginInputDomainAdapter.cpp
g++  -O2 -Wall -I. -fPIC   -c -o vamp-sdk/hostext/PluginLoader.o vamp-sdk/hostext/PluginLoader.cpp
g++  -O2 -Wall -I. -fPIC   -c -o vamp-sdk/hostext/PluginWrapper.o vamp-sdk/hostext/PluginWrapper.cpp
ar r vamp-sdk/libvamp-hostsdk.a vamp-sdk/PluginHostAdapter.o vamp-sdk/hostext/PluginBufferingAdapter.o vamp-sdk/hostext/PluginChannelAdapter.o vamp-sdk/hostext/PluginInputDomainAdapter.o vamp-sdk/hostext/PluginLoader.o vamp-sdk/hostext/PluginWrapper.o vamp-sdk/RealTime.o
ranlib vamp-sdk/libvamp-sdk.a
ranlib vamp-sdk/libvamp-hostsdk.a
g++  -static-libgcc -shared -Wl,-Bsymbolic -Wl,-soname=libvamp-sdk.so.1 -o vamp-sdk/libvamp-sdk.so vamp-sdk/PluginAdapter.o vamp-sdk/RealTime.o
g++  -static-libgcc -shared -Wl,-Bsymbolic -Wl,-soname=libvamp-hostsdk.so.2 -o vamp-sdk/libvamp-hostsdk.so vamp-sdk/PluginHostAdapter.o vamp-sdk/hostext/PluginBufferingAdapter.o vamp-sdk/hostext/PluginChannelAdapter.o vamp-sdk/hostext/PluginInputDomainAdapter.o vamp-sdk/hostext/PluginLoader.o vamp-sdk/hostext/PluginWrapper.o vamp-sdk/RealTime.o
g++  -O2 -Wall -I. -fPIC   -c -o examples/SpectralCentroid.o examples/SpectralCentroid.cpp
g++  -O2 -Wall -I. -fPIC   -c -o examples/PercussionOnsetDetector.o examples/PercussionOnsetDetector.cpp
g++  -O2 -Wall -I. -fPIC   -c -o examples/AmplitudeFollower.o examples/AmplitudeFollower.cpp
g++  -O2 -Wall -I. -fPIC   -c -o examples/ZeroCrossing.o examples/ZeroCrossing.cpp
g++  -O2 -Wall -I. -fPIC   -c -o examples/plugins.o examples/plugins.cpp
g++  -static-libgcc -shared -Wl,-Bsymbolic -Wl,--version-script=vamp-plugin.map -o examples/vamp-example-plugins.so examples/SpectralCentroid.o examples/PercussionOnsetDetector.o examples/AmplitudeFollower.o examples/ZeroCrossing.o examples/plugins.o vamp-sdk/libvamp-sdk.a /usr/lib/gcc/x86_64-linux-gnu/4.2.3/libstdc++.a
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/4.2.3/libstdc++.a(functexcept.o): relocation R_X86_64_32 against `std::bad_typeid::~bad_typeid()' can not be used when making a shared object; recompile with -fPIC
/usr/lib/gcc/x86_64-linux-gnu/4.2.3/libstdc++.a: could not read symbols: Bad value
collect2: ld returned 1 exit status
make: *** [examples/vamp-example-plugins.so] Error 1

Is it trying to tell me that libstdc++ is compiled incorrectly on my machine? It's the one that comes with every Ubuntu 64-bit system. Any help would be greatly appreciated. Thank you!

cannam

  • Administrator
  • Sr. Member
  • *****
  • Posts: 273
    • View Profile
Re: Compilation issues on Kubuntu (RT kernel) 64-bit
« Reply #1 on: September 16, 2008, 13:27:56 »
Darren,

This is simply an error in the Vamp SDK Makefile; it was shipped with a line that should not have been included.  Fortunately it's easy enough to correct.

Where you read this text in the Makefile ...

Code: [Select]
# Libraries required for the plugins.
# (Note that it is desirable to statically link libstdc++ if possible,
# because our plugin exposes only a C API so there are no boundary
# compatibility problems.)
#
#PLUGIN_LIBS = $(SDKDIR)/libvamp-sdk.a
PLUGIN_LIBS = $(SDKDIR)/libvamp-sdk.a $(shell g++ -print-file-name=libstdc++.a)

... the comment is wrong: statically linking libstdc++ is not a good idea, and isn't even possible using the particular build you have.

Just comment out the second of those PLUGIN_LIBS lines with the # comment character, and uncomment the first one instead.


Chris

dmlandrum

  • Newbie
  • *
  • Posts: 2
    • View Profile
Re: Compilation issues on Kubuntu (RT kernel) 64-bit
« Reply #2 on: September 17, 2008, 15:35:06 »
Chris,

I sent my thanks to the LAD list, but I figured I should add my thanks here as well. I was able to get Vamp working just fine. Now I'm reading around on the web site, trying to divine what it's designed for and what it's capable of.

I don't think I'll be building real-time softsynths in Vamp (though it could be capable of that, I don't know), but building a nice detector for a compressor plug-in sounds like a real possibility. After all, once you have a detector, all you're doing after that is multiplying the incoming signal by the result of the detector.

Well, I might put in some tube emulation stuff after that if I wanted to make a "character" compressor, but that's neither here nor there.

Again, thank you for your help.