Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot compile under Debian #18

Open
dionyziz opened this issue Dec 31, 2013 · 41 comments
Open

Cannot compile under Debian #18

dionyziz opened this issue Dec 31, 2013 · 41 comments

Comments

@dionyziz
Copy link

I'm getting the following errors when trying to compile under a Debian Linux system. Not sure how to get this to work.

Here is the full log. Compile errors are at the end:

https://gist.github.com/dionyziz/8202593

Thanks for your time!

@joshpurvis
Copy link
Contributor

This is the same problem I had when compiling on Ubuntu. I pushed a modification to the INSTALL file which should fix it. Basically run make while in the libtorrent directory, then try compiling it again.

https://github.com/miguelfreitas/twister-core/pull/16/files

@dionyziz
Copy link
Author

dionyziz commented Jan 1, 2014

Thanks for your help. I get an error while trying to run make within libtorrent. What do you recommend?

https://gist.github.com/dionyziz/8204841

@joshpurvis
Copy link
Contributor

Hm really not sure.. but looks like maybe you don't have the libboost libraries installed? With Ubuntu I followed the dependency directions from here:

https://github.com/miguelfreitas/twister-core/blob/master/doc/build-unix.md#dependency-build-instructions-ubuntu--debian

@dionyziz
Copy link
Author

dionyziz commented Jan 1, 2014

In my first gist, you'll notice I've tried various ways of installing boost. I think I should have it. Perhaps you can point me to how to properly install it if I'm doing something wrongly? Thank you! :)

@dionyziz
Copy link
Author

dionyziz commented Jan 1, 2014

I tried running the following (before boostrap, configure, and make in the libtorrent folder) to no avail:

sudo apt-get install build-essential
sudo apt-get install libssl-dev
sudo apt-get install libboost-all-dev
sudo apt-get install libdb4.8-dev
sudo apt-get install libdb4.8++-dev
sudo apt-get install libboost1.37-dev

Incidentally, all of them installed fine, except for the last one, for which a package doesn't seem to exist.

@joshpurvis
Copy link
Contributor

Sorry I'm out of ideas. I installed this late the other night, and didn't document my steps. It definitely wasn't a smooth process, I remember having many snags long the way. The author says the build process is hacky and needs to be reworked.

You might check this pull request that some other guy just pushed which updates the documentation:

#19

@dionyziz
Copy link
Author

dionyziz commented Jan 2, 2014

What version of Debian or what distro are you installing this on? What is the author's distro? I'll set up a VM and try with your exact system specs and see if I can get it to run.

@joshpurvis
Copy link
Contributor

Ubuntu 12.10 64bit
On Jan 1, 2014 7:04 PM, "Dionysis Zindros" [email protected] wrote:

What version of Debian or what distro are you installing this on? What is
the author's distro? I'll set up a VM and try with your exact system specs
and see if I can get it to run.


Reply to this email directly or view it on GitHubhttps://github.com//issues/18#issuecomment-31433295
.

@dionyziz
Copy link
Author

dionyziz commented Jan 2, 2014

Thanks, I'll give it a shot. Did you use any 64-specific compile options?

@joshpurvis
Copy link
Contributor

Nope, I didn't have to do that.
On Jan 1, 2014 7:07 PM, "Dionysis Zindros" [email protected] wrote:

Thanks, I'll give it a shot. Did you use any 64-specific compile options?


Reply to this email directly or view it on GitHubhttps://github.com//issues/18#issuecomment-31433357
.

@trogau
Copy link

trogau commented Jan 9, 2014

Just chiming in to say I had the same problem compiling on Debian 6.0.8

edit: just saw there's a new list of instructions for installing on Debian - trying them out now.

edit#2: still get the same error, though I wasn't able to install libminiupnpc-dev via apt-get, or libdb++dev - had to install libdb4.8++dev specifically. Maybe Deb6 is too old?

@EskimoBob
Copy link

Trogau, you can edit your makefile.unix to have:
USE_UPNP:=-

libdb4.8++dev is available from bitcoin project (if you run newer Ubuntu 13.10)

@miguelfreitas
Copy link
Owner

If you don't care about copying your binary wallet between computers (not that big deal, since copying the secretkey in text also works) then it is ok to use libdb5.1 which is current in debian, afaik.

