<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">
  <channel>
    <title>'Snort cross-compiling' Thread RSS Feed</title>
    <link>http://www.programmersheaven.com/</link>
    <description>Contains the latest posts from the thread 'Snort cross-compiling' posted on the 'Embedded C/C++' forum at Programmer's Heaven.</description>
    <language>en</language>
    <copyright>Copyright 2013 Programmers Heaven</copyright>
    <pubDate>Sat, 18 May 2013 13:58:57 -0700</pubDate>
    <lastBuildDate>Sat, 18 May 2013 13:58:57 -0700</lastBuildDate>
    <generator>Argotic Syndication Framework 2007.3.0.1, http://www.codeplex.com/Argotic</generator>
    <docs>http://www.rssboard.org/rss-specification</docs>
    <ttl>360</ttl>
    <image>
      <url>http://www.programmersheaven.com/images/ph.gif</url>
      <title>Programmers Heaven</title>
      <link>http://www.programmersheaven.com/</link>
      <width>88</width>
      <height>31</height>
    </image>
    <item>
      <title>Snort cross-compiling</title>
      <link>http://www.programmersheaven.com/mb/embedCpp/389912/389912/snort-cross-compiling/</link>
      <description>Hey experts,&lt;br /&gt;
&lt;br /&gt;
i'm trying to cross-compile snort for a arm-linux architecture.&lt;br /&gt;
i already downloaded a toolchain and tested it with a smal hello-world.c .. the compiling successed and it worked on the arm-arch.&lt;br /&gt;
&lt;br /&gt;
so cross-compiling snort is a way hard, of course.&lt;br /&gt;
&lt;br /&gt;
i tried something stupid, like change the Makefile-entries from gcc to arm-linux-gcc and stuff .. and of course i didnt worked.&lt;br /&gt;
&lt;br /&gt;
so i tried to use the configure script and configure it with the --host-command.&lt;br /&gt;
&amp;gt;&amp;gt; ./configure --prefix/.. --host=arm-linux&lt;br /&gt;
&lt;br /&gt;
this works for using the right compiler.&lt;br /&gt;
&lt;br /&gt;
configure: WARNING: If you wanted to set the --build type, don't use --host.&lt;br /&gt;
    If a cross compiler is detected then cross compile mode will be used.&lt;br /&gt;
checking for a BSD-compatible install... /usr/bin/install -c&lt;br /&gt;
checking whether build environment is sane... yes&lt;br /&gt;
checking for a thread-safe mkdir -p... /bin/mkdir -p&lt;br /&gt;
checking for gawk... no&lt;br /&gt;
checking for mawk... mawk&lt;br /&gt;
checking whether make sets $(MAKE)... yes&lt;br /&gt;
checking for arm-linux-strip... arm-linux-strip&lt;br /&gt;
checking whether to enable maintainer-specific portions of Makefiles... no&lt;br /&gt;
checking for style of include used by make... GNU&lt;br /&gt;
checking for arm-linux-gcc... arm-linux-gcc&lt;br /&gt;
checking for C compiler default output file name... a.out&lt;br /&gt;
checking whether the C compiler works... yes&lt;br /&gt;
checking whether we are cross compiling... yes&lt;br /&gt;
checking for suffix of executables... &lt;br /&gt;
checking for suffix of object files... o&lt;br /&gt;
checking whether we are using the GNU C compiler... yes&lt;br /&gt;
.&lt;br /&gt;
.&lt;br /&gt;
&lt;br /&gt;
and so on.&lt;br /&gt;
&lt;br /&gt;
but if the configure-script checks for the libs and includes of libpcap and pcrep it fails:&lt;br /&gt;
&lt;br /&gt;
checking for sizeof(unsigned long)... configure: error: cannot run test program while cross compiling&lt;br /&gt;
See `config.log' for more details.&lt;br /&gt;
32 bits&lt;br /&gt;
checking for __FUNCTION__... yes&lt;br /&gt;
checking for floor in -lm... yes&lt;br /&gt;
checking for pcap_datalink in -lpcap... no&lt;br /&gt;
checking pfring.h usability... no&lt;br /&gt;
checking pfring.h presence... no&lt;br /&gt;
checking for pfring.h... no&lt;br /&gt;
checking for pfring_open in -lpfring... no&lt;br /&gt;
checking for pfring_open in -lpcap... no&lt;br /&gt;
&lt;br /&gt;
   ERROR!  Libpcap library/headers (libpcap.a (or .so)/pcap.h)&lt;br /&gt;
   not found, go get it from &lt;a href="http://www.tcpdump.org"&gt;http://www.tcpdump.org&lt;/a&gt;&lt;br /&gt;
   or use the --with-libpcap-* options, if you have it installed&lt;br /&gt;
   in unusual place.  Also check if your libpcap depends on another&lt;br /&gt;
   shared library that may be installed in an unusual place&lt;br /&gt;
checking for libpcap version &amp;gt;= 0.9... configure: error: cannot run test program while cross compiling&lt;br /&gt;
See `config.log' for more details.&lt;br /&gt;
&lt;br /&gt;
checking pcre.h usability... yes&lt;br /&gt;
checking pcre.h presence... yes&lt;br /&gt;
checking for pcre.h... yes&lt;br /&gt;
checking for pcre_compile in -lpcre... no&lt;br /&gt;
&lt;br /&gt;
   ERROR!  Libpcre library not found.&lt;br /&gt;
   Get it from &lt;a href="http://www.pcre.org"&gt;http://www.pcre.org&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
