Ticket #2127 (closed defect: worksforme)

Opened 23 months ago

Last modified 10 months ago

freebsd libtorrent compile of trunk

Reported by: jedgainer@gmail.com Owned by: rakshasa
Priority: normal Component: libtorrent
Version: Severity: normal
Keywords: Cc:

Description (last modified by rakshasa) (diff)

i3d# ./autogen.sh
aclocal...
aclocal not found
i3d# pkg_add -r autotools
Fetching ftp://ftp.freebsd.org/pub/FreeBSD/ports/amd64/packages-7.2-release/Latest/autotools.tbz... Done.
Fetching ftp://ftp.freebsd.org/pub/FreeBSD/ports/amd64/packages-7.2-release/All/automake-wrapper-20071109.tbz... Done.
Fetching ftp://ftp.freebsd.org/pub/FreeBSD/ports/amd64/packages-7.2-release/All/autoconf-wrapper-20071109.tbz... Done.
Fetching ftp://ftp.freebsd.org/pub/FreeBSD/ports/amd64/packages-7.2-release/All/autoconf-2.62.tbz... Done.
Fetching ftp://ftp.freebsd.org/pub/FreeBSD/ports/amd64/packages-7.2-release/All/automake-1.9.6_3.tbz... Done.
Fetching ftp://ftp.freebsd.org/pub/FreeBSD/ports/amd64/packages-7.2-release/All/automake-1.8.5_3.tbz... Done.
Fetching ftp://ftp.freebsd.org/pub/FreeBSD/ports/amd64/packages-7.2-release/All/automake-1.7.9_2.tbz... Done.
Fetching ftp://ftp.freebsd.org/pub/FreeBSD/ports/amd64/packages-7.2-release/All/automake-1.6.3_1.tbz... Done.
Fetching ftp://ftp.freebsd.org/pub/FreeBSD/ports/amd64/packages-7.2-release/All/automake-1.5_5,1.tbz... Done.
Fetching ftp://ftp.freebsd.org/pub/FreeBSD/ports/amd64/packages-7.2-release/All/automake-1.4.6_5.tbz... Done.
Fetching ftp://ftp.freebsd.org/pub/FreeBSD/ports/amd64/packages-7.2-release/All/automake-1.10.1.tbz... Done.
Fetching ftp://ftp.freebsd.org/pub/FreeBSD/ports/amd64/packages-7.2-release/All/autoconf-2.13.000227_6.tbz... Done.
i3d# rehash
i3d# ./autogen.sh
aclocal...
/usr/local/share/aclocal/glib.m4:8: warning: underquoted definition of AM_PATH_GLIB
/usr/local/share/aclocal/glib.m4:8:   run info '(automake)Extending aclocal'
/usr/local/share/aclocal/glib.m4:8:   or see http://sources.redhat.com/automake/automake.html#Extending-aclocal
configure.ac:20: warning: macro `AM_PATH_CPPUNIT' not found in library
autoheader...
libtoolize... using libtoolize
automake...
configure.ac:18: installing `./install-sh'
configure.ac:18: installing `./missing'
src/Makefile.am: installing `./depcomp'
autoconf...
configure.ac:20: error: possibly undefined macro: AM_PATH_CPPUNIT
      If this token and others are legitimate, please use m4_pattern_allow.
      See the Autoconf documentation.
ready to configure
i3d# ./configure
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... ./install-sh -c -d
checking for gawk... no
checking for mawk... no
checking for nawk... nawk
checking whether make sets $(MAKE)... yes
./configure: 2611: Syntax error: word unexpected (expecting ")")
i3d# uname -a
FreeBSD i3d 7.2-RELEASE FreeBSD 7.2-RELEASE #0: Fri May  1 07:18:07 UTC 2009     root@driscoll.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC  amd64
i3d#

Change History

  Changed 23 months ago by anonymous

I'm also having the same problem on debian:

