ossec-hids icon indicating copy to clipboard operation
ossec-hids copied to clipboard

can't compile latest ossec hids on proxmox hypervisor.

Open openaspace opened this issue 2 years ago • 5 comments

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 avatar Feb 07 '23 14:02 openaspace

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

openaspace avatar Feb 07 '23 14:02 openaspace

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

uranderu avatar Mar 01 '23 18:03 uranderu

Did you installed all dependencies mentioned in the documentation?

wolle604 avatar Mar 27 '23 19:03 wolle604

Did you installed all dependencies mentioned in the documentation?

Yep

uranderu avatar Mar 28 '23 13:03 uranderu

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

ddpbsd avatar Mar 28 '23 13:03 ddpbsd

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

atomicturtle avatar Jun 05 '24 17:06 atomicturtle