Impossible to configure suricata cause to libhtp bundle

Please include the following information with your help request:

  • Suricata lastest version after git pull
  • Ubuntu 24.x
    normally yes but I’m reinstalling everything
  • How you installed Suricata ? official github repo

github

hello , i can’t configure and make -j 10 cause to libhtp directory in suricata directory , that’s my error:

./scripts/bundle.sh
./autogen.sh \
sudo autoreconf -i \
sudo chmod +x ./autogen.sh
 ./configure --prefix=/usr/            --bindir=/usr/bin/            --sbindir=/usr/sbin/            --libdir=/usr/lib/             --sysconfdir=/etc/             --enable-python             --enable-debug             --enable-unittests             --enable-ebpf-build             --enable-geoip             --enable-af-packet             --enable-nflog             --with-libpcap-includes=/usr/local/include             --with-libpcap-libraries=/usr/lib/x86_64-linux-gnu/             --with-libhtp-includes=/usr/local/include/htp  --with-libhtp-libraries=/usr/lib --with-libyaml-libraries=/usr/lib/x86_64-linux-gnu --enable-nfqueue  \
  &&  sudo make -j10 && sudo make install-full
...
Suricata Configuration:
  AF_PACKET support:                       yes
  AF_XDP support:                          no
  DPDK support:                            no
  eBPF support:                            no
  XDP support:                             no
  PF_RING support:                         no
  NFQueue support:                         yes
  NFLOG support:                           yes
  IPFW support:                            no
  Netmap support:                          no 
  DAG enabled:                             no
  Napatech enabled:                        no
  WinDivert enabled:                       no

  Unix socket enabled:                     yes
  Detection enabled:                       yes

  Libmagic support:                        yes
  libjansson support:                      yes
  hiredis support:                         no
  hiredis async with libevent:             no
  PCRE jit:                                yes
  GeoIP2 support:                          yes
  JA3 support:                             yes
  JA4 support:                             yes
  Non-bundled htp:                         no
  Hyperscan support:                       no
  Libnet support:                          yes
  liblz4 support:                          yes
  Landlock support:                        yes
  Systemd support:                         yes

  Rust support:                            yes
  Rust strict mode:                        no
  Rust compiler path:                      /home/alexandre/.cargo/bin/rustc
  Rust compiler version:                   rustc 1.81.0 (eeb90cda1 2024-09-04)
  Cargo path:                              /home/alexandre/.cargo/bin/cargo
  Cargo version:                           cargo 1.81.0 (2dbb1af80 2024-08-20)

  Python support:                          yes
  Python path:                             /usr/bin/python3
  Install suricatactl:                     yes
  Install suricatasc:                      yes
  Install suricata-update:                 yes

  Profiling enabled:                       no
  Profiling locks enabled:                 no
  Profiling rules enabled:                 no

  Plugin support (experimental):           yes
  DPDK Bond PMD:                           no

Development settings:
  Coccinelle / spatch:                     no
  Unit tests enabled:                      yes
  Debug output enabled:                    yes
  Debug validation enabled:                no
  Fuzz targets enabled:                    no

Generic build parameters:
  Installation prefix:                     /usr
  Configuration directory:                 /etc/suricata/
  Log directory:                           /usr/var/log/suricata/

  --prefix                                 /usr
  --sysconfdir                             /etc
  --localstatedir                          /usr/var
  --datarootdir                            /usr/share

  Host:                                    x86_64-pc-linux-gnu
  Compiler:                                gcc (exec name) / g++ (real)
  GCC Protect enabled:                     no
  GCC march native enabled:                yes
  GCC Profile enabled:                     no
  Position Independent Executable enabled: no
  CFLAGS                                   -O2 -g -fPIC -DOS_LINUX -std=c11 -march=native -I${srcdir}/../rust/gen -I${srcdir}/../rust/dist -I../rust/gen
  PCAP_CFLAGS                               -I/usr/include
  SECCFLAGS                                

To build and install run 'make' and 'make install'.

You can run 'make install-conf' if you want to install initial configuration
files to /etc/suricata/. Running 'make install-full' will install configuration
and rules and provide you a ready-to-run suricata.

