rakshasa / rtorrent

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

Actual up to date build instrunctions, please?? #1273

Open wiegleyj opened 2 months ago

wiegleyj commented 2 months ago

I can't get this to build. It's all guess work. INSTALL references the shell command "./configure && make && make install" but there is no configure shell script.

Oh... autoconf... that throws an error.

Oh... autoreconf -vfi... that throws an error... "apt install autoconf-archive" of course. Great. Now we have a configure script. And it runs and completes with no errors. So...

# make...
make[2]: Entering directory '/root/rtorrent/src'
depbase=`echo main.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'`;\
g++ -std=c++14 -DHAVE_CONFIG_H -I. -I..  -I. -I..   -g -O2 -g -DDEBUG -Wall -pthread   -I/usr/include/x86_64-linux-gnu   -D_DEFAULT_SOURCE -D_XOPEN_SOURCE=600  -MT main.o -MD -MP -MF $depbase.Tpo -c -o main.o main.cc &&\
mv -f $depbase.Tpo $depbase.Po
In file included from main.cc:47:
/usr/include/torrent/http.h:43:10: error: #include expects "FILENAME" or <FILENAME>
   43 | #include lt_tr1_functional
      |          ^~~~~~~~~~~~~~~~~
In file included from main.cc:50:
/usr/include/torrent/poll.h:40:10: error: #include expects "FILENAME" or <FILENAME>
   40 | #include lt_tr1_functional
      |          ^~~~~~~~~~~~~~~~~
In file included from main.cc:52:
/usr/include/torrent/utils/log.h:43:10: error: #include expects "FILENAME" or <FILENAME>
   43 | #include lt_tr1_array`

What's the modern secret to building rtorrent?

kannibalox commented 2 months ago

It looks like the libtorrent headers that were installed into /usr/include/torrent/ haven't been preprocessed. If you're building rtorrent from master, I'd recommend also building libtorrent from master to match, and using those headers instead of wherever the /usr/include/torrent/ ones are coming from.

wiegleyj commented 2 months ago

Alrighty. Thank you. I built libtorrent as you suggested and that did allow rtorrent to build.

I built both with: autoreconf -vfi ./configure make make install

Ubuntu 24.04's install of rtorrent throw a "buffer overflow detected" whenever you try to specify a session directory as well. It looks Ubuntu has some serious problems with their rtorrent/libtorrent build since the libtorrent development headers don't support a raw rtorrent build either.