kmatheussen / radium

A graphical music editor. A next generation tracker.
http://users.notam02.no/~kjetism/radium/
GNU General Public License v2.0
839 stars 36 forks source link

Compile radium without libpd #1253

Open Dsm0 opened 4 years ago

Dsm0 commented 4 years ago

I am trying to compile the most recently released git-version of radium.

Like others, I've had trouble successfully compiling libpd, so in accordance with advice mentioned in #1235 (specifically, https://github.com/kmatheussen/radium/issues/1235#issuecomment-558391327), I commented out the libpd lines in bin/packages/build.sh, and exported INCLUDE_PDDEV="jadda".

I successfully ran make packages. However, when I tried to install with build_linux.sh , I still got an error concerning libpd:

Compiling audio/Pd_plugin.cpp...
audio/Pd_plugin.cpp:264:10: fatal error: libpds.h: No such file or directory
  264 | #include <libpds.h>
      |          ^~~~~~~~~~
compilation terminated.
make: *** [Makefile:1996: /tmp/radium_objects/Pd_plugin.o] Error 1
make: *** Waiting for unfinished jobs....

What would I have to change in the install file to make sure nothing related to libpd is linked?

Teteros commented 4 years ago

I would first suggest trying the change from my last PR #1251: https://github.com/kmatheussen/radium/pull/1251/commits/f0d05264f440b9c666e088e1562a83966c12fea4

this will use clang instead of gcc10 to build libpd-master. that package alone fails to compile on gcc > 9 it seems. EDIT: It's merged so you just have to fetch/pull latest changes from git for above.

To exclude the Pd instrument entirely from the build you need to patch out everything related to Pd from the build scripts like this:

diff --git a/Makefile.Qt b/Makefile.Qt
index bd2bd8161..30fbb6e61 100755
--- a/Makefile.Qt
+++ b/Makefile.Qt
@@ -741,7 +741,7 @@ start_bin.sh:
    echo "LD_LIBRARY_PATH=../lib $(PYTHONEXE) start.py keybindings.conf $@" >>start_bin.sh
    chmod a+rx start_bin.sh

-$(RADIUM_BIN): $(OBJ) $(MAKEFILE) bin/packages/fluidsynth-1.1.6/src/.libs/libfluidsynth.a bin/packages/libgig/src/.libs/libgig.a bin/packages/libpd-master/libs/libpds.a $(OS_DEPS)
+$(RADIUM_BIN): $(OBJ) $(MAKEFILE) bin/packages/fluidsynth-1.1.6/src/.libs/libfluidsynth.a bin/packages/libgig/src/.libs/libgig.a $(OS_DEPS)
    @echo
    @echo "Changed ($(RADIUM_BIN)):"
    @echo $?
diff --git a/bin/packages/build.sh b/bin/packages/build.sh
index 77a7820f0..1b0826714 100755
--- a/bin/packages/build.sh
+++ b/bin/packages/build.sh
@@ -126,16 +126,6 @@ CFLAGS="$CPPFLAGS -fPIC -g" CPPFLAGS="$MYFLAGS" CC="$DASCC" CXX="$DASCXX $MYFLAG
 VERBOSE=1 make -j`nproc`
 cd ..

-rm -fr libpd-master
-tar xvzf libpd-master.tar.gz
-cd libpd-master/
-sed -i '/define CFLAGS/ s|")| -I/usr/include/tirpc ")|' make.scm
-sed -i 's/k_cext$//' make.scm
-sed -i 's/oscx //' make.scm
-make clean
-make -j`nproc`
-cd ..
-
 rm -fr qhttpserver-master
 tar xvzf qhttpserver-master.tar.gz
 cd qhttpserver-master/
diff --git a/build_linux_common.sh b/build_linux_common.sh
index 9d41603f9..caf89b0f4 100755
--- a/build_linux_common.sh
+++ b/build_linux_common.sh
@@ -44,7 +44,7 @@ export INCLUDE_FAUSTDEV="jadda"
 #export INCLUDE_FAUSTDEV_BUT_NOT_LLVM="jadda"

 # Always compile pddev. Most of it is placed in a dynamic library, so it doesn't contribute to higher link time or startup time.
-export INCLUDE_PDDEV="jadda"
+#export INCLUDE_PDDEV="jadda"

 #if ! env |grep OPTIMIZE ; then
diff --git a/install.sh b/install.sh
index 453006787..c36100b8d 100755
--- a/install.sh
+++ b/install.sh
@@ -94,15 +94,6 @@ rm -fr "$TARGET/packages/faust/architecture/teensy"
 rm -fr "$TARGET/packages/faust/architecture/unity"
 rm -fr "$TARGET/packages/faust/architecture/unsupported-arch"

-
-
-# pure data
-cp -a packages/libpd-master "$TARGET/packages/"
-cd "$TARGET/packages/libpd-master"
-make clean
-rm -f libpds.o
-cd "$THIS_DIR/bin"
-
 # libxcb
 if [[ $RADIUM_INSTALL_LIBXCB != 0 ]]
 then

I could make an environment variable for this and send out a pull-request as the Pd dependency probably should not be hardcoded upstream.