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

Error when compile on Centos 7 #573

Closed
gibranduatiga opened this issue Sep 10, 2019 · 3 comments

Comments

@gibranduatiga
Copy link

commented Sep 10, 2019

Does anyone understand what this problem is caused by?
i run command --prefix=/opt/bro --enable-jemalloc and then make, but when the progress on 94% the program stopped with this error.

please.. help me, and thanks for advice before

In file included from /opt/bro/zeek/src/Func.cc:721:0:
zeek.bif:3625:2: error: ‘MMDB_lookup_result_s’ does not name a type
zeek.bif:3630:2: error: ‘MMDB_s’ does not name a type
zeek.bif: In constructor ‘MMDB::MMDB(const char*, stat)’:
zeek.bif:3640:35: error: ‘MMDB_MODE_MMAP’ was not declared in this scope
zeek.bif:3640:52: error: ‘mmdb’ was not declared in this scope
zeek.bif:3640:56: error: ‘MMDB_open’ was not declared in this scope
zeek.bif:3642:7: error: ‘MMDB_SUCCESS’ was not declared in this scope
zeek.bif:3644:48: error: ‘MMDB_strerror’ was not declared in this scope
zeek.bif: In destructor ‘MMDB::~MMDB()’:
zeek.bif:3650:14: error: ‘mmdb’ was not declared in this scope
zeek.bif:3650:18: error: ‘MMDB_close’ was not declared in this scope
zeek.bif: At global scope:
zeek.bif:3653:1: error: ‘MMDB_lookup_result_s’ does not name a type
zeek.bif: In member function ‘bool MMDB::StaleDB()’:
zeek.bif:3686:17: error: ‘mmdb’ was not declared in this scope
zeek.bif:3692:18: error: ‘mmdb’ was not declared in this scope
zeek.bif: In member function ‘const char* MMDB::Filename()’:
zeek.bif:3701:9: error: ‘mmdb’ was not declared in this scope
zeek.bif: At global scope:
zeek.bif:3775:45: error: ‘MMDB_lookup_result_s’ has not been declared
zeek.bif: In function ‘bool mmdb_lookup(const IPAddr&, int&, bool)’:
zeek.bif:3796:28: error: ‘class MMDB’ has no member named ‘Lookup’
zeek.bif:3797:28: error: ‘class MMDB’ has no member named ‘Lookup’
zeek.bif:3807:16: error: request for member ‘found_entry’ in ‘result’, which is of non-class type ‘int’
zeek.bif: At global scope:
zeek.bif:3810:49: error: ‘MMDB_lookup_result_s’ has not been declared
zeek.bif:3815:49: error: ‘MMDB_lookup_result_s’ has not been declared
zeek.bif:3820:27: error: ‘MMDB_entry_data_s’ was not declared in this scope
zeek.bif:3820:46: error: ‘entry_data’ was not declared in this scope
zeek.bif:3820:58: error: expected primary-expression before ‘int’
zeek.bif:3821:27: error: expected primary-expression before ‘int’
zeek.bif:3821:41: error: expression list treated as compound expression in initializer [-fpermissive]
zeek.bif:3822:2: error: expected ‘,’ or ‘;’ before ‘{’ token
In file included from /opt/bro/zeek/aux/broker/3rdparty/caf/libcaf_core/caf/make_actor.hpp:28:0,
from /opt/bro/zeek/aux/broker/3rdparty/caf/libcaf_core/caf/actor_system.hpp:46,
from /opt/bro/zeek/aux/broker/3rdparty/caf/libcaf_core/caf/scoped_actor.hpp:23,
from /opt/bro/zeek/aux/broker/include/broker/store.hh:11,
from /opt/bro/zeek/src/broker/Manager.h:6,
from stats.bif:5,
from /opt/bro/zeek/src/Func.cc:722:
/opt/bro/zeek/aux/broker/3rdparty/caf/libcaf_core/caf/actor_storage.hpp:31:28: error: expected declaration before end of line
#pragma GCC diagnostic push
^
In file included from /opt/bro/zeek/src/Func.cc:721:0:
zeek.bif: In member function ‘const char* MMDB::Filename()’:
zeek.bif:3702:2: warning: control reaches end of non-void function [-Wreturn-type]
make[3]: *** [src/CMakeFiles/zeek.dir/Func.cc.o] Error 1
make[3]: Leaving directory /opt/bro/zeek/build' make[2]: *** [src/CMakeFiles/zeek.dir/all] Error 2 make[2]: Leaving directory /opt/bro/zeek/build'
make[1]: *** [all] Error 2
make[1]: Leaving directory `/opt/bro/zeek/build'
make: *** [all] Error 2

@jsiwek

This comment has been minimized.

Copy link
Member

commented Sep 10, 2019

We regularly build the master branch on CentOS 7 and I just tested a build on a new image after installing dependencies (including libmaxminddb and jemalloc), so likely something about your system config going wrong. Might be helpful to provide the full output of your ./configure command.

In file included from /opt/bro/zeek/src/Func.cc:721:0:
zeek.bif:3625:2: error: ‘MMDB_lookup_result_s’ does not name a type

You have the libmaxminddb-devel package installed ? Or is there some other maxminddb.h file other than the one in /usr/include/maxminddb.h ? What's that one look like ? It should be the thing to provide the missing type definitions that the compiler is complaining about, but it seems like maybe your installation of libmaxminddb could be broken.

from /opt/bro/zeek/src/Func.cc:722:
/opt/bro/zeek/aux/broker/3rdparty/caf/libcaf_core/caf/actor_storage.hpp:31:28: error: expected declaration before end of line
#pragma GCC diagnostic push
^

What compiler and version are you using (e.g. output of c++ --version) ? This error seems like it would only show up on GCC less than 4.6, but Zeek requires at least GCC 4.8.3 (and Centos 7 should provide 4.8.4 now, so you should check if you need to install updates).

@gibranduatiga

This comment has been minimized.

Copy link
Author

commented Sep 12, 2019

I've install jemalloc & libmaxminddb-devel before..

[root@bro-ids gibran]# repoquery -a --installed | grep 'jemalloc|libmaxminddb*'
Failed to set locale, defaulting to C
jemalloc-0:3.6.0-1.el7.x86_64
jemalloc-devel-0:3.6.0-1.el7.x86_64
libmaxminddb-0:1.2.0-1.el7.x86_64
libmaxminddb-devel-0:1.2.0-1.el7.x86_64

I found a line file other than maxminddb.h, which is maxminddb_config.h and is that the cause of the problem? Btw, my current GCC version is 4.8.5.

[root@bro-ids gibran]# ls -alsrt /usr/include/max*
0 -rw-r--r--. 1 root root 0 Mar 27 2016 /usr/include/maxminddb_config.h
0 -rw-r--r--. 1 root root 0 Mar 27 2016 /usr/include/maxminddb.h

[root@bro-ids gibran]# gcc --version
gcc (GCC) 4.8.5 20150623 (Red Hat 4.8.5-36)
Copyright (C) 2015 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.

@jsiwek

This comment has been minimized.

Copy link
Member

commented Sep 12, 2019

[root@bro-ids gibran]# ls -alsrt /usr/include/max*
0 -rw-r--r--. 1 root root 0 Mar 27 2016 /usr/include/maxminddb_config.h
0 -rw-r--r--. 1 root root 0 Mar 27 2016 /usr/include/maxminddb.h

Those files are empty? That would explain the compile errors. They shouldn't be empty, so something is wrong with your system or package installation. Maybe try re-installing.

@jsiwek jsiwek closed this Sep 12, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.