[Error during Suricata installation]

Hi everyone.
This is Agha Saad. I am an Outreachy applicant. I am interested in Project " Convert protocol from C to Rust ". For that I started installing the Suricata in my local machine. I am following this link.

Commands I have used:
./autogen.sh
./configure
./make

I face errors when I try to run the make command. I have attached files that have logs of configure and make commands

Agent detail:
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=20.04
DISTRIB_CODENAME=focal
DISTRIB_DESCRIPTION=“Ubuntu 20.04.1 LTS”
NAME=“Ubuntu”
VERSION=“20.04.1 LTS (Focal Fossa)”

configure-command.log (27.9 KB) make-command.log (50.7 KB)

Hello,

do you have a rust installed?

yes I have rust installed.

image

Hi,

–enable-rust in ./configure ?

Pardon me but I don’t understand that. Do I need to run enable-rust command or what?

I always enable it. Also, I install rustp:

sudo snap install rustup --classic

Just installed rustp. Can you explain how to enable rust?

run ./configure with --enable-rust alone and make

Just run the command, but still getting the same errors

Hi Agha!
I found that your configure log has
./configure: line 28809: Volume/Outreachy-20-Dec/suricata/suricata/rust: No such file or directory
Wondering if you could recheck the paths?

Rust is enabled in the newer Suricata versions by default so ./configure should work. You already have those things set up. You can check them in the end of the output of configure.

Edit: Just to make it less confusing, maybe you could rename your outer dir to oisf? So that the path to suricata becomes <prefix>/oisf/suricata instead of <prefix>/suricata/suricata.

Hi Shivani,
This is the complete path to the rust folder

Thanks. I’ll wait and see if Jeff has something better to say about this.

Sure going to rename and re run the commands

Hi,
Just a clarification – Rust is a mandatory part of Suricata so it’s no longer necessary (or possible) to use --enable-rust with Suricata.

The make log shows this:

error: couldn't read /media/saad/New Volume/Outreachy-20-Dec/suricata/suricata/src/lib.rs: No such file or directory (os error 2)

This file is part of the Suricata distribution (rust/src/lib.rs) … can you check if your source code directory is missing any other files?

Hi jeff,

lib.rs file does exist in rust/src/lib.rs but the error is, it is searching for the lib.rs file in suricata/src/lib.rs instead of suricata/rust/src/lib.rs

Just noticed /usr/bin/cargo build --release, --release is only set for the releases. Just to be sure, are you compiling the latest master from git? https://github.com/oisf/suricata

I suspect the space in the directory name New Volume might cause issues. Can you try building in a location that doesn’t have a space anywhere in its path?

3 Likes

Sure gonna try this.

Thank you so much all for the quick responses. Just got it running and the issue was the space in my drive name. Thanks Victor for the suggestion :slight_smile:

I am following basic setup link and getting error after running the command ./configure && make && make install-full

configure-install-full.log (69.1 KB)