compile problems

You're new to the LinuxSampler world? You don't know where to start and nothing works? Here's the place to ask for help.
Post Reply
unhandyandy
Newbie
Posts: 1
Joined: Wed May 05, 2010 12:44 am

compile problems

Post by unhandyandy » Wed May 05, 2010 12:53 am

I compiled and installed libgig 3.3 successfully, but I can't compile linuxsampler.

I used --prefix=/opt to configure, and set GIG_CFLAGS=-I/opt/include and GIG_LIBS=/opt/lib. It starts compiling away fine, but then chokes at this point:

/bin/bash ../libtool --mode=link g++ -Wreturn-type -ffast-math -pthread -o linuxsampler linuxsampler.o liblinuxsampler.la -luuid
g++ -Wreturn-type -ffast-math -pthread -o .libs/linuxsampler linuxsampler.o ./.libs/liblinuxsampler.so /usr/lib/libuuid.so -Wl,--rpath -Wl,/opt/lib/linuxsampler
./.libs/liblinuxsampler.so: undefined reference to `gig::Sample::LoadSampleDataWithNullSamplesExtension(unsigned int)'
./.libs/liblinuxsampler.so: undefined reference to `gig::Sample::SetPos(unsigned long, RIFF::stream_whence_t)'
./.libs/liblinuxsampler.so: undefined reference to `gig::libraryVersion()'

and more "undefined reference" errors for another page.

Any ideas?

User avatar
cuse
Developer
Posts: 366
Joined: Wed Jan 23, 2008 10:07 pm
Location: Germany

Re: compile problems

Post by cuse » Sun Jun 13, 2010 6:50 pm

Seems you have another, old version of libgig installed under another path (e.g. /usr/lib or /usr/local/lib) and the compiler selected that old one where those listed functions are missing. So remove that old version of libgig, then it compile fine.

prokoudine
Newbie
Posts: 2
Joined: Sat Feb 14, 2009 4:41 am
Contact:

Re: compile problems

Post by prokoudine » Fri Aug 13, 2010 1:18 am

Well, here is output from failed attempt to compile LS with most recent libgig and liblscp (all taken from CVS):

Code: Select all

libtool: compile:  g++ -DHAVE_CONFIG_H -I. -I../../.. -Wreturn-type -ffast-math -g -O2 -pthread -MT InstrumentResourceManager.lo -MD -MP -MF .deps/InstrumentResourceManager.Tpo -c InstrumentResourceManager.cpp  -fPIC -DPIC -o .libs/InstrumentResourceManager.o
In file included from InstrumentResourceManager.cpp:27:
InstrumentResourceManager.h:30:16: error: SF.h: No such file or directory
In file included from InstrumentResourceManager.h:33,
                 from InstrumentResourceManager.cpp:27:
../../common/Pool.h: In member function ‘void Pool<T>::resizePool(int)’:
../../common/Pool.h:485: error: ‘cerr’ is not a member of ‘std’
In file included from InstrumentResourceManager.cpp:27:
InstrumentResourceManager.h: At global scope:
InstrumentResourceManager.h:41: error: ‘::sf2’ has not been declared
InstrumentResourceManager.h:41: error: ‘::sf2’ has not been declared
InstrumentResourceManager.h:41: error: template argument 1 is invalid
InstrumentResourceManager.h:41: error: invalid type in declaration before ‘;’ token
In file included from InstrumentResourceManager.cpp:27:
InstrumentResourceManager.h:62: error: ‘::sf2’ has not been declared
InstrumentResourceManager.h:62: error: ‘::sf2’ has not been declared
In file included from InstrumentResourceManager.cpp:27:
InstrumentResourceManager.h:62: error: wrong number of template arguments (1, should be 4)
../InstrumentManagerBase.h:165: error: provided for ‘template<class F, class I, class R, class S> class LinuxSampler::InstrumentManagerDefaultImpl’
InstrumentResourceManager.h:68: error: ‘instrument_id_t’ was not declared in this scope
InstrumentResourceManager.h:68: error: template argument 1 is invalid
InstrumentResourceManager.h:68: error: template argument 2 is invalid
InstrumentResourceManager.h:69: error: ‘instrument_id_t’ has not been declared
InstrumentResourceManager.h:70: error: ‘instrument_id_t’ was not declared in this scope
InstrumentResourceManager.h:70: error: template argument 1 is invalid
InstrumentResourceManager.h:70: error: template argument 2 is invalid
InstrumentResourceManager.h:71: error: ‘instrument_info_t’ does not name a type
InstrumentResourceManager.h:75: error: ‘::sf2’ has not been declared
InstrumentResourceManager.h:75: error: ISO C++ forbids declaration of ‘Preset’ with no type
InstrumentResourceManager.h:75: error: ‘Preset’ declared as a ‘virtual’ field
InstrumentResourceManager.h:75: error: expected ‘;’ before ‘*’ token
InstrumentResourceManager.h:76: error: ‘::sf2’ has not been declared
InstrumentResourceManager.h:76: error: expected ‘,’ or ‘...’ before ‘*’ token
InstrumentResourceManager.h:77: error: ‘::sf2’ has not been declared
InstrumentResourceManager.h:77: error: expected ‘,’ or ‘...’ before ‘*’ token
InstrumentResourceManager.h:78: error: ‘::sf2’ has not been declared
InstrumentResourceManager.h:78: error: expected ‘,’ or ‘...’ before ‘*’ token
InstrumentResourceManager.h:79: error: ‘::sf2’ has not been declared
InstrumentResourceManager.h:79: error: expected ‘,’ or ‘...’ before ‘*’ token
InstrumentResourceManager.h:81: error: ‘::sf2’ has not been declared
InstrumentResourceManager.h:81: error: ‘::sf2’ has not been declared
InstrumentResourceManager.h:81: error: template argument 1 is invalid
InstrumentResourceManager.h:83: error: ‘::sf2’ has not been declared
InstrumentResourceManager.h:83: error: ‘::sf2’ has not been declared
InstrumentResourceManager.h:83: error: template argument 2 is invalid
InstrumentResourceManager.h:86: error: ‘::sf2’ has not been declared
InstrumentResourceManager.h:86: error: ISO C++ forbids declaration of ‘File’ with no type
InstrumentResourceManager.h:86: error: ‘File’ declared as a ‘virtual’ field
InstrumentResourceManager.h:86: error: expected ‘;’ before ‘*’ token
InstrumentResourceManager.h:87: error: ‘::sf2’ has not been declared
InstrumentResourceManager.h:87: error: expected ‘,’ or ‘...’ before ‘*’ token
InstrumentResourceManager.h:88: error: ‘::sf2’ has not been declared
InstrumentResourceManager.h:88: error: expected ‘,’ or ‘...’ before ‘*’ token
InstrumentResourceManager.h:97: error: ‘::sf2’ has not been declared
InstrumentResourceManager.h:97: error: expected ‘,’ or ‘...’ before ‘*’ token
InstrumentResourceManager.h:98: error: ‘::sf2’ has not been declared
InstrumentResourceManager.h:98: error: ISO C++ forbids declaration of ‘Preset’ with no type
InstrumentResourceManager.h:98: error: expected ‘;’ before ‘*’ token
In file included from Voice.h:33,
                 from EngineChannel.h:31,
                 from InstrumentResourceManager.cpp:28:
Stream.h:33: error: ‘::sf2’ has not been declared
Stream.h:33: error: ‘::sf2’ has not been declared
Stream.h:33: error: template argument 1 is invalid
Stream.h:40: error: ‘LinuxSampler::sf2::Stream::Handle’ has not been declared
Stream.h:41: error: ‘reference_t’ has not been declared
Stream.h:42: error: ‘::sf2’ has not been declared
Stream.h:42: error: expected ‘,’ or ‘...’ before ‘*’ token
In file included from Voice.h:34,
                 from EngineChannel.h:31,
                 from InstrumentResourceManager.cpp:28:
DiskThread.h:34: error: ‘::sf2’ has not been declared
DiskThread.h:34: error: ‘::sf2’ has not been declared
DiskThread.h:34: error: wrong number of template arguments (1, should be 2)
../common/Stream.h:120: error: provided for ‘template<class R, class IM> class LinuxSampler::DiskThreadBase’
DiskThread.h:40: error: ‘LinuxSampler::sf2::Stream::Handle’ has not been declared
DiskThread.h:41: error: ‘LinuxSampler::sf2::Stream::reference_t’ has not been declared
DiskThread.h:42: error: ‘::sf2’ has not been declared
DiskThread.h:42: error: expected ‘,’ or ‘...’ before ‘*’ token
In file included from EngineChannel.h:31,
                 from InstrumentResourceManager.cpp:28:
Voice.h:48: error: ‘::sf2’ has not been declared
Voice.h:48: error: ‘::sf2’ has not been declared
Voice.h:48: error: wrong number of template arguments (2, should be 4)
../AbstractEngine.h:85: error: provided for ‘template<class EC, class R, class S, class D> class LinuxSampler::VoiceBase’
Voice.h:56: error: ‘SampleInfo’ does not name a type
Voice.h:57: error: ‘RegionInfo’ does not name a type
Voice.h:58: error: ‘InstrumentInfo’ does not name a type
Voice.h:62: error: ‘EGInfo’ does not name a type
Voice.h:63: error: ISO C++ forbids declaration of ‘EGInfo’ with no type
Voice.h:63: error: expected ‘,’ or ‘...’ before ‘&’ token
In file included from EngineChannel.h:31,
                 from InstrumentResourceManager.cpp:28:
Voice.h:65: error: ‘EGInfo’ does not name a type
In file included from InstrumentResourceManager.cpp:28:
EngineChannel.h:35: error: ‘::sf2’ has not been declared
EngineChannel.h:35: error: ‘::sf2’ has not been declared
EngineChannel.h:35: error: wrong number of template arguments (2, should be 3)
../AbstractEngine.h:84: error: provided for ‘template<class V, class R, class I> class LinuxSampler::EngineChannelBase’
In file included from InstrumentResourceManager.cpp:29:
Engine.h:35: error: ‘::sf2’ has not been declared
Engine.h:35: error: ‘::sf2’ has not been declared
In file included from InstrumentResourceManager.cpp:29:
Engine.h:35: error: wrong number of template arguments (2, should be 6)
../AbstractEngineChannel.h:80: error: provided for ‘template<class TV, class TRR, class TR, class TD, class TIM, class TI> class LinuxSampler::EngineBase’
Engine.h:44: error: ‘Format’ does not name a type
InstrumentResourceManager.cpp:41: error: ‘::sf2’ has not been declared
InstrumentResourceManager.cpp:41: error: ISO C++ forbids declaration of ‘File’ with no type
InstrumentResourceManager.cpp:41: error: expected ‘;’ before ‘*’ token
InstrumentResourceManager.cpp:51: error: ‘instrument_id_t’ is not a member of ‘LinuxSampler::sf2::InstrumentResourceManager’
InstrumentResourceManager.cpp:51: error: ‘instrument_id_t’ is not a member of ‘LinuxSampler::sf2::InstrumentResourceManager’
InstrumentResourceManager.cpp:51: error: template argument 1 is invalid
InstrumentResourceManager.cpp:51: error: template argument 2 is invalid
InstrumentResourceManager.cpp: In member function ‘virtual int LinuxSampler::sf2::InstrumentResourceManager::Instruments()’:
InstrumentResourceManager.cpp:52: error: ‘Entries’ was not declared in this scope
InstrumentResourceManager.cpp: At global scope:
InstrumentResourceManager.cpp:55: error: ‘String LinuxSampler::sf2::InstrumentResourceManager::GetInstrumentName’ is not a static member of ‘class LinuxSampler::sf2::InstrumentResourceManager’
InstrumentResourceManager.cpp:55: error: ‘instrument_id_t’ was not declared in this scope
InstrumentResourceManager.cpp:55: error: expected ‘,’ or ‘;’ before ‘{’ token
InstrumentResourceManager.cpp:63: error: ‘instrument_id_t’ is not a member of ‘LinuxSampler::sf2::InstrumentResourceManager’
InstrumentResourceManager.cpp:63: error: ‘instrument_id_t’ is not a member of ‘LinuxSampler::sf2::InstrumentResourceManager’
InstrumentResourceManager.cpp:63: error: template argument 1 is invalid
InstrumentResourceManager.cpp:63: error: template argument 2 is invalid
InstrumentResourceManager.cpp: In member function ‘virtual int LinuxSampler::sf2::InstrumentResourceManager::GetInstrumentFileContent(String)’:
InstrumentResourceManager.cpp:65: error: ‘::sf2’ has not been declared
InstrumentResourceManager.cpp:65: error: expected primary-expression before ‘=’ token
InstrumentResourceManager.cpp:67: error: ‘instrument_id_t’ was not declared in this scope
InstrumentResourceManager.cpp:67: error: template argument 1 is invalid
InstrumentResourceManager.cpp:67: error: template argument 2 is invalid
InstrumentResourceManager.cpp:67: error: invalid type in declaration before ‘;’ token
InstrumentResourceManager.cpp:69: error: expected primary-expression before ‘=’ token
InstrumentResourceManager.cpp:69: error: expected type-specifier before ‘::’ token
InstrumentResourceManager.cpp:69: error: expected ‘;’ before ‘::’ token
InstrumentResourceManager.cpp:70: error: expected primary-expression before ‘)’ token
InstrumentResourceManager.cpp:71: error: expected ‘;’ before ‘id’
InstrumentResourceManager.cpp:72: error: ‘id’ was not declared in this scope
InstrumentResourceManager.cpp:74: error: request for member ‘push_back’ in ‘result’, which is of non-class type ‘int’
InstrumentResourceManager.cpp:76: error: expected primary-expression before ‘)’ token
InstrumentResourceManager.cpp:76: error: expected primary-expression before ‘;’ token
InstrumentResourceManager.cpp:80: error: expected primary-expression before ‘)’ token
InstrumentResourceManager.cpp:80: error: expected primary-expression before ‘;’ token
InstrumentResourceManager.cpp:84: error: expected primary-expression before ‘)’ token
InstrumentResourceManager.cpp:84: error: expected primary-expression before ‘;’ token
InstrumentResourceManager.cpp: At global scope:
InstrumentResourceManager.cpp:90: error: ‘instrument_info_t’ in class ‘LinuxSampler::sf2::InstrumentResourceManager’ does not name a type
InstrumentResourceManager.cpp:149: error: ‘::sf2’ has not been declared
InstrumentResourceManager.cpp:149: error: expected constructor, destructor, or type conversion before ‘*’ token
InstrumentResourceManager.cpp:298: error: expected ‘}’ at end of input
InstrumentResourceManager.cpp:298: error: expected ‘}’ at end of input
make[4]: *** [InstrumentResourceManager.lo] Error 1
make[4]: Leaving directory `/home/avp/soft/build/sound/libs/linuxsampler-cvs20100812/src/engines/sf2'
make[3]: *** [all-recursive] Error 1
make[3]: Leaving directory `/home/avp/soft/build/sound/libs/linuxsampler-cvs20100812/src/engines'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/home/avp/soft/build/sound/libs/linuxsampler-cvs20100812/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/avp/soft/build/sound/libs/linuxsampler-cvs20100812'
make: *** [all] Error 2
Are you guys sure you haven't forgotten to commit something? :)
News and tutorials on free design and photography software

User avatar
cuse
Developer
Posts: 366
Joined: Wed Jan 23, 2008 10:07 pm
Location: Germany

Re: compile problems

Post by cuse » Fri Aug 27, 2010 1:38 pm

SF.h is (at the moment) only available in the CVS version of libgig. And since the compiler complains about this file missing, you dont have the CVS version of libgig installed. It should be at /usr/include/SF.h . What is this about? The CVS version of LinuxSampler now also supports besides the Gigasampler format also support for Soundfont and SFZ. For that we wrote file format code for those formats and merged it with libgig. By the way, due to this we will probably rename libgig before the next upcoming release since its now a libraries which covers a collection of other sound formats.

Post Reply