./autogen.sh aclocal... aclocal:configure.ac:20: warning: macro `AM_PATH_CPPUNIT' not found in library autoheader... libtoolize... using libtoolize automake... autoconf... configure.ac:20: error: possibly undefined macro: AM_PATH_CPPUNIT

If this token and others are legitimate, please use m4_pattern_allow. See the Autoconf documentation.

ready to configure

  Changed 23 months ago by calico@noichi.net

On my Ubuntu server 8.10 distribution, I had this error too. I just installed libcppunit-dev package to solve the problem

  Changed 23 months ago by rakshasa

  • description modified (diff)

At the moment you need cppunit installed to generate the configure scripts.

  Changed 23 months ago by anonymous

Installed /usr/ports/devel/cppunit still no dice.

i3d# ./autogen.sh
aclocal...
/usr/local/share/aclocal/glib.m4:8: warning: underquoted definition of AM_PATH_GLIB
/usr/local/share/aclocal/glib.m4:8:   run info '(automake)Extending aclocal'
/usr/local/share/aclocal/glib.m4:8:   or see http://sources.redhat.com/automake/automake.html#Extending-aclocal
autoheader...
libtoolize... using libtoolize
automake...
autoconf...
ready to configure
i3d# ./configure
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... ./install-sh -c -d
checking for gawk... no
checking for mawk... no
checking for nawk... nawk
checking whether make sets $(MAKE)... yes
checking for cppunit-config... /usr/local/bin/cppunit-config
checking for Cppunit - version >= 1.9.6... 1.12.1
./configure: 2783: Syntax error: word unexpected (expecting ")")
i3d#

  Changed 23 months ago by anonymous

Tried to install cppunit trunk and ran into same problem I am having with libtorrent, lol!

i3d# ./configure
./configure: Command not found.
i3d# ls
.svn                    COPYING                 INSTALL                 INSTALL-unix            README                  THANKS                  autoupd.sh              contrib                 cppunit.m4              devtools                include
AUTHORS                 ChangeLog               INSTALL-VS.Net2008.txt  Makefile.am             README.CVS              TODO                    config                  cppunit-config.1        cppunit.pc.in           doc                     lib
BUGS                    CodingGuideLines.txt    INSTALL-WIN32.txt       NEWS                    README.sourceforge      autogen.sh              configure.in            cppunit-config.in       cppunit.spec.in         examples                src
i3d# ./autogen.sh
/usr/local/share/aclocal/glib.m4:8: warning: underquoted definition of AM_PATH_GLIB
/usr/local/share/aclocal/glib.m4:8:   run info '(automake)Extending aclocal'
/usr/local/share/aclocal/glib.m4:8:   or see http://sources.redhat.com/automake/automake.html#Extending-aclocal
Putting files in AC_CONFIG_AUX_DIR, `config'.
configure.in:41: installing `config/install-sh'
configure.in:41: installing `config/missing'
doc/Makefile.am:18: htmldir was already defined in condition TRUE, which includes condition DOC ...
configure.in:2: ... `htmldir' previously defined here
examples/cppunittest/Makefile.am: installing `config/depcomp'
i3d# ./configure
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... config/install-sh -c -d
checking for gawk... no
checking for mawk... no
checking for nawk... nawk
checking whether make sets $(MAKE)... yes
checking whether make sets $(MAKE)... (cached) yes
checking for a BSD-compatible install... /usr/bin/install -c
checking for gcc... gcc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables...
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking for style of include used by make... GNU
checking dependency style of gcc... gcc3
checking for g++... g++
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking dependency style of g++... gcc3
checking build system type... amd64-unknown-freebsd7.2
checking host system type... amd64-unknown-freebsd7.2
./configure: 4691: Syntax error: word unexpected (expecting ")")

  Changed 23 months ago by anonymous

I fixed this problem on debian by install cppunit from source. Its avaiable on source forge. svn co  https://cppunit.svn.sourceforge.net/svnroot/cppunit/trunk/cppunit

then ./autogen.sh ./configure make && make install

But now it falls over with a fallocate error. Looks like this error is being experiance by others too

  Changed 23 months ago by anonymous

