Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
openaspace opened this issue Feb 7, 2023 · 5 comments
Open

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

openaspace opened this issue Feb 7, 2023 · 5 comments

Comments

@openaspace
Copy link

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
Copy link
Author

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

@uranderu
Copy link

uranderu commented Mar 1, 2023

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

@wolle604
Copy link

Did you installed all dependencies mentioned in the documentation?

@uranderu
Copy link

Did you installed all dependencies mentioned in the documentation?

Yep

@ddpbsd
Copy link
Member

ddpbsd commented Mar 28, 2023 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants