problems with ./configure for libtorrent on linux - linux

Hell I have been having an extremely tough time installing libtorrent and am unsure what the problems are. I have seen plenty similar errors online but the solutions were not helpful and I am pretty sure the error message is just too vague for comparison.
When I run ./configure I get
**
Building libtorrent-rasterbar 0.16.5
Checking for a C/C++ compiler to use:
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
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 how to run the C preprocessor... gcc -E
checking whether gcc and cc understand -c and -o together... yes
checking for g++... g++
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking how to run the C++ preprocessor... g++ -E
checking whether g++ understands -c and -o together... yes
.
..
.
Checking for boost libraries:
checking for boostlib >= 1.36... yes
checking whether the Boost::System library is available... yes
configure: error: Boost.System library not found. Try using --with-boost-system=lib
**
I then use the suggestion and the difference is that the bottom says
**
Checking for boost libraries:
checking for boostlib >= 1.36... yes
checking whether the Boost::System library is available... yes
checking for exit in -llib... no
checking for exit in -lboost_system-lib... no
configure: error: Could not link against boost_system-lib !
**
the config.log file has an error
**
configure:16572: result: no
configure:16537: checking for exit in -lboost_system-lib
configure:16562: gcc -o conftest -lpthread -g -O2 -fvisibility=hidden -I/usr/include -L/usr/lib conftest.c -lboost_system-lib -lpthread >&5
conftest.c:33: warning: conflicting types for built-in function 'exit'
/usr/bin/ld: cannot find -lboost_system-lib
collect2: ld returned 1 exit status
**
Any insight would be enormously appreciated
after installing
apt-get install libboost-system-dev
apt-get install libboost-filesystem-dev libboost-thread-dev
Checking features to be enabled:
checking whether encryption support should be enabled... yes
configure: encryption support: now checking for the OpenSSL library...
checking for pkg-config... /usr/bin/pkg-config
checking for openssl/ssl.h in /usr/local/ssl... no
checking for openssl/ssl.h in /usr/lib/ssl... no
checking for openssl/ssl.h in /usr/ssl... no
checking for openssl/ssl.h in /usr/pkg... no
checking for openssl/ssl.h in /usr/local... no
checking for openssl/ssl.h in /usr... no
checking whether compiling and linking against OpenSSL works... no
configure: error: OpenSSL library not found. Try using --with-openssl=DIR or disabling encryption at all.

You need to install libboost-system.
If you are using Debian/Ubuntu, use apt-get as follows.
$ apt-get install libboost-system-dev
You may also need to install ...
$ apt-get install libboost-filesystem-dev libboost-thread-dev

The easiest way to install all the dependencies is with apt-get.
sudo apt-get build-dep python-libtorrent

I know this is a bit old, but to solve your OpenSSL problem you need to install the OpenSSL libraries with sudo apt-get install libssl-dev.

For CentOS users, you will want to install boost-devel.
# yum install boost-devel
But I still got the same error. Just want to point out one more thing, the CentOS 6.4 I work with had an old gcc compiler:
# g++ --version
g++ (GCC) 4.4.7 20120313 (Red Hat 4.4.7-3)
Copyright (C) 2010 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.
Installing a newer version of gcc helped me to get rid of that particular error. I used g++ (GCC) 4.8.2 version and this time calling the following command worked:
# ./configure --with-boost-libdir=/usr/lib64
After this point you might still run into not finding openssl headers like the OP posted here, this post will help to overcome the error. You may have to install openssl-devel (for CentOS) or libssl-dev (for Debian), or you can run with
# ./configure --with-boost-libdir=/usr/lib64 --without-ssl
If you have openssl headers installed in your system, you don't need to use --with-openssl flag, or at least I didn't need to use it.
Although this is old post, hope it will help someone else like me.

To avoid OpenSSL issues you can build "libtorrent-rasterbar" disabling OpenSSL encryption.
For instance:
./configure --disable-debug --disable-encryption --prefix=/opt/libtorrent-rasterbar
And then "make" + "make install"
Regards

The accepted answer didn't work for me. What did work was editing the configure script file and removing those lines from it:
if test -z "$BOOST_SYSTEM_LIB"; then :
as_fn_error $? "Boost.System library not found. Try using --with-boost-system=lib" "$LINENO" 5
fi
Those lines seemed to check that the BOOST_SYSTEM_LIB environment variable exists and is not empty.

For Arch users (ex. Manjaro) install the boost pkg from pacman. Search for "boost" and install from Official Repo(extra).

Related

vim install from source fails in macOS high sierra

