argus-clients rasql/rasqlinsert compile/make errors
Drew Dixon
dwdixon at umich.edu
Sat Apr 7 18:33:19 EDT 2018
Thank you Eric- somehow the .threads file disappeared from my source code
directory...however I'm still having issues after fixing that...still can't
seem to get any of the rasql* clients to install...
...snip....
making in ./ramysql
make[2]: Entering directory
`/home/argus/argus-clients-3.0.8.2-umich/examples/ramysql'
gcc -O -I. -I../../include -I../../common -I/usr/include/mysql
-DHAVE_CONFIG_H -c ./rasqlinsert.c
gcc -O -I. -I../../include -I../../common -I/usr/include/mysql
-DHAVE_CONFIG_H -c ./raclient.c
gcc -O -o ../../bin/rasqlinsert raclient.o rasqlinsert.o
-L/usr/lib64/mysql -lmysqlclient ../../lib/argus_parse.a
../../lib/argus_common.a ../../lib/argus_client.a -lm -lpthread -lGeoIP
-lz -lncurses -lreadline
raclient.o: In function `RaParseComplete':
raclient.c:(.text+0x41): undefined reference to `ArgusDebug'
raclient.c:(.text+0xc7): undefined reference to `ArgusDebug'
raclient.o: In function `ArgusThreadsInit':
raclient.c:(.text+0x27c): undefined reference to `ArgusDebug'
raclient.o: In function `RaProcessThisEventRecord':
raclient.c:(.text+0xb38): undefined reference to `ArgusDebug'
raclient.o: In function `RaProcessManRecord':
raclient.c:(.text+0xb5f): undefined reference to `ArgusDebug'
raclient.o:raclient.c:(.text+0xcea): more undefined references to
`ArgusDebug' follow
collect2: error: ld returned 1 exit status
make[2]: *** [../../bin/rasqlinsert] Error 1
make[2]: Leaving directory
`/home/argus/argus-clients-3.0.8.2-umich/examples/ramysql'
make[1]: *** [all] Error 2
make[1]: Leaving directory
`/home/argus/argus-clients-3.0.8.2-umich/examples'
make: *** [all] Error 2
...snip....
bin]$ pwd
/usr/local/bin
bin]$ ls -ltha ras*
-rwxr-xr-x. 1 root root 670K Apr 7 18:13 rastrip
-rwxr-xr-x. 1 root root 684K Apr 7 18:13 rastream
-rwxr-xr-x. 1 root root 666K Apr 7 18:13 raservices
-rwxr-xr-x. 1 root root 679K Apr 7 18:13 rasplit
-rwxr-xr-x. 1 root root 670K Apr 7 18:13 rasort
bin]$ ls -ltha ra* | sort -d
-rwxr-xr-x. 1 root root 11K Apr 7 18:13 radark
-rwxr-xr-x. 1 root root 1.1M Apr 7 18:13 radump
-rwxr-xr-x. 1 root root 4.0K Apr 7 18:13 raports
-rwxr-xr-x. 1 root root 5.4K Apr 7 18:13 rahosts
-rwxr-xr-x. 1 root root 5.8K Apr 7 18:13 radecode
-rwxr-xr-x. 1 root root 63K Apr 7 18:13 ragraph
-rwxr-xr-x. 1 root root 666K Apr 7 18:13 rafilteraddr
-rwxr-xr-x. 1 root root 666K Apr 7 18:13 ralabel
-rwxr-xr-x. 1 root root 666K Apr 7 18:13 raservices
-rwxr-xr-x. 1 root root 670K Apr 7 18:13 raevent
-rwxr-xr-x. 1 root root 670K Apr 7 18:13 ragrep
-rwxr-xr-x. 1 root root 670K Apr 7 18:13 rasort
-rwxr-xr-x. 1 root root 670K Apr 7 18:13 rastrip
-rwxr-xr-x. 1 root root 670K Apr 7 18:13 ratemplate
-rwxr-xr-x. 1 root root 670K Apr 7 18:13 ratimerange
-rwxr-xr-x. 1 root root 674K Apr 7 18:13 racluster
-rwxr-xr-x. 1 root root 674K Apr 7 18:13 rahisto
-rwxr-xr-x. 1 root root 674K Apr 7 18:13 rarpwatch
-rwxr-xr-x. 1 root root 675K Apr 7 18:13 rapath
-rwxr-xr-x. 1 root root 675K Apr 7 18:13 rauserdata
-rwxr-xr-x. 1 root root 678K Apr 7 18:13 ra
-rwxr-xr-x. 1 root root 679K Apr 7 18:13 rasplit
-rwxr-xr-x. 1 root root 680K Apr 7 18:13 racount
-rwxr-xr-x. 1 root root 684K Apr 7 18:13 rastream
-rwxr-xr-x. 1 root root 688K Apr 7 18:13 ranonymize
-rwxr-xr-x. 1 root root 691K Apr 7 18:13 raconvert
-rwxr-xr-x. 1 root root 699K Apr 7 18:13 rabins
-rwxr-xr-x. 1 root root 703K Apr 7 18:13 rapolicy
-rwxr-xr-x. 1 root root 760K Apr 7 18:13 ratop
Many thanks,
-Drew
On Sat, Apr 7, 2018 at 4:46 PM, Eric Kinzie <eric at qosient.com> wrote:
> On Sat Apr 07 15:48:31 -0400 2018, Drew Dixon wrote:
> > I've been wanting to experiment with rasqlinsert so where I have my
> > radium->racluster->archives test/dev server I realized I needed to
> install
> > some mysql packages to satisfy the dependencies for building the rasql*
> > client tools...I have all the required dependencies installed and so I
> went
> > to re-compile argus-clients (our umich version with IPFIX compatibility
> up
> > to the Netflow v9 field level) and pretty certain we've only modified
> > argus_import.c
> > to create the new v10 routines etc. (incase that might have any
> > side-effects or implications here I wanted to mention that)
> >
> > *Installed:*
> > mysql-community-client.x86_64 (5.7.21-1.el7)
> > mysql-community-common.x86_64 (5.7.21-1.el7)
> > mysql-community-devel.x86_64 (5.7.21-1.el7)
> > mysql-community-libs.x86_64 (5.7.21-1.el7)
> > mysql-community-libs-compat.x86_64 (5.7.21-1.el7)
> > mysql-community-server.x86_64 (5.7.21-1.el7)
> >
> > gcc.x86_64 (4.8.5-16.el7_4.2)
> > make.x86_64 (1:3.82-23.el7)
> >
> > Anyhow, so I went to recompile and make/make install the clients again to
> > get the rasql* tools and ran into the following errors with
> rasqlinsert.c,
> > it's flagging on some areas within the last 30ish lines of code:
> >
> > ****************************************************************
> > making in ./ramysql
> > make[2]: Entering directory
> > `/home/argus/downloads/argus-clients-3.0.8.2-umich/examples/ramysql'
> > gcc -O -I. -I../../include -I../../common -I/usr/include/mysql
> > -DHAVE_CONFIG_H -c ./rasql.c
> > gcc -O -o ../../bin/rasql rasql.o -L/usr/lib64/mysql -lmysqlclient
> > ../../lib/argus_parse.a ../../lib/argus_common.a ../../lib/argus_client.a
> > -lm -lGeoIP -lz
> > gcc -O -I. -I../../include -I../../common -I/usr/include/mysql
> > -DHAVE_CONFIG_H -c ./rasqlinsert.c
> > *./rasqlinsert.c: In function ‘ArgusScheduleSQLQuery’:*
> > *./rasqlinsert.c:7881:54: error: ‘struct ArgusListStruct’ has no member
> > named ‘cond’*
> > * pthread_cond_signal(&ArgusSQLInsertQueryList->cond);*
> > * ^*
> > *./rasqlinsert.c:7886:54: error: ‘struct ArgusListStruct’ has no member
> > named ‘cond’*
> > * pthread_cond_signal(&ArgusSQLUpdateQueryList->cond);*
> > * ^*
> > *./rasqlinsert.c:7890:54: error: ‘struct ArgusListStruct’ has no member
> > named ‘cond’*
> > * pthread_cond_signal(&ArgusSQLSelectQueryList->cond);*
> > * ^*
> > ****************************************************************
> >
> > *From rasqlinsert.c:*
> >
> > ****************************************************************
> > case RAGETTINGw: {
> > *struct ArgusListStruct* *wlist =
> ArgusParser->ArgusWfileList;
> >
> > ...snip...
> >
> > int ArgusProcessSQLQueryList(struct ArgusParserStruct *, *struct
> > ArgusListStruct **);
> >
> >
> > int
> > ArgusProcessSQLQueryList(struct ArgusParserStruct *parser, *struct
> > ArgusListStruct *ArgusSQLQueryList*)
> >
> > ....snip....
> >
> > switch (ns->status & ARGUS_SQL_STATUS) {
> > case ARGUS_SQL_INSERT:
> > ArgusPushBackList (ArgusSQLInsertQueryList, (struct
> > ArgusListRecord *)&sqry->nxt, ARGUS_LOCK);
> > *pthread_cond_signal(&ArgusSQLInsertQueryList->cond);*
> > break;
> >
> > case ARGUS_SQL_UPDATE:
> > ArgusPushBackList (ArgusSQLUpdateQueryList, (struct
> > ArgusListRecord *)&sqry->nxt, ARGUS_LOCK);
> > *pthread_cond_signal(&ArgusSQLUpdateQueryList->cond);*
> > break;
> > case ARGUS_SQL_DELETE:
> > ArgusPushBackList (ArgusSQLSelectQueryList, (struct
> > ArgusListRecord *)&sqry->nxt, ARGUS_LOCK);
> > *pthread_cond_signal(&ArgusSQLSelectQueryList->cond);*
> > break;
> > }
> > ns->status &= ~(ARGUS_SQL_STATUS);
> >
> > free(tmpbuf);
> > free(mbuf);
> >
> > if (rbuf != NULL) free(rbuf);
> >
> > return (retn);
> > }
> >
> > ....snip....
> > ****************************************************************
> >
> > Any idea why this is throwing this error or what the issue is? Am I
> > missing something obvious?
> >
> > Many thanks,
> >
> > -Drew
>
>
> Drew, I don't see -lpthread in the link step. The sql examples
> will not work without thread support (they should really just be
> skipped during the build if threads are disabled).
>
> Did you run "configure --without-threads" or remove the .threads
> file? Either of those seems to trigger the error above.
>
> Eric
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://pairlist1.pair.net/pipermail/argus/attachments/20180407/48416f61/attachment.html>
More information about the argus
mailing list