Snort mailing list archives

Re: Compilation Bug (Solaris 9, Snort 2.0.0, Sun CC)


From: Chris Green <cmg () sourcefire com>
Date: Tue, 20 May 2003 10:26:10 -0400

"Roy S. Rapoport" <snort-users () ols inorganic org> writes:

A casual search of the mailing list did not reveal a previous report of
this problem.

Out of the box, snort compiles w/o problems using gcc (3.2.2) on my
Solaris 9 box.  However, given that SunCC usually produces faster
binaries, I attempted to compile with it, only to encounter

Please update to current CVS for the __FUNCTION__ problem

---
cc -DHAVE_CONFIG_H -I. -I. -I../.. -I../.. -I../../src
-I../../src/output-plugins -I../../src/detection-plugins
-I../../src/preprocessors  -DBSD_COMP -I/usr/local/mysql/include/mysql
-DENABLE_MYSQL  -xO5 -I/usr/local/include -c `test -f
'sp_pattern_match.c' || echo './'`sp_pattern_match.c
"sp_pattern_match.c", line 254: warning: assignment type mismatch:
        pointer to char "=" pointer to unsigned char

Change to (unsigned char *) casts on thopse pointers. If you really
want to earn brownie points, submit a diff and I will make it in for

[...]


The important error there relates to __FUNCTION__, and specifically
these lines in sp_pattern_match.c:
---
#ifdef WIN32
#define __FUNCTION__ "SetUseDoePtr"
#endif 
        LogMessage("%s: No pattern match data found\n", __FUNCTION__);
#ifdef WIN32
#undef __FUNCTION__
#endif 
---

Unfortunately, SunCC doesn't have a __FUNCTION__ macro either.  Removing
the #ifdef/#endif lines and leaving jus 
#define __FUNCTION__ "SetUseDoePtr"

#define __FUNCTION__ __func__ should work for you


allowed me to continue compiling to this point:
---
cc -DHAVE_CONFIG_H -I. -I. -I.. -I.. -I../src  -I../src/output-plugins
-I../src/detection-plugins -I../src/preprocessors  -DBSD_COMP
-I/usr/local/mysql/include/mysql -DENABLE_MYSQL  -xO5
-I/usr/local/include -c `test -f 'log.c' || echo './'`log.c
"log.c", line 1578: syntax error before or at: {
"log.c", line 1578: undefined symbol: __tmp

I believe that should be fixed in current CVS.


-- 
Chris Green <cmg () sourcefire com>
 "Not everyone holds these truths to be self-evident, so we've worked
                  up a proof of them as Appendix A." --  Paul Prescod


-------------------------------------------------------
This SF.net email is sponsored by: ObjectStore.
If flattening out C++ or Java code to make your application fit in a
relational database is painful, don't do it! Check out ObjectStore.
Now part of Progress Software. http://www.objectstore.net/sourceforge
_______________________________________________
Snort-users mailing list
Snort-users () lists sourceforge net
Go to this URL to change user options or unsubscribe:
https://lists.sourceforge.net/lists/listinfo/snort-users
Snort-users list archive:
http://www.geocrawler.com/redir-sf.php3?list=snort-users


Current thread: