Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compilation segfaults at 81% on AVL-MXE (based on Debian 10) #202

Closed
AVLinux opened this issue Jun 15, 2021 · 14 comments
Closed

Compilation segfaults at 81% on AVL-MXE (based on Debian 10) #202

AVLinux opened this issue Jun 15, 2021 · 14 comments
Assignees
Labels
bug Something isn't working

Comments

@AVLinux
Copy link

AVLinux commented Jun 15, 2021

Thanks for your great projects!

Unfortunately the Linux Deb packages provided for Ubuntu don't really work dependency wise for people with Debian systems as there are minor differences with libcurl versions etc. I am attempting to compile the ChowDSP plugins on AV Linux MX Edition which is currently based on Debian 10 Buster. I have successfully been able to compile Chow Centaur but am having difficulties with Analog Tape Model. I have all required dependencies and CMake but for some reason the compilation segfaults at 81% with the following error:

[ 80%] Building CXX object CMakeFiles/CHOWTapeModel_LV2.dir/modules/JUCE/modules/juce_audio_plugin_client/juce_audio_plugin_client_VST3.cpp.o
[ 81%] Linking CXX shared module CHOWTapeModel_artefacts/LV2/CHOWTapeModel.lv2/CHOWTapeModel.so
Generate ttl data for './CHOWTapeModel.so', basename: 'CHOWTapeModel'
Segmentation fault
make[2]: *** [CMakeFiles/CHOWTapeModel_LV2.dir/build.make:242: CHOWTapeModel_artefacts/LV2/CHOWTapeModel.lv2/CHOWTapeModel.so] Error 139
make[2]: *** Deleting file 'CHOWTapeModel_artefacts/LV2/CHOWTapeModel.lv2/CHOWTapeModel.so'
make[1]: *** [CMakeFiles/Makefile2:345: CMakeFiles/CHOWTapeModel_LV2.dir/all] Error 2
make: *** [Makefile:130: all] Error 2

This is building the GIT repo version as instructed in your build docs. It seems odd to me to have something segfault during compilation. Any ideas or suggestions?

@AVLinux AVLinux added the bug Something isn't working label Jun 15, 2021
@KottV
Copy link

KottV commented Jun 15, 2021

Hi,

as far as I can see curl is disabled in the CMakelists.txt

@KottV
Copy link

KottV commented Jun 16, 2021

Alright, I've tried this in Open Build Server and got the same segfault. It may be hard to investigate as I (and @jatinchowdhury18 too I guess) haven' Debian 10 locally.

@AVLinux what if ask Debian/MX users/maintainers to look at this?

@AVLinux
Copy link
Author

AVLinux commented Jun 16, 2021

@KottV

Just so I am sure I understand. You have tried building in your OBS with the Debian-backports version of CMake? In other words are you suspecting CMake 3.16.3 has a bug in it?

@KottV
Copy link

KottV commented Jun 16, 2021

Yes I'm trying to build it in OBS: https://build.opensuse.org/package/show/home:kill_it:debian/chowtapemodel
I haven't yet idea where is problem. It can be even in JUCE LV2 code and Debian_10's compiler/libs as it falls on linking stage.

So, from my side it requires additional time to install Buster and look into issue.

PS. build is fine for Deban_Testing

@AVLinux
Copy link
Author

AVLinux commented Jun 16, 2021

@KottV

I will soon also have to move to Debian 11 so perhaps it is not worth fixing this for Debian 10 since Debian 11 is coming very soon?

@jatinchowdhury18
Copy link
Owner

Thanks @AVLinux for reporting this and @KottV for taking a look also! It looks like the last print statement before the segfault is coming from the LV2 ttl generation code here. This leads me to believe that the ttl generation function in the LV2 build is coming up as a nullptr, so there's probably a linking error somewhere upstream.

@AVLinux: would it be possible to try building just the VST3, and seeing if that works (cmake --build build --target CHOWTapeModel_VST3)? It would also be helpful to share the full build output if possible.

Thanks,
Jatin

@KottV
Copy link

KottV commented Jun 17, 2021

@KottV

I will soon also have to move to Debian 11 so perhaps it is not worth fixing this for Debian 10 since Debian 11 is coming very soon?

It will save a lot of time :)

@AVLinux
Copy link
Author

AVLinux commented Jun 17, 2021

@KottV

Let me try what Jatin has suggested, don't put any more of your time into this until we see if VST3 is an option, my goal right now is to just get working binaries of one kind or another from Debian 10 and hopefully that will hold things until Debian 11 is out. I'll try and get a VST3 build done tomorrow..

@AVLinux
Copy link
Author

AVLinux commented Jun 17, 2021

Hi!

Some good news, the VST3 Plugin builds successfully and Tested successfully in Ardour 6.7!

After running the VST3 build I then ran a targeted LV2 build and it didn't provide a lot more details:

Dev64@AVL-MXE-64:~/PACKAGING/CHOWDSP/AnalogTapeModel/Plugin
$ cmake --build build --target CHOWTapeModel_LV2
[ 38%] Built target BinaryData
[ 40%] Built target RTNeural
[ 55%] Built target juce_plugin_modules
[ 86%] Built target CHOWTapeModel
Scanning dependencies of target CHOWTapeModel_LV2_lv2_ttl_generator
[ 87%] Building CXX object CMakeFiles/CHOWTapeModel_LV2_lv2_ttl_generator.dir/modules/JUCE/extras/Build/lv2_ttl_generator/lv2_ttl_generator.c.o
[ 88%] Linking CXX executable CHOWTapeModel_LV2_lv2_ttl_generator
[ 88%] Built target CHOWTapeModel_LV2_lv2_ttl_generator
Scanning dependencies of target CHOWTapeModel_LV2
[ 88%] Building CXX object CMakeFiles/CHOWTapeModel_LV2.dir/modules/JUCE/modules/juce_audio_plugin_client/juce_audio_plugin_client_AAX.cpp.o
[ 90%] Building CXX object CMakeFiles/CHOWTapeModel_LV2.dir/modules/JUCE/modules/juce_audio_plugin_client/juce_audio_plugin_client_LV2.cpp.o
[ 91%] Building CXX object CMakeFiles/CHOWTapeModel_LV2.dir/modules/JUCE/modules/juce_audio_plugin_client/juce_audio_plugin_client_RTAS_1.cpp.o
[ 92%] Building CXX object CMakeFiles/CHOWTapeModel_LV2.dir/modules/JUCE/modules/juce_audio_plugin_client/juce_audio_plugin_client_RTAS_2.cpp.o
[ 93%] Building CXX object CMakeFiles/CHOWTapeModel_LV2.dir/modules/JUCE/modules/juce_audio_plugin_client/juce_audio_plugin_client_RTAS_3.cpp.o
[ 93%] Building CXX object CMakeFiles/CHOWTapeModel_LV2.dir/modules/JUCE/modules/juce_audio_plugin_client/juce_audio_plugin_client_RTAS_4.cpp.o
[ 95%] Building CXX object CMakeFiles/CHOWTapeModel_LV2.dir/modules/JUCE/modules/juce_audio_plugin_client/juce_audio_plugin_client_RTAS_utils.cpp.o
[ 96%] Building CXX object CMakeFiles/CHOWTapeModel_LV2.dir/modules/JUCE/modules/juce_audio_plugin_client/juce_audio_plugin_client_Standalone.cpp.o
[ 97%] Building CXX object CMakeFiles/CHOWTapeModel_LV2.dir/modules/JUCE/modules/juce_audio_plugin_client/juce_audio_plugin_client_Unity.cpp.o
[ 98%] Building CXX object CMakeFiles/CHOWTapeModel_LV2.dir/modules/JUCE/modules/juce_audio_plugin_client/juce_audio_plugin_client_VST2.cpp.o
[ 98%] Building CXX object CMakeFiles/CHOWTapeModel_LV2.dir/modules/JUCE/modules/juce_audio_plugin_client/juce_audio_plugin_client_VST3.cpp.o
[100%] Linking CXX shared module CHOWTapeModel_artefacts/LV2/CHOWTapeModel.lv2/CHOWTapeModel.so
Generate ttl data for './CHOWTapeModel.so', basename: 'CHOWTapeModel'
Segmentation fault
make[3]: *** [CMakeFiles/CHOWTapeModel_LV2.dir/build.make:242: CHOWTapeModel_artefacts/LV2/CHOWTapeModel.lv2/CHOWTapeModel.so] Error 139
make[3]: *** Deleting file 'CHOWTapeModel_artefacts/LV2/CHOWTapeModel.lv2/CHOWTapeModel.so'
make[2]: *** [CMakeFiles/Makefile2:345: CMakeFiles/CHOWTapeModel_LV2.dir/all] Error 2
make[1]: *** [CMakeFiles/Makefile2:352: CMakeFiles/CHOWTapeModel_LV2.dir/rule] Error 2
make: *** [Makefile:191: CHOWTapeModel_LV2] Error 2
Dev64@AVL-MXE-64:~/PACKAGING/CHOWDSP/AnalogTapeModel/Plugin

Also if it is of interest Chow Matrix fails at the exact same point and again VST3 builds successfully:

