moforte / sam-faust

Faust examples for the SAM SHARC DSP Board
11 stars 6 forks source link

Error running faust2sam on Linux #1

Open glen-anderson opened 6 years ago

glen-anderson commented 6 years ago

Using a fairly clean Ubuntu 18.04 machine I've followed all of the steps in the PDF (I think). Faust was built from master (v2.5.32) as was sam-faust.

Running faust2sam -midi 16-channel-volume.dsp gives the following error:

$ faust2sam -midi 16-channel-volume.dsp       
Your 16-channel-volume-sam.zip package is being created
cp: cannot stat '/usr/share/faust/sam/fast_pow2.h': No such file or directory

/usr/share/faust exists however /usr/share/faust/sam does not. Looking at the output of the generated faust/Makefile.sam I can see it copying files to /usr/local/include/faust/audio and /usr/local/bin but that's about it:

$ sudo make -f Makefile.sam install | grep sam
make[1]: Entering directory '/home/ganders/work/sam/faust/build'
CMake Warning at http/CMakeLists.txt:111 (message):
  Cannot locate libmicrohttpd: skip HTTPDFaust generation
-- Build files have been written to: /home/ganders/work/sam/faust/build/faustdir
make[2]: Entering directory '/home/ganders/work/sam/faust/build/faustdir'
make[3]: Entering directory '/home/ganders/work/sam/faust/build/faustdir'
make[4]: Entering directory '/home/ganders/work/sam/faust/build/faustdir'
make[4]: Leaving directory '/home/ganders/work/sam/faust/build/faustdir'
make[4]: Entering directory '/home/ganders/work/sam/faust/build/faustdir'
make[4]: Leaving directory '/home/ganders/work/sam/faust/build/faustdir'
make[3]: Leaving directory '/home/ganders/work/sam/faust/build/faustdir'
-- Up-to-date: /usr/local/include/faust/audio/samAudio.h
-- Up-to-date: /usr/local/bin/faust2sam
make[2]: Leaving directory '/home/ganders/work/sam/faust/build/faustdir'
make[1]: Leaving directory '/home/ganders/work/sam/faust/build'

I also see that the faust2sam script relies on a $FAUSTLIB variable which I don't have set nor do I see in the docs.

$ cat /usr/local/bin/faust2sam | grep FAUSTLIB 
    cp -r $FAUSTLIB/sam/fast_pow2.h $APIFOLDER
    cp -r $FAUSTLIB/sam/samFaustDSP.h $APIFOLDER
moforte commented 6 years ago

This means that you may not have not run the script to add the faust additions to the faust installation, Chapter 4.3 in the doc. Note that this has never been tested under linux.