on Debian run apt-get install libcppunit-dev

  Changed 23 months ago by Artifex Maximus <artifex@freemail.hu>

I have the ports below installed and compile without problem with bundled gcc 4.2 see #2095:

# pkg_info | egrep '^(cppunit|automake|autoconf|libsigc|curl)'
autoconf-2.62       Automatically configure source code on many Un*x platforms
autoconf-wrapper-20071109 Wrapper script for GNU autoconf
automake-1.10.1     GNU Standards-compliant Makefile generator (1.10)
automake-1.4.6_5    GNU Standards-compliant Makefile generator (1.4)
automake-1.5_5,1    GNU Standards-compliant Makefile generator (1.5)
automake-1.9.6_3    GNU Standards-compliant Makefile generator (1.9)
automake-wrapper-20071109 Wrapper script for GNU automake
cppunit-1.12.1      C++ port of the JUnit framework for unit testing
curl-7.19.7_1       Non-interactive tool to get files from FTP, GOPHER, HTTP(S)
libsigc++-2.2.4.2   Callback Framework for C++

I believe that one automake is enough but for some dependencies the system have installed all.

follow-up: ↓ 16   Changed 23 months ago by anonymous

i3d# pkg_add -r libsigc++
Fetching ftp://ftp.freebsd.org/pub/FreeBSD/ports/amd64/packages-7.2-release/Latest/libsigc++.tbz... Done.
i3d# pkg_info | egrep '^(cppunit|automake|autoconf|libsigc|curl)'
autoconf-2.13.000227_6 Automatically configure source code on many Un*x platforms
autoconf-2.62       Automatically configure source code on many Un*x platforms
autoconf-wrapper-20071109 Wrapper script for GNU autoconf
automake-1.10.1     GNU Standards-compliant Makefile generator (1.10)
automake-1.4.6_5    GNU Standards-compliant Makefile generator (1.4)
automake-1.5_5,1    GNU Standards-compliant Makefile generator (1.5)
automake-1.6.3_1    GNU Standards-compliant Makefile generator (1.6)
automake-1.7.9_2    GNU Standards-compliant Makefile generator (1.7)
automake-1.8.5_3    GNU Standards-compliant Makefile generator (1.8)
automake-1.9.6_3    GNU Standards-compliant Makefile generator (1.9)
automake-wrapper-20071109 Wrapper script for GNU automake
cppunit-1.12.1      C++ port of the JUnit framework for unit testing
curl-7.19.4         Non-interactive tool to get files from FTP, GOPHER, HTTP(S)
libsigc++-1.0.4_1   Callback Framework for C++
libsigc++-2.2.3     Callback Framework for C++
i3d#

Only thing different I see is I have older libsigc, I just updated ports tree and installed the libsigc++ port but I still do not have the version you do. Did you install it from source?

  Changed 23 months ago by anonymous

i get the error too on ubuntu, even with libcppunit-dev 1.12.1-1 installed

  Changed 23 months ago by anonymous

Yeah i got past the CPPUNIT errors during autogen by installing from source using the above link. I'm not getting fallocate errors.

