argus-clients rasql/rasqlinsert compile/make errors

Eric Kinzie eric at qosient.com
Sat Apr 7 20:01:56 EDT 2018


On April 7, 2018 7:23:29 PM EDT, Drew Dixon <dwdixon at umich.edu> wrote:
>Thanks Carter, so I actually had the .debug file in the root directory
>already and still having the issue in my previous email, not sure
>what's up:
>
>argus-clients-3.0.8.2-umich]$ ls -ltha
>total 944K
>drwxr-xr-x. 15 dwdixon users 4.0K Apr  7 18:21 .
>*-rw-r--r--.  1 root    root     0 Apr  7 18:21 .threads*
>drwxr-xr-x.  5 dwdixon users 4.0K Mar  5 15:28 ..
>-rw-r--r--.  1 root    root  319K Feb 28 17:42 config.log
>drwxr-xr-x.  6 dwdixon users 4.0K Feb 28 17:42 include
>drwxr-xr-x. 24 dwdixon users 4.0K Feb 28 17:42 examples
>drwxr-xr-x.  2 dwdixon users 4.0K Feb 28 17:42 lib
>drwxr-xr-x.  2 dwdixon users 4.0K Feb 28 17:42 clients
>drwxr-xr-x.  2 dwdixon users 4.0K Feb 28 17:42 common
>-rw-r--r--.  1 root    root  9.8K Feb 28 17:42 Makefile
>-rwxr-xr-x.  1 root    root   35K Feb 28 17:42 config.status
>*-rw-r--r--.  1 dwdixon users    0 Feb 28 17:41 .debug*
>drwxr-xr-x.  2 dwdixon users 4.0K Feb 28 17:37 bin
>drwxr-xr-x.  2 dwdixon users   75 Dec 18 11:49 .idea
>-rw-r--r--.  1 dwdixon users 6.1K Oct 30 11:20 .DS_Store
>drwxr-xr-x.  5 dwdixon users   39 Oct 30 09:00 man
>drwxr-xr-x.  4 dwdixon users   61 Oct 30 09:00 pkg
>drwxr-xr-x.  6 dwdixon users   61 Oct 30 09:00 support
>drwxr-xr-x.  2 dwdixon users   79 Oct 30 09:00 config
>drwxr-xr-x.  3 dwdixon users 4.0K Oct 30 09:00 debian
>drwxr-xr-x.  3 dwdixon users  101 Oct 30 08:59 cmake-build-debug
>-rw-r--r--.  1 dwdixon users  140 Oct 30 08:58 CMakeLists.txt
>-rw-r--r--.  1 dwdixon users  26K Jun  5  2016 MANIFEST
>-rw-r--r--.  1 dwdixon users  36K Jun  5  2016 ChangeLog
>-rw-r--r--.  1 dwdixon users  59K Jun  1  2016 acsite.m4
>-rw-r--r--.  1 dwdixon users  517 Jun  1  2016 AUTHORS
>-rw-r--r--.  1 dwdixon users  11K Jun  1  2016 configure.ac
>-rw-r--r--.  1 dwdixon users 8.4K Jun  1  2016 INSTALL
>-rw-r--r--.  1 dwdixon users 3.8K Jun  1  2016 README
>-rw-r--r--.  1 dwdixon users 9.0K Jun  1  2016 Makefile.in
>-rw-r--r--.  1 dwdixon users 3.9K Jun  1  2016 CREDITS
>-rw-r--r--.  1 dwdixon users 6.9K Jun  1  2016 CHANGES
>-rw-r--r--.  1 dwdixon users    8 Jun  1  2016 VERSION
>-rwxr-xr-x.  1 dwdixon users 298K Apr 10  2015 configure
>-rw-r--r--.  1 dwdixon users 7.7K Nov 14  2012 aclocal.m4
>-rw-r--r--.  1 dwdixon users  35K Nov  3  2011 COPYING
>
>
>Many thanks in advance,
>
>-Drew
>
>
>On Sat, Apr 7, 2018 at 7:14 PM, Carter Bullard <carter at qosient.com>
>wrote:
>
>> Hey Drew,
>> Create the file .debug in the root directory and run configure and
>make
>> again.
>> Shiuld get you closer.
>> Carter
>>
>>
>> On Apr 7, 2018, at 6:33 PM, Drew Dixon <dwdixon at umich.edu> wrote:
>>
>> 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
>>>
>>
>>

It looks like there may be a mixture of object files compiled with, and some compiled without, debug logging.  You could try running "make distclean", then configure and make again.



More information about the argus mailing list