error installing libtorrent with boost - boost

on Lubuntu 14.04 64 bit, I am getting this configure error when I try to install de libtorrent library:
checking for boostlib >= 1.35... yes
checking whether the Boost::System library is available... yes
checking for exit in -l/usr/local/boost_1_57_0/bin.v2/libs/system/build/gcc-4.8/release/threading-multi/... no
checking for exit in -lboost_system-/usr/local/boost_1_57_0/bin.v2/libs/system/build/gcc-4.8/release/threading-multi/... no
configure: error: Could not link against boost_system-/usr/local/boost_1_57_0/bin.v2/libs/system/build/gcc-4.8/release/threading-multi/ !
I executed this:
alberto#alberto-virtual-machine:~/trabajo/libtorrent-rasterbar-0.14.7$ ./configure --with-boost-system=/usr/local/boost_1_57_0/bin.v2/libs/system/build/gcc-4.8/release/threading-multi
there are this files on the directory:
alberto#alberto-virtual-machine:~/trabajo/libtorrent-rasterbar-0.14.7$ ls /usr/local/boost_1_57_0/bin.v2/libs/system/build/gcc-4.8/release/threading-multi/
error_code.o libboost_system.so.1.57.0
I haven't much idea about static libraries, could someone help me please? thank you.

The argument --with-boost-system takes either:
A library name suffix (like mt, which some distros use)
A full path including the library name
You did not pass in a full path with the library name, so the configure script interprets it as (1) and it fails to link against that library. Instead, try:
./configure --with-boost-system=/usr/local/boost_1_57_0/bin.v2/libs/system/build/gcc-4.8/release/threading-multi/libboost_system.so

Related

compilation of binutils-gdb can't find ncurses

I'm trying to compile the binutils for the i686-elf target according to this tutorial:
https://wiki.osdev.org/GCC_Cross-Compiler
I just added the --enable-tui option, so that I have the support in the gdb.
I did the following:
# get sources
git clone git://sourceware.org/git/binutils-gdb.git
# store settings
export PREFIX="`pwd`/opt/cross"
export TARGET=i686-elf
export PATH="$PREFIX/bin:$PATH"
# create build folder
mkdir build-binutils
cd build-binutils
# run configure
../binutils-gdb/configure -target=$TARGET --prefix="$PREFIX" --with-sysroot --disable-nls --disable-werror --enable-tui
# make
make
This runs for some time and terminates with the following error:
checking for library containing socketpair... (cached) none required
checking for ld used by GCC... (cached) ld
checking if the linker (ld) is GNU ld... (cached) yes
checking for shared library run path origin... (cached) done
checking for iconv... (cached) yes
checking for iconv declaration... (cached)
extern size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
checking for library containing waddstr... (cached) no
configure: error: no enhanced curses library found; disable TUI
make[1]: *** [Makefile:11329: configure-gdb] Error 1
make[1]: Leaving directory '/home/noexpandtab/dev/build-binutils'
make: *** [Makefile:853: all] Error 2
For me it seems, that the ncurses library cannot be found.
I have a Debian 10 running and installed the following additional packages:
libncurses-dev
ncurses-base
ncurses-doc
libncurses5-dev
Do I have to install additional packages? Or am I missing some options for the configure script?
You're cross-compiling to a different architecture (i686-elf) than whatever you're running on—the $TARGET mentioned in the question. gdb will have to be linked with libraries which are built for that architecture.
Debian provides ncurses packages which run on the current architecture, but does not provide a suitable package for the cross-compiled application. So you get to do this for yourself.
When cross-compiling ncurses, you'll have to keep in mind that part of it builds/runs on the current architecture (to generate source-files for compiling by the cross-compiler). That's defined in the environment as $BUILD_CC (rather than $CC), as you might see when reading the script for the mingw cross-compiling. There's a section in the INSTALL file (in the ncurses sources) which outlines the process.
There's no tutorial (that would be off-topic here anyway), but others have read the instructions and cross-compiled ncurses as evidenced by a recent bug report.
I retried the whole compilation, and suddenly it works! I tested a bit and I assume I found my fault: I executed configure without --enable-tui, where make worked. Then I executed configure with --enable-tui in the same folder without cleaning it. After cleaning or running in a new folder it compiled.
Thanks to the one user who posted to delete the contents of opt/cross. (The comment itself was already somehow deleted in between.) This wasn't the solution, but leaded me in the right direction.
TL;DR: Clean the build folder before running configure with different parameters again.

