ahodesuka / ahoviewer

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

Can't compile it on Void Linux. #76

Closed mamimi0 closed 5 years ago

mamimi0 commented 5 years ago
[@Thinkpad ahoviewer-1.6.4]$ ./bootstrap 
autoreconf: Entering directory `.'
autoreconf: configure.ac: not using Gettext
autoreconf: running: aclocal --force 
version.sh: 24: version.sh: [[: not found
version.sh: 24: version.sh: -f: not found
version.sh: 24: version.sh: [[: not found
version.sh: 24: version.sh: -f: not found
autoreconf: configure.ac: tracing
version.sh: 24: version.sh: [[: not found
version.sh: 24: version.sh: -f: not found
autoreconf: configure.ac: not using Libtool
autoreconf: running: /usr/bin/autoconf --force
version.sh: 24: version.sh: [[: not found
version.sh: 24: version.sh: -f: not found
configure.ac:63: error: possibly undefined macro: AC_MSG_ERROR
      If this token and others are legitimate, please use m4_pattern_allow.
      See the Autoconf documentation.
autoreconf: /usr/bin/autoconf failed with exit status: 1
[@Thinkpad ahoviewer-1.6.4]$ 
[@Thinkpad ahoviewer-1.6.4]$ sudo xbps-query -s libtool
[*] libtool-2.4.6_2       Generic library support script
[@Thinkpad ~]$ sudo xbps-query -s libconfig++
[*] libconfig++-1.7.2_2 C++ Configuration File Library
[@Thinkpad ahoviewer-1.6.4]$ sudo xbps-query  -s gettext
[*] gettext-0.19.8.1_4      Internationalized Message Handling Library and tools
[*] gettext-libs-0.19.8.1_4 Internationalized Message Handling Library and tools - shared librarie

I tried setting LT_INIT on configure.ac, still it won't compile but at least it uses libtool.

autoreconf: Entering directory `.'
autoreconf: configure.ac: not using Gettext
autoreconf: running: aclocal --force 
version.sh: 24: version.sh: [[: not found
version.sh: 24: version.sh: -f: not found
version.sh: 24: version.sh: [[: not found
version.sh: 24: version.sh: -f: not found
autoreconf: configure.ac: tracing
version.sh: 24: version.sh: [[: not found
version.sh: 24: version.sh: -f: not found
autoreconf: running: libtoolize --copy --force
libtoolize: putting auxiliary files in '.'.
libtoolize: copying file './ltmain.sh'
libtoolize: putting macros in AC_CONFIG_MACRO_DIRS, 'm4'.
libtoolize: copying file 'm4/libtool.m4'
libtoolize: copying file 'm4/ltoptions.m4'
libtoolize: copying file 'm4/ltsugar.m4'
libtoolize: copying file 'm4/ltversion.m4'
libtoolize: copying file 'm4/lt~obsolete.m4'
libtoolize: Consider adding '-I m4' to ACLOCAL_AMFLAGS in Makefile.am.
version.sh: 24: version.sh: [[: not found
version.sh: 24: version.sh: -f: not found
version.sh: 24: version.sh: [[: not found
version.sh: 24: version.sh: -f: not found
autoreconf: running: /usr/bin/autoconf --force
version.sh: 24: version.sh: [[: not found
version.sh: 24: version.sh: -f: not found
configure.ac:64: error: possibly undefined macro: AC_MSG_ERROR
      If this token and others are legitimate, please use m4_pattern_allow.
      See the Autoconf documentation.
autoreconf: /usr/bin/autoconf failed with exit status: 1
[@Thinkpad ahoviewer-1.6.4]$ 

I don't even know anymore.

ahodesuka commented 5 years ago
version.sh: 24: version.sh: [[: not found
version.sh: 24: version.sh: -f: not found

Makes it look like your /bin/bash is busted.

Try the following and post the results:

libtoolize --force
aclocal
autoheader
automake --force-missing --add-missing
autoconf
mamimi0 commented 5 years ago

Let's see.

@Thinkpad ahoviewer-1.6.4]$ 
libtoolize --force
libtoolize: putting auxiliary files in '.'.
libtoolize: linking file './ltmain.sh'
libtoolize: putting macros in AC_CONFIG_MACRO_DIRS, 'm4'.
libtoolize: linking file 'm4/libtool.m4'
libtoolize: linking file 'm4/ltoptions.m4'
libtoolize: linking file 'm4/ltsugar.m4'
libtoolize: linking file 'm4/ltversion.m4'
libtoolize: linking file 'm4/lt~obsolete.m4'
libtoolize: Remember to add 'LT_INIT' to configure.ac.
libtoolize: Consider adding '-I m4' to ACLOCAL_AMFLAGS in Makefile.am.
version.sh: 24: version.sh: [[: not found
version.sh: 24: version.sh: -f: not found
version.sh: 24: version.sh: [[: not found
version.sh: 24: version.sh: -f: not found
[@Thinkpad ahoviewer-1.6.4]$ autoheader
[@Thinkpad ahoviewer-1.6.4]$ 
[@Thinkpad ahoviewer-1.6.4]$ automake --force-missing --add-missing
version.sh: 24: version.sh: [[: not found
version.sh: 24: version.sh: -f: not found
configure.ac:6: installing './config.guess'
configure.ac:6: installing './config.sub'
configure.ac:7: installing './install-sh'
configure.ac:7: installing './missing'
src/Makefile.am: installing './depcomp'
[@Thinkpad ahoviewer-1.6.4]$ 
[@Thinkpad ahoviewer-1.6.4]$ autoconf
configure.ac:63: error: possibly undefined macro: AC_MSG_ERROR
      If this token and others are legitimate, please use m4_pattern_allow.
      See the Autoconf documentation.

Shell: bash 4.4.23

ahodesuka commented 5 years ago

Try changing line 24 of version.sh to: if [ "$VERSION" != "$OLD_VERSION" ] || [ ! -f "src/version.h" ]

mamimi0 commented 5 years ago
[@Thinkpad ahoviewer-1.6.4]$ ./bootstrap 
autoreconf: Entering directory `.'
autoreconf: configure.ac: not using Gettext
autoreconf: running: aclocal --force 
autoreconf: configure.ac: tracing
autoreconf: configure.ac: not using Libtool
autoreconf: running: /usr/bin/autoconf --force
configure.ac:63: error: possibly undefined macro: AC_MSG_ERROR
      If this token and others are legitimate, please use m4_pattern_allow.
      See the Autoconf documentation.
autoreconf: /usr/bin/autoconf failed with exit status: 1

Nice, the version.sh error is gone now, but still won't compile.

ahodesuka commented 5 years ago

Are you sure you have all these dependencies installed?

gtkmm-2.4
glibmm-2.4
libconfig++
libcurl
libxml2
mamimi0 commented 5 years ago
[@Thinkpad ~]$ sudo xbps-install gtkmm glibmm libconfig++ libcurl libxml2
Password: 
Package `gtkmm' already installed.
Package `glibmm' already installed.
Package `libconfig++' already installed.
Package `libcurl' already installed.
Package `libxml2' already installed.

Yep, I have glibmm-2.58 and gtkmm3-24 tho, I'm more convinced it's a libconfig issue.

ahodesuka commented 5 years ago

You need gtkmm2.

mamimi0 commented 5 years ago

Should gtkmm2-2.24.5_3 C++ work right? I have installed it, but still won't compile...

ahodesuka commented 5 years ago

Do you have openssl or gnutls installed? By default ahoviewer assumes you use openssl, so if you have gnutls you need to run the bootstrap like this ./bootstrap --enable-gnutls

mamimi0 commented 5 years ago

I have gnutls, I tried ./bootstrap --enable-gnutls but still it won't compile, perhaps you can't just compile it on Void haha, I'm going to ask on the Void Forum, I'm probably missing something and I still haven't noticed, I will update if I find a solution.

Void uses LibreSSL if that's relevant.

ahodesuka commented 5 years ago

With ./bootstrap --enable-gnutls what is the error message? Although I have not tried it personally, I am pretty sure ahoviewer compiles with LibreSSL. You should also try ./bootstrap --disable-ssl

mamimi0 commented 5 years ago

It's always the same error:

configure.ac:65: error: possibly undefined macro: AC_MSG_ERROR
      If this token and others are legitimate, please use m4_pattern_allow.
      See the Autoconf documentation.
autoreconf: /usr/bin/autoconf failed with exit status: 1

Apparently it won't use gettext or something.

[@Thinkpad ahoviewer-1.6.4]$ ./bootstrap --disable-ssl
autoreconf: Entering directory `.'
autoreconf: configure.ac: not using Gettext
autoreconf: running: aclocal --force 
autoreconf: configure.ac: tracing
autoreconf: running: libtoolize --copy --force
libtoolize: putting auxiliary files in '.'.
libtoolize: copying file './ltmain.sh'
libtoolize: putting macros in AC_CONFIG_MACRO_DIRS, 'm4'.
libtoolize: copying file 'm4/libtool.m4'
libtoolize: copying file 'm4/ltoptions.m4'
libtoolize: copying file 'm4/ltsugar.m4'
libtoolize: copying file 'm4/ltversion.m4'
libtoolize: copying file 'm4/lt~obsolete.m4'
libtoolize: Consider adding '-I m4' to ACLOCAL_AMFLAGS in Makefile.am.
autoreconf: running: /usr/bin/autoconf --force
configure.ac:65: error: possibly undefined macro: AC_MSG_ERROR
      If this token and others are legitimate, please use m4_pattern_allow.
      See the Autoconf documentation.
autoreconf: /usr/bin/autoconf failed with exit status: 1

I found this thread https://unix.stackexchange.com/questions/30748/configure-ac-not-using-gettext If you force it with Writing AM_GNU_GETTEXT_VERSION and AM_GNU_GETTEXT_REQUIRE_VERSION (to the configure.ac file).

[@Thinkpad ahoviewer-1.6.4]$ ./bootstrap 
autoreconf: Entering directory `.'
autoreconf: running: autopoint --force
Can't exec "autopoint": No such file or directory at /usr/share/autoconf/Autom4te/FileUtils.pm line 345.
autoreconf: failed to run autopoint: No such file or directory
autoreconf: autopoint is needed because this package uses Gettext

It'll say it can't find autopoint, supposely autopoint should come with Gettext.

ahodesuka commented 5 years ago

This isn't a compiling issue, autotools (autoconf) is failing to even generate a configure file. The version.sh issue has been fixed so this now just seems to be an issue with Void Linux's version of autoconf. Here is the output I have when running ./bootstrap

autoreconf-2.69: Entering directory `.'              
autoreconf-2.69: configure.ac: not using Gettext
autoreconf-2.69: running: aclocal --force 
autoreconf-2.69: configure.ac: tracing
autoreconf-2.69: configure.ac: not using Libtool
autoreconf-2.69: running: /usr/bin/autoconf-2.69 --force
autoreconf-2.69: running: /usr/bin/autoheader-2.69 --force
autoreconf-2.69: running: automake --add-missing --copy --force-missing
configure.ac:6: installing './config.guess'
configure.ac:6: installing './config.sub'
configure.ac:7: installing './install-sh'
configure.ac:7: installing './missing'
src/Makefile.am: installing './depcomp'
autoreconf-2.69: Leaving directory `.'
...

You could try deleting line 58 to 78 in the original configure.ac and see if it configures correctly.

mamimi0 commented 5 years ago

I'm back, after compiling libgsic++, and the rest of the dependencies manually and installing libconfig++-devel and libcurl-devel I'm able to compile it. I'm so sorry for causing you so much trouble, Dev-kun. Thanks for your time.

ahodesuka commented 5 years ago

libgsic++ should have been pulled in by your package manager when gtkmm was installed, but I'll go ahead and add it to the list of dependencies in the readme.