pyroscope / rtorrent-ps

:art: Extended rTorrent distribution with a fully customizable canvas and colors, other feature additions, and complete docs.
http://rtorrent-ps.readthedocs.io/
GNU General Public License v2.0
466 stars 43 forks source link

Build error on arm32v7/debian:stretch #76

Open devster31 opened 6 years ago

devster31 commented 6 years ago

I'm encountering the below error on a clean system after following instruction and documentation.

checking for XMLRPC-C... failed
configure: error: Could not compile XMLRPC-C test.

and here the entire history of commands ran:

    1  apt update && apt-get install sudo locales lsb-release build-essential pkg-config     subversion git time lsof binutils tmux curl wget     python-setuptools python-virtualenv python-dev     libssl-dev zlib1g-dev libncurses-dev libncursesw5-dev     libcppunit-dev autoconf automake libtool     libffi-dev libxml2-dev libxslt1-dev
    2  git clone https://github.com/pyroscope/rtorrent-ps.git
    3  cd rtorrent-ps/
    4  ./build.sh install
    5  history

The system is a Scaleway server (C1) with an armv7l_armhf CPU (Marvell Armada I believe).

The failure is, as far as I can see, during the building steps for rtorrent itself.

pyroscope commented 6 years ago

Read your configure.log. This is a problem of your environment.

devster31 commented 6 years ago

Here the incriminated log rtorrent-0.9.6/config.log:

configure:18550: checking for XMLRPC-C
configure:18584: g++ -o conftest  -march=armv7-a -mfpu=neon-vfpv4 -mfloat-abi=hard -g -DDEBUG    -I/opt/rtorrent/include -I/opt/rtorrent/include  -I/opt/rtorrent/include  -I /opt/rtorrent/include -pthread -Wl,-rpath,/opt/rtorrent/lib -L/opt/rtorrent/lib conftest.cpp  -lncursesw -lcppunit  -L/opt/rtorrent/lib -lcurl -L/opt/rtorrent/lib -ltorrent -lpthread -L/opt/rtorrent/lib   -lxmlrpc_server -lxmlrpc  -lxmlrpc_xmlparse -lxmlrpc_xmltok -lxmlrpc_util -lpthread  >&5
/opt/rtorrent/lib/libtorrent.so: undefined reference to `torrent::request_list_constants::bucket_count'
/opt/rtorrent/lib/libtorrent.so: undefined reference to `torrent::PeerConnection<(torrent::Download::ConnectionType)1>::offer_chunk()'
/opt/rtorrent/lib/libtorrent.so: undefined reference to `torrent::PeerConnection<(torrent::Download::ConnectionType)0>::offer_chunk()'
/opt/rtorrent/lib/libtorrent.so: undefined reference to `torrent::MemoryChunk::sync_sync'
/opt/rtorrent/lib/libtorrent.so: undefined reference to `torrent::MemoryChunk::sync_async'
collect2: error: ld returned 1 exit status
configure:18584: $? = 1
configure: failed program was:
| /* confdefs.h */
| #define PACKAGE_NAME "rtorrent"
| #define PACKAGE_TARNAME "rtorrent"
| #define PACKAGE_VERSION "0.9.6"
| #define PACKAGE_STRING "rtorrent 0.9.6"
| #define PACKAGE_BUGREPORT "sundell.software@gmail.com"
| #define PACKAGE_URL ""
| #define API_VERSION 9
| #define PACKAGE "rtorrent"
| #define VERSION "0.9.6"
| #define STDC_HEADERS 1
| #define HAVE_SYS_TYPES_H 1
| #define HAVE_SYS_STAT_H 1
| #define HAVE_STDLIB_H 1
| #define HAVE_STRING_H 1
| #define HAVE_MEMORY_H 1
| #define HAVE_STRINGS_H 1
| #define HAVE_INTTYPES_H 1
| #define HAVE_STDINT_H 1
| #define HAVE_UNISTD_H 1
| #define HAVE_DLFCN_H 1
| #define LT_OBJDIR ".libs/"
| #define HAVE_TR1 1
| #define HAVE_CXX11 1
| #define _FILE_OFFSET_BITS 64
| #define USE_EXECINFO 1
| #define USE_VARIABLE_FDSET 1
| #define HAVE_SYS_VFS_H 1
| #define HAVE_SYS_STATVFS_H 1
| #define HAVE_SYS_STATFS_H 1
| #define FS_STAT_FD fstatvfs(fd, &m_stat) == 0
| #define FS_STAT_FN statvfs(fn, &m_stat) == 0
| #define FS_STAT_STRUCT struct statvfs
| #define FS_STAT_SIZE_TYPE unsigned long
| #define FS_STAT_FN statvfs(fn, &m_stat) == 0
| #define FS_STAT_STRUCT struct statvfs
| #define FS_STAT_SIZE_TYPE unsigned long
| #define FS_STAT_COUNT_TYPE fsblkcnt_t
| #define FS_STAT_BLOCK_SIZE (m_stat.f_frsize)
| #define HAVE_PTHREAD_PRIO_INHERIT 1
| #define HAVE_PTHREAD 1
| #define HAVE_NCURSESW 1
| #define HAVE_CURSES 1
| #define HAVE_CURSES_ENHANCED 1
| #define HAVE_CURSES_COLOR 1
| #define HAVE_CURSES_OBSOLETE 1
| #define HAVE_NCURSESW_CURSES_H 1
| /* end confdefs.h.  */
|  #include <xmlrpc-c/server.h>
|
| int
| main ()
| {
|  xmlrpc_registry_new(NULL);
|   ;
|   return 0;
| }
configure:18591: result: failed
configure:18593: error: Could not compile XMLRPC-C test.

This also happens, with the same error output, with the ./build.sh docker_deb arm32v7/debian:stretch (this is needed because of https://github.com/moby/moby/issues/34875 which would otherwise pull an armel image instead of an armhf image as appropriate).

My best guess is that it's related to these lines: https://github.com/pyroscope/rtorrent-ps/blob/66e43c4fbd288412a839330b9470c9fc245d58d2/build.sh#L136-L157 which may not be necessary anymore since gcc is now -ge 6 in arm32v7/debian:stretch.

# gcc --version
gcc (Debian 6.3.0-18+deb9u1) 6.3.0 20170516
Copyright (C) 2016 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
$ gcc --version
gcc (Raspbian 6.3.0-18+rpi1+deb9u1) 6.3.0 20170516
Copyright (C) 2016 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

This line in particular seems to be the culprit https://github.com/pyroscope/rtorrent-ps/blob/66e43c4fbd288412a839330b9470c9fc245d58d2/build.sh#L153 commenting it out seems to solve the issue.

pyroscope commented 6 years ago

@devster31 I need an uname -a instead of the GCC version, and quick (before Sunday) if you want it in the upcoming 1.1 release.