[Snort-devel] [Snort-users] --enable-open-appid failing even though luajit is installed

Avery Rozar avery.rozar at ...3576...
Mon Dec 7 16:05:51 EST 2015


Installing luajit from pkg was the key.

Thanks again!

On Mon, Dec 7, 2015 at 3:50 PM, Avery Rozar <avery.rozar at ...3576...>
wrote:

> I installed luajit from source, I'll try your suggestions and see if I'm
> successful.
>
> Thanks,
> Avery
>
> On Mon, Dec 7, 2015 at 3:48 PM, Y M <snort at ...3347...> wrote:
>
>> I did not!
>>
>>
>> Was lua installed with pkg or you compiled it from source? I installed
>> both luajit and lua51 via pkg, compiling from source did not work for me.
>> If you do ldconfig -r /usr/local/lib and then try again, does that help?
>>
>>
>> Here is my lib directory for lua just in case if it helps. lua52 did not
>> work either, so ignore it.
>>
>>
>> # ls -l /usr/local/lib | grep lua
>> -rw-r--r--   1 root  wheel    366228 Nov  5 04:20 liblua-5.1.a
>> -rw-r--r--   1 root  wheel    193024 Nov  5 04:20 liblua-5.1.so
>> -rw-r--r--   1 root  wheel    392948 Nov  5 04:19 liblua-5.2.a
>> -rw-r--r--   1 root  wheel    209872 Nov  5 04:19 liblua-5.2.so
>> -rw-r--r--   1 root  wheel    843416 Nov  5 05:04 libluajit-5.1.a
>> lrwxr-xr-x   1 root  wheel        22 Nov  5 05:04 libluajit-5.1.so ->
>> libluajit-5.1.so.2.0.4
>> lrwxr-xr-x   1 root  wheel        22 Nov  5 05:04 libluajit-5.1.so.2 ->
>> libluajit-5.1.so.2.0.4
>> -rwxr-xr-x   1 root  wheel    521288 Nov  5 05:04 libluajit-5.1.so.2.0.4
>> drwxr-xr-x   4 root  wheel       512 Dec  4 23:10 lua
>>
>> YM
>> ------------------------------
>> *From:* Avery Rozar <avery.rozar at ...3576...>
>> *Sent:* Monday, December 7, 2015 8:28 PM
>> *To:* Y M
>> *Cc:* William S; snort-users at lists.sourceforge.net;
>> snort-devel at lists.sourceforge.net
>>
>> *Subject:* Re: [Snort-users] --enable-open-appid failing even though
>> luajit is installed
>>
>> Y M,
>> I spoke too soon. I assume you did not get this error when running "make".
>>
>> /usr/local/bin/ld: /usr/local/lib/libluajit-5.1.a(lj_err.o): relocation
>> R_X86_64_32S against `.rodata' can not be used when making a shared object;
>> recompile with -fPIC
>>
>> /usr/local/lib/libluajit-5.1.a: error adding symbols: Bad value
>>
>> collect2: error: ld returned 1 exit status
>>
>> *** Error code 1
>>
>> Stop.
>>
>> make[5]: stopped in
>> /usr/home/arozar/src/snort-2.9.8.0/src/dynamic-preprocessors/appid
>>
>> *** Error code 1
>>
>> Stop.
>>
>> make[4]: stopped in
>> /usr/home/arozar/src/snort-2.9.8.0/src/dynamic-preprocessors
>>
>> *** Error code 1
>>
>> Stop.
>>
>> make[3]: stopped in
>> /usr/home/arozar/src/snort-2.9.8.0/src/dynamic-preprocessors
>>
>> *** Error code 1
>>
>> Stop.
>>
>> make[2]: stopped in /usr/home/arozar/src/snort-2.9.8.0/src
>>
>> *** Error code 1
>>
>> Stop.
>>
>> make[1]: stopped in /usr/home/arozar/src/snort-2.9.8.0
>>
>> *** Error code 1
>>
>> Stop.
>>
>> make: stopped in /usr/home/arozar/src/snort-2.9.8.0
>>
>> On Mon, Dec 7, 2015 at 2:23 PM, Avery Rozar <avery.rozar at ...3576...>
>> wrote:
>>
>>> adding luajit_CFLAGS="-I/usr/local/include/luajit-2.0" and
>>> luajit_LIBS="-L/usr/local/lib -lluajit-5.1" did the trick, thank you very
>>> much!
>>>
>>> On Mon, Dec 7, 2015 at 2:21 PM, Y M <snort at ...3347...> wrote:
>>>
>>>>
>>>> Avery,
>>>>
>>>>
>>>> Here is what I did on FreeBSD 10.2 which succeeded with me:
>>>>
>>>>
>>>> ./configure --enable-sourcefire --enable-open-appid
>>>> luajit_CFLAGS="-I/usr/local/include/luajit-2.0"
>>>> luajit_LIBS="-L/usr/local/lib -lluajit-5.1"
>>>>
>>>>
>>>> # which luajit
>>>> /usr/local/bin/luajit
>>>>
>>>> # which lua51
>>>> /usr/local/bin/lua51
>>>>
>>>> YM
>>>> ------------------------------
>>>> *From:* Avery Rozar <avery.rozar at ...3576...>
>>>> *Sent:* Monday, December 7, 2015 7:14 PM
>>>> *To:* William S
>>>> *Cc:* Y M; snort-users at lists.sourceforge.net;
>>>> snort-devel at lists.sourceforge.net
>>>> *Subject:* Re: [Snort-users] --enable-open-appid failing even though
>>>> luajit is installed
>>>>
>>>> I did see this one but from what I can see freeBSD 10.2 is not using
>>>> pkg-config, but I could be wrong.
>>>>
>>>> Thank you,
>>>> Avery
>>>>
>>>> On Mon, Dec 7, 2015 at 2:03 PM, William S <willst at ...2499...> wrote:
>>>>
>>>>> Hi,
>>>>> Back in May I had issues installing on OS X, with --enable-open-appid
>>>>> complaining about LuaJIT.  I sent my solution to the list.  Maybe this will
>>>>> help?  Text from my response:
>>>>>
>>>>> """
>>>>> Hi,
>>>>> Well, this is fun.  I started picking apart the configure script again
>>>>> to figure out which pkg-config commands it was running.  I then realized I
>>>>> didn't have pkg-config installed at all, which was actually evidenced in
>>>>> the script output.  Just before the "checking for luajit... no" line,
>>>>> it also said "checking for pkg-config... no".  Further, grepping for
>>>>> PKG_CONFIG variables in config.log shows that PKG_CONFIG and
>>>>> PKG_CONFIG_LIBDIR were empty.  I installed pkg-config via brew, reran my
>>>>> configure script with options, and voila.  It configures and compiles just
>>>>> fine!
>>>>>
>>>>> To further validate, I uninstalled pkg-config, reran configure, and it
>>>>> failed as expected.
>>>>>
>>>>> Moral of the story - pkg-config is required for the configure script
>>>>> on OS X, at least when enabling OpenAppID.
>>>>>
>>>>> Thanks for the prompting to check on pkg-config.
>>>>>
>>>>>
>>>>> For future reference, this was what my reply was GOING to be before I
>>>>> did that one last configure after installing pkg-config:
>>>>>
>>>>> """
>>>>> I believe this means that pkgconfig can find LuaJIT:
>>>>>
>>>>> $ pkg-config --libs luajit
>>>>> -L/usr/local/lib -lluajit-5.1
>>>>>
>>>>> And
>>>>>
>>>>> $ pkg-config --list-all | grep -i lua
>>>>> lua5.2               Lua - An Extensible Extension Language
>>>>> lua-5.2              Lua - An Extensible Extension Language
>>>>> luajit               LuaJIT - Just-in-time compiler for Lua
>>>>> lua                  Lua - An Extensible Extension Language
>>>>>
>>>>>
>>>>> If I'm pulling the right lines from configure script, I think this
>>>>> also means yes it can find LuaJIT:
>>>>>
>>>>> $ pkg-config --print-errors --cflags --libs luajit
>>>>> -I/usr/local/include/luajit-2.0 -L/usr/local/lib -lluajit-5.1
>>>>> """
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> On Mon, Dec 7, 2015 at 1:56 PM, Y M <snort at ...3347...> wrote:
>>>>>
>>>>>> In my case I also had to install lua51 (which may be unnecessary).
>>>>>> Also you need to set the "luajit_CFLAGS" and "luajit_LIBS" when compiling
>>>>>> Snort.
>>>>>>
>>>>>> _____________________________
>>>>>> From: Avery Rozar <avery.rozar at ...3576...>
>>>>>> Sent: Monday, December 7, 2015 9:53 PM
>>>>>> Subject: [Snort-users] --enable-open-appid failing even though luajit
>>>>>> is installed
>>>>>> To: <snort-users at lists.sourceforge.net>, <
>>>>>> snort-devel at lists.sourceforge.net>
>>>>>>
>>>>>>
>>>>>>
>>>>>> I'm trying trying to install Snort 2.8 on FreeBSD with the
>>>>>> --enable-open-appid configuration option. It's failing complaining
>>>>>> that luajit is not installed. I did install luajit 2.0.4 from source with
>>>>>> default options and verified with "which luajit", this is the response
>>>>>> "/usr/local/bin/luajit". There does not seem to be an option for
>>>>>> "--with-luajit-libraries=DIR" in the ./configure --help.
>>>>>>
>>>>>> checking for luajit... no
>>>>>>
>>>>>>   ERROR!  LuaJIT library not found.....
>>>>>>
>>>>>> Am I missing another dependency?
>>>>>>
>>>>>> Thanks,
>>>>>>
>>>>>>
>>>>>> Avery
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> ------------------------------------------------------------------------------
>>>>>> Go from Idea to Many App Stores Faster with Intel(R) XDK
>>>>>> Give your users amazing mobile app experiences with Intel(R) XDK.
>>>>>> Use one codebase in this all-in-one HTML5 development environment.
>>>>>> Design, debug & build mobile apps & 2D/3D high-impact games for
>>>>>> multiple OSs.
>>>>>> http://pubads.g.doubleclick.net/gampad/clk?id=254741911&iu=/4140
>>>>>> _______________________________________________
>>>>>> Snort-users mailing list
>>>>>> Snort-users at 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://sourceforge.net/mailarchive/forum.php?forum_name=snort-users
>>>>>>
>>>>>> Please visit http://blog.snort.org to stay current on all the latest
>>>>>> Snort news!
>>>>>>
>>>>>
>>>>>
>>>>
>>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.snort.org/pipermail/snort-devel/attachments/20151207/c12b2e00/attachment.html>


More information about the Snort-devel mailing list