I recently upgraded from 10.9 to 10.13 and had to reinstall vim. I checked out vim from source and did the following:
$/source-pkgs/vim>./configure --with-features=huge -
-enable-multibyte --enable-rubyinterp=yes --enable-pythoninterp=yes --with-
python-config-dir=/usr/lib/python2.7/config --enable-cscope --
prefix=/usr/local
configure: loading cache auto/config.cache
checking whether make sets $(MAKE)... yes
checking for gcc... /usr/bin/gcc
checking whether the C compiler works... no
configure: error: in `/Users/arenduchintala/source-pkgs/vim/src':
configure: error: C compiler cannot create executables
See `config.log' for more details
To make matters worse I can't seem to locate config.log!! It does not appear in $:source-pkgs/vim or anywhere in /usr/local/
My gcc seems to work fine:
$/source-pkgs/vim>which gcc
/usr/bin/gcc
$/source-pkgs/vim>gcc --version
Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/usr/include/c++/4.2.1
Apple LLVM version 9.0.0 (clang-900.0.39.2)
Target: x86_64-apple-darwin17.3.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
Any suggestions on how to proceed would be helpful!

Cross Compiling libcurl for arm-linux-gnueabihf: Unable to link function recv

I'm trying to cross-compile libcurl (version 7.54.0) for arm-linux-gnueabihf, I have the toolkit installed in my $PATH. I'm running the command to configure libcurl:
./configure --enable-static --disable-shared --prefix=/usr/arm-linux-gnueabihf --host=arm-linux-gnueabi --build=i686-pc-linux-gnu CC=arm-linux-gnueabihf-gcc
It starts configuring but then outputs: checking if sig_atomic_t is
already defined as volatile... yes checking return type of signal
handlers... void checking for sys/select.h... (cached) yes checking
for sys/socket.h... (cached) yes checking for select... no checking
for sys/types.h... (cached) yes checking for sys/socket.h... (cached)
yes checking for recv... no configure: error: Unable to link function
recv
I believe it may have something to do with the shared libraries, I installed arm-linux-gnueabihf-gcc via sudo apt-get install arm-linux-gnueabihf-gcc
The function recv is the first to be check in terms of execution and linking by autotools. The standard flags for the test comprehend also -lz , which is the flag to link the zlib ( see the file config.log below ) :
configure:21072: arm-linux-gnueabihf-gcc-4.9 -o conftest -O2 -Wno-error -Werror-implicit-function-declaration -Wno-system-headers -O2 -Wno-error conftest.c -lbrotlidec -lz >&5
/usr/lib/gcc-cross/arm-linux-gnueabihf/4.9/../../../../arm-linux-gnueabihf/bin/ld: cannot find -lbrotlidec
/lib/../lib/libz.so: file not recognized: File format not recognized
If you are cross compiling, the system location - generally /lib/libz.so - is not good. Please ensure to place the correct location of zlib using --with-zlib .
[
i used, sudo ./configure ....
to pass the error point - Unable to link function recv
and need to use, sudo make
] ==> sorry , this sould be wrong answer.
you shud
export CPPFLAGS="-I...../include" ==> this is refer to ur target tool chain's include path.
refer to https://curl.haxx.se/docs/install.html

error while building the package for fuse-exfat

I was installing fuse-exfat and got the below error while installing, I did the following things to install,
git clone https://github.com/relan/exfat.git
cd exfat
autoreconf --install
./configure --prefix=/usr
[root#angus exfat]# ./configure --prefix=/usr
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /usr/bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
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 gcc option to accept ISO C99... -std=gnu99
checking for ranlib... ranlib
checking for ar... ar
checking the archiver (ar) interface... ar
checking for special C compiler options needed for large files... no
checking for _FILE_OFFSET_BITS value needed for large files... no
checking for pkg-config... /usr/bin/pkg-config
checking pkg-config is at least version 0.9.0... yes
checking for FUSE... no
configure: error: Package requirements (fuse) were not met:
No package 'fuse' found
Consider adjusting the PKG_CONFIG_PATH environment variable if you
installed software in a non-standard prefix.
Alternatively, you may set the environment variables FUSE_CFLAGS
and FUSE_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details.
Please help to resolve the error.
I have found a possible solution to the existing problem of compiling exFAT from GitHub source code.
download:
https://github.com/libfuse/libfuse/releases/download/fuse-3.10.4/fuse-3.10.4.tar.xz
or:
sudo apt-get install fuse-exfat exfat-utils`
then:
git clone https://github.com/relan/exfat.git cd exfat
You must export these flages:
export FUSE_CFLAGS=-lfuse3
export FUSE_LIBS=/usr/lib/libfuse3.so
autoreconf --install
Add links to '/usr/include/fuse3/' files pointing to '/usr/include/' file name:
ln -s /usr/include/fuse3/fuse.h /usr/include/fuse.h
ln -s /usr/include/fuse3/fuse_common.h /usr/include/fuse_common.h
ln -s /usr/include/fuse3/fuse_opt.h /usr/include/fuse_opt.h
ln -s /usr/include/fuse3/fuse_log.h /usr/include/fuse_log.h
use an editor (e.g nano) and edit exfat/fuse/main.c file
nano /sources/exfat/fuse/main.c
some one could make a patch for this.
old lines:
filler(buffer, ".", NULL, 0);
filler(buffer, "..", NULL, 0);
filler(buffer, name, &stbuf, 0);
new lines:
filler(buffer, ".", NULL,0, 0);
filler(buffer, "..", NULL,0, 0);
filler(buffer, name, &stbuf,0, 0);
now compile the program:
./configure --prefix=/usr
make
make install
this was successfully compiled and installed on Linux , I am currently working my way though the Beyond Linux from Scratch book, the goal is to have a custom OS.
checking for FUSE... no
So I think you need to try install fuse because it's required listed in README.md.
To install fuse-exfat and exfat-utils packages:
sudo apt-get install fuse-exfat exfat-utils

error installing a package in R pertaining stringr package [duplicate]

This question already has an answer here:
Error installing r packages (Linux Mint 17.1) "error: C preprocessor "g++ -E" fails sanity check"
(1 answer)
Closed 7 years ago.
I have problem with installing packages in RStudio.
I'm using Linux Mint and have already installed libgdal-dev and libproj-dev.
Here's the text in the terminal:
* installing *source* package ‘stringi’ ...
** package ‘stringi’ successfully unpacked and MD5 sums checked
checking for local ICUDT_DIR... icu55/data
checking for R_HOME... /usr/lib/R
checking for R... /usr/lib/R/bin/R
checking for R >= 3.1.0... no
*** disabling C++11 use
checking for cat... /bin/cat
checking for gcc... gcc -std=gnu99
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc -std=gnu99 accepts -g... yes
checking for gcc -std=gnu99 option to accept ISO C89... none needed
checking how to run the C preprocessor... g++ -E
configure: error: in `/tmp/Rtmp3NFJZN/R.INSTALL28c32774afde/stringi':
configure: error: C preprocessor "g++ -E" fails sanity check
See `config.log' for more details
ERROR: configuration failed for package ‘stringi’
* removing ‘/home/varum/R/x86_64-pc-linux-gnu-library/3.0/stringi’
Warning in install.packages :
installation of package ‘stringi’ had non-zero exit status
The downloaded source packages are in
‘/tmp/Rtmpv9QKWM/downloaded_packages’
Any ideas where the problem is?
checking for R >= 3.1.0... no
It might help to update your R version. The current release is version 3.2.2
Check the installation guidelines here.
Maybe installing the g++ could help
sudo apt-get install g++

gcc on my linux system is installed, still giving failure in installation

When I tried to install libxml2 on my linux server, it is giving me following error. Gcc on my machine is installed as well as fully updated, still it gives me error that your C compiler is not working, can anyone give me suggestion how to overcome it.
[root#localhost libxml2-2.8.0]# ./configure
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking for gcc... gcc
checking whether the C compiler works... no
configure: error: in `/root/tmpdir/libxml2-2.8.0':
configure: error: C compiler cannot create executables
See `config.log' for more details
Just a few comments, not necessarily a solution... Do not use root for everyday usage (for me compiling libxml2 is an everyday situation). I would advise to create a "normal" user, and use it to work on your computer. configure, make with that user, and then sudo make install.
Then, depending on your Linux, I am almost sure there is a package for libxml2 and libxml2-devel. Try to install that, instead of manually compiling. This install by compile approach after some time tends to bring chaos to your computer...
Edit: To answer your comment:
get the RPM: wget ftp://rpmfind.net/linux/fedora/linux/development/rawhide/x86_64/os/Packages/l/libxml2-2.9.1-2.fc20.x86_64.rpm
(up here be sure about your architecture, select the correct one, last column)
install the RPM: [sudo] yum --nogpgcheck localinstall libxml2-2.9.1-2.fc20.x86_64.rpm
you might or might not need sudo... if you run this as root you will not need it.
As in your output C compiler cannot create executables
Can you compile simple c file using gcc
in the configure file it checks the following
# Try to create an executable without -o first, disregard a.out.
# It will help us diagnose broken compilers, and finding out an intuition
# of exeext.
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
$as_echo_n "checking whether the C compiler works... " >&6; }
ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'
# The possible output files:
ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
does gcc without -o option provide executable file

Resources