Build wazuh-agent for architecrute armhf

75 views
Skip to first unread message

Symeon Zapsis

unread,
Sep 2, 2024, 2:50:31 AM9/2/24
to Wazuh | Mailing List
Dear Wazuh Team,
I trying to build wazuh-agent for armhf (board STM32MP157F-DK2).

Are there any instructions, bash scripts, builders, or anything else that needs to be done?

1. I followed the instructions for cross-compile provided in the wazuh github https://github.com/wazuh/wazuh/tree/master/packages and take error make[2]: *** No rule to make target 'agent', needed by 'build'.  Stop.

2. I followed the instructions for cross-compile provided in the wazuh-agent https://github.com/wazuh/wazuh-agent/tree/master/packages and take error
+++ cat 'wazuh*/src/VERSION'
/bin/cat: 'wazuh*/src/VERSION': No such file or directory
++ wazuh_version=
++ [[ no == \y\e\s ]]
++ package_name=wazuh-agent-
++ source_dir=/build_wazuh/agent/wazuh-agent-
++ cp -R wazuh-local-src /build_wazuh/agent/wazuh-agent-
++ echo /build_wazuh/agent/wazuh-agent-
+ source_dir=/build_wazuh/agent/wazuh-agent-
++ cut -d v -f 2
++ cat /build_wazuh/agent/wazuh-agent-/src/VERSION
/bin/cat: /build_wazuh/agent/wazuh-agent-/src/VERSION: No such file or directory

Thank you in advance.
Best Regards.
Symeon Zapsis


Manuel Jose Cano Rojo

unread,
Sep 2, 2024, 3:23:43 AM9/2/24
to Wazuh | Mailing List
Hi Symeon!

Currently, the correct way to build the wazuh agent is using the wazuh/wazuh repository, as you tried in your first attempt. The problem you are encountering is expected since you are using the master branch and the wazuh agent is being moved to the wazuh/wazuh-agent  repository in the master branch. To solve it you have to use another branch such as https://github.com/wazuh/wazuh/tree/v4.8.2 which still contains all the necessary files and folders to build the agent with no problems.

So if you clone the repository:
Enter the cloned repository:
  • cd wazuh
Then change the branch:
  • git checkout v.4.8.2
Now you will be able to build from sources with no problems.

Let me know if you need further help!

Regards,

Manuel.

Symeon Zapsis

unread,
Sep 2, 2024, 3:43:31 AM9/2/24
to Wazuh | Mailing List
Dear Manuel,

Thank you very much for your answer.

Best Regards.
Symeon

Symeon Zapsis

unread,
Sep 2, 2024, 4:49:55 AM9/2/24
to Wazuh | Mailing List
Dear Manuel,

I have observed that version v4.8.2 does not include a packages folder inside the wazuh directory. Additionally, the generate_package.sh script is missing in this version.

In contrast, the v4.9.0-alpha1(and newest) release does contain the packages folder.

Could you please advise on the best course of action?

Thank you for your assistance.

Best regards.
Symeon

Manuel Jose Cano Rojo

unread,
Sep 2, 2024, 10:14:44 AM9/2/24
to Wazuh | Mailing List
Hi Symeon!

Sure, I'll go ahead and explain this case to you. 

Until version 4.9.0, wazuh packages generation mechanisms have been stored in the wazuh/wazuh-packages repository but in the 4.9.0 version, the building tools are being migrated to the wazuh/wazuh repository. 

If you want to build packages, you have to use wazuh/wazuh-packages repository for v4.8.2 version and older. In case you want to build packages for 4.9.0 version you can use the wazuh/wazuh repository, where you will find the packages folder. Keep in mind, 4.9.0 version has not been officially released yet, so it could still contain some unsolved bugs.
 
Hope it helps!

Regards,

Manuel.
Reply all
Reply to author
Forward
0 new messages