|
|
|
|
Snort Forums Archive
Archive Home » Third Party Tools » Compile barnyard-0.2.0 on RHEL v4 WS -error (snort works)
Please note that the categories listed below represent an archived version of our forums pages. To view the current version and be able to post and reply to threads, please register and login here to go to the full forums pages.
[ Notice: Full Version of This Topic ]
Compile barnyard-0.2.0 on RHEL v4 WS -error (snort works)
Posted by icurnet on June 14, 2005 06:29:03
I am running RHEL v4 WS here, using RPMs for mysql, etc. just like I have always done. However, when I run ./configure --enable-mysql to compile barnyard I get the following error:
[snip]
checking for strerror... yes
checking for /usr/include/mysql/mysql.h... yes
checking for mysql_real_connect in -lmysqlclient... no
**********************************************
ERROR: unable to find mysqlclient library
checked in the following places
/usr/lib/mysql
**********************************************
RPMs installed:
mysql-4.1.10a-2.RHEL4.1
mysql-devel-4.1.10a-2.RHEL4.1
mysql-server-4.1.10a-2.RHEL4.1
pcre-4.5-3
pcre-devel-4.5-3
gcc-3.4.3-22.1
I was able to compile snort-2.2.0 with no errors (./configure --with-mysql).
Contents of /usr/lib/mysql are:
ls -l /usr/lib/mysql/
-rw-r--r-- 1 root root 10196 May 12 21:11 libdbug.a
-rw-r--r-- 1 root root 41890 May 12 21:11 libheap.a
-rw-r--r-- 1 root root 14298 May 12 21:11 libmerge.a
-rw-r--r-- 1 root root 329008 May 12 21:11 libmyisam.a
-rw-r--r-- 1 root root 26222 May 12 21:11 libmyisammrg.a
-rw-r--r-- 1 root root 1189718 May 12 21:11 libmysqlclient.a
-rw-r--r-- 1 root root 1197552 May 12 21:11 libmysqlclient_r.a
lrwxrwxrwx 1 root root 26 Jun 13 17:44 libmysqlclient_r.so -> libmysqlclient_r.so.14.0.0
lrwxrwxrwx 1 root root 26 Jun 13 17:16 libmysqlclient_r.so.14 -> libmysqlclient_r.so.14.0.0
-rwxr-xr-x 1 root root 1052160 May 12 21:11 libmysqlclient_r.so.14.0.0
lrwxrwxrwx 1 root root 24 Jun 13 17:44 libmysqlclient.so -> libmysqlclient.so.14.0.0
lrwxrwxrwx 1 root root 24 Jun 13 17:16 libmysqlclient.so.14 -> libmysqlclient.so.14.0.0
-rwxr-xr-x 1 root root 1046360 May 12 21:11 libmysqlclient.so.14.0.0
-rw-r--r-- 1 root root 966100 May 12 21:11 libmystrings.a
-rw-r--r-- 1 root root 250126 May 12 21:11 libmysys.a
-rw-r--r-- 1 root root 104816 May 12 21:11 libnisam.a
-rw-r--r-- 1 root root 5246 May 12 21:11 libvio.a
-rwxr-xr-x 1 root root 11051 May 12 21:11 mysqlbug
-rwxr-xr-x 1 root root 4403 May 12 21:11 mysql_config
Any help is appreciated (and a good nights sleep might make a solution jump out tomorrow, but reply anyway).
Thanks,
david |
|
Posted by dawookie on June 16, 2005 11:59:45
I just tested my spec file for RHEL4 after yesterdays up2date run.
--- start barnyard.spec ---
Summary: A fast output system for Snort
Name: barnyard
Version: 0.2.0
Release: 3
Copyright: QPL
Group: Applications/Communications
Source: http://www.snort.org/dl/barnyard/barnyard-0.2.0.tar.gz
URL: http://www.snort.org/
BuildRoot: %{_tmppath}/%{name}-root
%description
%prep
%setup -q
%build
%configure --enable-mysql
make
%install
rm -rf %{buildroot}
%makeinstall
mkdir %{buildroot}/etc
cp etc/barnyard.conf %{buildroot}/etc
%clean
rm -rf %{buildroot}
%post -p /sbin/ldconfig
%postun -p /sbin/ldconfig
%files
%doc README LICENSE.QPL COPYING AUTHORS docs/*
%defattr(-, root, root)
/usr/bin/barnyard
%config /etc/barnyard.conf
%changelog
* Thu Jun 16 2005 Rik Schneider
- Rebuild after RHEL4 system update
* Fri Apr 08 2005 Rik Schneider
- Initial RPM release.
--- end barnyard.spec ---
HTH,
dawookie |
|
Posted by icurnet on June 16, 2005 12:40:35
Thanks for the reply but you lost me a little there ;)
I have not gotten around this issue. If you can help please let me know.
Thanks!
David |
|
Posted by icurnet on June 16, 2005 13:03:43
The config.log follows for the failed attempt to compile barnyard-0.2.0 on RHEL v4 WS as noted above.
tail -10000 config.log
[root@wsp015485wss barnyard-0.2.0]# tail -10000 config.log
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
configure:574: checking for a BSD compatible install
configure:627: checking whether build environment is sane
configure:684: checking whether make sets ${MAKE}
configure:730: checking for working aclocal-1.4
configure:743: checking for working autoconf
configure:756: checking for working automake-1.4
configure:769: checking for working autoheader
configure:782: checking for working makeinfo
configure:798: checking for gcc
configure:911: checking whether the C compiler (gcc ) works
configure:927: gcc -o conftest conftest.c 1>&5
configure:953: checking whether the C compiler (gcc ) is a cross-compiler
configure:958: checking whether we are using GNU C
configure:967: gcc -E conftest.c
configure:986: checking whether gcc accepts -g
configure:1021: checking for gcc option to accept ANSI C
configure:1074: gcc -c -g -O2 conftest.c 1>&5
configure:1100: checking for ranlib
configure:1133: checking for gcc
configure:1246: checking whether the C compiler (gcc -g -O2 ) works
configure:1262: gcc -o conftest -g -O2 conftest.c 1>&5
configure:1288: checking whether the C compiler (gcc -g -O2 ) is a cross-compiler
configure:1293: checking whether we are using GNU C
configure:1321: checking whether gcc accepts -g
configure:1377: checking host system type
configure:1401: checking whether byte ordering is bigendian
configure:1419: gcc -c -g -O2 -Wall conftest.c 1>&5
configure:1434: gcc -c -g -O2 -Wall conftest.c 1>&5
configure: In function `main':
configure:1429: error: `not' undeclared (first use in this function)
configure:1429: error: (Each undeclared identifier is reported only once
configure:1429: error: for each function it appears in.)
configure:1429: error: syntax error before "big"
configure: failed program was:
#line 1423 "configure"
#include "confdefs.h"
#include
#include
int main() {
#if BYTE_ORDER != BIG_ENDIAN
not big endian
#endif
; return 0; }
configure:1641: checking how to run the C preprocessor
configure:1662: gcc -E conftest.c >/dev/null 2>conftest.out
configure:1724: checking for strings.h
configure:1734: gcc -E conftest.c >/dev/null 2>conftest.out
configure:1764: checking for string.h
configure:1774: gcc -E conftest.c >/dev/null 2>conftest.out
configure:1804: checking for stdlib.h
configure:1814: gcc -E conftest.c >/dev/null 2>conftest.out
configure:1844: checking for unistd.h
configure:1854: gcc -E conftest.c >/dev/null 2>conftest.out
configure:1884: checking for sys/sockio.h
configure:1894: gcc -E conftest.c >/dev/null 2>conftest.out
configure:1890:24: sys/sockio.h: No such file or directory
configure: failed program was:
#line 1889 "configure"
#include "confdefs.h"
#include
configure:1924: checking for paths.h
configure:1934: gcc -E conftest.c >/dev/null 2>conftest.out
configure:1964: checking for socket in -lsocket
configure:1983: gcc -o conftest -g -O2 -Wall conftest.c -lsocket 1>&5
/usr/bin/ld: cannot find -lsocket
collect2: ld returned 1 exit status
configure: failed program was:
#line 1972 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
builtin and then its argument prototype would still apply. */
char socket();
int main() {
socket()
; return 0; }
configure:2150: checking whether printf must be declared
configure:2179: gcc -c -g -O2 -Wall conftest.c 1>&5
configure: In function `main':
configure:2175: warning: unused variable `pfn'
configure:2150: checking whether fprintf must be declared
configure:2179: gcc -c -g -O2 -Wall conftest.c 1>&5
configure: In function `main':
configure:2175: warning: unused variable `pfn'
configure:2150: checking whether syslog must be declared
configure:2179: gcc -c -g -O2 -Wall conftest.c 1>&5
configure: In function `main':
configure:2175: warning: unused variable `pfn'
configure:2150: checking whether puts must be declared
configure:2179: gcc -c -g -O2 -Wall conftest.c 1>&5
configure: In function `main':
configure:2175: warning: unused variable `pfn'
configure:2150: checking whether fputs must be declared
configure:2179: gcc -c -g -O2 -Wall conftest.c 1>&5
configure: In function `main':
configure:2175: warning: unused variable `pfn'
configure:2150: checking whether fputc must be declared
configure:2179: gcc -c -g -O2 -Wall conftest.c 1>&5
configure: In function `main':
configure:2175: warning: unused variable `pfn'
configure:2150: checking whether fopen must be declared
configure:2179: gcc -c -g -O2 -Wall conftest.c 1>&5
configure: In function `main':
configure:2175: warning: unused variable `pfn'
configure:2150: checking whether fclose must be declared
configure:2179: gcc -c -g -O2 -Wall conftest.c 1>&5
configure: In function `main':
configure:2175: warning: unused variable `pfn'
configure:2150: checking whether fwrite must be declared
configure:2179: gcc -c -g -O2 -Wall conftest.c 1>&5
configure: In function `main':
configure:2175: warning: unused variable `pfn'
configure:2150: checking whether fflush must be declared
configure:2179: gcc -c -g -O2 -Wall conftest.c 1>&5
configure: In function `main':
configure:2175: warning: unused variable `pfn'
configure:2150: checking whether getopt must be declared
configure:2179: gcc -c -g -O2 -Wall conftest.c 1>&5
configure: In function `main':
configure:2175: warning: unused variable `pfn'
configure:2150: checking whether bzero must be declared
configure:2179: gcc -c -g -O2 -Wall conftest.c 1>&5
configure: In function `main':
configure:2175: warning: unused variable `pfn'
configure:2150: checking whether bcopy must be declared
configure:2179: gcc -c -g -O2 -Wall conftest.c 1>&5
configure: In function `main':
configure:2175: warning: unused variable `pfn'
configure:2150: checking whether memset must be declared
configure:2179: gcc -c -g -O2 -Wall conftest.c 1>&5
configure: In function `main':
configure:2175: warning: unused variable `pfn'
configure:2150: checking whether strtol must be declared
configure:2179: gcc -c -g -O2 -Wall conftest.c 1>&5
configure: In function `main':
configure:2175: warning: unused variable `pfn'
configure:2150: checking whether strcasecmp must be declared
configure:2179: gcc -c -g -O2 -Wall conftest.c 1>&5
configure: In function `main':
configure:2175: warning: unused variable `pfn'
configure:2150: checking whether strncasecmp must be declared
configure:2179: gcc -c -g -O2 -Wall conftest.c 1>&5
configure: In function `main':
configure:2175: warning: unused variable `pfn'
configure:2150: checking whether strerror must be declared
configure:2179: gcc -c -g -O2 -Wall conftest.c 1>&5
configure: In function `main':
configure:2175: warning: unused variable `pfn'
configure:2150: checking whether perror must be declared
configure:2179: gcc -c -g -O2 -Wall conftest.c 1>&5
configure: In function `main':
configure:2175: warning: unused variable `pfn'
configure:2150: checking whether socket must be declared
configure:2179: gcc -c -g -O2 -Wall conftest.c 1>&5
configure: In function `main':
configure:2175: warning: unused variable `pfn'
configure:2150: checking whether sendto must be declared
configure:2179: gcc -c -g -O2 -Wall conftest.c 1>&5
configure: In function `main':
configure:2175: warning: unused variable `pfn'
configure:2150: checking whether vsnprintf must be declared
configure:2179: gcc -c -g -O2 -Wall conftest.c 1>&5
configure: In function `main':
configure:2175: warning: unused variable `pfn'
configure:2150: checking whether snprintf must be declared
configure:2179: gcc -c -g -O2 -Wall conftest.c 1>&5
configure: In function `main':
configure:2175: warning: unused variable `pfn'
configure:2150: checking whether strtoul must be declared
configure:2179: gcc -c -g -O2 -Wall conftest.c 1>&5
configure: In function `main':
configure:2175: warning: unused variable `pfn'
configure:2210: checking for snprintf
configure:2238: gcc -o conftest -g -O2 -Wall conftest.c 1>&5
configure:2222: warning: conflicting types for built-in function 'snprintf'
configure:2265: checking for strlcpy
configure:2293: gcc -o conftest -g -O2 -Wall conftest.c 1>&5
/tmp/ccamIy2P.o(.text+0xd): In function `main':
/vol1/source/barnyard-0.2.0/configure:2287: undefined reference to `strlcpy'
collect2: ld returned 1 exit status
configure: failed program was:
#line 2270 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char strlcpy(); below. */
#include
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
builtin and then its argument prototype would still apply. */
char strlcpy();
int main() {
/* The GNU C library defines this for functions which it implements
to always fail with ENOSYS. Some functions are actually named
something starting with __ and the normal name is an alias. */
#if defined (__stub_strlcpy) || defined (__stub___strlcpy)
choke me
#else
strlcpy();
#endif
; return 0; }
configure:2320: checking for strlcat
configure:2348: gcc -o conftest -g -O2 -Wall conftest.c 1>&5
/tmp/ccEmaPy5.o(.text+0xd): In function `main':
/vol1/source/barnyard-0.2.0/configure:2342: undefined reference to `strlcat'
collect2: ld returned 1 exit status
configure: failed program was:
#line 2325 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char strlcat(); below. */
#include
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
builtin and then its argument prototype would still apply. */
char strlcat();
int main() {
/* The GNU C library defines this for functions which it implements
to always fail with ENOSYS. Some functions are actually named
something starting with __ and the normal name is an alias. */
#if defined (__stub_strlcat) || defined (__stub___strlcat)
choke me
#else
strlcat();
#endif
; return 0; }
configure:2375: checking for strerror
configure:2403: gcc -o conftest -g -O2 -Wall conftest.c 1>&5
configure:2438: gcc -c -g -O2 -Wall conftest.c 1>&5
configure: In function `main':
configure:2434: warning: assignment discards qualifiers from pointer target type
configure:2494: checking for /usr/include/mysql/mysql.h
configure:2504: gcc -E -I/usr/include/mysql -DENABLE_MYSQL conftest.c >/dev/null 2>conftest.out
configure:2559: checking for mysql_real_connect in -lmysqlclient
configure:2578: gcc -o conftest -g -O2 -Wall -I/usr/include/mysql -DENABLE_MYSQL -L/usr/lib/mysql conftest.c -lmysqlclient -lz -lssl -lmysqlclient 1>&5
/usr/bin/ld: cannot find -lz
collect2: ld returned 1 exit status
configure: failed program was:
#line 2567 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
builtin and then its argument prototype would still apply. */
char mysql_real_connect();
int main() {
mysql_real_connect()
; return 0; }
====
Any help is appreciated.
David |
|
Posted by dawookie on June 16, 2005 13:45:46
Sorry about that.
I nearly always use rpm for software installs on linux. We are using RHEL4 here for our sensor and test updates on another box before pushing them out to the sensor.
The specfile I included is what I used to build our production barnyard install. I can make the rpm or source rpm available if it would help you.
I tested my spec file for barnyard on RHEL4 after yesterdays up2date run. I was able to rebuild a barnyard RPM for for our use here.
If you are building an rpm are you using the configure macro or a manually created configure command in your specfile. If you are building by hand what does your configure command look like. Mine (created by the %configure macro for rpm) is:
./configure --build=i686-redhat-linux-gnu --host=i686-redhat-linux-gnu \ --target=i386-redhat-linux-gnu --program-prefix= --prefix=/usr \
--exec-prefix=/usr --bindir=/usr/bin --sbindir=/usr/sbin --sysconfdir=/etc \
--datadir=/usr/share --includedir=/usr/include --libdir=/usr/lib \
--libexecdir=/usr/libexec --localstatedir=/var --sharedstatedir=/usr/com \
--mandir=/usr/share/man --infodir=/usr/share/info --enable-mysql
On closer inspection of differences between my install and what you had listed I also have mysqlclient10-3.23.58-4.RHEL4.1 installed. If this is your problem it would be strange as ldd shows that barnyard is linked against /usr/lib/mysql/libmysqlclient.so.14 not /usr/lib/mysql/libmysqlclient.so.10
HTH,
dawookie |
|
Posted by thrawnkb on March 12, 2007 10:01:02
icurnet, I am running into the same problem in Ubuntu 6.10,
Did you manage to solve the problem?
Thanks |
|
|
|
|
|