VLC 3.0.2 compile fails under Ubuntu 18.04 for Win32

I am trying to compile VLC 3.0.2 according to the wiki document
https://wiki.videolan.org/Win32Compile/
The platform is a Ubuntu 18.04 64bit desktop and the target is Win32.
However, as I follows the instruction
$ ../extras/package/win32/configure.sh --host=HOST-TRIPLET --build=x86_64-pc-linux-gnu
The compile shows error message as:
checking neaacdec.h usability... yes
checking neaacdec.h presence... yes
checking for neaacdec.h... yes
checking for NeAACDecOpen in -lfaad... no
configure: error: cannot find FAAD library
As I go through the config.log file, I found the following message:
/home/zhengdao/develop/gitroot/pctools/mptool/vlc-3.0.2/contrib/i686-w64-mingw32/lib/libfaad.a(syntax.o): In function `latmAudioMuxElement': /home/jenkins/workspace/vlc-nightly/vlc-nightly-win32-x86/contrib/contrib-win32/faad2/libfaad/syntax.c:2578: undefined reference to `_imp____acrt_iob_func'
So actually libfaad is not missing, but contains symbols that the compiler could not link against.
I can use previous old libraries that doesn't contain this symbol to work around, but will always encounter this error message here and there, and finally old libraries will be lack of APIs that VLC depends on, and the compile still fails.
Can anyone give me some guide to make the compile pass?
Try to start with /extras/package/win32/build.sh . This script automatically build all the libraries and then it can build vlc itself.

Installing glib from git in mac os x and gettext