socket_file.cc: In member function âbool torrent::SocketFile::set_size(uint64_t, int) constâ:
socket_file.cc:105: error: âfallocateâ was not declared in this scope
make[3]: *** [socket_file.lo] Error 1
make[3]: Leaving directory `/torrent/rtorrent-svn/trunk/libtorrent/src/data'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/torrent/rtorrent-svn/trunk/libtorrent/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/torrent/rtorrent-svn/trunk/libtorrent'
make: *** [all] Error 2

  Changed 23 months ago by Martin van Nostrand

Make sure your trunk is up to date, r1147 contains a change related to fallocate.

  Changed 23 months ago by anonymous

good spotting but nope still getting the same error

  Changed 23 months ago by anonymous

ok, I downloaded the tar.gz files (both libtorrent/rtorrent) and it all installed fine. So there may be an issue with trunk?

  Changed 23 months ago by scar

still having the problem with r1148. if i comment out line 20 in configure.ac, i can ./configure. but when i make, i get this error:

make[3]: Entering directory `/home/scar/src/libtorrent/src/data'
/bin/bash ../../libtool --tag=CXX   --mode=compile g++ -DHAVE_CONFIG_H -I. -I../.. -I. -I./.. -I../..    -g -O2 -g -DDEBUG -fvisibility=hidden   -I/usr/include/sigc++-2.0 -I/usr/lib/sigc++-2.0/include   -MT socket_file.lo -MD -MP -MF .deps/socket_file.Tpo -c -o socket_file.lo socket_file.cc
libtool: compile:  g++ -DHAVE_CONFIG_H -I. -I../.. -I. -I./.. -I../.. -g -O2 -g -DDEBUG -fvisibility=hidden -I/usr/include/sigc++-2.0 -I/usr/lib/sigc++-2.0/include -MT socket_file.lo -MD -MP -MF .deps/socket_file.Tpo -c socket_file.cc  -fPIC -DPIC -o .libs/socket_file.o
socket_file.cc: In member function ‘bool torrent::SocketFile::set_size(uint64_t, int) const’:
socket_file.cc:109: error: ‘fallocate’ was not declared in this scope
make[3]: *** [socket_file.lo] Error 1
make[3]: Leaving directory `/home/scar/src/libtorrent/src/data'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/home/scar/src/libtorrent/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/scar/src/libtorrent'
make: *** [all] Error 2

in reply to: ↑ 9 ; follow-up: ↓ 17   Changed 23 months ago by Artifex Maximus <artifex@freemail.hu>

Replying to anonymous:

Only thing different I see is I have older libsigc, I just updated ports tree and installed the libsigc++ port but I still do not have the version you do. Did you install it from source?

Yes, I did. And I'm on x86 not amd64.

BTW, I've just finished compiling r1148 without any error.

./configure: 2783: Syntax error: word unexpected (expecting ")")

What is in line 2783 or near that line which might cause this error?

in reply to: ↑ 16 ; follow-ups: ↓ 20 ↓ 22   Changed 23 months ago by scar

Replying to Artifex Maximus <artifex@…>:

BTW, I've just finished compiling r1148 without any error.

can you provide more details on how you accomplished it? i am still getting the AM_PATH_CPPUNIT error. thanks

  Changed 23 months ago by anonymous

i3d# svn co svn://rakshasa.no/libtorrent/trunk

U    trunk/rtorrent/src/command_helpers.h
U    trunk/rtorrent/src/core/download_factory.h
U    trunk/rtorrent/src/core/download_list.cc
U    trunk/rtorrent/src/core/dht_manager.cc
U    trunk/rtorrent/src/core/manager.h
U    trunk/rtorrent/src/core/download_store.cc
U    trunk/rtorrent/src/core/download_factory.cc
U    trunk/rtorrent/src/core/download_list.h
U    trunk/rtorrent/src/core/download.cc
U    trunk/rtorrent/src/core/download.h
U    trunk/rtorrent/src/core/manager.cc
U    trunk/rtorrent/src/command_download.cc
U    trunk/rtorrent/src/main.cc
U    trunk/rtorrent/src/command_local.cc
U    trunk/rtorrent/src/command_events.cc
U    trunk/rtorrent/src/command_ui.cc
U    trunk/rtorrent/src/display/utils.cc
U    trunk/rtorrent/src/ui/download.cc
U    trunk/libtorrent/test/torrent/object_static_map_test.cc
U    trunk/libtorrent/src/dht/dht_tracker.h
U    trunk/libtorrent/src/dht/dht_router.cc
U    trunk/libtorrent/src/dht/dht_node.cc
U    trunk/libtorrent/src/dht/dht_server.cc
U    trunk/libtorrent/src/dht/dht_server.h
U    trunk/libtorrent/src/protocol/extensions.cc
U    trunk/libtorrent/src/protocol/extensions.h
U    trunk/libtorrent/src/protocol/peer_connection_base.cc
U    trunk/libtorrent/src/protocol/peer_connection_base.h
U    trunk/libtorrent/src/protocol/peer_connection_leech.cc
A    trunk/libtorrent/src/protocol/peer_connection_metadata.cc
A    trunk/libtorrent/src/protocol/peer_connection_metadata.h
U    trunk/libtorrent/src/protocol/handshake_manager.cc
U    trunk/libtorrent/src/protocol/peer_factory.cc
U    trunk/libtorrent/src/protocol/peer_factory.h
U    trunk/libtorrent/src/protocol/Makefile.am
U    trunk/libtorrent/src/protocol/handshake.cc
U    trunk/libtorrent/src/net/data_buffer.h
U    trunk/libtorrent/src/net/address_list.cc
U    trunk/libtorrent/src/net/socket_base.cc
U    trunk/libtorrent/src/net/address_list.h
U    trunk/libtorrent/src/net/socket_base.h
D    trunk/libtorrent/src/download/download_info.h
U    trunk/libtorrent/src/download/download_wrapper.cc
U    trunk/libtorrent/src/download/download_wrapper.h
U    trunk/libtorrent/src/download/download_main.cc
U    trunk/libtorrent/src/download/download_constructor.cc
U    trunk/libtorrent/src/download/download_main.h
U    trunk/libtorrent/src/download/download_constructor.h
U    trunk/libtorrent/src/download/Makefile.am
U    trunk/libtorrent/src/data/socket_file.cc
U    trunk/libtorrent/src/tracker/tracker_udp.cc
U    trunk/libtorrent/src/tracker/tracker_manager.cc
U    trunk/libtorrent/src/tracker/tracker_dht.cc
U    trunk/libtorrent/src/tracker/tracker_http.cc
U    trunk/libtorrent/src/torrent/torrent.cc
U    trunk/libtorrent/src/torrent/torrent.h
U    trunk/libtorrent/src/torrent/object_raw_bencode.h
U    trunk/libtorrent/src/torrent/resume.cc
U    trunk/libtorrent/src/torrent/peer/connection_list.cc
U    trunk/libtorrent/src/torrent/object.h
U    trunk/libtorrent/src/torrent/object_stream.cc
U    trunk/libtorrent/src/torrent/object_stream.h
A    trunk/libtorrent/src/torrent/download_info.h
U    trunk/libtorrent/src/torrent/data/file_manager.cc
U    trunk/libtorrent/src/torrent/data/file_list.cc
U    trunk/libtorrent/src/torrent/data/file_manager.h
U    trunk/libtorrent/src/torrent/data/file_list.h
U    trunk/libtorrent/src/torrent/data/transfer_list.h
U    trunk/libtorrent/src/torrent/tracker_list.cc
U    trunk/libtorrent/src/torrent/download.cc
U    trunk/libtorrent/src/torrent/download.h
U    trunk/libtorrent/src/torrent/Makefile.am
Checked out revision 1148.
i3d# cd trunk/libtorrent/
i3d# ./autogen.sh
aclocal...
/usr/local/share/aclocal/glib.m4:8: warning: underquoted definition of AM_PATH_G                                                                                                                                                                                                                                             LIB
/usr/local/share/aclocal/glib.m4:8:   run info '(automake)Extending aclocal'
/usr/local/share/aclocal/glib.m4:8:   or see http://sources.redhat.com/automake/                                                                                                                                                                                                                                             automake.html#Extending-aclocal
autoheader...
libtoolize... using libtoolize
automake...
autoconf...
ready to configure
i3d# ./configure
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... ./install-sh -c -d
checking for gawk... no
checking for mawk... no
checking for nawk... nawk
checking whether make sets $(MAKE)... yes
checking for cppunit-config... /usr/local/bin/cppunit-config
checking for Cppunit - version >= 1.9.6... 1.12.1
./configure: 2783: Syntax error: word unexpected (expecting ")")
i3d#

line 2783 of configure:

    _LT_DECL(build_old_libs, enable_static, 0,
        Whether or not to build static libraries)

  Changed 23 months ago by anonymous

Also got libsigc current etc:

i3d# pkg_info | egrep '^(cppunit|automake|autoconf|libsigc|curl)'
autoconf-2.13.000227_6 Automatically configure source code on many Un*x platforms
autoconf-2.62       Automatically configure source code on many Un*x platforms
autoconf-wrapper-20071109 Wrapper script for GNU autoconf
automake-1.10.1     GNU Standards-compliant Makefile generator (1.10)
automake-1.4.6_5    GNU Standards-compliant Makefile generator (1.4)
automake-1.5_5,1    GNU Standards-compliant Makefile generator (1.5)
automake-1.6.3_1    GNU Standards-compliant Makefile generator (1.6)
automake-1.7.9_2    GNU Standards-compliant Makefile generator (1.7)
automake-1.8.5_3    GNU Standards-compliant Makefile generator (1.8)
automake-1.9.6_3    GNU Standards-compliant Makefile generator (1.9)
automake-wrapper-20071109 Wrapper script for GNU automake
cppunit-1.12.1      C++ port of the JUnit framework for unit testing
curl-7.19.4         Non-interactive tool to get files from FTP, GOPHER, HTTP(S)
libsigc++-2.2.4.2   Callback Framework for C++
i3d#

in reply to: ↑ 17   Changed 23 months ago by anonymous

Replying to scar:

Replying to Artifex Maximus <artifex@…>:

BTW, I've just finished compiling r1148 without any error.

can you provide more details on how you accomplished it? i am still getting the AM_PATH_CPPUNIT error. thanks

I re-installed both pkg-config and cppunit from source, and that seemed toe clear any issues I had.

  Changed 23 months ago by scar

according to the output of ./configure, a version of cppunit >= 1.9.6 is needed. i already have 1.12.1 installed from repositories so do not see a need to compile yet something else from source.

in reply to: ↑ 17   Changed 23 months ago by Artifex Maximus <artifex@freemail.hu>

Replying to scar:

Replying to Artifex Maximus <artifex@…>:

BTW, I've just finished compiling r1148 without any error.

can you provide more details on how you accomplished it? i am still getting the AM_PATH_CPPUNIT error. thanks

As usual.

cd libtorrent
svn up
autogen.sh
configure with flags
make
make install
make distclean

cd ../rtorrent
svn up
autogen.sh
configure with flags
make
make install
make distclean

Might you have some files left from previous cppunit installation? That might mislead configure script. All my ports are installed or upgraded from source and not from packages.

  Changed 23 months ago by scar

ok well since this was for freebsd maybe i should open a new ticket for debian/ubuntu based systems?

  Changed 23 months ago by scar

doh! nevermind. user error :\ i must have been confusing my rtorrent box with my home box. libcpuunit-dev wasn't actually installed on rtorrent box. after installing, autogen.sh doesn't throw and errors, and configure completes without error.

but now i am having the fallocate error also described above

  Changed 21 months ago by anonymous

installing cppunit-devel(which also pulled in cppunit) solved this issue for on fedora 12 64bit

  Changed 15 months ago by swasher

apt-get install libcppunit-dev under Ubuntu 10.10server x64 resolve the problem.

  Changed 10 months ago by anonymous

cppunit installed but problem remains... autogen.sh generates the following line: "configure.ac:20: warning: macro `AM_PATH_CPPUNIT' not found in library"

I have copied cppunit.m4 from cppunit source package folder into libtorrent source package - "autogen.sh" and "configure" work now. But "make" fails generating the same line "configure.ac:20: warning: macro `AM_PATH_CPPUNIT' not found in library "...

I have also copied cppunit.m4 inso ./scripts folder, now "make" goes forward... compilation starts.

BWT it may be useful to do ./configure --prefix='/usr' in some systems... otherwise it goes to /usr/local

  Changed 10 months ago by rakshasa

  • status changed from new to closed
  • resolution set to worksforme
Note: See TracTickets for help on using tickets.