rakshasa / rtorrent

rTorrent BitTorrent client
https://github.com/rakshasa/rtorrent/wiki
GNU General Public License v2.0
4.05k stars 412 forks source link

How to build without autogen.sh? #1211

Open buggsi opened 1 year ago

buggsi commented 1 year ago

autogen.sh was removed in the latest master, how can we build without it? Please update the INSTALL instructions.

Antorell commented 1 year ago

Try autoreconf -vfi before ./configure

buggsi commented 1 year ago

autoreconf -vfi gives this (trying to build on Alpine 3.14):

configure:8301: error: possibly undefined macro: PKG_CHECK_EXISTS
      If this token and others are legitimate, please use m4_pattern_allow.
      See the Autoconf documentation.
autoreconf: error: /usr/bin/autoconf failed with exit status: 1
Antorell commented 1 year ago

I don't know about Alpline, I'm using ubuntu 2210 headless and it doesn't return any error when I run autoreconf

root@bob:~/old# git clone  https://github.com/rakshasa/libtorrent.git
Cloning into 'libtorrent'...
remote: Enumerating objects: 20062, done.
remote: Counting objects: 100% (343/343), done.
remote: Compressing objects: 100% (192/192), done.
remote: Total 20062 (delta 182), reused 274 (delta 150), pack-reused 19719
Receiving objects: 100% (20062/20062), 10.94 MiB | 10.12 MiB/s, done.
Resolving deltas: 100% (12784/12784), done.
root@bob:~/old# cd libtorrent/
root@bob:~/old/libtorrent# autoreconf -vfi
autoreconf: export WARNINGS=
autoreconf: Entering directory '.'
autoreconf: configure.ac: not using Gettext
autoreconf: running: aclocal --force -I scripts
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, 'scripts'.
libtoolize: copying file 'scripts/libtool.m4'
libtoolize: copying file 'scripts/ltoptions.m4'
libtoolize: copying file 'scripts/ltsugar.m4'
libtoolize: copying file 'scripts/ltversion.m4'
libtoolize: copying file 'scripts/lt~obsolete.m4'
autoreconf: configure.ac: not using Intltool
autoreconf: configure.ac: not using Gtkdoc
autoreconf: running: aclocal --force -I scripts
autoreconf: running: /usr/bin/autoconf --force
autoreconf: running: /usr/bin/autoheader --force
autoreconf: running: automake --add-missing --copy --force-missing
configure.ac:7: installing './compile'
configure.ac:7: installing './config.guess'
configure.ac:7: installing './config.sub'
configure.ac:5: installing './install-sh'
configure.ac:5: installing './missing'
src/Makefile.am: installing './depcomp'
autoreconf: Leaving directory '.'
root@bob:~/old/libtorrent#
buggsi commented 1 year ago

@Antorell you showed me the building of libtorrent, I was trying rtorrent. I also tried to autoreconf -vfi on Ubuntu 22.04, and I got the same error.

Antorell commented 1 year ago

It doesn't cause any issue with rtorrent either.

root@bob:~/old# git clone  https://github.com/rakshasa/rtorrent.git
Cloning into 'rtorrent'...
remote: Enumerating objects: 11948, done.
remote: Counting objects: 100% (2670/2670), done.
remote: Compressing objects: 100% (875/875), done.
remote: Total 11948 (delta 2117), reused 1795 (delta 1795), pack-reused 9278
Receiving objects: 100% (11948/11948), 4.39 MiB | 11.87 MiB/s, done.
Resolving deltas: 100% (8915/8915), done.
root@bob:~/old# cd rtorrent/
root@bob:~/old/rtorrent# autoreconf -vfi
autoreconf: export WARNINGS=
autoreconf: Entering directory '.'
autoreconf: configure.ac: not using Gettext
autoreconf: running: aclocal --force -I scripts
autoreconf: configure.ac: tracing
autoreconf: configure.ac: not using Libtool
autoreconf: configure.ac: not using Intltool
autoreconf: configure.ac: not using Gtkdoc
autoreconf: running: /usr/bin/autoconf --force
autoreconf: running: /usr/bin/autoheader --force
autoreconf: running: automake --add-missing --copy --force-missing
configure.ac:11: installing './compile'
configure.ac:41: installing './config.guess'
configure.ac:41: installing './config.sub'
configure.ac:5: installing './install-sh'
configure.ac:5: installing './missing'
src/Makefile.am: installing './depcomp'
parallel-tests: installing './test-driver'
autoreconf: Leaving directory '.'

Edit: @buggsi check if you're not missing a package or something. I have these packages apt install build-essential libssl-dev libcppunit-dev libsigc++-2.0-dev autogen automake libtool libcurl4-openssl-dev libncurses-dev zlib1g-dev autoconf-archive bison flex libelf-dev

buggsi commented 1 year ago

I have several of those packages installed, the one that fixed it was autoconf-archive, on alpine and ubuntu. Now I have another problem with make, but that's another story. Thanks a lot for the help.

buggsi commented 1 year ago

It looks like building rtorrent master with libtorrent v0.13.8 fails. However, it builds ok with libtorrent master.

WagnerGMD commented 1 year ago

1) The first attempt with "autoreconf -fi;" :

configure:7411: error: possibly undefined macro: PKG_CHECK_EXISTS
      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

2) The second attempt with "autoreconf -vfi;" :

autoreconf: Entering directory `.'
autoreconf: configure.ac: not using Gettext
autoreconf: running: aclocal --force -I scripts
autoreconf: configure.ac: tracing
autoreconf: configure.ac: not using Libtool
autoreconf: running: /usr/bin/autoconf --force
configure:7411: error: possibly undefined macro: PKG_CHECK_EXISTS
      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

3) Check if they are available ?

apt show autogen autoconf-archive flex libelf-dev | egrep 'Package|Version|APT-Sources';
apt show libncurses-dev libsigc++-2.0-dev libssl-dev | egrep 'Package|Version|APT-Sources';

4) Which one cause the trouble ?

apt install autogen automake autoconf-archive bison build-essential flex libelf-dev;
apt install libcppunit-dev libcurl4-openssl-dev libncurses-dev libsigc++-2.0-dev libssl-dev libtool zlib1g-dev;
apt install autogen autoconf-archive flex libelf-dev;

To resume when you met this kind of mistake, it will be solve after the installation of these packages. According to my memories, the latest one was "autoconf-archive" then I was able to compile (the master branch of rtorrent).

PS : Still nothing since 2022 ? Remain one month ? Almost (8 days) because the latest release was publihsed several years ago (the 19 July 2019).

kruzda commented 7 months ago

What made it work for me was removing the line AX_REQUIRE_DEFINED([PKG_CHECK_EXISTS]) from ax_with_curses.m4 as it is suggested here in this now closed Issue: https://github.com/rakshasa/rtorrent/issues/1110#issuecomment-1823041446

Doing that presumably disables the use to that macro entirely so no checking for ncurses happens afaict

WagnerGMD commented 4 months ago

Thank you @kruzda that's provide probably another solution for the people which use Fedora. But I don't use it at all that's why I can't compare (neither tell) at the contrary of Debian and Ubuntu (we can found very often one solution for the both because basically they are similar). As today I don't plan a new clean reinstall for a long time and from my point of view, it's must rectify inside rtorrent (it's remain 5 months (still nothing (absent) = none hope for one new release until the 19 July 2024)).