brummer10 / guitarix.vst

guitarix vst3 wrapper for linux
63 stars 1 forks source link

Link error on Fedora 41 beta with the last guitarix vst3 release #33

Open ycollet opened 13 hours ago

ycollet commented 13 hours ago

I tried to build guitarix vst3 on Fedora 41 and met a link problem during the build. Here is the error message:

g++ -o build/Guitarix.vst3/Contents/x86_64-linux/Guitarix.so build/intermediate/Release/include_juce_audio_plugin_client_VST3_dd633589.o  build/Guitarix.a  -Lbuild -Lbuild -lasound -lfreetype -lcurl -lgiomm-2.4 -lgio-2.0 -lglibmm-2.4 -lgobject-2.0 -lsigc-2.0 -lavahi-gobject -lavahi-glib -lglib-2.0 -lavahi-common -lavahi-client -lfftw3f -lsndfile -llilv-0 -fvisibility=hidden -I../../guitarix/trunk/src/headers -lrt -ldl -lpthread  -Wl,-z,relro -Wl,--as-needed  -Wl,-z,pack-relative-relocs -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1  -Wl,--build-id=sha1 -specs=/usr/lib/rpm/redhat/redhat-package-notes   -shared -Wl,--no-undefined  
/usr/bin/ld: build/Guitarix.a(include_juce_audio_formats_15f82001.o): in function `juce::AiffAudioFormat::createMemoryMappedReader(juce::File const&)':
/builddir/build/BUILD/vst3-guitarix-0.3-build/guitarix.vst/Builds/LinuxMakefile/../../JuceModules/modules/juce_core/containers/juce_Array.h:132:(.text.unlikely+0x12f2): undefined reference to `std::unique_ptr<juce::FileInputStream, std::default_delete<juce::FileInputStream> >::~unique_ptr()'
/usr/bin/ld: build/Guitarix.a(include_juce_audio_formats_15f82001.o): in function `juce::WavAudioFormat::createMemoryMappedReader(juce::File const&)':
/builddir/build/BUILD/vst3-guitarix-0.3-build/guitarix.vst/Builds/LinuxMakefile/../../JuceModules/modules/juce_core/containers/juce_Array.h:132:(.text.unlikely+0x1316): undefined reference to `std::unique_ptr<juce::FileInputStream, std::default_delete<juce::FileInputStream> >::~unique_ptr()'
/usr/bin/ld: build/Guitarix.a(include_juce_audio_formats_15f82001.o): in function `juce::AudioFormatManager::createReaderFor(juce::File const&)':
/builddir/build/BUILD/vst3-guitarix-0.3-build/guitarix.vst/Builds/LinuxMakefile/../../JuceModules/modules/juce_core/containers/juce_Array.h:132:(.text.unlikely+0x133a): undefined reference to `std::unique_ptr<juce::FileInputStream, std::default_delete<juce::FileInputStream> >::~unique_ptr()'
/usr/bin/ld: build/Guitarix.a(include_juce_audio_formats_15f82001.o): in function `juce::OggVorbisAudioFormat::estimateOggFileQuality(juce::File const&)':
/builddir/build/BUILD/vst3-guitarix-0.3-build/guitarix.vst/Builds/LinuxMakefile/../../JuceModules/modules/juce_audio_formats/codecs/juce_OggVorbisAudioFormat.cpp:502:(.text.unlikely+0x13b3): undefined reference to `std::unique_ptr<juce::FileInputStream, std::default_delete<juce::FileInputStream> >::~unique_ptr()'
/usr/bin/ld: build/Guitarix.a(include_juce_audio_formats_15f82001.o): in function `juce::WavAudioFormat::replaceMetadataInFile(juce::File const&, juce::StringPairArray const&) [clone .cold]':
/builddir/build/BUILD/vst3-guitarix-0.3-build/guitarix.vst/Builds/LinuxMakefile/../../JuceModules/modules/juce_audio_formats/codecs/juce_WavAudioFormat.cpp:2041:(.text.unlikely+0x1b83): undefined reference to `std::unique_ptr<juce::FileInputStream, std::default_delete<juce::FileInputStream> >::~unique_ptr()'
/usr/bin/ld: build/Guitarix.a(include_juce_audio_formats_15f82001.o):/builddir/build/BUILD/vst3-guitarix-0.3-build/guitarix.vst/Builds/LinuxMakefile/../../JuceModules/modules/juce_audio_formats/codecs/juce_WavAudioFormat.cpp:2074: more undefined references to `std::unique_ptr<juce::FileInputStream, std::default_delete<juce::FileInputStream> >::~unique_ptr()' follow
collect2: error: ld returned 1 exit status
brummer10 commented 13 hours ago

Do you build with the included Juce modules or against a other version? btw. I'm just on the way to update the included modules to 7.0.12

ycollet commented 13 hours ago

I use the included juce modules. This is the spec I used for the build. This one worked fine for Fedora 40. The same gcc version is used between F40 and F41. I will try to check which LDFLAGS is. used during packaging ...

ycollet commented 13 hours ago

For Fedora 41:

LDFLAGS='-Wl,-z,relro -Wl,--as-needed  -Wl,-z,pack-relative-relocs -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1  -Wl,--build-id=sha1 -specs=/usr/lib/rpm/redhat/redhat-package-notes '

For Fedora 40:

LDFLAGS='-Wl,-z,relro -Wl,--as-needed  -Wl,-z,pack-relative-relocs -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1  -Wl,--build-id=sha1 -specs=/usr/lib/rpm/redhat/redhat-package-notes '

Same flags

brummer10 commented 13 hours ago

And did you use -std=gnu++17 check your distribution CXXFLAGS if they overwrite this, c++17 is minimal required, c++20 is the highest supported level.

ycollet commented 13 hours ago

Thanks, I will check that tomorrow evening and will keep you informed :) !