ossec-hids
ossec-hids copied to clipboard
can't compile latest ossec hids on proxmox hypervisor.
Hello, can't compile latest ossec hids on proxmox hypervisor. Any idea?
`cc -I./external/compat -DMAX_AGENTS=2048 -DOSSECHIDS -DDEFAULTDIR="/var/ossec" -DUSER="ossec" -DREMUSER="ossecr" -DGROUPGLOBAL="ossec" -DMAILUSER="ossecm" -DLinux -DINOTIFY_ENABLED -DHAVE_SYSTEMD -DZLIB_SYSTEM -DUSE_PCRE2_JIT -DLIBOPENSSL_ENABLED -DLOCAL -Wall -Wextra -I./ -I./headers/ -c os_xml/os_xml_variables.c -o os_xml/os_xml_variables.o os_xml/os_xml_variables.c: In function ‘OS_ApplyVariables’: os_xml/os_xml_variables.c:179:42: warning: ‘%s’ directive output may be truncated writing up to 255 bytes into a region of size 101 [-Wformat-truncation=] 179 | "XMLERR: Unknown variable" | ^~~~~~~~~~~~~~~~~~~~~~~~~~ 180 | ": '%s'.", lvar); | ~~~~ os_xml/os_xml_variables.c:180:46: note: format string is defined here 180 | ": '%s'.", lvar); | ^~ os_xml/os_xml_variables.c:178:33: note: ‘snprintf’ output between 30 and 285 bytes into a destination of size 128 178 | snprintf(_lxml->err, XML_ERR_LENGTH, | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 179 | "XMLERR: Unknown variable" | ~~~~~~~~~~~~~~~~~~~~~~~~~~ 180 | ": '%s'.", lvar); | ~~~~~~~~~~~~~~~~ cc -I./external/compat -DMAX_AGENTS=2048 -DOSSECHIDS -DDEFAULTDIR="/var/ossec" -DUSER="ossec" -DREMUSER="ossecr" -DGROUPGLOBAL="ossec" -DMAILUSER="ossecm" -DLinux -DINOTIFY_ENABLED -DHAVE_SYSTEMD -DZLIB_SYSTEM -DUSE_PCRE2_JIT -DLIBOPENSSL_ENABLED -DLOCAL -Wall -Wextra -I./ -I./headers/ -c os_xml/os_xml_writer.c -o os_xml/os_xml_writer.o ar -crs os_xml.a os_xml/os_xml_access.o os_xml/os_xml.o os_xml/os_xml_node_access.o os_xml/os_xml_variables.o os_xml/os_xml_writer.o ranlib os_xml.a cc -I./external/compat -DMAX_AGENTS=2048 -DOSSECHIDS -DDEFAULTDIR="/var/ossec" -DUSER="ossec" -DREMUSER="ossecr" -DGROUPGLOBAL="ossec" -DMAILUSER="ossecm" -DLinux -DINOTIFY_ENABLED -DHAVE_SYSTEMD -DZLIB_SYSTEM -DUSE_PCRE2_JIT -DLIBOPENSSL_ENABLED -DLOCAL -Wall -Wextra -I./ -I./headers/ os_maild/config.o os_maild/maild.o os_maild/mail_list.o os_maild/os_maild_client.o os_maild/sendcustomemail.o os_maild/sendmail.o os_crypto.a config.a shared.a os_net.a os_regex.a os_xml.a -lm -lpthread -lsystemd -lpcre2-8 -lssl -lcrypto -lz ./external/compat/imsg.c ./external/compat/imsg-buffer.c -o ossec-maild /usr/bin/ld: cannot find -lsystemd collect2: error: ld returned 1 exit status make: *** [Makefile:930: ossec-maild] Error 1
Error 0x5. Building error. Unable to finish the installation.`
after installing: apt-get install libxmu-dev libxmu-headers libxext-dev libxi-dev
I have :
`Installing the system
- Running the Makefile cc -I./external/compat -DMAX_AGENTS=2048 -DOSSECHIDS -DDEFAULTDIR="/var/ossec" -DUSER="ossec" -DREMUSER="ossecr" -DGROUPGLOBAL="ossec" -DMAILUSER="ossecm" -DLinux -DINOTIFY_ENABLED -DHAVE_SYSTEMD -DZLIB_SYSTEM -DUSE_PCRE2_JIT -DLIBOPENSSL_ENABLED -DLOCAL -Wall -Wextra -I./ -I./headers/ os_maild/config.o os_maild/maild.o os_maild/mail_list.o os_maild/os_maild_client.o os_maild/sendcustomemail.o os_maild/sendmail.o os_crypto.a config.a shared.a os_net.a os_regex.a os_xml.a -lm -lpthread -lsystemd -lpcre2-8 -lssl -lcrypto -lz ./external/compat/imsg.c ./external/compat/imsg-buffer.c -o ossec-maild /usr/bin/ld: cannot find -lsystemd collect2: error: ld returned 1 exit status make: *** [Makefile:930: ossec-maild] Error 1
Error 0x5. Building error. Unable to finish the installation.`
Having the same issue, version 3.6.0 compiles though. Tested on Ubuntu 18.04 LTS and 22.04.2 LTS
Did you installed all dependencies mentioned in the documentation?
Did you installed all dependencies mentioned in the documentation?
Yep
Make sure the development package for libsystemd or whatever debian calls it is installed. That should fix the error in OP.
On Tue, Mar 28, 2023 at 8:39 AM uranderu @.***> wrote:
Did you installed all dependencies mentioned in the documentation?
Yep
— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you are subscribed to this thread.Message ID: @.***>
Closing this one as out of date, looks like it was just a missing dependency