Wazuh Windows Agent Build Error

159 views
Skip to first unread message

Aamir Mustafa

unread,
Dec 31, 2021, 6:56:54 AM12/31/21
to Wazuh mailing list
Hi,
I'm getting the following error when trying to build Wazuh winagent from Wazuh github repo. I'm following the instructions as mentioned on the GitHub repo.

external/cJSON/libcjson.a: member external/cJSON/libcjson.a(cJSON.o) in archive is not an object
collect2: error: ld returned 1 exit status
Makefile:1577: recipe for target 'libwazuhext.dll' failed
make[1]: *** [libwazuhext.dll] Error 1
make[1]: Leaving directory '/home/***/wazuh/src'
Makefile:744: recipe for target 'winagent' failed
make: *** [winagent] Error 2


Can anyone help me out with this error?

Federico Pacher

unread,
Dec 31, 2021, 3:09:47 PM12/31/21
to Wazuh mailing list

Hi there,

Here you have the Wazuh documentation that explains how to build wazuh winagent from source. Make sure you follow the steps. I have tested it in ubuntu 18.04.6 LTS Bionic and works for me. Then, I have installed the compiled agent on a Windows 10 machine 

Make sure you have cmake latest version.

Check cmake version 

Cmake --version

Installing the last version of CMAKE

Using APT Repositories

Kitware now provides an APT Repository that supports Ubuntu 16.04, 18.04, and 20.04. So we can install it easily following these steps:

1. Uninstall the default version provided by Ubuntu's package manager and configuration by using:


sudo apt remove --purge --auto-remove cmake

or:

sudo apt purge --auto-remove cmake

2. Prepare for installation


sudo apt update && \ sudo apt install -y software-properties-common lsb-release && \ sudo apt clean all


3. Obtain a copy of kitware's signing key.


wget -O - https://apt.kitware.com/keys/kitware-archive-latest.asc 2>/dev/null | gpg --dearmor - | sudo tee /etc/apt/trusted.gpg.d/kitware.gpg >/dev/null


4. Add kitware's repository to your sources list for Ubuntu Focal Fossa (20.04), Ubuntu Bionic Beaver (18.04) and Ubuntu Xenial Xerus (16.04).


sudo apt-add-repository "deb https://apt.kitware.com/ubuntu/ $(lsb_release -cs) main"


5. As an optional step, is recommended that we also install the kitware-archive-keyring package to ensure that Kitware's keyring stays up to date as they rotate their keys.

sudo apt update sudo apt install kitware-archive-keyring sudo rm /etc/apt/trusted.gpg.d/kitware.gpg


6. Finally, we can update and install the cmake package.


sudo apt update 

sudo apt install cmake


I hope this help,

Regards

Reply all
Reply to author
Forward
0 new messages