Open CychoRider opened 3 years ago
As mentioned on IRC, the raspberry pi build scripts haven't been updated since some build system changes occurred a few months back. It shouldn't be terribly complex to adapt the build-rpi3 scripts to work again based on the changes in the common makefile and linux makefile. e.g. 'make setup' is no longer a required build step.
I currently only own a Rasberry Pi 1, so I'm not equipped to verify all changes are made correctly to those scripts, but if they're failing because they're calling 'make setup' when that has been removed, that's a logical starting point. Zyn itself should work just fine on Rasberry Pi 1..4 and the Raspberry Pi 400, The Zyn-Fusion interface should work fine with Rasberry Pi 2..4/400 (I'd expect the Rpi1 to have too little compute power). The build system does not have a compatibility issue with those devices, it just does not have a working build-rpi3.rb script. That script is community maintained and contributions are welcome to fix it.
Fundamental, appreciate you picking up the conversation here. I have many years experience in various languages but I'm new to contributing with open source. I wanted to do a diff between build-rpi2.rb and build-linux.rb but my searches for build-linux.rb were not successful.
I commented out make setup and that led to a make builddep error so I commented that out also: def get_zest() stage "Getting Zest"
cmd "git clone --depth=1 https://github.com/mruby-zest/mruby-zest-build"
chdir "mruby-zest-build"
cmd "git submodule update --init"
cmd "ruby rebuild-fcache.rb"
#cmd "mv testing-cache.rb src/mruby-widget-lib/mrblib/fcache.rb"
#make setup no longer required
#cmd "make setup"
#make builddep no longer required?
#cmd "make builddep"
chdir ".."
end
On IRC you mentioned "I wouldn't be surprise if the OpenGL -> OpenGL ES flag is needed for the raspberry pi build." Any tips on were to turn on this flag?
It got to 100% on the build but then it threw a gl related error: [100%] Built target WatchTest Changing directory to ..
Changing directory to mruby-zest-build make clean cd mruby && MRUBY_CONFIG=../build_config.rb rake clean Environment is:
rm -f /home/pi/zyn-fusion-build/mruby-zest-build/mruby/build/host/mrbgems/mruby-file-stat/config.h Cleaned up target build folder cd mruby && rm -rf build/w64 rm -f deps/libuv.a deps/libuv-win.a sed -i -- 's/GL2/GLES2/g' src/mruby-widget-lib/src/gem.c sed -i -- 's/MRUBY_NANOVG_GL2/MRUBY_NANOVG_GLES2/g' build_config.rb sed -i '/idiot/d' deps/mruby-nanovg/src/nvg_impl.h cp ../gl_core.3.2. deps/mruby-nanovg/src cp: cannot stat '../gl_core.3.2.': No such file or directory ERROR: 'cp ../gl_core.3.2.* deps/mruby-nanovg/src' failed pi@raspberrypi:~/zyn-fusion-build $
Update, searching for location to set the OpenGL -> OpenGL ES flag. Or, how to create ./gl_core.3.2. to satisfy the copy command cp ../gl_core.3.2. deps/mruby-nanovg/src
I used this to activate GL, rebooted, and rebuilt, but no change. sudo raspi-config Advance Options GL Drivers GL (Full KMS) Desktop Drivers
I did a grep -r OpenGL in zyn-fusion-build and got about 100 instances of that string but I didn't see from that how or where to set the OpenGL -> OpenGL ES flag.
Any ideas on how to to set the OpenGL -> OpenGL ES flag. Or, how to create ./gl_core.3.2. to satisfy the copy command cp ../gl_core.3.2. deps/mruby-nanovg/src?
Or, how to create ./gl_core.3.2.* to satisfy the copy command
It looks like the file is in the place where the code is trying to copy it, so that statement might not be needed. If the existing one doesn't work then it would have to be the old one in this repo which got removed around https://github.com/zynaddsubfx/zyn-fusion-build/commit/2eed727f467d728d83792207993d54c5497acc62
sudo raspi-config
No configuration change on the side of your raspberry pi should be needed. My statement referred to build-rpi3.rb:67,68 where GL2 was replaced with GLES2
Update, got through ruby build-rpi3.rb by skipping (commenting out) many steps, but then tar -jxvf zyn-fusion-linux-64bit-3.0.6-dev-release.tar.bz2 failed.
I had previously done a search on github for ruby build-linux.rb but could not find it. Maybe if I could locate that file I could compare it to ruby build-rpi3.rb to see why so many commands fail.
Does the RPi400 use a different OS that is detected such that ruby build-linux.rb installs seamlessly? Something must account for the ease of building the project Floyd Steinberg shows on an RPi400, as compared to the multitude of failures trying to build on an RPi3B+.. ZYNADDSUBFX on Raspberry PI Linux - open source synthesiser https://www.youtube.com/watch?v=iIcKMS_lxZ8
Here is the modified build script I have added to with every failure. I had to comment out so many things to get ruby build-rpi3.rb to complete that I am not surprised the subsequent command tar -jxvf zyn-fusion-linux-64bit-3.0.6-dev-release.tar.bz2 failed (below)
sudo apt-get update
sudo apt-get upgrade
sudo apt-get install build-essential git ruby libtool libmxml-dev automake cmake libfftw3-dev libjack-jackd2-dev liblo-dev libz-dev libasound2-dev mesa-common-dev libgl1-mesa-dev libglu1-mesa-dev libcairo2-dev libfontconfig1-dev bison libuv1 libuv1-dev
git clone https://github.com/zynaddsubfx/zyn-fusion-build
cd zyn-fusion-build
#############
#for RPi3B+ comment out the following in build-rpi3.rb
#cmd "make setup"
#cmd "make builddep"
#cmd "cp ../gl_core.3.2.* deps/mruby-nanovg/src"
#cmd "make -j2" #comment out 2 places
#cmd "unzip -o ZynAddSubFX_C_Owl_Alvarez_full_bank.zip"
#cmd "sudo mv Cris\\ Owl\\ Alvarez/ /opt/zyn-fusion/banks"
#cmd "sudo cp ./mruby-zest-build/package/libzest.so /opt/zyn-fusion/"
#cmd "sudo cp ./mruby-zest-build/package/zest /opt/zyn-fusion/zyn-fusion"
#############
#for RPi3B+ comment out the following in MakefileMod to be copied to mruby-zest-build/Makefile
#cp mruby/bin/mruby package/
#cp libzest.so package/
#cp zest package/
# #############
# #remove make file and put a corrected makefile in its place to prevent overwrite of correction
# cmd "rm mruby-zest-build/Makefile"
# cmd "cp MakefileMod mruby-zest-build/Makefile"
# #############
# cmd "make pack"
#############
#build-linux.rb not present, use build-rpi3.rb instead
#ruby build-linux.rb
ruby build-rpi3.rb
tar -jxvf zyn-fusion-linux-64bit-3.0.6-dev-release.tar.bz2
cd zyn-fusion
sudo bash ./install-linux.sh
zynaddsubfx&
qjackctl&
pi@raspberrypi:~/zyn-fusion-build $ tar -jxvf zyn-fusion-linux-64bit-3.0.6-dev-release.tar.bz2
tar (child): zyn-fusion-linux-64bit-3.0.6-dev-release.tar.bz2: Cannot open: No such file or directory
tar (child): Error is not recoverable: exiting now
tar: Child returned status 2
tar: Error is not recoverable: exiting now
pi@raspberrypi:~/zyn-fusion-build $
Does the RPi400 use a different OS that is detected such that ruby build-linux.rb installs seamlessly?
No. As stated before the build system has changed over time. When he built it the older scripts would have worked. build-linux.rb was replaced with the makefiles and around the same time the build-rpi3.rb script was likely broken.
I had previously done a search on github for ruby build-linux.rb but could not find it. Maybe if I could locate that file I could compare it to ruby build-rpi3.rb to see why so many commands fail.
If you look in this repository's history you'll see the build-linux.rb file. It was removed when it was replaced with the makefiles. I strongly recommend referring to the makefiles as they're the currently tested build system. Only minor modifications of those should be required to have a fully functional raspberry pi build.
I'm trying to get this working on a 3b myself within patchbox OS.
Will come back with details if I manage to get it going @fundamental
Sounds good to me. I just got a RPi 4 for an unrelated project, so I should be able to verify what is proposed. Side note - egads does the chip shortage make it tricky to buy a RPi without going through scalpers.
@fundamental At least for me the standard make process seems to compile just fine.
Have you tried that @CychoRider ?
@rtizzy I appreciate the response. I have tried the standard build process but it failed in my setup. Lots of details are posted above with the points at which it threw errors and the items I cut out of the makefile in order to get the make to complete. Eventually I got the make to complete but by then I had cut so many things out that the result did not function.
I first had a problem with this:
ruby build-rpi3.rb
Thus, the standard build process calls for build-linux.rb to be in a folder on the Pi, but it was not present there or any other place I looked, and I searched all subfolders from the root of the Pi. However, build-rpi3.rb was present so I edited that file name into the process, but that led to a series of other calls that threw errors.
I am using an Rpi3B+, Raspbian, imager, update, and upgrade to start with a freshly imaged microSD drive. I see you are using patchbox OS, so that is at least one difference in our configurations.
@cychorider
Read the full README. The install instructions for generic Linux should work.
https://github.com/zynaddsubfx/zyn-fusion-build
I've seen the YouTube video you're referring to and his instructions did not work for me either. A lot of the instructions are relatively outdated.
Make sure you read the entire README as there is an important tidbit at the end regarding setting the release.
On Sun, Oct 24, 2021, 1:15 AM CychoRider @.***> wrote:
@rtizzy https://github.com/rtizzy I appreciate the response. I have tried the standard build process but it failed in my setup. Lots of details are posted above with the points at which it threw errors and the items I cut out of the makefile in order to get the make to complete. Eventually I got the make to complete but by then I had cut so many things out that the result did not function.
I first had a problem with this:
build-linux.rb not present, use build-rpi3.rb instead
ruby build-linux.rb
ruby build-rpi3.rb
Thus, the standard build process calls for build-linux.rb to be in a folder on the Pi, but it was not present there or any other place I looked, and I searched all subfolders from the root of the Pi. However, build-rpi3.rb was present so I edited that file name into the process, but that led to a series of other calls that threw errors.
I am using an Rpi3B+, Raspbian, imager, update, and upgrade to start with a freshly imaged microSD drive. I see you are using patchbox OS, so that is at least one difference in our configurations.
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/zynaddsubfx/zyn-fusion-build/issues/87#issuecomment-950230595, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAD75FTHR62MJ5ZFL5UQC6TUIM6YJANCNFSM5DNQW2VQ . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.
@Robert Tisdale Great info! By "standard build" I was referring to the process shown on the wiki page, which appears to be where floyd Steinberg got his command list for his video. As @fundamental has pointed out to me, that wiki is not necessarily maintained so me calling it "standard" is not actually valid.
So, based on the readme you directed me to, it seems this is the command list I should follow. I have not tested this process yet.
sudo apt-get install build-essential git ruby libtool libmxml-dev automake cmake libfftw3-dev libjack-jackd2-dev liblo-dev libz-dev libasound2-dev mesa-common-dev libgl1-mesa-dev libglu1-mesa-dev libcairo2-dev libfontconfig1-dev bison libuv1 libuv1-dev
instructions
git clone --recursive https://github.com/zynaddsubfx/zyn-fusion-build zyn-fusion-build
make MODE=release -f Makefile.linux.mk install_deps
make MODE=release -f Makefile.linux.mk all
cd zyn-fusion sudo bash ./install-linux.sh
http://www.avg.com/email-signature?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail Virus-free. www.avg.com http://www.avg.com/email-signature?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail <#DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2>
On Sat, Oct 23, 2021 at 7:53 PM Robert Tisdale @.***> wrote:
@cychorider
Read the full README. The install instructions for generic Linux should work.
https://github.com/zynaddsubfx/zyn-fusion-build
I've seen the YouTube video you're referring to and his instructions did not work for me either. A lot of the instructions are relatively outdated.
Make sure you read the entire README as there is an important tidbit at the end regarding setting the release.
On Sun, Oct 24, 2021, 1:15 AM CychoRider @.***> wrote:
@rtizzy https://github.com/rtizzy I appreciate the response. I have tried the standard build process but it failed in my setup. Lots of details are posted above with the points at which it threw errors and the items I cut out of the makefile in order to get the make to complete. Eventually I got the make to complete but by then I had cut so many things out that the result did not function.
I first had a problem with this:
build-linux.rb not present, use build-rpi3.rb instead
ruby build-linux.rb
ruby build-rpi3.rb
Thus, the standard build process calls for build-linux.rb to be in a folder on the Pi, but it was not present there or any other place I looked, and I searched all subfolders from the root of the Pi. However, build-rpi3.rb was present so I edited that file name into the process, but that led to a series of other calls that threw errors.
I am using an Rpi3B+, Raspbian, imager, update, and upgrade to start with a freshly imaged microSD drive. I see you are using patchbox OS, so that is at least one difference in our configurations.
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub < https://github.com/zynaddsubfx/zyn-fusion-build/issues/87#issuecomment-950230595 , or unsubscribe < https://github.com/notifications/unsubscribe-auth/AAD75FTHR62MJ5ZFL5UQC6TUIM6YJANCNFSM5DNQW2VQ
. Triage notifications on the go with GitHub Mobile for iOS < https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/zynaddsubfx/zyn-fusion-build/issues/87#issuecomment-950250734, or unsubscribe https://github.com/notifications/unsubscribe-auth/AVPPBKEZVHVCR24ELAWJCSLUINYKDANCNFSM5DNQW2VQ . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.
I see a very minor error or two (You miss a cd
after the git clone
for example). Some of the folder names may be different but the commands you mentioned should get you 99-100% of the way there.
Following the build instructions on the github wiki page (https://github.com/zynaddsubfx/zyn-fusion-build/wiki/Building-on-Linux) leads to errors when building on an RPi3B+ with 32 bit Raspbian OS installed on the SD using Imager, followed by update and upgrade prior to build.
Anybody have success building ZynAddSubFX on an RPi3B+ or any other Raspberry Pi?
Floyd Steinberg (ZYNADDSUBFX on Raspberry PI Linux - open source synthesiser) has a cool youtube video showing building on an RPi400. In the description are links to the wiki where he got the build instruction list. He shows running the build instruction list without errors, but when I run those build instructions there is no build-linux.rb in the folder zyn-fusion-build.
So I tried using build-rpi3.rb instead of build-linux.rb, but that led to a make error.
Things seemed to be going OK after I made a little substitution:
Then the build quickly failed:
I would not mind buying a different RPi if the RPi3B+ is not supported, but I don't really want the form factor of an RPI400.
Thanks very much if you have any tips, experiences, or links to share.