ossec / ossec-hids

OSSEC is an Open Source Host-based Intrusion Detection System that performs log analysis, file integrity checking, policy monitoring, rootkit detection, real-time alerting and active response.
http://www.ossec.net
Other
4.33k stars 1.02k forks source link

can't compile latest ossec hids on proxmox hypervisor. #2076

Closed openaspace closed 1 month ago

openaspace commented 1 year ago

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.`

openaspace commented 1 year ago

after installing: apt-get install libxmu-dev libxmu-headers libxext-dev libxi-dev

I have :

`Installing the system

uranderu commented 1 year ago

Having the same issue, version 3.6.0 compiles though. Tested on Ubuntu 18.04 LTS and 22.04.2 LTS

wolle604 commented 1 year ago

Did you installed all dependencies mentioned in the documentation?

uranderu commented 1 year ago

Did you installed all dependencies mentioned in the documentation?

Yep

ddpbsd commented 1 year ago

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: @.***>

atomicturtle commented 1 month ago

Closing this one as out of date, looks like it was just a missing dependency