ahodesuka / ahoviewer

A GTK image viewer, manga reader, and booru browser
MIT License
486 stars 31 forks source link

Incompatibility with latest libconfig #55

Closed cryzed closed 7 years ago

cryzed commented 7 years ago

Fails to build with libconfig version 1.5-3 on Arch Linux:

[...]
ahoviewer-settings.o: In function `AhoViewer::SettingsManager::get_sites()':
settings.cc:(.text+0x17c0): undefined reference to `libconfig::Setting::operator std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >() const'
settings.cc:(.text+0x17da): undefined reference to `libconfig::Setting::operator std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >() const'
collect2: error: ld returned 1 exit status
make[2]: *** [Makefile:469: ahoviewer] Error 1
make[1]: *** [Makefile:338: all] Error 2
make: *** [Makefile:425: all-recursive] Error 1
ahodesuka commented 7 years ago

This seems to be an issue with gcc. libconfig was probably compiled with gcc 4 and you're trying to compile ahoviewer with gcc 5. You can try setting the CXXFLAGS before running ./configure like so CXXFLAGS=-D_GLIBCXX_USE_CXX11_ABI=0 ./configure and see if that fixes it.

OrdinaryMagician commented 7 years ago

I tried that myself, it fails to link all other libraries when using that.

Thanks, Arch.

OrdinaryMagician commented 7 years ago

Arch's libconfig package has been outdated for a year now. I've tried to talk about this on the Arch IRC but I've only received snarky comments and unfunny jokes.

This goddamn distro and its entire community are such a pain in the ass.

I think the best we can do is just download the package source for libconfig and recompile it.

ahodesuka commented 7 years ago

I think the best we can do is just download the package source for libconfig and recompile it.

That's what I'd recommend.

cryzed commented 7 years ago

@OrdinaryMagician if you aren't too fed up with Arch yet, I customized the PKGBUILD which conflicts/provides libconfig 1.6 and replaces the official package until it gets updated. You can find it here: https://gist.github.com/cryzed/2c5c954e40e285773d29c16c04cdca4c

Compiling the latest ahoviewer-git from AUR works with it. I also contacted the maintainer, arojas, on IRC and linked him the same gist and asked that he update it at some point.