Error compiling latest CVS. Can't find SF.h? + runtime issue
-
- User
- Posts: 67
- Joined: Mon Sep 01, 2008 8:53 am
Error compiling latest CVS. Can't find SF.h? + runtime issue
When I try and compile the latest CVS of linuxsampler I get this:
rumentResourceManager.lo -MD -MP -MF .deps/InstrumentResourceManager.Tpo -c InstrumentResourceManager.cpp -fPIC -DPIC -o .l bs/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
InstrumentResourceManager.h:62: error: wrong number of template arguments (1, should be 4)
../InstrumentManagerBase.h:163: error: provided for 'template<class F, class I, class R, class S> class LinuxSampler::Instru entManagerDefaultImpl'
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
etc etc.
I've checked the directory and SF.h isn't in the sf2/ directory. :/
Also, when I configure linuxsampler with --disable-sf2-engine, when I try and load a previously saved .lscp file, I get this in the linuxsampler terminal:
LinuxSampler 1.0.0.cvs2
Copyright (C) 2003,2004 by Benno Senoner and Christian Schoenebeck
Copyright (C) 2005-2009 Christian Schoenebeck
Detected features: MMX SSE SSE2
Automatic Stacktrace: Off
Creating Sampler...OK
Registered sampler engines: 'GIG','SFZ'
Registered MIDI input drivers: ALSA,JACK
Registered audio output drivers: ALSA,JACK
Loading instrument editor plugins...OK
Registered instrument editors: 'gigedit'
Starting LSCP network server (0.0.0.0:8888)...OK
LinuxSampler initialization completed.
LSCPServer: Client connection established on socket:4.
LSCPServer: Client connection established on socket:5.
Unloading instrument editor plugins...Segmentation fault
And Fantasia-0.9.jar spews out:
27-Nov-2009 18:18:27 org.jsampler.DefaultLSConsoleModel$LSConsoleThread run
INFO: Stream closed.
java.io.IOException: Stream closed.
at java.net.PlainSocketImpl.available(PlainSocketImpl.java:434)
at java.net.SocketInputStream.available(SocketInputStream.java:217)
at org.jsampler.DefaultLSConsoleModel$LscpInputStream.available(DefaultLSConsoleModel.java:528)
at org.jsampler.DefaultLSConsoleModel$LSConsoleThread.processInput(DefaultLSConsoleModel.java:467)
at org.jsampler.DefaultLSConsoleModel$LSConsoleThread.run(DefaultLSConsoleModel.java:443)
Endlessly.
Any ideas what's wrong here?
Thanks.
rumentResourceManager.lo -MD -MP -MF .deps/InstrumentResourceManager.Tpo -c InstrumentResourceManager.cpp -fPIC -DPIC -o .l bs/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
InstrumentResourceManager.h:62: error: wrong number of template arguments (1, should be 4)
../InstrumentManagerBase.h:163: error: provided for 'template<class F, class I, class R, class S> class LinuxSampler::Instru entManagerDefaultImpl'
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
etc etc.
I've checked the directory and SF.h isn't in the sf2/ directory. :/
Also, when I configure linuxsampler with --disable-sf2-engine, when I try and load a previously saved .lscp file, I get this in the linuxsampler terminal:
LinuxSampler 1.0.0.cvs2
Copyright (C) 2003,2004 by Benno Senoner and Christian Schoenebeck
Copyright (C) 2005-2009 Christian Schoenebeck
Detected features: MMX SSE SSE2
Automatic Stacktrace: Off
Creating Sampler...OK
Registered sampler engines: 'GIG','SFZ'
Registered MIDI input drivers: ALSA,JACK
Registered audio output drivers: ALSA,JACK
Loading instrument editor plugins...OK
Registered instrument editors: 'gigedit'
Starting LSCP network server (0.0.0.0:8888)...OK
LinuxSampler initialization completed.
LSCPServer: Client connection established on socket:4.
LSCPServer: Client connection established on socket:5.
Unloading instrument editor plugins...Segmentation fault
And Fantasia-0.9.jar spews out:
27-Nov-2009 18:18:27 org.jsampler.DefaultLSConsoleModel$LSConsoleThread run
INFO: Stream closed.
java.io.IOException: Stream closed.
at java.net.PlainSocketImpl.available(PlainSocketImpl.java:434)
at java.net.SocketInputStream.available(SocketInputStream.java:217)
at org.jsampler.DefaultLSConsoleModel$LscpInputStream.available(DefaultLSConsoleModel.java:528)
at org.jsampler.DefaultLSConsoleModel$LSConsoleThread.processInput(DefaultLSConsoleModel.java:467)
at org.jsampler.DefaultLSConsoleModel$LSConsoleThread.run(DefaultLSConsoleModel.java:443)
Endlessly.
Any ideas what's wrong here?
Thanks.
Re: Error compiling latest CVS. Can't find SF.h? + runtime issue
SF.h is from libgig, you need to update libgig to latest CVS too.
I don't know why you get that crash, sorry.
I don't know why you get that crash, sorry.
-
- User
- Posts: 67
- Joined: Mon Sep 01, 2008 8:53 am
Re: Error compiling latest CVS. Can't find SF.h? + runtime issue
Just a heads up, I've compiled the latest libgig and the latest linuxsampler, but I still get this message.
To fix it I just copied SF.h from the libgig source into src/engines/sf2 and then changed all instances of <SF.h> to "SF.h".
But then when the linker comes along I get this:
libtool: link: ranlib .libs/liblinuxsampler.a
libtool: link: rm -fr .libs/liblinuxsampler.lax .libs/liblinuxsampler.lax
libtool: link: ( cd ".libs" && rm -f "liblinuxsampler.la" && ln -s "../liblinuxsampler.la" "liblinuxsampler.la" )
g++ -DHAVE_CONFIG_H -I. -I.. -I/usr/local/include -Wreturn-type -ffast-math -march=i686 -g -O2 -pthread -MT linuxsampler.o -MD -MP -MF .deps/linuxsampler.Tpo -c -o linuxsampler.o linuxsampler.cpp
mv -f .deps/linuxsampler.Tpo .deps/linuxsampler.Po
/bin/sh ../libtool --tag=CXX --mode=link g++ -Wreturn-type -ffast-math -march=i686 -g -O2 -pthread -o linuxsampler linuxsampler.o liblinuxsampler.la -luuid
libtool: link: g++ -Wreturn-type -ffast-math -march=i686 -g -O2 -pthread -o .libs/linuxsampler linuxsampler.o ./.libs/liblinuxsampler.so -luuid -pthread -Wl,-rpath -Wl,/usr/local/lib/linuxsampler
./.libs/liblinuxsampler.so: undefined reference to `sf2::Region::GetEG2Decay(sf2::Region*)'
./.libs/liblinuxsampler.so: undefined reference to `sf2::Region::GetEG1Decay(sf2::Region*)'
./.libs/liblinuxsampler.so: undefined reference to `sf2::Sample::LoadSampleData(unsigned long)'
./.libs/liblinuxsampler.so: undefined reference to `sf2::InstrumentBase::GetRegionsOnKey(int, unsigned char)'
./.libs/liblinuxsampler.so: undefined reference to `sf2::Region::GetFineTune(sf2::Region*)'
./.libs/liblinuxsampler.so: undefined reference to `sf2::Sample::GetTotalFrameCount()'
./.libs/liblinuxsampler.so: undefined reference to `sf2::Region::GetEG1Release(sf2::Region*)'
./.libs/liblinuxsampler.so: undefined reference to `sf2::File::~File()'
./.libs/liblinuxsampler.so: undefined reference to `sf2::Region::GetEG2Attack(sf2::Region*)'
./.libs/liblinuxsampler.so: undefined reference to `sf2::Sample::ReadAndLoop(void*, unsigned long, sf2::Sample::PlaybackState*, sf2::Region*)'
./.libs/liblinuxsampler.so: undefined reference to `sf2::Sample::LoadSampleDataWithNullSamplesExtension(unsigned int)'
./.libs/liblinuxsampler.so: undefined reference to `sf2::Sample::GetFrameSize()'
./.libs/liblinuxsampler.so: undefined reference to `sf2::Region::GetPan(sf2::Region*)'
./.libs/liblinuxsampler.so: undefined reference to `sf2::Region::GetEG1Sustain(sf2::Region*)'
./.libs/liblinuxsampler.so: undefined reference to `sf2::File::GetPreset(int)'
./.libs/liblinuxsampler.so: undefined reference to `sf2::Region::GetEG1Attack(sf2::Region*)'
./.libs/liblinuxsampler.so: undefined reference to `sf2::Sample::GetCache()'
./.libs/liblinuxsampler.so: undefined reference to `sf2::Region::GetCoarseTune(sf2::Region*)'
./.libs/liblinuxsampler.so: undefined reference to `sf2::File::DeleteSample(sf2::Sample*)'
./.libs/liblinuxsampler.so: undefined reference to `sf2::Sample::SetPos(unsigned long)'
./.libs/liblinuxsampler.so: undefined reference to `sf2::Instrument::DeleteRegion(sf2::Region*)'
./.libs/liblinuxsampler.so: undefined reference to `sf2::File::GetPresetCount()'
./.libs/liblinuxsampler.so: undefined reference to `sf2::Region::GetEG2Sustain(sf2::Region*)'
./.libs/liblinuxsampler.so: undefined reference to `sf2::File::HasSamples()'
./.libs/liblinuxsampler.so: undefined reference to `sf2::Sample::GetChannelCount()'
./.libs/liblinuxsampler.so: undefined reference to `sf2::File::File(RIFF::File*)'
./.libs/liblinuxsampler.so: undefined reference to `sf2::Sample::Read(void*, unsigned long)'
./.libs/liblinuxsampler.so: undefined reference to `sf2::File::DeleteInstrument(sf2::Instrument*)'
./.libs/liblinuxsampler.so: undefined reference to `sf2::File::GetSample(int)'
./.libs/liblinuxsampler.so: undefined reference to `sf2::InstrumentBase::GetRegionCount()'
./.libs/liblinuxsampler.so: undefined reference to `sf2::Region::GetEG2Release(sf2::Region*)'
./.libs/liblinuxsampler.so: undefined reference to `sf2::Region::GetUnityNote()'
./.libs/liblinuxsampler.so: undefined reference to `sf2::Region::GetEG1Hold(sf2::Region*)'
./.libs/liblinuxsampler.so: undefined reference to `sf2::InstrumentBase::GetRegion(int)'
./.libs/liblinuxsampler.so: undefined reference to `sf2::Sample::GetPos()'
./.libs/liblinuxsampler.so: undefined reference to `sf2::File::GetInstrumentCount()'
./.libs/liblinuxsampler.so: undefined reference to `sf2::File::GetInstrument(int)'
./.libs/liblinuxsampler.so: undefined reference to `sf2::File::GetSampleCount()'
collect2: ld returned 1 exit status
Anyone have any ideas?
To fix it I just copied SF.h from the libgig source into src/engines/sf2 and then changed all instances of <SF.h> to "SF.h".
But then when the linker comes along I get this:
libtool: link: ranlib .libs/liblinuxsampler.a
libtool: link: rm -fr .libs/liblinuxsampler.lax .libs/liblinuxsampler.lax
libtool: link: ( cd ".libs" && rm -f "liblinuxsampler.la" && ln -s "../liblinuxsampler.la" "liblinuxsampler.la" )
g++ -DHAVE_CONFIG_H -I. -I.. -I/usr/local/include -Wreturn-type -ffast-math -march=i686 -g -O2 -pthread -MT linuxsampler.o -MD -MP -MF .deps/linuxsampler.Tpo -c -o linuxsampler.o linuxsampler.cpp
mv -f .deps/linuxsampler.Tpo .deps/linuxsampler.Po
/bin/sh ../libtool --tag=CXX --mode=link g++ -Wreturn-type -ffast-math -march=i686 -g -O2 -pthread -o linuxsampler linuxsampler.o liblinuxsampler.la -luuid
libtool: link: g++ -Wreturn-type -ffast-math -march=i686 -g -O2 -pthread -o .libs/linuxsampler linuxsampler.o ./.libs/liblinuxsampler.so -luuid -pthread -Wl,-rpath -Wl,/usr/local/lib/linuxsampler
./.libs/liblinuxsampler.so: undefined reference to `sf2::Region::GetEG2Decay(sf2::Region*)'
./.libs/liblinuxsampler.so: undefined reference to `sf2::Region::GetEG1Decay(sf2::Region*)'
./.libs/liblinuxsampler.so: undefined reference to `sf2::Sample::LoadSampleData(unsigned long)'
./.libs/liblinuxsampler.so: undefined reference to `sf2::InstrumentBase::GetRegionsOnKey(int, unsigned char)'
./.libs/liblinuxsampler.so: undefined reference to `sf2::Region::GetFineTune(sf2::Region*)'
./.libs/liblinuxsampler.so: undefined reference to `sf2::Sample::GetTotalFrameCount()'
./.libs/liblinuxsampler.so: undefined reference to `sf2::Region::GetEG1Release(sf2::Region*)'
./.libs/liblinuxsampler.so: undefined reference to `sf2::File::~File()'
./.libs/liblinuxsampler.so: undefined reference to `sf2::Region::GetEG2Attack(sf2::Region*)'
./.libs/liblinuxsampler.so: undefined reference to `sf2::Sample::ReadAndLoop(void*, unsigned long, sf2::Sample::PlaybackState*, sf2::Region*)'
./.libs/liblinuxsampler.so: undefined reference to `sf2::Sample::LoadSampleDataWithNullSamplesExtension(unsigned int)'
./.libs/liblinuxsampler.so: undefined reference to `sf2::Sample::GetFrameSize()'
./.libs/liblinuxsampler.so: undefined reference to `sf2::Region::GetPan(sf2::Region*)'
./.libs/liblinuxsampler.so: undefined reference to `sf2::Region::GetEG1Sustain(sf2::Region*)'
./.libs/liblinuxsampler.so: undefined reference to `sf2::File::GetPreset(int)'
./.libs/liblinuxsampler.so: undefined reference to `sf2::Region::GetEG1Attack(sf2::Region*)'
./.libs/liblinuxsampler.so: undefined reference to `sf2::Sample::GetCache()'
./.libs/liblinuxsampler.so: undefined reference to `sf2::Region::GetCoarseTune(sf2::Region*)'
./.libs/liblinuxsampler.so: undefined reference to `sf2::File::DeleteSample(sf2::Sample*)'
./.libs/liblinuxsampler.so: undefined reference to `sf2::Sample::SetPos(unsigned long)'
./.libs/liblinuxsampler.so: undefined reference to `sf2::Instrument::DeleteRegion(sf2::Region*)'
./.libs/liblinuxsampler.so: undefined reference to `sf2::File::GetPresetCount()'
./.libs/liblinuxsampler.so: undefined reference to `sf2::Region::GetEG2Sustain(sf2::Region*)'
./.libs/liblinuxsampler.so: undefined reference to `sf2::File::HasSamples()'
./.libs/liblinuxsampler.so: undefined reference to `sf2::Sample::GetChannelCount()'
./.libs/liblinuxsampler.so: undefined reference to `sf2::File::File(RIFF::File*)'
./.libs/liblinuxsampler.so: undefined reference to `sf2::Sample::Read(void*, unsigned long)'
./.libs/liblinuxsampler.so: undefined reference to `sf2::File::DeleteInstrument(sf2::Instrument*)'
./.libs/liblinuxsampler.so: undefined reference to `sf2::File::GetSample(int)'
./.libs/liblinuxsampler.so: undefined reference to `sf2::InstrumentBase::GetRegionCount()'
./.libs/liblinuxsampler.so: undefined reference to `sf2::Region::GetEG2Release(sf2::Region*)'
./.libs/liblinuxsampler.so: undefined reference to `sf2::Region::GetUnityNote()'
./.libs/liblinuxsampler.so: undefined reference to `sf2::Region::GetEG1Hold(sf2::Region*)'
./.libs/liblinuxsampler.so: undefined reference to `sf2::InstrumentBase::GetRegion(int)'
./.libs/liblinuxsampler.so: undefined reference to `sf2::Sample::GetPos()'
./.libs/liblinuxsampler.so: undefined reference to `sf2::File::GetInstrumentCount()'
./.libs/liblinuxsampler.so: undefined reference to `sf2::File::GetInstrument(int)'
./.libs/liblinuxsampler.so: undefined reference to `sf2::File::GetSampleCount()'
collect2: ld returned 1 exit status
Anyone have any ideas?
Re: Error compiling latest CVS. Can't find SF.h? + runtime issue
Did you remember to do "make install" in libgig?
-
- User
- Posts: 67
- Joined: Mon Sep 01, 2008 8:53 am
Re: Error compiling latest CVS. Can't find SF.h? + runtime issue
Yep, I definatly did, and it's at the latest CVS at this time of writing.
Re: Error compiling latest CVS. Can't find SF.h? + runtime issue
You just copied over the sf2 header files. Thats enough for compiling, but not for linking the linuxsampler binaries. Better delete your modifications and your manually copied header files and clean install latest libgig from CVS and make sure there is no old version of libgig installed anywhere (e.g. /usr/lib and /usr/local/lib).
-
- User
- Posts: 67
- Joined: Mon Sep 01, 2008 8:53 am
Re: Error compiling latest CVS. Can't find SF.h? + runtime issue
Thanks a lot Cuse!
I did a fresh install of both libgig and linuxsampler and also of jsampler and gigedit.
The SF2/SFZ engines cause linuxsampler to segfault whenever they're selected, is this a problem on my end or are the sf2/sfz engines not yet completely usuable?
I did a fresh install of both libgig and linuxsampler and also of jsampler and gigedit.
The SF2/SFZ engines cause linuxsampler to segfault whenever they're selected, is this a problem on my end or are the sf2/sfz engines not yet completely usuable?
Re: Error compiling latest CVS. Can't find SF.h? + runtime issue
Those 2 engines are still work in progress, theres certainly the possibility that they might crash here and there, but it should not segfault when you just select them.
-
- User
- Posts: 67
- Joined: Mon Sep 01, 2008 8:53 am
Re: Error compiling latest CVS. Can't find SF.h? + runtime issue
Oh right cool.
What could I do to find out the cause of the segfaults?
What could I do to find out the cause of the segfaults?
Re: Error compiling latest CVS. Can't find SF.h? + runtime issue
You have to make a back trace. There are various ways to do it. the most simple one is by enabling core dumps in your shell by typing
in the console before starting the sampler. After it crashed it will leave a file called "core" which can examine with
and then in the gdb app typing "bt" for backtrace. But this to be useful, you have to compile libgig, linuxsampler and co with debuggin symbols turned on, eg. CXXFLAGS=-g
Code: Select all
ulimit -c unlimited
Code: Select all
gdb /path/to/linuxsampler core