|Wazuh version|Install type|Install method|Platform|
|---|---|---|---|
| 3.10.2 | Manager/Agent | Sources | FreeBSD 11.3 and 12.0 STABLE |
We cannot build Wazuh on FreeBSD. The compilation stops when building OpenSSL:
Operating system: amd64-whatever-freebsd
Checking for gcc...
"glob" is not exported by the File::Glob module
Can't continue after import errors at ./Configure line 17.
BEGIN failed--compilation aborted at ./Configure line 17.
"glob" is not exported by the File::Glob module
Can't continue after import errors at ./Configure line 17.
BEGIN failed--compilation aborted at ./Configure line 17.
This system (BSD-x86_64) is not supported. See file INSTALL for details.
gmake[1]: Entering directory '/home/vagrant/wazuh/src/external/openssl'
/usr/bin/perl "-I." -Mconfigdata "util/dofile.pl" \
"-oMakefile" crypto/include/internal/bn_conf.h.in > crypto/include/internal/bn_conf.h
/bin/sh: /usr/bin/perl: not found
gmake[1]: *** [Makefile:593: crypto/include/internal/bn_conf.h] Error 127
gmake[1]: Leaving directory '/home/vagrant/wazuh/src/external/openssl'
gmake: *** [Makefile:686: external/openssl/libssl.a] Error 2
We are using the official version of Perl:
% sudo pkg install perl5
% perl -v
This is perl 5, version 30, subversion 0 (v5.30.0) built for amd64-freebsd-thread-multi
However, I've been able to build OpenSSL 1.1.1d on FreeBSD.
We should upgrade the external OpenSSL library dependency.
Hi @vikman90,
This error also appears while building the OpenSSL on ArchLinux, avoiding building the agent and the manager. A quick workaround is to "patch" the OpenSSL files by running this:
sed -i "s#'File::Glob' => qw/glob/;#'File::Glob' => qw/bsd_glob/;#g" src/external/openssl/test/recipes/90-test_fuzz.t
sed -i "s#'File::Glob' => qw/glob/;#'File::Glob' => qw/bsd_glob/;#g" src/external/openssl/test/recipes/80-test_ssl_new.t
sed -i "s#'File::Glob' => qw/glob/;#'File::Glob' => qw/bsd_glob/;#g" src/external/openssl/test/recipes/40-test_rehash.t
sed -i "s#'File::Glob' => qw/glob/;#'File::Glob' => qw/bsd_glob/;#g" src/external/openssl/test/build.info
sed -i "s#'File::Glob' => qw/glob/;#'File::Glob' => qw/bsd_glob/;#g" src/external/openssl/test/run_tests.pl
sed -i "s#'File::Glob' => qw/glob/;#'File::Glob' => qw/bsd_glob/;#g" src/external/openssl/util/process_docs.pl
sed -i "s#'File::Glob' => qw/glob/;#'File::Glob' => qw/bsd_glob/;#g" src/external/openssl/Configure
To reproduce the error, you can follow these steps:
docker run -it --rm archlinux bashpacman -Syu gcc git make automake autoconf libtool libnghttp2 libpsl librtmp0 brotli python perl-text-globgit clone https://github.com/wazuh/wazuh --depth=1 -b v3.10.2cd wazuh && make -C src deps && make TARGET=agentHi
I tested the new version of OpenSSL 1.1.1d, It compiles and executed in the OS Freebsd 11.3 and Freebsd 12. I only had problems with the firewall or the recompilation of python. This problem is solved by installing all the build dependencies of Python.
Also, I tested this change in several OS, where I fix the same problems, with the same solutions in all of them. These systems are:
Since the version of wazuh 3.11 OpenSSL has been updated to 1.1.1d
Regards
Closing the issue since the OpenSSL library has been updated to 1.1.1d.
Thanks, @SalvaMilenario!!
Some additional context File::Glob::glob() will disappear in perl 5.30. Use File::Glob::bsd_glob()
So if you're on this version of perl you'll need to either patch openssl or use a version that doesn't user the glob method.
Most helpful comment
Hi @vikman90,
This error also appears while building the OpenSSL on ArchLinux, avoiding building the agent and the manager. A quick workaround is to "patch" the OpenSSL files by running this:
To reproduce the error, you can follow these steps:
docker run -it --rm archlinux bashpacman -Syu gcc git make automake autoconf libtool libnghttp2 libpsl librtmp0 brotli python perl-text-globgit clone https://github.com/wazuh/wazuh --depth=1 -b v3.10.2cd wazuh && make -C src deps && make TARGET=agent