muse-sequencer / muse

MusE is a digital audio workstation with support for both Audio and MIDI
https://muse-sequencer.github.io/
Other
634 stars 67 forks source link

4.2 compilation only succeeds with MODULES_BUILD_STATIC=1 #1247

Closed dvzrv closed 9 months ago

dvzrv commented 9 months ago

Describe the bug Hi! I package this project for Arch Linux. Some time after 4.1 it appears that the linking stage for the main executable fails and now it only succeeds with -D MODULES_BUILD_STATIC=1, whereas before it worked without.

This looks somewhat similar to #772

To Reproduce Steps to reproduce the behavior:

  1. Build using PKGBUILD
[100%] Linking CXX executable muse4
cd /build/muse/src/build/muse && /usr/bin/cmake -E cmake_link_script CMakeFiles/muse.dir/link.txt --verbose=1
/usr/bin/c++ -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fexceptions         -Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security         -fstack-clash-protection -fcf-protection -Wp,-D_GLIBCXX_ASSERTIONS -g -ffile-prefix-map=/build/muse/src=/usr/src/debug/muse -flto=auto -Werror=format-security -Wextra -Winv
alid-pch -fexceptions -Wall -fPIC -Wl,-O1,--sort-common,--as-needed,-z,relro,-z,now -flto=auto CMakeFiles/muse.dir/main.cpp.o CMakeFiles/muse.dir/qrc_resources.cpp.o -o muse4  -Wl,-rpath,/usr/lib/muse/modules libmuse_core.so -linstpatch-1.0 -lgobject-2.0 -lgthread-2.0 -lglib-2.0 -lsndfile midiedit/libmuse_midiedit.so
ctrl/libmuse_ctrl.so function_dialogs/libmuse_widgets_functiondialogs.so ../al/libmuse_al.so arranger/libmuse_arranger.so cliplist/libmuse_cliplist.so driver/libmuse_driver.so -lasound -L/usr/lib -ljack -ljack -lrtaudio instruments/libmuse_instruments.so libmuse_latency_compensator_module.so liste/libmuse_liste.so mar
ker/libmuse_marker.so master/libmuse_master.so mixer/libmuse_mixer.so mplugins/libmuse_mplugins.so ../libs/string/libmuse_string.so ../libs/plugin/libmuse_plugin_cache_writer_module.so ../libs/plugin/libmuse_plugin_rdf_module.so ../libs/plugin/libmuse_plugin_cache_reader_module.so ../libs/plugin/libmuse_plugin_list_mo
dule.so ../libs/plugin/libmuse_plugin_scan_module.so -llrdf ../synti/libsynti/libmuse_synti.so ../libs/wave/libmuse_wave_module.so ../audio_convert/libaudio_converter_plugin.so ../libs/time_stretch/libmuse_time_stretch_module.so waveedit/libmuse_waveedit.so libmuse_wavepreview_module.so components/libmuse_components.s
o libmuse_icons.so -lsamplerate remote/libmuse_remote.so widgets/libmuse_widgets.so /usr/lib/libpython3.11.so -ldl -latomic -llo libmuse_lv2host_module.so ../libs/midnam/libmuse_midnam_module.so ../libs/midi_controller/libmuse_midi_controller_module.so ../libs/mpevent/libmuse_mpevent_module.so ../libs/evdata/libmuse_e
vdata_module.so ../libs/memory/libmuse_memory_module.so ../libs/sysex_helper/libmuse_sysex_helper_module.so ../libs/xml/libmuse_xml_module.so /usr/lib/libQt5UiTools.a /usr/lib//libQt5Widgets.so /usr/lib//libQt5Gui.so /usr/lib//libQt5Core.so /usr/lib//libQt5Widgets.so /usr/lib//libQt5Gui.so /usr/lib//libQt5Core.so /usr
/lib/libGL.so /usr/lib/libQt5Xml.so.5.15.10 /usr/lib/libQt5Svg.so.5.15.10 /usr/lib/libQt5Widgets.so.5.15.10 /usr/lib/libQt5Gui.so.5.15.10 /usr/lib/libQt5Core.so.5.15.10 -llilv-0 -lsord-0 -lserd-0 -lsndfile
/usr/bin/ld: driver/libmuse_driver.so: undefined reference to `MusECore::MidiDevice::latencyCompWriteOffsetMidi(bool) const'
/usr/bin/ld: driver/libmuse_driver.so: undefined reference to `MusECore::MidiDevice::canDominateOutputLatencyMidi(bool) const'
/usr/bin/ld: driver/libmuse_driver.so: undefined reference to `MusECore::MidiDevice::canDominateEndPointLatencyMidi(bool) const'
/usr/bin/ld: driver/libmuse_driver.so: undefined reference to `MusECore::MidiDevice::canPassThruLatencyMidi(bool) const'
/usr/bin/ld: driver/libmuse_driver.so: undefined reference to `MusECore::MidiDevice::canDominateInputLatencyMidi(bool) const'
collect2: error: ld returned 1 exit status
make[2]: *** [muse/CMakeFiles/muse.dir/build.make:388: muse/muse4] Error 1
make[2]: Leaving directory '/build/muse/src/build'
make[1]: *** [CMakeFiles/Makefile2:2220: muse/CMakeFiles/muse.dir/all] Error 2
make[1]: Leaving directory '/build/muse/src/build'
make: *** [Makefile:156: all] Error 2

full build log: muse-4.2.0-1-x86_64-build.log

Expected behavior Build succeeds also without -D MODULES_BUILD_STATIC=1.

Screenshots n/a

Desktop (please complete the following information):

Additional context n/a

terminator356 commented 9 months ago

Hello. A fix has been added to github master. Should soon appear in the AppImage as well.

The five undefined references each were prefaced with the 'inline' keyword, in mididev.cpp The 'inline' keywords have now been removed.

Should hopefully fix the problem. Lemme know how it goes. Thanks for the report.

dvzrv commented 9 months ago

@terminator356 thanks for the quick response!

Applying the inline removal from https://github.com/muse-sequencer/muse/commit/050aa29e4f2f96d5c2723a56ee74dcb22a8f2fe1 indeed fixes the problem!

terminator356 commented 9 months ago

OK Good. Sorry for the trouble. I had been tinkering with 'inline', but then removed it from several places due to problems like these, but I neglected these places.

Funny that no complaints came in, and our AppImage automatically builds fine with them. I suppose different compilers, configurations, distros etc. can cause this to happen.

I might request that @spamatica do another MusE release soon-ish since an error in 4.2 caused the 'simpledrums' MESS synth to be missing from installations.

Re-open if any further trouble. Thanks.

spamatica commented 9 months ago

Cool, I can start that tonight.

/Robert

Den sön 24 sep. 2023 kl 01:41 skrev Tim @.***>:

OK Good. Sorry for the trouble. I had been tinkering with 'inline', but then removed it from several places due to problems like these, but I neglected these places.

Funny that no complaints came in, and our AppImage automatically builds fine with them. I suppose different compilers, configurations, distros etc. can cause this to happen.

I might request that @spamatica https://github.com/spamatica do another MusE release soon-ish since an error in 4.2 caused the 'simpledrums' MESS synth to be missing from installations.

Re-open if any further trouble. Thanks.

— Reply to this email directly, view it on GitHub https://github.com/muse-sequencer/muse/issues/1247#issuecomment-1732433763, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABCFAN4DXAYZN7WYCE6WCJLX35XSRANCNFSM6AAAAAA5EM3FPE . You are receiving this because you were mentioned.Message ID: @.***>