no&lt;br /&gt;
&lt;br /&gt;
    ERROR!  Libpcre library version &amp;gt;= 6.0 not found.&lt;br /&gt;
    Get it from &lt;a href="http://www.pcre.org"&gt;http://www.pcre.org&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
checking for dlsym in -ldl... yes&lt;br /&gt;
checking for u_int8_t... yes&lt;br /&gt;
checking for u_int16_t... yes&lt;br /&gt;
.&lt;br /&gt;
.&lt;br /&gt;
&lt;br /&gt;
the configure-statement was the following:&lt;br /&gt;
sudo ./configure --prefix=/tmp/snort/ --host=arm-linux --with-libpcap-libraries=/usr/local/lib/ --with-libpcre-includes=/usr/include/ --with-libpcre-libraries=/usr/lib/ --with-libpcap-includes=/usr/local/include/&lt;br /&gt;
&lt;br /&gt;
i changed some entries in the configure-script to dont exit at this errors.&lt;br /&gt;
doing this it will finish. after that i tried to "make".&lt;br /&gt;
&lt;br /&gt;
and of course it doesnt worked.&lt;br /&gt;
..&lt;br /&gt;
include/ -I/usr/include/  -g -O2 -Wall -DDYNAMIC_PLUGIN -DDETECTION_OPTION_TREE -c ipobj.c&lt;br /&gt;
/tmp/ccxGleZM.s: Assembler messages:&lt;br /&gt;
/tmp/ccxGleZM.s:2054: Error: bad instruction `rorw $8,r3'&lt;br /&gt;
/tmp/ccxGleZM.s:2054: Error: bad instruction `rorl $16,r3'&lt;br /&gt;
/tmp/ccxGleZM.s:2054: Error: bad instruction `rorw $8,r3'&lt;br /&gt;
/tmp/ccxGleZM.s:2060: Error: bad instruction `rorw $8,r2'&lt;br /&gt;
/tmp/ccxGleZM.s:2060: Error: bad instruction `rorl $16,r2'&lt;br /&gt;
/tmp/ccxGleZM.s:2060: Error: bad instruction `rorw $8,r2'&lt;br /&gt;
/tmp/ccxGleZM.s:2103: Error: bad instruction `rorw $8,r0'&lt;br /&gt;
/tmp/ccxGleZM.s:2103: Error: bad instruction `rorl $16,r0'&lt;br /&gt;
/tmp/ccxGleZM.s:2103: Error: bad instruction `rorw $8,r0'&lt;br /&gt;
/tmp/ccxGleZM.s:2186: Error: bad instruction `rorw $8,r0'&lt;br /&gt;
/tmp/ccxGleZM.s:2186: Error: bad instruction `rorl $16,r0'&lt;br /&gt;
/tmp/ccxGleZM.s:2186: Error: bad instruction `rorw $8,r0'&lt;br /&gt;
make[3]: *** [ipobj.o] Error 1&lt;br /&gt;
make[3]: Leaving directory `/home/snortsensor/Desktop/setups/snortixp/src/sfu
til'&lt;br /&gt;
make[2]: *** [all-recursive] Error 1&lt;br /&gt;
make[2]: Leaving directory `/home/snortsensor/Desktop/setups/snortixp/src'&lt;br /&gt;
make[1]: *** [all-recursive] Error 1&lt;br /&gt;
make[1]: Leaving directory `/home/snortsensor/Desktop/setups/snortixp'&lt;br /&gt;
make: *** [all] Error 2&lt;br /&gt;
&lt;br /&gt;
..&lt;br /&gt;
&lt;br /&gt;
im sure i have the right libpcap and pcre libs installed, because it works fine, if i compile snort without the --host-command.&lt;br /&gt;
&lt;br /&gt;
honestly im not very familiar with linux, yet. so if i did some stupid mistakes it depends on my dumbness with linux.&lt;br /&gt;
im using ubuntu 8.10&lt;br /&gt;
&lt;br /&gt;
so is there anybody who could help? this would be grateful.&lt;br /&gt;
&lt;br /&gt;
thx a lot&lt;br /&gt;
&lt;br /&gt;
topf&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/embedCpp/389912/389912/snort-cross-compiling/</guid>
      <pubDate>Mon, 27 Apr 2009 03:14:10 -0700</pubDate>
      <category>Embedded C/C++</category>
    </item>
    <item>
      <title>Re: Snort cross-compiling</title>
      <link>http://www.programmersheaven.com/mb/embedCpp/389912/389925/re-snort-cross-compiling/#389925</link>
      <description>im a step closer.&lt;br /&gt;
i cross-compiled libpcap and pcre and set the include-paths to the configure.&lt;br /&gt;
the configure finishs fine. but "make" exits with the following:&lt;br /&gt;
&lt;br /&gt;
....&lt;br /&gt;
nsl  -ldl&lt;br /&gt;
mkdir .libs&lt;br /&gt;
arm-linux-gcc -I/usr/include/ -I/usr/local/arm-linux/include/ -Wall -DDYNAMIC_PLUGIN -DDETECTION_OPTION_TREE -o snort codes.o debug.o decode.o log.o mstring.o parser.o profiler.o plugbase.o snort.o snprintf.o strlcatu.o strlcpyu.o tag.o ubi_BinTree.o ubi_SplayTree.o util.o detect.o signature.o mempool.o sf_sdlist.o fpcreate.o fpdetect.o pcrm.o byte_extract.o sfthreshold.o packet_time.o event_wrapper.o event_queue.o inline.o ppm.o log_text.o  -L/tmp/libpcap/lib/ -L/tmp/pcre/lib/ output-plugins/libspo.a detection-plugins/libspd.a dynamic-plugins/libdynamic.a preprocessors/libspp.a preprocessors/flow/portscan/libportscan.a preprocessors/flow/libflow.a parser/libparser.a target-based/libtarget_based.a preprocessors/HttpInspect/libhttp_inspect.a preprocessors/Stream5/libstream5.a sfutil/libsfutil.a /tmp/pcre/lib/libpcre.so -lpcap -lm -lnsl -ldl   -Wl,--rpath -Wl,/tmp/pcre/lib -Wl,--rpath -Wl,/tmp/pcre/lib&lt;br /&gt;
mstring.o(.text+0xc4): In function `mSplit':&lt;br /&gt;
: undefined reference to `__ctype_b_loc'&lt;br /&gt;
mstring.o(.text+0x27c): In function `mSplit':&lt;br /&gt;
: undefined reference to `__ctype_b_loc'&lt;br /&gt;
parser.o(.text+0x1690): In function `ContinuationCheck':&lt;br /&gt;
: undefined reference to `__ctype_b_loc'&lt;br /&gt;
parser.o(.text+0x1754): In function `CheckRule':&lt;br /&gt;
: undefined reference to `__ctype_b_loc'&lt;br /&gt;
parser.o(.text+0x17dc): In function `CheckRule':&lt;br /&gt;
: undefined reference to `__ctype_b_loc'&lt;br /&gt;
parser.o(.text+0x4c94): more undefined references to `__ctype_b_loc' follow&lt;br /&gt;
util.o(.text+0x1454): In function `CreatePidFile':&lt;br /&gt;
: undefined reference to `__xpg_strerror_r'&lt;br /&gt;
signature.o(.text+0x1e4): In function `ParseReference':&lt;br /&gt;
: undefined reference to `__ctype_b_loc'&lt;br /&gt;
signature.o(.text+0x23c): In function `ParseReference':&lt;br /&gt;
: undefined reference to `__ctype_b_loc'&lt;br /&gt;
signature.o(.text+0x500): In function `ParseReferenceSystemConfig':&lt;br /&gt;
: undefined reference to `__ctype_b_loc'&lt;br /&gt;
signature.o(.text+0x5a4): In function `ParseSID':&lt;br /&gt;
: undefined reference to `__ctype_b_loc'&lt;br /&gt;
signature.o(.text+0x5e8): In function `ParseSID':&lt;br /&gt;
: undefined reference to `__ctype_b_loc'&lt;br /&gt;
signature.o(.text+0x6b4): more undefined references to `__ctype_b_loc' follow&lt;br /&gt;
collect2: ld returned 1 exit status&lt;br /&gt;
make[3]: *** [snort] Error 1&lt;br /&gt;
make[3]: Leaving directory `/home/snortsensor/Desktop/setups/snortixp/src'&lt;br /&gt;
make[2]: *** [all-recursive] Error 1&lt;br /&gt;
make[2]: Leaving directory `/home/snortsensor/Desktop/setups/snortixp/src'&lt;br /&gt;
make[1]: *** [all-recursive] Error 1&lt;br /&gt;
make[1]: Leaving directory `/home/snortsensor/Desktop/setups/snortixp'&lt;br /&gt;
make: *** [all] Error 2&lt;br /&gt;
&lt;br /&gt;
configure:&lt;br /&gt;
&lt;br /&gt;
sudo CFLAGS="-I/usr/include/ -I/usr/local/arm-linux/include/" ./configure --prefix=/tmp/snort/ --host=arm-linux --with-libpcap-libraries=/tmp/libpcap/lib/ --with-libpcre-includes=/tmp/pcre/include/ --with-libpcre-libraries=/tmp/pcre/lib/ --with-libpcap-includes=/tmp/libpcap/include/&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/embedCpp/389912/389925/re-snort-cross-compiling/#389925</guid>
      <pubDate>Mon, 27 Apr 2009 06:52:15 -0700</pubDate>
      <category>Embedded C/C++</category>
    </item>
    <item>
      <title>Re: Snort cross-compiling</title>
      <link>http://www.programmersheaven.com/mb/embedCpp/389912/425567/re-snort-cross-compiling/#425567</link>
      <description>Hey did u solve the error and get a crosscompiled snort?? I too m stuck there so pls help if u got it solved..&lt;br /&gt;
