CAIDA / bgpstream

BGP measurement analysis for the masses
GNU General Public License v2.0
109 stars 43 forks source link

./configure wandio http support error, ld problem (again, debian) #32

Closed amitkalani1 closed 7 years ago

amitkalani1 commented 8 years ago

I'm trying to compile under debian jessie according to http://bgpstream.caida.org/docs/install/bgpstream using a custom prefix path. I get wandio http support in ./configure as detailed in #1 but using prefixes (which is your solution to #1).

My configure line: ./configure --prefix=/home/username/bin/bgp/ CPPFLAGS='-I/home/username/bin/bgp/include/' LDFLAGS='-L/home/username/bin/bgp/lib/'

wandio is compiled with the necessary dependencies and same prefix, and wandiocat works. ./configure runs into a ld problem, when looking at the strace, the relevant part looks like this:

execve("./conftest", ["./conftest"], [/* 84 vars */]) = 0 brk(0) = 0x16c6000 access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory) mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f2984730000 access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory) open("/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3 fstat(3, {st_mode=S_IFREG|0644, st_size=173565, ...}) = 0 mmap(NULL, 173565, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7f2984705000 close(3) = 0 access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory) open("/lib/x86_64-linux-gnu/tls/x86_64/libwandio.so.1", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory) stat("/lib/x86_64-linux-gnu/tls/x86_64", 0x7fff59b0c020) = -1 ENOENT (No such file or directory) open("/lib/x86_64-linux-gnu/tls/libwandio.so.1", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory) stat("/lib/x86_64-linux-gnu/tls", 0x7fff59b0c020) = -1 ENOENT (No such file or directory) open("/lib/x86_64-linux-gnu/x86_64/libwandio.so.1", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory) stat("/lib/x86_64-linux-gnu/x86_64", 0x7fff59b0c020) = -1 ENOENT (No such file or directory) open("/lib/x86_64-linux-gnu/libwandio.so.1", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory) stat("/lib/x86_64-linux-gnu", {st_mode=S_IFDIR|0755, st_size=16384, ...}) = 0 open("/usr/lib/x86_64-linux-gnu/tls/x86_64/libwandio.so.1", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory) stat("/usr/lib/x86_64-linux-gnu/tls/x86_64", 0x7fff59b0c020) = -1 ENOENT (No such file or directory) open("/usr/lib/x86_64-linux-gnu/tls/libwandio.so.1", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory) stat("/usr/lib/x86_64-linux-gnu/tls", 0x7fff59b0c020) = -1 ENOENT (No such file or directory) open("/usr/lib/x86_64-linux-gnu/x86_64/libwandio.so.1", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory) stat("/usr/lib/x86_64-linux-gnu/x86_64", 0x7fff59b0c020) = -1 ENOENT (No such file or directory) open("/usr/lib/x86_64-linux-gnu/libwandio.so.1", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory) stat("/usr/lib/x86_64-linux-gnu", {st_mode=S_IFDIR|0755, st_size=122880, ...}) = 0 open("/lib/tls/x86_64/libwandio.so.1", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory) stat("/lib/tls/x86_64", 0x7fff59b0c020) = -1 ENOENT (No such file or directory) open("/lib/tls/libwandio.so.1", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory) stat("/lib/tls", 0x7fff59b0c020) = -1 ENOENT (No such file or directory) open("/lib/x86_64/libwandio.so.1", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory) stat("/lib/x86_64", 0x7fff59b0c020) = -1 ENOENT (No such file or directory) open("/lib/libwandio.so.1", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory) stat("/lib", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0 open("/usr/lib/tls/x86_64/libwandio.so.1", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory) stat("/usr/lib/tls/x86_64", 0x7fff59b0c020) = -1 ENOENT (No such file or directory) open("/usr/lib/tls/libwandio.so.1", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory) stat("/usr/lib/tls", 0x7fff59b0c020) = -1 ENOENT (No such file or directory) open("/usr/lib/x86_64/libwandio.so.1", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory) stat("/usr/lib/x86_64", 0x7fff59b0c020) = -1 ENOENT (No such file or directory) open("/usr/lib/libwandio.so.1", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory) stat("/usr/lib", {st_mode=S_IFDIR|0755, st_size=49152, ...}) = 0 writev(2, [{"./conftest", 10}, {": ", 2}, {"error while loading shared libra"..., 36}, {": ", 2}, {"libwandio.so.1", 14}, {": ", 2}, {"cannot open shared object file", 30}, {": ", 2}, {"No such file or directory", 25}, {"\n", 1}], 10) = 124 exit_group(127) = ? +++ exited with 127 +++

which essentially means that the LDFLAGS='-L/home/username/bin/bgp/lib/' parameter gets ignored for the wandio_create() test program. when commenting out the test in configure, it compiles and runs. I even tried to change the wandio_create() test program in configure to return 0, configure fails regardless.

alistairking commented 8 years ago

I'll try and reproduce on a VM and see if I can figure out what is going on.

alistairking commented 8 years ago

On a clean Debian Jessie (64bit) VM:

sudo apt-get update
sudo apt-get -y install build-essential
sudo apt-get -y install zlib1g-dev libbz2-dev libcurl4-openssl-dev

mkdir ~/src
cd ~/src/
wget http://research.wand.net.nz/software/wandio/wandio-1.0.3.tar.gz
tar zxf wandio-1.0.3.tar.gz
cd wandio-1.0.3/
./configure --prefix=$HOME/bin/bgp
make
make install

export LD_LIBRARY_PATH="$HOME/bin/bgp/lib:$LD_LIBRARY_PATH"

cd ~/src/
wget http://bgpstream.caida.org/bundles/caidabgpstreamwebhomepage/dists/bgpstream-1.1.0.tar.gz
tar zxf bgpstream-1.1.0.tar.gz
cd bgpstream-1.1.0/
./configure --prefix=$HOME/bin/bgp LDFLAGS=-L$HOME/bin/bgp/lib CPPFLAGS=-I$HOME/bin/bgp/include
make
make check
make install

I think the only difference here compared to the documentation is that I used wget instead of curl (it seems curl is not available on a fresh install whereas wget is).

I've included all the commands I ran in case there is something you're doing differently.

Hope this helps!

SoPrime commented 8 years ago

Have the same issue (configure: error: wandio HTTP support required.) under an ubuntu 14.04 VM, without any prefix or special installation paths.

here the exact sequence of commands I used:

aptitude install libbz2-dev zlib1g-dev libcurl4-openssl-dev
mkdir build
cd build
wget http://research.wand.net.nz/software/wandio/wandio-1.0.3.tar.gz
tar xzvf wandio-1.0.3.tar.gz
cd wandio-1.0.3/
./configure
make
make install
cd ..
wget http://bgpstream.caida.org/bundles/caidabgpstreamwebhomepage/dists/bgpstream-1.1.0.tar$
tar xzvf bgpstream-1.1.0.tar.gz
cd bgpstream-1.1.0/
./configure

wandio ./configure output:

configure: WANDIO version 1.0.3
configure: Compiled with compressed file (zlib) support: Yes
configure: Compiled with compressed file (bz2) support: Yes
configure: Compiled with compressed file (lzo write only) support: No
configure: Compiled with compressed file (lzma) support: No
configure: Compiled with http read (libcurl) support: Yes

BGPStream ./configure output:

configure: ---- BGPStream configuration ----
checking whether to build with data interface: broker... yes
checking whether to build with data interface: singlefile... yes
checking whether to build with data interface: csvfile... yes
checking whether to build with data interface: sqlite... no
configure: checking data interface dependencies...
checking for wandio HTTP support... configure: error: wandio HTTP support required. Ensure you have a working Internet connection and that libcurl is installed before building wandio.

Is there any more information I could give you to debug this?

Commenting out the check in the configure script as described in the first post works.

After that, a small test application I wrote seems to run without problems.

alistairking commented 8 years ago

Can you try the sudo ldconfig command after running make install?

alistairking commented 7 years ago

Are you still having problems with this?

alistairking commented 7 years ago

I'm going to close this. Feel free to reopen if you are still having problems.

andy19910403 commented 6 years ago

sorry I have same problem after try the sudo ldconfig

alistairking commented 6 years ago

What OS are you using?