AppImageLauncher
AppImageLauncher copied to clipboard
Error building v. 2.2.0 from sources with -DUSE_SYSTEM_LIBAPPIMAGE=OFF: multiple definitions
Pre-submit checks
- [X] I checked for similar issues beforehand, but could not find any, not even closed ones. I could not add my bug report to any existing issue.
- [X] I am going to take the time to to fill in all the required details. I know that the bug report will be dismissed otherwise.
Describe the bug
Trying to build v. 2.2.0 from appimagelauncher-0f91801.source.tar.xz; I would like make a package for Rosa Fresh 2021.1 (a marginal Mandriva-derivative distribution).
The build fails form while linking libappimage.so with "multiple definition" errors similar to the ones reported in issue #427
/usr/bin/x86_64-rosa-linux-gnu-ld: desktop_integration/CMakeFiles/appimage_desktop_integration.dir/integrator/Integrator.cpp.o:(.rodata+0x0): multiple definition of
ZGRN15StringSanitizer14pathSafeChars_E'; utils/CMakeFiles/appimage_utils.dir/StringSanitizer.cpp.o:(.rodata+0x0): first defined here
/usr/bin/x86_64-rosa-linux-gnu-ld: desktop_integration/CMakeFiles/appimage_desktop_integration.dir/integrator/Integrator.cpp.o:(.rodata+0x8): multiple definition of _ZGRN15StringSanitizer12asciiDigits_E_'; utils/CMakeFiles/appimage_utils.dir/StringSanitizer.cpp.o:(.rodata+0x8): first defined here /usr/bin/x86_64-rosa-linux-gnu-ld: desktop_integration/CMakeFiles/appimage_desktop_integration.dir/integrator/Integrator.cpp.o:(.rodata+0x20): multiple definition of
ZGRN15StringSanitizer13asciiLetters_E'; utils/CMakeFiles/appimage_utils.dir/StringSanitizer.cpp.o:(.rodata+0x20): first defined here
/usr/bin/x86_64-rosa-linux-gnu-ld: desktop_integration/CMakeFiles/appimage_desktop_integration.dir/integrator/DesktopEntryEditor.cpp.o:(.rodata+0x0): multiple definition of _ZGRN15StringSanitizer14pathSafeChars_E_'; utils/CMakeFiles/appimage_utils.dir/StringSanitizer.cpp.o:(.rodata+0x0): first defined here /usr/bin/x86_64-rosa-linux-gnu-ld: desktop_integration/CMakeFiles/appimage_desktop_integration.dir/integrator/DesktopEntryEditor.cpp.o:(.rodata+0x8): multiple definition of
ZGRN15StringSanitizer12asciiDigits_E'; utils/CMakeFiles/appimage_utils.dir/StringSanitizer.cpp.o:(.rodata+0x8): first defined here
/usr/bin/x86_64-rosa-linux-gnu-ld: desktop_integration/CMakeFiles/appimage_desktop_integration.dir/integrator/DesktopEntryEditor.cpp.o:(.rodata+0x20): multiple definition of _ZGRN15StringSanitizer13asciiLetters_E_'; utils/CMakeFiles/appimage_utils.dir/StringSanitizer.cpp.o:(.rodata+0x20): first defined here
(See the attached full build log) BuildError.txt
I'm using gcc 11.2.0 and calling cmake with the following build options: -DENABLE_UPDATE_HELPER=ON -DUSE_SYSTEM_LIBAPPIMAGE=OFF -DUSE_SYSTEM_BOOST=ON -DUSE_SYSTEM_XZ=ON -DUSE_SYSTEM_SQUASHFUSE=ON -DUSE_SYSTEM_LIBARCHIVE=ON -DUSE_SYSTEM_XDGUTILS=ON
No clue about how to avoid the above errors...
Expected behavior
A successful build.
Steps to reproduce the issue
- Install the appimagelauncher-0f91801.source.tar.xz sources
- Run cmake with the following command line:
/usr/bin/cmake .. -DLIB_SUFFIX=64 -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_INSTALL_LIBDIR:PATH=/usr/lib64 '-DCMAKE_MODULE_LINKER_FLAGS=-O2 -fomit-frame-pointer -gdwarf-4 -Wstrict-aliasing=2 -pipe -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -fPIC -fstack-protector-strong --param=ssp-buffer-size=4 -m64 -mtune=generic -Wl,-O2' -DDBUS_SERVICES_DIR=/usr/share/dbus-1/services -DDBUS_INTERFACES_DIR=/usr/share/dbus-1/interfaces -DENABLE_UPDATE_HELPER=ON -DUSE_SYSTEM_LIBAPPIMAGE=OFF -DUSE_SYSTEM_BOOST=ON -DUSE_SYSTEM_XZ=ON -DUSE_SYSTEM_SQUASHFUSE=ON -DUSE_SYSTEM_LIBARCHIVE=ON -DUSE_SYSTEM_XDGUTILS=ON
- Run make
- Watch the linking failure
Screenshots
No response
Distribution and desktop environment
PRETTY_NAME="ROSA Fresh Desktop 12.2" - VERSION="12.2" - Arch: x86_64 HOME_URL="https://www.rosalinux.ru/en/"
plasmashell 5.22.5 - Qt: 5.15.2 - KDE Frameworks: 5.86.0 - kf5-config: 1.0
Installed AppImageLauncher version
None: I'm trying to build it for the first time for my distro...
List of AppImages you tried
None: the AppImageLauncher build fails at the moment...
Additional context
System libappimage is 1.0.3.
Passing -DUSE_SYSTEM_LIBAPPIMAGE=ON to cmake causes it to error out because it cannot find "/usr/lib64/libappimage_hashlib.a"... but this is another issue...
The issue with -DUSE_SYSTEM_LIBAPPIMAGE=ON was caused by a missing package (Rosa put static libraries in packages different from the ones containing the corresponding share libraries).
After installing it and setting -DUSE_SYSTEM_LIBAPPIMAGE to "ON" also solved the build failure I was seeing... So the issue present itself only with -DUSE_SYSTEM_LIBAPPIMAGE=OFF