[PD-dev] Compiling and debugging flext external on Debian linux

Pablo Vanwoerkom guikubivan at gmail.com
Thu Jun 12 20:23:53 CEST 2008


Hello,

This is my first post on the list, so I hope it makes sense. Any help is
appreciated!

I've been having trouble running the DEBUG-SINGLE binary of an external
that uses flext. I launch pd and the patch that calls the external. When
I attach the process id in gdb, gdb seems to recognize the symbols from
the external. Then when I do anything useful back in puredata, puredata
crashes, at the bottom is the message I get.

I did not make the external. However, the RELASE-SINGLE binary that
flext produces works for the most part when using it from pd. I am
guessing I am not compiling the external correctly or perhaps(though
doubt it) I did not compile and install flext correctly. My version of
puredata is 0.41-0.

Just in case, this is the part of the external compilation process
dealing with the debug binaries. I don't really know either what the
different debug versions are (shared, multi, single)...

Thank you,
-Pablo V.

g++ -c -O3 -msse -mfpmath=sse -ffast-math -D_DEBUG -pthread -fPIC -g
-DFLEXT_USE_SIMD -DFLEXT_SYS=2 -I/usr/local/src/pd/src
-I/usr/local/include/flext soundspotter3/CircularMatrix.cpp -o
pd-linux/debug-single/CircularMatrix.opp
g++ -c -O3 -msse -mfpmath=sse -ffast-math -D_DEBUG -pthread -fPIC -g
-DFLEXT_USE_SIMD -DFLEXT_SYS=2 -I/usr/local/src/pd/src
-I/usr/local/include/flext soundspotter3/SoundFile.cpp -o
pd-linux/debug-single/SoundFile.opp
g++ -c -O3 -msse -mfpmath=sse -ffast-math -D_DEBUG -pthread -fPIC -g
-DFLEXT_USE_SIMD -DFLEXT_SYS=2 -I/usr/local/src/pd/src
-I/usr/local/include/flext soundspotter3/DriverFlext.cpp -o
pd-linux/debug-single/DriverFlext.opp
g++ -c -O3 -msse -mfpmath=sse -ffast-math -D_DEBUG -pthread -fPIC -g
-DFLEXT_USE_SIMD -DFLEXT_SYS=2 -I/usr/local/src/pd/src
-I/usr/local/include/flext soundspotter3/MatchedFilter.cpp -o
pd-linux/debug-single/MatchedFilter.opp
soundspotter3/MatchedFilter.cpp: In constructor
‘MatchedFilter::MatchedFilter(SoundSpotter*)’:
soundspotter3/MatchedFilter.cpp:22: warning: deprecated conversion from
string constant to ‘char*’
soundspotter3/MatchedFilter.cpp:26: warning: deprecated conversion from
string constant to ‘char*’
soundspotter3/MatchedFilter.cpp:32: warning: deprecated conversion from
string constant to ‘char*’
g++ -c -O3 -msse -mfpmath=sse -ffast-math -D_DEBUG -pthread -fPIC -g
-DFLEXT_USE_SIMD -DFLEXT_SYS=2 -I/usr/local/src/pd/src
-I/usr/local/include/flext soundspotter3/Matcher.cpp -o
pd-linux/debug-single/Matcher.opp
g++ -c -O3 -msse -mfpmath=sse -ffast-math -D_DEBUG -pthread -fPIC -g
-DFLEXT_USE_SIMD -DFLEXT_SYS=2 -I/usr/local/src/pd/src
-I/usr/local/include/flext soundspotter3/SoundSpotter.cpp -o
pd-linux/debug-single/SoundSpotter.opp
g++ -pthread -shared -Wl,-x -g -L/usr/local/src/pd/bin -L/usr/local/lib
-o pd-linux/debug-single/soundspotter~.pd_linux
pd-linux/debug-single/CircularMatrix.opp
pd-linux/debug-single/SoundFile.opp
pd-linux/debug-single/DriverFlext.opp
pd-linux/debug-single/MatchedFilter.opp
pd-linux/debug-single/Matcher.opp pd-linux/debug-single/SoundSpotter.opp
-lsndfile -lfftw3 -lflext-pd_sd
chmod 755 pd-linux/debug-single/soundspotter~.pd_linux
make[1]: Leaving directory `/media/docs/capstone/pureData/soundspotter3'
make -f ../flext/buildsys/gnumake-sub.mak PLATFORM=lnx RTSYS=pd
COMPILER=gcc BUILDPATH=../flext/buildsys/ PKGINFO=package.txt
BUILDCLASS=ext USRCONFIG=config.txt USRMAKE=build/gnumake-lnx-gcc.inc
TARGETMODE=debug TARGETTYPE=multi THREADED=1 DEBUG=1 _build_
make[1]: Entering directory `/media/docs/capstone/pureData/soundspotter3'
mkdir -p pd-linux/debug-multi
g++ -c -O3 -msse -mfpmath=sse -ffast-math -D_DEBUG -pthread -fPIC -g
-DFLEXT_USE_SIMD -DFLEXT_THREADS -DFLEXT_SYS=2 -I/usr/local/src/pd/src
-I/usr/local/include/flext soundspotter3/CircularMatrix.cpp -o
pd-linux/debug-multi/CircularMatrix.opp
g++ -c -O3 -msse -mfpmath=sse -ffast-math -D_DEBUG -pthread -fPIC -g
-DFLEXT_USE_SIMD -DFLEXT_THREADS -DFLEXT_SYS=2 -I/usr/local/src/pd/src
-I/usr/local/include/flext soundspotter3/SoundFile.cpp -o
pd-linux/debug-multi/SoundFile.opp
g++ -c -O3 -msse -mfpmath=sse -ffast-math -D_DEBUG -pthread -fPIC -g
-DFLEXT_USE_SIMD -DFLEXT_THREADS -DFLEXT_SYS=2 -I/usr/local/src/pd/src
-I/usr/local/include/flext soundspotter3/DriverFlext.cpp -o
pd-linux/debug-multi/DriverFlext.opp
g++ -c -O3 -msse -mfpmath=sse -ffast-math -D_DEBUG -pthread -fPIC -g
-DFLEXT_USE_SIMD -DFLEXT_THREADS -DFLEXT_SYS=2 -I/usr/local/src/pd/src
-I/usr/local/include/flext soundspotter3/MatchedFilter.cpp -o
pd-linux/debug-multi/MatchedFilter.opp
soundspotter3/MatchedFilter.cpp: In constructor
‘MatchedFilter::MatchedFilter(SoundSpotter*)’:
soundspotter3/MatchedFilter.cpp:22: warning: deprecated conversion from
string constant to ‘char*’
soundspotter3/MatchedFilter.cpp:26: warning: deprecated conversion from
string constant to ‘char*’
soundspotter3/MatchedFilter.cpp:32: warning: deprecated conversion from
string constant to ‘char*’
g++ -c -O3 -msse -mfpmath=sse -ffast-math -D_DEBUG -pthread -fPIC -g
-DFLEXT_USE_SIMD -DFLEXT_THREADS -DFLEXT_SYS=2 -I/usr/local/src/pd/src
-I/usr/local/include/flext soundspotter3/Matcher.cpp -o
pd-linux/debug-multi/Matcher.opp
g++ -c -O3 -msse -mfpmath=sse -ffast-math -D_DEBUG -pthread -fPIC -g
-DFLEXT_USE_SIMD -DFLEXT_THREADS -DFLEXT_SYS=2 -I/usr/local/src/pd/src
-I/usr/local/include/flext soundspotter3/SoundSpotter.cpp -o
pd-linux/debug-multi/SoundSpotter.opp
g++ -pthread -shared -Wl,-x -g -L/usr/local/src/pd/bin -L/usr/local/lib
-o pd-linux/debug-multi/soundspotter~.pd_linux
pd-linux/debug-multi/CircularMatrix.opp
pd-linux/debug-multi/SoundFile.opp pd-linux/debug-multi/DriverFlext.opp
pd-linux/debug-multi/MatchedFilter.opp pd-linux/debug-multi/Matcher.opp
pd-linux/debug-multi/SoundSpotter.opp -lsndfile -lfftw3 -lflext-pd_td
chmod 755 pd-linux/debug-multi/soundspotter~.pd_linux
make[1]: Leaving directory `/media/docs/capstone/pureData/soundspotter3'
make -f ../flext/buildsys/gnumake-sub.mak PLATFORM=lnx RTSYS=pd
COMPILER=gcc BUILDPATH=../flext/buildsys/ PKGINFO=package.txt
BUILDCLASS=ext USRCONFIG=config.txt USRMAKE=build/gnumake-lnx-gcc.inc
TARGETMODE=debug TARGETTYPE=shared SHARED=1 DEBUG=1 _build_
make[1]: Entering directory `/media/docs/capstone/pureData/soundspotter3'
mkdir -p pd-linux/debug-shared
g++ -c -O3 -msse -mfpmath=sse -ffast-math -D_DEBUG -pthread -fPIC -g
-DFLEXT_USE_SIMD -DFLEXT_SHARED -DFLEXT_SYS=2 -I/usr/local/src/pd/src
-I/usr/local/include/flext soundspotter3/CircularMatrix.cpp -o
pd-linux/debug-shared/CircularMatrix.opp
g++ -c -O3 -msse -mfpmath=sse -ffast-math -D_DEBUG -pthread -fPIC -g
-DFLEXT_USE_SIMD -DFLEXT_SHARED -DFLEXT_SYS=2 -I/usr/local/src/pd/src
-I/usr/local/include/flext soundspotter3/SoundFile.cpp -o
pd-linux/debug-shared/SoundFile.opp
g++ -c -O3 -msse -mfpmath=sse -ffast-math -D_DEBUG -pthread -fPIC -g
-DFLEXT_USE_SIMD -DFLEXT_SHARED -DFLEXT_SYS=2 -I/usr/local/src/pd/src
-I/usr/local/include/flext soundspotter3/DriverFlext.cpp -o
pd-linux/debug-shared/DriverFlext.opp
g++ -c -O3 -msse -mfpmath=sse -ffast-math -D_DEBUG -pthread -fPIC -g
-DFLEXT_USE_SIMD -DFLEXT_SHARED -DFLEXT_SYS=2 -I/usr/local/src/pd/src
-I/usr/local/include/flext soundspotter3/MatchedFilter.cpp -o
pd-linux/debug-shared/MatchedFilter.opp
soundspotter3/MatchedFilter.cpp: In constructor
‘MatchedFilter::MatchedFilter(SoundSpotter*)’:
soundspotter3/MatchedFilter.cpp:22: warning: deprecated conversion from
string constant to ‘char*’
soundspotter3/MatchedFilter.cpp:26: warning: deprecated conversion from
string constant to ‘char*’
soundspotter3/MatchedFilter.cpp:32: warning: deprecated conversion from
string constant to ‘char*’
g++ -c -O3 -msse -mfpmath=sse -ffast-math -D_DEBUG -pthread -fPIC -g
-DFLEXT_USE_SIMD -DFLEXT_SHARED -DFLEXT_SYS=2 -I/usr/local/src/pd/src
-I/usr/local/include/flext soundspotter3/Matcher.cpp -o
pd-linux/debug-shared/Matcher.opp
g++ -c -O3 -msse -mfpmath=sse -ffast-math -D_DEBUG -pthread -fPIC -g
-DFLEXT_USE_SIMD -DFLEXT_SHARED -DFLEXT_SYS=2 -I/usr/local/src/pd/src
-I/usr/local/include/flext soundspotter3/SoundSpotter.cpp -o
pd-linux/debug-shared/SoundSpotter.opp
g++ -pthread -shared -Wl,-x -g -L/usr/local/src/pd/bin -L/usr/local/lib
-o pd-linux/debug-shared/soundspotter~.pd_linux
pd-linux/debug-shared/CircularMatrix.opp
pd-linux/debug-shared/SoundFile.opp
pd-linux/debug-shared/DriverFlext.opp
pd-linux/debug-shared/MatchedFilter.opp
pd-linux/debug-shared/Matcher.opp pd-linux/debug-shared/SoundSpotter.opp
-lsndfile -lfftw3 -lflext-pd_d
chmod 755 pd-linux/debug-shared/soundspotter~.pd_linux
make[1]: Leaving directory `/media/docs/capstone/pureData/soundspotter3'



========================================
*Below is the error I am getting when I try to load a soundfile in the
puredata patch that uses the soundspotter external:*
=====================================================
Program received signal SIGSEGV, Segmentation fault.
0x9d879480 in flext_root_single::operator delete (blk=0x0) at
source/flsupport.cpp:173
173 size_t bytes = *(size_t *)ori;
Current language: auto; currently c++
====================================================


*And the backtrace is:*
=====================================================
#0 0x9d879480 in flext_root_single::operator delete (blk=0x0) at
source/flsupport.cpp:173
#1 0x9d8723f9 in operator delete (blk=0x0) at source/flsupport.h:103
#2 0x9d86b1c2 in SoundFile::loadSound (this=0x82597f4) at
soundspotter3/SoundFile.cpp:31
#3 0x9d86b2d1 in SoundFile::sfOpen (this=0x82597f4,
inFileName=0x82597b8
"/media/docs/capstone/audioclips/HummedScale_Don.wav")
at soundspotter3/SoundFile.cpp:21
#4 0x9d86ca16 in soundspotter::m_milt (this=0x823a154, argc=1,
argv=0xbfc0958c) at soundspotter3/DriverFlext.cpp:103
#5 0x9d86cfeb in soundspotter::flext_c_m_milt (c=0x823a154, argc=1,
argv=0xbfc0958c) at soundspotter3/DriverFlext.h:55
#6 0x9d87e08a in flext_base_single::TryMethTag (this=0x823a154,
lst=0x823a4ac, tag=0x823f578, argc=1, argv=0xbfc0958c) at
source/flmsg.cpp:37
#7 0x9d87e4ba in flext_base_single::FindMeth (this=0x823a154,
inlet=0, s=0x823f578, argc=1, argv=0xbfc0958c) at source/flmsg.cpp:146
#8 0x9d87e67d in flext_base_single::CbMethodHandler (this=0x823a154,
inlet=0, s=0x823f578, argc=1, argv=0xbfc0958c) at source/flmsg.cpp:184
#9 0x9d87ec84 in flext_base_single::cb_px_anything (c=0x8239d98,
s=0x823f578, argc=1, argv=0xbfc0958c) at source/flproxy.cpp:32
#10 0x080aa5d6 in pd_typedmess ()
#11 0x082432c8 in ?? ()
#12 0xbfc09336 in ?? ()
#13 0xbfc09792 in ?? ()
#14 0x00000010 in ?? ()
#15 0x00000004 in ?? ()
#16 0x00000000 in ?? ()
=====================================================






More information about the Pd-dev mailing list