CAIDA / libbgpstream

Client-side C library and CLI tool of the BGPStream project
https://bgpstream.caida.org
BSD 2-Clause "Simplified" License
44 stars 27 forks source link

WANDIO support required #230

Closed ACodingfreak closed 2 years ago

ACodingfreak commented 2 years ago

This issue is observed in the past as mentioned below. I am creating a new one with new logs with latest git clone in Ubuntu 20.04

https://github.com/CAIDA/libbgpstream/issues/191

when running ./configure from cloned repo I am seeing the following error

error: wandio HTTP support required. Ensure you have a working Internet connection and that libcurl is installed before building wandio.

Looks like the link https://broker.bgpstream.caida.org/v1/ is not reachable

from config.log:

configure:14324: gcc -o conftest -g -O2 -pthread conftest.c -lwandio >&5 configure:14324: $? = 0 configure:14324: ./conftest configure:14324: $? = 1 configure: program exited with status 1 configure: failed program was: / confdefs.h / #define PACKAGE_NAME "bgpstream" #define PACKAGE_TARNAME "bgpstream" #define PACKAGE_VERSION "1.2.3" #define PACKAGE_STRING "bgpstream 1.2.3" #define PACKAGE_BUGREPORT "bgpstream-info@caida.org" #define PACKAGE_URL "" #define BGPSTREAM_MAJOR_VERSION 1 #define BGPSTREAM_MID_VERSION 2 #define BGPSTREAM_MINOR_VERSION 3 #define LIBBGPSTREAM_MAJOR_VERSION 2 #define LIBBGPSTREAM_MID_VERSION 0 #define LIBBGPSTREAM_MINOR_VERSION 0 #define STDC_HEADERS 1 #define HAVE_SYS_TYPES_H 1 #define HAVE_SYS_STAT_H 1 #define HAVE_STDLIB_H 1 #define HAVE_STRING_H 1 #define HAVE_MEMORY_H 1 #define HAVE_STRINGS_H 1 #define HAVE_INTTYPES_H 1 #define HAVE_STDINT_H 1 #define HAVE_UNISTD_H 1 #define HAVE_DLFCN_H 1 #define LT_OBJDIR ".libs/" #define PACKAGE "bgpstream" #define VERSION "1.2.3" #define HAVE_GETTIMEOFDAY 1 #define HAVE_MEMSET 1 #define HAVE_STRDUP 1 #define HAVE_STRSTR 1 #define HAVE_STDLIB_H 1 #define HAVE_MALLOC 1 #define HAVE_STDLIB_H 1 #define HAVE_INTTYPES_H 1 #define HAVE_LIMITS_H 1 #define HAVE_MATH_H 1 #define HAVE_STDLIB_H 1 #define HAVE_STRING_H 1 #define HAVE_TIME_H 1 #define HAVE_SYS_TIME_H 1 #define PTHREAD_YIELD_FUNC pthread_yield #define HAVE_PTHREAD_PRIO_INHERIT 1 #define HAVE_PTHREAD 1 #define WITH_DATA_INTERFACE_BROKER 1 #define WITH_DATA_INTERFACE_SINGLEFILE 1 #define WITH_DATA_INTERFACE_CSVFILE 1 / end confdefs.h. /
#include
int main() {
io_t *file = wandio_create("https://broker.bgpstream.caida.org/v1/");
return (file == NULL);
}

configure:14327: error: wandio HTTP support required. Ensure you have a working Internet connection and that libcurl is installed before building wandio.

ACodingfreak commented 2 years ago

configure script is auto-generated with following code which seems to be wrong.

cat confdefs.h - <<_ACEOF >conftest.$ac_ext / end confdefs.h. /

#include <wandio.h>
int main() {
  io_t *file = wandio_create("https://broker.bgpstream.caida.org/v1/");
  return (file == NULL);
}

_ACEOF

According to below commit it should have been proper link

https://github.com/CAIDA/libbgpstream/pull/192/commits

alistairking commented 2 years ago

If you're sure you have the latest version of the code checked out, you could try re-running ./autogen.sh to rebuild the configure script.

ACodingfreak commented 2 years ago

Issue is in the configure.ac file in bgpstream project

image

The same logic in libbgpstream seams to be fine as shown below

image

ACodingfreak commented 2 years ago

If you're sure you have the latest version of the code checked out, you could try re-running ./autogen.sh to rebuild the configure script.

I I did try a complete clean build as mentioned below and still see the same issue

git clone https://github.com/CAIDA/bgpstream.git cd bgpstream/ ./autogen.sh ./configure

alistairking commented 2 years ago

But you've opened an issue against the libbgpstream project?

https://github.com/CAIDA/bgpstream/ is deprecated in favor of libbgpstream and basically unmaintained at this point. If you want to submit a PR to that repo then I'm sure we can merge it, but I'd strongly encourage you to upgrade to BGPStream v2.

ACodingfreak commented 2 years ago

Thanks for the reply @alistairking .

My bad.

Where can i get the access to BGPStreamV2 ? is that a separate repo ?

alistairking commented 2 years ago

That's this repo :)

You can follow the instructions here: https://bgpstream.caida.org/docs/install/bgpstream#ubuntu

ACodingfreak commented 2 years ago

No wonder I faced many issues compiling BGPSTREAM in Ubuntu 22.04 and I have reverted to Ubuntu 20.04 to try the same.

I guess README inside BGPSTREAM should be updated with a NOTE recommending v2.0. Let me try the instructions shared.

ACodingfreak commented 2 years ago

I understand this is not the issue of bgpstream but one minor inconvenience is WANDIO path mentioned in installation steps is unreachable

https://research.wand.net.nz/software/libwandio.php

alistairking commented 2 years ago

It should probably be https://github.com/LibtraceTeam/wandio

ACodingfreak commented 2 years ago

Agree.

If you are planning to update the install script then below order of commands should work

git clone https://github.com/LibtraceTeam/wandio cd wandio/ ./bootstrap.sh ./configure make sudo make install sudo ldconfig

alistairking commented 2 years ago

Feel free to submit a PR for this

ACodingfreak commented 2 years ago

But this change is needed in the below website. Where can I submit pull request for that ?

https://bgpstream.caida.org/docs/install/bgpstream#ubuntu

alistairking commented 2 years ago

Oh good point. It should be in here: https://github.com/caida/bgpstream-web

ACodingfreak commented 2 years ago

Thanks for the link. Let me search for the exact page.

Also the README file of libbgpstream points to downloading the code from BGPSTREAM repo which is no more maintained. Dont you think it should be corrected ?

https://github.com/CAIDA/libbgpstream

Ideally current name of the libbgpstream repo should be BGPStreamv2.0 instead of libbgpstream. As per my understanding libbgpstream is just a library where as BGPSTREAM is the framework containing libbgpstream library, applications like pybgpstream, bgpreader and so on.

alistairking commented 2 years ago

Sure. Again, PR's are welcome.

As per my understanding libbgpstream is just a library where as BGPSTREAM is the framework containing libbgpstream library

This is exactly why this repo is called libbgpstream and not bgpstream. This repo only contains the bgpstream library (and bgpreader).

pybgpstream is here: https://github.com/caida/pybgpstream

ACodingfreak commented 2 years ago

Closing the issue as it is resolved in Ubuntu 20.04 using bgpstream v2.0