&lt;br /&gt;
Thanks&lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/embedCpp/389912/425567/re-snort-cross-compiling/#425567</guid>
      <pubDate>Thu, 03 Nov 2011 22:48:12 -0700</pubDate>
      <category>Embedded C/C++</category>
    </item>
    <item>
      <title>Re: Snort cross-compiling</title>
      <link>http://www.programmersheaven.com/mb/embedCpp/389912/425568/re-snort-cross-compiling/#425568</link>
      <description>Hey did u solve the error and get a crosscompiled snort?? I too m stuck there so pls help if u got it solved..&lt;br /&gt;
&lt;br /&gt;
Thanks&lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/embedCpp/389912/425568/re-snort-cross-compiling/#425568</guid>
      <pubDate>Thu, 03 Nov 2011 22:50:05 -0700</pubDate>
      <category>Embedded C/C++</category>
    </item>
    <item>
      <title>Re: Snort cross-compiling</title>
      <link>http://www.programmersheaven.com/mb/embedCpp/389912/425569/re-snort-cross-compiling/#425569</link>
      <description>Hey did u solve the error and get a crosscompiled snort?? I too m stuck there so pls help if u got it solved..&lt;br /&gt;
&lt;br /&gt;
Thanks&lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/embedCpp/389912/425569/re-snort-cross-compiling/#425569</guid>
      <pubDate>Thu, 03 Nov 2011 22:52:34 -0700</pubDate>
      <category>Embedded C/C++</category>
    </item>
  </channel>
</rss>