To install Suricata into /usr/bin/suricata, have the config in
/etc/suricata and use /var/log/suricata as log dir, use:
./configure --prefix=/usr/ --sysconfdir=/etc/ --localstatedir=/var/

Making all in libhtp
make[1] : on entre dans le répertoire « /home/alexandre/Téléchargements/suricata/libhtp »
make[1]: *** Aucune règle pour fabriquer la cible « all ». Arrêt.
make[1] : on quitte le répertoire « /home/alexandre/Téléchargements/suricata/libhtp »
make: *** [Makefile:505 : all-recursive] Erreur 1
alexandre@alexandre-Matebook:~/Téléchargements/suricata$ make -j10
Making all in libhtp
make[1] : on entre dans le répertoire « /home/alexandre/Téléchargements/suricata/libhtp »
make[1]: *** Aucune règle pour fabriquer la cible « all ». Arrêt.
make[1] : on quitte le répertoire « /home/alexandre/Téléchargements/suricata/libhtp »
make: *** [Makefile:505 : all-recursive] Erreur 1

and if i write : sudo ./scripts/bundle.sh ./autogen.sh \ sudo autoreconf -i \ sudo chmod +x ./autogen.sh ./configure --prefix=/usr/ --bindir=/usr/bin/ --sbindir=/usr/sbin/ --libdir=/usr/lib/ --sysconfdir=/etc/ --enable-python --enable-debug --enable-unittests --enable-ebpf-build --enable-geoip --enable-af-packet --enable-nflog --with-libpcap-includes=/usr/local/include --with-libpcap-libraries=/usr/lib/x86_64-linux-gnu/ --with-libhtp-includes=/usr/local/include/htp --with-libhtp-libraries=/usr/lib --with-libyaml-libraries=/usr/lib/x86_64-linux-gnu --enable-nfqueue \ && sudo make -j10 && sudo make install-full ,i have :

checking for bpf_xdp_query_id... no
checking that generated files are newer than configure... done
configure: creating ./config.status
config.status: creating suricata-update/Makefile
rm: cannot remove 'suricata-update/Makefile': Permission denied
config.status: error: could not create suricata-update/Makefile
alexandre@alexandre-Matebook:~/Téléchargements/suricata$

could you help me ?
Regards

Looks like the mix of sudo and non-sudo?

Don’t use sudo at all, I’d start with a fresh clone just to be sure.

So, the problem has been partially resolved. I wrote : sudo chmod 777 -R ./* an then i moved to libhtp with : cd libhtpand then i did : ./configure && make -j 10 && sudo make install and then : cd .., then make -j10 && sudo make install-full, and now i’ve this error :

 make[1] : on entre dans le répertoire « /home/alexandre/Téléchargements/suricata/rust »
cd /home/alexandre/Téléchargements/suricata/rust && \
	RUSTUP_HOME=/home/alexandre/.rustup CARGO_HOME="/home/alexandre/.cargo" \
	CARGO_TARGET_DIR="/home/alexandre/Téléchargements/suricata/rust/target" \
	/home/alexandre/.cargo/bin/cargo build   \
		--features "ja3 ja4 debug " 
error: failed to acquire jobserver token

Caused by:
  Bad file descriptor (os error 9)
warning: build failed, waiting for other jobs to finish...
make[1]: *** [Makefile:547 : all-local] Erreur 101
make[1] : on quitte le répertoire « /home/alexandre/Téléchargements/suricata/rust »
make: *** [Makefile:505 : all-recursive] Erreur 1
alexandre@alexandre-Matebook:~/Téléchargements/suricata$

, could you help me ?

are you sure there’s not a problem with the makefile?

This sequence of commands is run many times a day in CI and QA. I suggest you start fresh, with the sudo, and chmod’s its hard to say what the state of your directory is in:

https://docs.suricata.io/en/latest/devguide/codebase/installation-from-git.html#suricata

so , for the moment I think that my problem comes from parallelism I’m under a huawei matebook D 14 , I advance further by do make than make -j 6 or -j 10

regards

Are you using Docker, with Ubuntu in the container, and a bind-mount to the host file system? I’ve seen similar in similar scenarios. But usually not an issue with standard file system mounts.

no docker , host system.

yes that’s it, I was not mistaken!! do you need a video as proof?
regards