Closed Mailaender closed 3 years ago
I feel like the code in src/libappimage/utils/StringSanitizer.h is not c++11 compliant.
Specifically static constexpr
in c++11 aren't implicitly inline (they are in c++17), hence the link problem because both translation units that use the header get their own definition.
Fixing this ought to be as trivial as prefixing the members with inline
to make them explicitly inline.
@apachelogger thanks, will push a fix soon.
@Mailaender I'll have a look at your problem afterwards.
@apachelogger making those inline triggers a warning that inline variables were a C++17 extension.
src/libappimage/utils/StringSanitizer.h:14:76: warning: inline variables are only available with -std=c++1z or -std=gnu++1z
static inline constexpr std::initializer_list<std::string::value_type> asciiLetters_ = {
Mind to share your version? Otherwise, we can also just make them const
and initialize them in the .cpp
file.
Ah yes, best just make them const with a cpp definition. At a glance inline variables also were only adopted into the standard with c++17 :disappointed:
@apachelogger your issue should be fixed, please open a new issue if the issue persists.
@Mailaender your OBS setup seems to be broken:
I couldn't find any build logs there either. I'll try building it myself in a Tumbleweed container, with the options you provided.
Couldn't find xdg-utils or squashfuse as libraries in Tumbleweed, so I built with cmake -DUSE_SYSTEM_XZ=ON -DUSE_SYSTEM_LIBARCHIVE=ON -DUSE_SYSTEM_SQUASHFUSE=OFF -DUSE_SYSTEM_XDGUTILS=OFF -DUSE_SYSTEM_BOOST=ON ..
. Build works fine there, cannot reproduce the issue...
I fixed the build for squashfuse in https://build.opensuse.org/request/show/823616
I think we can close this now as the commit after the latest release fixes this. I've compiled libappimage myself and have had no linking issues.
Fix confirmed: https://build.opensuse.org/request/show/847938
Should we make a new release then?
Should we make a new release then?
It would be appreciated. I'm still tinkering with the automated build on Launchpad for this one, so it can then be slotted in as a Build-Dep for the AppImageLauncher PPAs and ideally obviate the madness where Debian/Ubuntu still ship v0.1.9 while other (less lazy? yes, packaging is hell but it only gets easier when effort is applied consistently...) distros like Neon do a much better job of keeping pace with upstream releases. Not a huge stumbling block, but dropping patches always feels very satisfying and lessens error potential. :mechanical_arm:
on @openSUSE Tumbleweed
Command line options
See https://build.opensuse.org/package/show/home:Mailaender:branches:system:packagemanager/libappimage for my failed attempts. I tried patching away the static library https://github.com/Mailaender/libappimage/tree/disable-static but that seems to make things worse.