[ 80%] Building CXX object CMakeFiles/ChowMatrix_LV2.dir/modules/DISTRHO-JUCE/modules/juce_audio_plugin_client/juce_audio_plugin_client_VST2.cpp.o
[ 81%] Building CXX object CMakeFiles/ChowMatrix_LV2.dir/modules/DISTRHO-JUCE/modules/juce_audio_plugin_client/juce_audio_plugin_client_VST3.cpp.o
[ 82%] Linking CXX shared module ChowMatrix_artefacts/LV2/ChowMatrix.lv2/ChowMatrix.so
Generating LV2 Turtle manifest files for ChowMatrix_LV2
Generate ttl data for '/home/Dev64/PACKAGING/CHOWDSP/ChowMatrix/build/ChowMatrix_artefacts/LV2/ChowMatrix.lv2/ChowMatrix.so', basename: 'ChowMatrix'
Segmentation fault
make[2]: *** [CMakeFiles/ChowMatrix_LV2.dir/build.make:242: ChowMatrix_artefacts/LV2/ChowMatrix.lv2/ChowMatrix.so] Error 139
make[2]: *** Deleting file 'ChowMatrix_artefacts/LV2/ChowMatrix.lv2/ChowMatrix.so'
make[1]: *** [CMakeFiles/Makefile2:355: CMakeFiles/ChowMatrix_LV2.dir/all] Error 2
make: *** [Makefile:130: all] Error 2


@jatinchowdhury18
Copy link
Owner

Awesome, great to hear that VST3 builds are working! I've made a little test branch with some added debugging statements to hopefully help us figure out where exactly the program is crashing. Would it be possible to try building the LV2 off that branch, and posting the logs as above? You may need to do git submodule sync and git submodule update --init since some of the changes are in the JUCE submodule.

Thanks,
Jatin

@KottV
Copy link

KottV commented Jun 20, 2021

Using test branch, it crashes on plugin init:

[  316s] [ 80%] Building CXX object CMakeFiles/CHOWTapeModel_LV2.dir/modules/JUCE/modules/juce_audio_plugin_client/juce_audio_plugin_client_VST3.cpp.o
[  316s] [ 81%] Linking CXX shared module CHOWTapeModel_artefacts/LV2/CHOWTapeModel.lv2/CHOWTapeModel.so
[  317s] Generate ttl data for './CHOWTapeModel.so', basename: 'CHOWTapeModel'
[  317s] Creating LV2 files...
[  317s] Initialising plugin...
[  317s] Segmentation fault (core dumped)
[  317s] make[4]: *** [CMakeFiles/CHOWTapeModel_LV2.dir/build.make:242: CHOWTapeModel_artefacts/LV2/CHOWTapeModel.lv2/CHOWTapeModel.so] Error 139
[  317s] make[4]: *** Deleting file 'CHOWTapeModel_artefacts/LV2/CHOWTapeModel.lv2/CHOWTapeModel.so'
[  317s] make[4]: Leaving directory '/usr/src/packages/BUILD/Plugin/build'
[  317s] make[3]: *** [CMakeFiles/Makefile2:345: CMakeFiles/CHOWTapeModel_LV2.dir/all] Error 2
[  317s] make[3]: Leaving directory '/usr/src/packages/BUILD/Plugin/build'
[  317s] make[2]: *** [Makefile:130: all] Error 2
[  317s] make[2]: Leaving directory '/usr/src/packages/BUILD/Plugin/build'
[  317s] make[1]: *** [debian/rules:20: override_dh_auto_build] Error 2
[  317s] make[1]: Leaving directory '/usr/src/packages/BUILD'
[  317s] make: *** [debian/rules:10: build] Error 2

@jatinchowdhury18
Copy link
Owner

Ah okay, that's good to know! From there I guess the next step would be get a backtrace so we could figure out where the seg fault is happening. Usually I would use gdb for this sort of thing, but I'm not really sure how that would work in this case since the ttl generator is running as part of the build process... I'll have to keep thinking about it.

Thanks,
Jatin

@AVLinux
Copy link
Author

AVLinux commented Jun 23, 2021

@jatinchowdhury18

I am very appreciative of your time and efforts in troubleshooting with this. Since Debian 10 will soon be replaced by Debian 11 and since it appears the VST3 and LV2 builds are already working as expected on Debian 11 I wonder if your valuable time is better spent on new development rather than further triage of a soon to be obsolete operating system. @KottV has very generously provided Deb packages with VST3 and Standalone for Debian 10 (and therefore AVL-MXE) and already has Standalone, LV2 and VST3 packages for Debian 11 so we are in pretty good shape here...: )

@jatinchowdhury18
Copy link
Owner

That makes sense! Happy we were able to get VST3 working on AVL for the moment. I'm still a bit curious for my own sake why the LV2 build fails on Debian 10, but I've got a bunch other stuff to worry about for now, so I'll put that on the backburner :). Definitely reach out if you run into any issues as you move to Debian 11!

Thanks,
Jatin

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants