JohannesLorenz / lmms-zyn-fusion-test

Inofficial installer for LMMS with zyn fusion plugin
4 stars 0 forks source link

Cannot compile successfully using automatic install and cannot manage manual installation (ZynAddSubFX) #5

Closed DegradedMind closed 3 years ago

DegradedMind commented 3 years ago

Hi. i just want to be able to use LMMS with Zyn-Fusion natively, but I am not experienced with Linux and computers in general so i've encountered some issues with the compilation. Can anyone help me?

Running ./build.sh clang gives me:

Install the project...
-- Install configuration: "Release"
-- Up-to-date: /home/snail/lmms-zyn-fusion-test/spa/install-clang/lib/cmake/SPA/spa-config.cmake
-- Up-to-date: /home/snail/lmms-zyn-fusion-test/spa/install-clang/lib/pkgconfig/spa.pc
-- Up-to-date: /home/snail/lmms-zyn-fusion-test/spa/install-clang/include/rtosc/pseudo-arg-val-math.h
-- Up-to-date: /home/snail/lmms-zyn-fusion-test/spa/install-clang/include/rtosc/pseudo-rtosc.h
-- Up-to-date: /home/snail/lmms-zyn-fusion-test/spa/install-clang/include/ringbuffer/ringbuffer.h
-- Up-to-date: /home/snail/lmms-zyn-fusion-test/spa/install-clang/include/spa/spa_fwd.h
-- Up-to-date: /home/snail/lmms-zyn-fusion-test/spa/install-clang/include/spa/spa.h
-- Up-to-date: /home/snail/lmms-zyn-fusion-test/spa/install-clang/include/spa/audio_fwd.h
-- Up-to-date: /home/snail/lmms-zyn-fusion-test/spa/install-clang/include/spa/audio.h
-- Up-to-date: /home/snail/lmms-zyn-fusion-test/spa/install-clang/lib/libspa.a
~/lmms-zyn-fusion-test/spa ~/lmms-zyn-fusion-test
Error: Could not find pkg config file in spa installation
Please fix the error and retry

and running ./build.sh gcc:

/tmp/ccZQk3Sz.ltrans0.ltrans.o: In function `spa::ringbuffer<char>::write_with_length(char const*, unsigned long)':
<artificial>:(.text+0x1b46): undefined reference to `ringbuffer_base::write_space() const'
/tmp/ccZQk3Sz.ltrans0.ltrans.o: In function `spa::audio::osc_ringbuffer::write(char const*, char const*, __va_list_tag*)':
<artificial>:(.text+0x1bf3): undefined reference to `pseudo_rtosc::rtosc_vmessage(char*, unsigned long, char const*, char const*, __va_list_tag*)'
/tmp/ccZQk3Sz.ltrans1.ltrans.o: In function `unsigned long ringbuffer_t<char>::write_func<ringbuffer_t<char>::std_copy>(ringbuffer_t<char>::std_copy&, unsigned long)':
<artificial>:(.text+0x296): undefined reference to `ringbuffer_base::init_variables_for_write(unsigned long, unsigned long&, unsigned long&, unsigned long&, unsigned long&)'
/tmp/ccZQk3Sz.ltrans1.ltrans.o: In function `ringbuffer_base::ringbuffer_base(unsigned long)':
<artificial>:(.text+0x469): undefined reference to `ringbuffer_common_t::ringbuffer_common_t(unsigned long)'
/tmp/ccZQk3Sz.ltrans1.ltrans.o: In function `ringbuffer_t<char>::ringbuffer_t(unsigned long)':
<artificial>:(.text+0x51e): undefined reference to `ringbuffer_base::init_atomic_variables()'
/tmp/ccZQk3Sz.ltrans1.ltrans.o: In function `ringbuffer_t<char>::~ringbuffer_t() [clone .lto_priv.30]':
<artificial>:(.text+0xcee): undefined reference to `ringbuffer_base::munlock(void const*, unsigned long)'
/tmp/ccZQk3Sz.ltrans2.ltrans.o: In function `spa::visitor::visitor()':
<artificial>:(.text+0x4b): undefined reference to `vtable for spa::visitor'
/tmp/ccZQk3Sz.ltrans3.ltrans.o: In function `host_visitor::~host_visitor() [clone .lto_priv.20]':
<artificial>:(.text+0x3a9): undefined reference to `spa::audio::visitor::~visitor()'
<artificial>:(.text+0x3be): undefined reference to `spa::visitor::~visitor()'
/tmp/ccZQk3Sz.ltrans3.ltrans.o:(.rodata+0x168): undefined reference to `typeinfo for spa::audio::visitor'
/tmp/ccZQk3Sz.ltrans3.ltrans.o:(.rodata+0x3f0): undefined reference to `typeinfo for spa::audio::visitor'
collect2: error: ld returned 1 exit status
examples / CMakeFiles / osc-host.dir / build.make: 95: error executing recipe for target "examples / osc-host"
make [2]: *** [examples / osc-host] Error 1
CMakeFiles / Makefile2: 215: error executing recipe for target "examples / CMakeFiles / osc-host.dir / all"
make [1]: *** [examples / CMakeFiles / osc-host.dir / all] Error 2
Makefile: 160: error executing recipe for target "all"
make: *** [all] Error 2
"$ git submodule status
 695c6a3a484ac14bda90c4f5108058183920a0f7 mruby-zest-build (v3.0.2-65-g695c6a3)
 61d0e199d1e0583442fd44fa90945f670cc0396c new-lmms (v1.1.90-1326-g61d0e19)
 c27bc1025d8e6ac1337d89a3a125a7b6168e614b spa (v0.0.2)
 8f9e52951a2b538eb6a2558f1d33b21c2e5afa21 zynaddsubfx (3.0.3-80-g8f9e529)

When i try the second method Compile + Install (where i need to compile each component individually): I compiled zynaddsubfx but it wouldn't run because it couldn't find Zyn-Fusion or something. Maybe I didn't properly specify -DZynFusionDir=<path to where fusion is>/package but i'm not sure where that is. I just put the path to mruby-zest-build because it had /package folder after i compiled it.

JohannesLorenz commented 3 years ago

Thanks a lot for moving. Now looking at it...

JohannesLorenz commented 3 years ago

What is the ZynFusionDir in your CMakeCache.txt in the zynaddsubfx folder? It should really end on /package, like the README described - otherwise it will not work.

Sorry again for late reply.

DegradedMind commented 3 years ago

I am unable to find CMakeCache.txt anywhere. The build/src has a zyn-config.h file where there is a line: constexpr const char* fusion_dir = "~/lmms-zyn-fusion-test/mruby-zest-build/package";

The way i compile zynaddsubfx is:

mkdir -p build

cd build

PKG_CONFIG_PATH=$PKG_CONFIG_PATH:"/usr/local/lib/pkgconfig" cmake -DZynFusionDir="~/lmms-zyn-fusion-test/mruby- zest-build/package" -DGuiModule=zest ..

make

Is this incorrect?

The error i get when trying to run the compiled zynaddsubfx binary is: Warning: CMake's ZynFusionDir does not contain a"zest" binary - ignoring.zynaddsubfx: Failed to launch Zyn-Fusion: No such file or directory

JohannesLorenz commented 3 years ago

I'm not sure if you can really use "~", as this is a bash extension. Maybe try the complete /home/.../ path? Also, what's in ~/lmms-zyn-fusion-test/mruby-zest-build/package? Is there a zest in there?

JohannesLorenz commented 3 years ago

By the way, there is a "space" in your path if I edit your message, but I guess that's just a formatting issue on github.

DegradedMind commented 3 years ago

@JohannesLorenz, yes there is zest file in there. i'll try absolute path.

DegradedMind commented 3 years ago

@JohannesLorenz, Success! You were right. Indeed you need to specify the absolute path. Now I can run the compiled Zyn-Fusion binary.

JohannesLorenz commented 3 years ago

Cool! Does the new zyn work inside LMMS for you, too?

DegradedMind commented 3 years ago

@JohannesLorenz, running ./lmms with LMMS_PLUGIN_DIR=<path to where libzynaddsubfx_spa.so is> prepended made no result. There was still the old zynaddsubfx in the native instrument rack. I can run Zyn-Fusion inside LMMS only if I swap the old /build/plugins/libzynaddsubfx.so with /src/Output/libzynaddsubfx_spa.so, but preview and drag-drop from "My Presets" doesn't work. The plugin itself works great so far.

JohannesLorenz commented 3 years ago

You need to prepend it (it's an environment variable). Does it work then?

DegradedMind commented 3 years ago

Is this the correct way to run? LMMS_PLUGIN_DIR="/home/user/lmms-zyn-fusion-test/zynaddsubfx/build/src/Output/libzynaddsubfx_spa.so" ./lmms This doesn't seem to work.

JohannesLorenz commented 3 years ago

@DegradedMind I don't think so. It says plugin dir, so it expects a directory (the one where the .so file is in).

DegradedMind commented 3 years ago

@JohannesLorenz, it works! there are now 2 versions of zynaddsubfx (old and new). Drag and dropping the presets open the old version, and if i drag and drop them into the new version it causes LMMS to freeze. Any way to fix that? If not, i am still very much happy and grateful for your help and patience. i can select the presets from inside the Zyn-Fusion browser.

JohannesLorenz commented 3 years ago

So, previewing and drag-dropping xmz-files (only this file type) works for me and should work for you.

What exactly do you mean with "presets"?

DegradedMind commented 3 years ago

@JohannesLorenz, the presets from inside the LMMS browser that's on the left. The extension of the files are .xiz.

DegradedMind commented 3 years ago

Oh, wait. i was trying to use the presets with .xiz extension. They don't work, but .xmz do.

JohannesLorenz commented 3 years ago

@DegradedMind It's true that the plugin currently only supports xmz. However, there should really be no crash with xiz, it should simply not load them.

I'd say let's close this issue, since the install worked. If you can describe exactly how to reproduce a crash, it would be nice if you could open it in a new issue. Would that be OK?

DegradedMind commented 3 years ago

@JohannesLorenz, yes, this issue should be closed. The crash happens only if i drag and drop .xiz files here: image

I don't think opening an issue is really necessary.

JohannesLorenz commented 3 years ago

No problem, this is very easy to fix. Tracked as #6. I'll do that after I finished something else. Thanks for the report!