Suricata from git fails make

Hello,

I am currently trying to build Suricata from git to contribute, but I am encountering the following error when running the make command:

make[2]: Entering directory '/home/myid/jvr59620/suricata/src'
  CCLD     suricata
/usr/bin/ld: libsuricata_c.a(flow-hash.o): in function `FlowKeyGetHash':
/home/myid/jvr59620/suricata/src/flow-hash.c:325: undefined reference to `g_livedev_mask'
/usr/bin/ld: libsuricata_c.a(flow-hash.o): in function `FlowGetHash':
/home/myid/jvr59620/suricata/src/flow-hash.c:253: undefined reference to `g_livedev_mask'
/usr/bin/ld: /home/myid/jvr59620/suricata/src/flow-hash.c:288: undefined reference to `g_livedev_mask'
/usr/bin/ld: libsuricata_c.a(flow-hash.o): in function `FlowCompareICMPv4':
/home/myid/jvr59620/suricata/src/flow-hash.c:486: undefined reference to `g_livedev_mask'
/usr/bin/ld: /home/myid/jvr59620/suricata/src/flow-hash.c:476: undefined reference to `g_livedev_mask'
/usr/bin/ld: libsuricata_c.a(flow-hash.o):/home/myid/jvr59620/suricata/src/flow-hash.c:402: more undefined references to `g_livedev_mask' follow
collect2: error: ld returned 1 exit status
make[2]: *** [Makefile:2859: suricata] Error 1
make[2]: Leaving directory '/home/myid/jvr59620/suricata/src'
make[1]: *** [Makefile:2684: all] Error 2
make[1]: Leaving directory '/home/myid/jvr59620/suricata/src'
make: *** [Makefile:494: all-recursive] Error 1

Any idea on how to fix this error?

Hi Joseph,

are you using the newest master branch?

Can you do a clean installation from scratch so we maybe rule out artifacts that could have been created when you were trying to set up Suricata?
./autogen.sh && ./configure && make -j4

Or clone the repository again (into a different directory) so that nothing irrelevant is there.

Btw I just cloned and compiled the master so that should be working.

Lukas

1 Like

Hello,

I have synced my forked branch to the master. I also just tried to download the master branch from git and install without a fork and was successful. This tells me there is some artifact that is causing the problems. I will try to reclone my forked repo and install that and report back with the results!

OK, changes that I made were causing the errors. I will trouble shoot this on my own since it was my doing.

Thank you for your help!

1 Like