I'm trying build glib from source in Mac OS X.
I've clone glib repo from gnome site.
The autogen.sh script seems to run fine. But when it starts it shows this message :
autoreconf: Entering directory `.'
autoreconf: configure.ac: not using Gettext
This seems spooky. However it finishes without showing any error. After spawning configure script it stops with the error :
checking libintl.h usability... no
checking libintl.h presence... no
checking for libintl.h... no
configure: error:
*** You must have either have gettext support in your C library, or use the
*** GNU gettext library. (http://www.gnu.org/software/gettext/gettext.html
Although i've install gettext from macports and it seems to be there :
arif#dev:~/sak/glib$ls /opt/local/lib/ | grep gettext
gettext
libgettextlib-0.18.3.dylib
libgettextlib.dylib
libgettextlib.la
libgettextpo.0.dylib
libgettextpo.a
libgettextpo.dylib
libgettextpo.la
libgettextsrc-0.18.3.dylib
libgettextsrc.dylib
libgettextsrc.la
One thing i've noticed that although gettext is installed, it does not have pkg-config file. Maybe that's why its happening .
arif#dev:~/sak/glib$ls /opt/local/lib/pkgconfig/ | grep gettext
comes out with nothing.
I ran into something similar and you might want to try to set CFLAGS="-L/opt/local/lib -I/opt/local/include". It seems that those are not included by default when running the gettext tests. You can either CFLAGS to the configure call or probably also to the autogen.sh

Cannot compile gearman - configure script fails

My system is Red Hat Enterprise Linux Server release 5.7 (Tikanga).
I am trying to run the configure script , and I am getting the following error:
checking for the toolset name used by Boost for g++... gcc41 -gcc
configure: Detected BOOST_ROOT; continuing with --with-boost=/raid/users/andrey/3rdParty/boost_1_47/
checking for Boost headers version >= 1.39.0... /users/andrey/3rdParty/boost_1_47/
checking for Boost's header version... 1_47
checking boost/program_options.hpp usability... no
checking boost/program_options.hpp presence... no
checking for boost/program_options.hpp... no
configure: error: cannot find boost/program_options.hpp
The documentation of configure says that boost is an optional package. So I tried to build it without boost:
configure -with-boost=no
This does not run as well and returns the following error:
checking for assert... no
checking for the toolset name used by Boost for g++... gcc41 -gcc
configure: Detected BOOST_ROOT=/users/andrey/3rdParty/boost_1_47/, but overridden by --with-boost=no
checking for Boost headers version >= 1.39.0... no
I've seen this question already, but it does not seem to help me.
Any idea?
in debian/ubuntu/mint you can use :
apt-get install libboost-all-dev
I have met the same issue when building the gearmand from source. The issue was fixed after I installed the package boost-devel, which will place needed headers into /usr/include/boost. Thanks and hope this may help.
Step "Installing Cygwin Package Dependencies needed for Gearman".
In addition to these packages:
gcc
gcc-c++
gcc-g++
make
libuuid1-devel
libiconv
if you did this you can:
reinstall cygwin and install this :
libuuid
boost
You can use following command to solve this issue.
yum install boost*
If you are using centos or fedora or redhat then above command will work.

boost library gives errors on ubuntu

I am trying to compile a package on ubuntu 8.1
when executing this command: ./configure I get the follwoing error:
checking for Boost headers version >= 103700... no
configure: error: cannot find Boost headers version >= 103700
knowing that I installed needed boost packages using these command:
$ apt-get install libboost-dev libboost-graph-dev libboost-iostreams-dev
Can anybody help please?
thank you. Now it works but i get another error when running ./configure: checking boost/iostreams/device/file_descriptor.hpp usability... yes checking boost/iostreams/device/file_descriptor.hpp presence... yes checking for boost/iostreams/device/file_descriptor.hpp... yes checking for the Boost iostreams library... no configure: error: cannot not find the flags to link with Boost iostreams any ideas please?
It could be that the version of boost that you're getting from the Ubuntu repository is too old (it's suggested here that the highest version for 8.10 is 1.35; it looks like your configure script is asking for 1.37). You might need to build from source; there's some more info in the answers to the question I linked to which will hopefully help.
UPDATE:
From your new error, it sounds like configure now can't find the boost_iostreams library. On my system it's /usr/lib/libboost_iostreams-mt.[a|so] - do you have those files (possibly in a different directory depending on where you installed boost)?
You can also try running ldconfig in case there's a missing symlink (from, say,
libboost_iostreams-mt.so.1.37.0 to libboost_iostreams-mt.so).
Is this configure one generated by GNU autoconf? If it is, there should be a file called config.log in the same directory which contains a list of all the commands configure tried to run when looking for things. If there's anything in there about boost_iostreams could you post it?
One totally random guess: some examples I've found on the web link to boost_iostreams without the multi-threading suffix -mt - but I don't have those on my machine at all. Maybe your configure script is running into the same problem?
UPDATE 2
The configure script seems to be looking for a single-threaded debug build of the boost iostreams library, which won't be produced by default when building from source on linux. Also, the default on linux is not to name the libraries based on the build configuration (so the libs you found in /usr/lib might not be the ones you installed from source unless you overrode this). This stuff isn't really explained on the boost website, I only found out by looking in the Jamroot file (bjam --help works too)! Anyway, to get a library with the right build configuration, and named correctly, I need to go into the root of the boost source tree and run:
sudo bjam --with-iostreams --layout=tagged variant=debug threading=single install
For me this puts the libraries (libboost_iostreams-d.a and the shared versions) into /usr/local/lib where ld will find them by default, so this should be fine. If you need them to go somewhere else you can use the --prefix=... option to bjam eg. if you want them in /usr/lib you can do --prefix=/usr. If the package you're building needs more boost libraries you can remove the --with-iostreams and then they'll all be built (or replace iostream with the name of each other library you need).
A side note: I had to install the libbz2-dev package to get boost iostreams to build - it's easy to miss the error here if you build all of boost as there's so much output!

Resources