@trogau
Copy link

trogau commented Jan 13, 2014

@EskimoBob: I'm not up to the point of compiling Twister from within src/ (which is the only place I see a makefile.unix file) so I am not sure if that's applicable..? This is occurring when running 'make' for libtorrent.

@miguelfreitas: unfortunately it looks like Debian v6 / squeeze only supports libdb++ up to v4.8, so I might be out of luck?

@iShift
Copy link
Contributor

iShift commented Jan 21, 2014

Old issue i think we can close that, we have new building system

@trogau
Copy link

trogau commented Jan 21, 2014

@iShift, if you're referring to the new bootstrap.sh script in the project root, I just tried that after a git pull and I still get the same error compiling:

libtorrent/src/policy.cpp: In function 'uint32_t libtorrent::peer_priority(boost::asio::ip::basic_endpoint<boost::asio::ip::tcp>, boost::asio::ip::basic_endpoint<boost::asio::ip::tcp>)':
libtorrent/src/policy.cpp:172: error: no match for 'operator>' in 'e1 > e2'
./libtorrent/include/libtorrent/ptime.hpp:87: note: candidates are: bool libtorrent::operator>(libtorrent::ptime, libtorrent::ptime)
./libtorrent/include/libtorrent/ptime.hpp:105: note:                 bool libtorrent::operator>(libtorrent::time_duration, libtorrent::time_duration)
libtorrent/src/policy.cpp:191: error: no match for 'operator>' in 'e1 > e2'
./libtorrent/include/libtorrent/ptime.hpp:87: note: candidates are: bool libtorrent::operator>(libtorrent::ptime, libtorrent::ptime)
./libtorrent/include/libtorrent/ptime.hpp:105: note:                 bool libtorrent::operator>(libtorrent::time_duration, libtorrent::time_duration)
make[1]: *** [libtorrent/src/policy.o] Error 1
make[1]: Leaving directory `/home/vps/twister/twister-core'
make: *** [all-recursive] Error 1

@iShift
Copy link
Contributor

iShift commented Jan 21, 2014

apt-get update/upgrade? And install all packages from manual

@trogau
Copy link

trogau commented Jan 21, 2014

@iShift, as noted above, as I'm on Debian 6 I can't install some of the packages - I can only install libdb++ v4.8 and cannot install libminiupnpc-dev. I suspect it might just be an issue due to old libraries on deb6, but am not sure.

@toyg
Copy link
Contributor

toyg commented Jan 21, 2014

@trogau I don't think it's libdb (4.8 is fine, btw) or upnp (which is optional), it looks like a Boost issue to me. Which version of libboost are you running ?

@trogau
Copy link

trogau commented Jan 21, 2014

@toyg, /usr/include/boost/version.hpp reports: #define BOOST_LIB_VERSION "1_42" , installed from the Ubuntu/Debian instructions (apt-get install libboost-all-dev).

I'm not passing any Boost-specific parameters via the ./configure line (configure works fine), and don't seem to have any Boost environment variables set - but the configure process seems to pick up Boost fine:

Checking for boost libraries:
checking for boostlib >= 1.36... yes
checking whether the Boost::System library is available... yes
checking for exit in -lboost_system-mt... yes

@toyg
Copy link
Contributor

toyg commented Jan 22, 2014

Ok, yes -- the > operator between those boost objects was added in 1.44, so libtorrent will need that version at least. Debian oldstable only ships 1.42, so you should get an updated package (I think the first good package for most architectures in Sid is 1.49, there are some previous versions for some exotic architectures only).

@trogau
Copy link

trogau commented Jan 22, 2014

@toyg, thanks for the explanation. I'm a bit scared to switch out of stable on this particular machine so I might have to leave it here for now, although if time permits later I might try getting Boost from source and having another go at it.

@toyg
Copy link
Contributor

toyg commented Jan 22, 2014

@trogau any chance you could close this issue then? The tracker is a bit of a mess atm :)

@trogau
Copy link

trogau commented Jan 22, 2014

@toyg, I didn't open it so am not sure if I can close it, sorry..?

@toyg
Copy link
Contributor

toyg commented Jan 22, 2014

Ah, sorry, it's @dionyziz who could close it...

@anarcat
Copy link

anarcat commented Jan 28, 2014

FWIW, I also fail to compile this in Debian, Wheezy (6.0.8) amd64:

ar -rs libleveldb.a db/builder.o db/c.o db/dbformat.o db/db_impl.o db/db_iter.o db/filename.o db/log_reader.o db/log_writer.o db/memtable.o db/repair.o db/table_cache.o db/version_edit.o db/version_set.o db/write_batch.o table/block_builder.o table/block.o table/filter_block.o table/format.o table/iterator.o table/merger.o table/table_builder.o table/table.o table/two_level_iterator.o util/arena.o util/bloom.o util/cache.o util/coding.o util/comparator.o util/crc32c.o util/env.o util/env_posix.o util/env_win.o util/filter_policy.o util/hash.o util/histogram.o util/logging.o util/options.o util/status.o port/port_posix.o
ar: creating libleveldb.a
g++ -I. -I./include -fno-builtin-memcmp -pthread -DOS_LINUX -DLEVELDB_PLATFORM_POSIX -O2 -DNDEBUG        -c helpers/memenv/memenv.cc -o helpers/memenv/memenv.o
rm -f libmemenv.a
ar -rs libmemenv.a helpers/memenv/memenv.o
ar: creating libmemenv.a
make[1]: quittant le répertoire « /home/anarcat/dist/twister-core/src/leveldb »
make[1]: entrant dans le répertoire « /home/anarcat/dist/twister-core »
  CXX    libtorrent/src/web_connection_base.o
In file included from /usr/include/boost/thread/pthread/mutex.hpp:14:0,
                 from /usr/include/boost/thread/mutex.hpp:16,
                 from /usr/include/boost/pool/detail/mutex.hpp:14,
                 from /usr/include/boost/pool/poolfwd.hpp:24,
                 from /usr/include/boost/pool/pool.hpp:27,
                 from ./libtorrent/include/libtorrent/peer_connection.hpp:56,
                 from ./libtorrent/include/libtorrent/web_connection_base.hpp:60,
                 from libtorrent/src/web_connection_base.cpp:40:
/usr/include/boost/thread/xtime.hpp:23:5: error: expected identifier before numeric constant
/usr/include/boost/thread/xtime.hpp:23:5: error: expected ‘}’ before numeric constant
/usr/include/boost/thread/xtime.hpp:23:5: error: expected unqualified-id before numeric constant
/usr/include/boost/thread/xtime.hpp:46:14: error: expected type-specifier before ‘system_time’
In file included from /usr/include/boost/thread/pthread/mutex.hpp:14:0,
                 from /usr/include/boost/thread/mutex.hpp:16,
                 from /usr/include/boost/pool/detail/mutex.hpp:14,
                 from /usr/include/boost/pool/poolfwd.hpp:24,
                 from /usr/include/boost/pool/pool.hpp:27,
                 from ./libtorrent/include/libtorrent/peer_connection.hpp:56,
                 from ./libtorrent/include/libtorrent/web_connection_base.hpp:60,
                 from libtorrent/src/web_connection_base.cpp:40:
/usr/include/boost/thread/xtime.hpp: In function ‘int xtime_get(xtime*, int)’:
/usr/include/boost/thread/xtime.hpp:73:40: error: ‘get_system_time’ was not declared in this scope
/usr/include/boost/thread/xtime.hpp:73:40: note: suggested alternative:
In file included from /usr/include/boost/thread/locks.hpp:12:0,
                 from /usr/include/boost/thread/pthread/mutex.hpp:12,
                 from /usr/include/boost/thread/mutex.hpp:16,
                 from /usr/include/boost/pool/detail/mutex.hpp:14,
                 from /usr/include/boost/pool/poolfwd.hpp:24,
                 from /usr/include/boost/pool/pool.hpp:27,
                 from ./libtorrent/include/libtorrent/peer_connection.hpp:56,
                 from ./libtorrent/include/libtorrent/web_connection_base.hpp:60,
                 from libtorrent/src/web_connection_base.cpp:40:
/usr/include/boost/thread/thread_time.hpp:19:24: note:   ‘boost::get_system_time’
In file included from /usr/include/boost/thread/pthread/mutex.hpp:14:0,
                 from /usr/include/boost/thread/mutex.hpp:16,
                 from /usr/include/boost/pool/detail/mutex.hpp:14,
                 from /usr/include/boost/pool/poolfwd.hpp:24,
                 from /usr/include/boost/pool/pool.hpp:27,
                 from ./libtorrent/include/libtorrent/peer_connection.hpp:56,
                 from ./libtorrent/include/libtorrent/web_connection_base.hpp:60,
                 from libtorrent/src/web_connection_base.cpp:40:
/usr/include/boost/thread/xtime.hpp: At global scope:
/usr/include/boost/thread/xtime.hpp:88:1: error: expected declaration before ‘}’ token
make[1]: *** [libtorrent/src/web_connection_base.o] Erreur 1
make[1]: quittant le répertoire « /home/anarcat/dist/twister-core »
make: *** [all-recursive] Erreur 1

Seems also to be a problem with boost. Maybe it would be better if twister would use the system libtorrent instead?

@toyg
Copy link
Contributor

toyg commented Jan 28, 2014

@anarcat no can do: Miguel had to modify libtorrent, he's not just using it.

That error seems a problem with Boost indeed, Google says: https://bbs.archlinux.org/viewtopic.php?id=144593

You might want to try with Boost 1.50+. We recently found that 1.44 seems to be the minimum for the set of features the codebase uses, but we don't really know all the bugs for all Boost versions...

@anarcat
Copy link

anarcat commented Jan 28, 2014

The discussion about libtorrent should happen in #140.

Problem with 1.50+ is that it's not available in Debian stable (wheezy) or any Ubuntu before Saucy so that really limits adoption of this software, unless people (like me) start backporting stuff like crazy.

@toyg
Copy link
Contributor

toyg commented Jan 28, 2014

@anarcat that's a problem for Boost and Debian really...? This is alpha software. I think Miguel has enough stuff to do without asking him to work around bugs in a specific version of Boost for backward-compatibility purposes 😃

@anarcat
Copy link

anarcat commented Jan 28, 2014

I guess it's a problem if people actually want this to get out of alpha one day. Obviously, this is not the right time for me to help with this project...

@miguelfreitas
Copy link
Owner

@anarcat Which version of boost is available for wheezy?

If you have libtorrent compiled with an unsupported boost version, does it means that the debian package includes some fix/backport? We may do the same here, no objections.

@anarcat
Copy link

anarcat commented Jan 29, 2014

@miguelfreitas http://packages.debian.org/libboost

Squeeze/oldstable: 1.42
Wheezy/stable/6.x: 1.49
Jessie/testing/7.x: 1.54
sid/unstable/xxxx: 1.54

We can probably ignore squeeze at this point for all intents and purposes.

It would be useful to make this work in boost 1.49, but I don't really expect this to happen considering how wild boost transitions are...

There's no debian package of Twister, as far as I know. As for libtorrent, those are the versions available in Debian: http://packages.debian.org/search?keywords=libtorrent - libtorrent 0.13 seems to be compiling fine in Wheezy. There doesn't seem to be any special compile-time flags or patches in the Debian package that I can find.

@miguelfreitas
Copy link
Owner

twister does work with boost 1.49, that's for sure. It is the version i use at home and also in a remote debian machine.

check if this version means something to you:
uname -a
Linux mlsrj200152124p103 3.2.0-4-686-pae #1 SMP Debian 3.2.46-1+deb7u1 i686 GNU/Linux
cat /etc/debian_version
7.3

it compiles fine in this machine.

@anarcat
Copy link

anarcat commented Jan 29, 2014

anarcat@marcos:~$ uname -a
Linux marcos 3.10-0.bpo.3-amd64 #1 SMP Debian 3.10.11-1~bpo70+1 (2013-09-24) x86_64 GNU/Linux
anarcat@marcos:~$ cat /etc/debian_version
7.3
anarcat@marcos:~$ dpkg -l libboost* | grep ^i
ii  libboost-all-dev                               1.49.0.1                                 amd64        Boost C++ Libraries development files (ALL) (default version)
ii  libboost-chrono-dev                            1.49.0.1                                 amd64        C++ representation of time duration, time point, and clocks (default version)
ii  libboost-chrono1.49-dev                        1.49.0-3.2                               amd64        C++ representation of time duration, time point, and clocks
ii  libboost-chrono1.49.0                          1.49.0-3.2                               amd64        C++ representation of time duration, time point, and clocks
ii  libboost-date-time-dev                         1.49.0.1                                 amd64        set of date-time libraries based on generic programming concepts (default version)
ii  libboost-date-time1.49-dev                     1.49.0-3.2                               amd64        set of date-time libraries based on generic programming concepts
ii  libboost-date-time1.49.0                       1.49.0-3.2                               amd64        set of date-time libraries based on generic programming concepts
ii  libboost-dev                                   1.49.0.1                                 amd64        Boost C++ Libraries development files (default version)
ii  libboost-filesystem-dev                        1.49.0.1                                 amd64        filesystem operations (portable paths, iteration over directories, etc) in C++ (default version)
ii  libboost-filesystem1.49-dev                    1.49.0-3.2                               amd64        filesystem operations (portable paths, iteration over directories, etc) in C++
ii  libboost-filesystem1.49.0                      1.49.0-3.2                               amd64        filesystem operations (portable paths, iteration over directories, etc) in C++
ii  libboost-graph-dev                             1.49.0.1                                 amd64        generic graph components and algorithms in C++ (default version)
ii  libboost-graph-parallel-dev                    1.49.0.1                                 amd64        generic graph components and algorithms in C++ (default version)
ii  libboost-graph-parallel1.49-dev                1.49.0-3.2                               amd64        generic graph components and algorithms in C++
ii  libboost-graph1.49-dev                         1.49.0-3.2                               amd64        generic graph components and algorithms in C++
ii  libboost-iostreams-dev                         1.49.0.1                                 amd64        Boost.Iostreams Library development files (default version)
ii  libboost-iostreams1.49-dev                     1.49.0-3.2                               amd64        Boost.Iostreams Library development files
ii  libboost-iostreams1.49.0                       1.49.0-3.2                               amd64        Boost.Iostreams Library
ii  libboost-locale-dev                            1.49.0.1                                 amd64        C++ facilities for localization (default version)
ii  libboost-locale1.49-dev                        1.49.0-3.2                               amd64        C++ facilities for localization
ii  libboost-locale1.49.0                          1.49.0-3.2                               amd64        C++ facilities for localization
ii  libboost-math-dev                              1.49.0.1                                 amd64        Boost.Math Library development files (default version)
ii  libboost-math1.49-dev                          1.49.0-3.2                               amd64        Boost.Math Library development files
ii  libboost-math1.49.0                            1.49.0-3.2                               amd64        Boost.Math Library
ii  libboost-mpi-dev                               1.49.0.1                                 amd64        C++ interface to the Message Passing Interface (MPI) (default version)
ii  libboost-mpi-python-dev                        1.49.0.1                                 amd64        C++ interface to the Message Passing Interface (MPI), Python Bindings (default version)
ii  libboost-mpi-python1.49-dev                    1.49.0-3.2                               amd64        C++ interface to the Message Passing Interface (MPI), Python Bindings
ii  libboost-mpi-python1.49.0                      1.49.0-3.2                               amd64        C++ interface to the Message Passing Interface (MPI), Python Bindings
ii  libboost-mpi1.49-dev                           1.49.0-3.2                               amd64        C++ interface to the Message Passing Interface (MPI)
ii  libboost-mpi1.49.0                             1.49.0-3.2                               amd64        C++ interface to the Message Passing Interface (MPI)
ii  libboost-program-options-dev                   1.49.0.1                                 amd64        program options library for C++ (default version)
ii  libboost-program-options1.49-dev               1.49.0-3.2                               amd64        program options library for C++
ii  libboost-program-options1.49.0                 1.49.0-3.2                               amd64        program options library for C++
ii  libboost-python-dev                            1.49.0.1                                 amd64        Boost.Python Library development files (default version)
ii  libboost-python1.49-dev                        1.49.0-3.2                               amd64        Boost.Python Library development files
ii  libboost-python1.49.0                          1.49.0-3.2                               amd64        Boost.Python Library
ii  libboost-random-dev                            1.49.0.1                                 amd64        Boost Random Number Library (default version)
ii  libboost-random1.49-dev                        1.49.0-3.2                               amd64        Boost Random Number Library
ii  libboost-random1.49.0                          1.49.0-3.2                               amd64        Boost Random Number Library
ii  libboost-regex-dev                             1.49.0.1                                 amd64        regular expression library for C++ (default version)
ii  libboost-regex1.49-dev                         1.49.0-3.2                               amd64        regular expression library for C++
ii  libboost-regex1.49.0                           1.49.0-3.2                               amd64        regular expression library for C++
ii  libboost-serialization-dev                     1.49.0.1                                 amd64        serialization library for C++ (default version)
ii  libboost-serialization1.49-dev                 1.49.0-3.2                               amd64        serialization library for C++
ii  libboost-serialization1.49.0                   1.49.0-3.2                               amd64        serialization library for C++
ii  libboost-signals-dev                           1.49.0.1                                 amd64        managed signals and slots library for C++ (default version)
ii  libboost-signals1.49-dev                       1.49.0-3.2                               amd64        managed signals and slots library for C++
ii  libboost-signals1.49.0                         1.49.0-3.2                               amd64        managed signals and slots library for C++
ii  libboost-system-dev                            1.49.0.1                                 amd64        Operating system (e.g. diagnostics support) library (default version)
ii  libboost-system1.49-dev                        1.49.0-3.2                               amd64        Operating system (e.g. diagnostics support) library
ii  libboost-system1.49.0                          1.49.0-3.2                               amd64        Operating system (e.g. diagnostics support) library
ii  libboost-test-dev                              1.49.0.1                                 amd64        components for writing and executing test suites (default version)
ii  libboost-test1.49-dev                          1.49.0-3.2                               amd64        components for writing and executing test suites
ii  libboost-test1.49.0                            1.49.0-3.2                               amd64        components for writing and executing test suites
ii  libboost-thread-dev                            1.49.0.1                                 amd64        portable C++ multi-threading (default version)
ii  libboost-thread1.49-dev                        1.49.0-3.2                               amd64        portable C++ multi-threading
ii  libboost-thread1.49.0                          1.49.0-3.2                               amd64        portable C++ multi-threading
ii  libboost-timer-dev                             1.49.0.1                                 amd64        C++ wall clock and CPU process timers (default version)
ii  libboost-timer1.49-dev                         1.49.0-3.2                               amd64        C++ wall clock and CPU process timers
ii  libboost-timer1.49.0                           1.49.0-3.2                               amd64        C++ wall clock and CPU process timers
ii  libboost-wave-dev                              1.49.0.1                                 amd64        C99/C++ preprocessor library (default version)
ii  libboost-wave1.49-dev                          1.49.0-3.2                               amd64        C99/C++ preprocessor library
ii  libboost-wave1.49.0                            1.49.0-3.2                               amd64        C99/C++ preprocessor library
ii  libboost1.49-dev                               1.49.0-3.2                               amd64        Boost C++ Libraries development files

@kerskine
Copy link

I'm getting boost compile errors on OSX . Tried running a make in the libtorrent src directory but it didn't help.

@miguelfreitas
Copy link
Owner

@kerskine the preferred build system is the one at the top level directory. I don't know about OSX specifics, but if you have automake/autoconf/etc you should try running "bootstrap.sh" and then "make" (not the libtorrent one).

@toyg
Copy link
Contributor

toyg commented May 28, 2014

@kerskine if you are getting boost from homebrew, try updating it (brew update && brew upgrade, if I remember correctly). I've had a similar problem a couple of weeks ago and solved it like that.

@anarcat
Copy link

anarcat commented May 28, 2014

er... this is about Debian, can we keep the discussion about it please?

@rodneyrod
Copy link

I'm getting this error on Debian jessie

Checking for boost libraries:
checking for boostlib >= 1.44... yes
checking whether the Boost::System library is available... yes
configure: error: Could not find a version of the library!

And then ./configure fails. Any idea what might be wrong?

@rodneyrod
Copy link

Also, would it be difficult to get binary packages of Twister available on Debian?

@miguelfreitas
Copy link
Owner

@rodneyrod they are available already. see our download page (twister.net.co)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

10 participants