wazuh / wazuh-packages

Wazuh - Tools for packages creation
https://wazuh.com
GNU General Public License v2.0
104 stars 94 forks source link

Wazuh agent Alpine package fails to be created #3012

Closed rauldpm closed 3 months ago

rauldpm commented 3 months ago

Description

Alpine package generation is failing for the v4.9.0-alpha1 stage, we need to investigate the cause and fix what is necessary

Investigating Cloudwatch, I found the following log:

    /build/SPECS/wazuh-agent/src/wazuh-wazuh-d51c991/src/data_provider/src/packages/berkeleyRpmDbHelper.h:73:60: error: 'DBT' does not name a type
    2024-06-21T11:48:07.827Z    /build/SPECS/wazuh-agent/src/wazuh-wazuh-d51c991/src/data_provider/src/packages/berkeleyRpmDbHelper.h:135:85: error: 'DBT' does not name a type
    2024-06-21T11:48:07.831Z    /build/SPECS/wazuh-agent/src/wazuh-wazuh-d51c991/src/data_provider/src/packages/berkeleyRpmDbHelper.h:75:58: error: request for member 'data' in 'data', which is of non-class type 'const int'
    2024-06-21T11:48:07.831Z    /build/SPECS/wazuh-agent/src/wazuh-wazuh-d51c991/src/data_provider/src/packages/berkeleyRpmDbHelper.h:79:22: error: request for member 'size' in 'data', which is of non-class type 'const int'
    2024-06-21T11:48:07.832Z    /build/SPECS/wazuh-agent/src/wazuh-wazuh-d51c991/src/data_provider/src/packages/berkeleyRpmDbHelper.h:87:100: error: request for member 'size' in 'data', which is of non-class type 'const int'
    2024-06-21T11:48:07.832Z    /build/SPECS/wazuh-agent/src/wazuh-wazuh-d51c991/src/data_provider/src/packages/berkeleyRpmDbHelper.h:107:40: error: 'tag' is not captured
    2024-06-21T11:48:07.832Z    /build/SPECS/wazuh-agent/src/wazuh-wazuh-d51c991/src/data_provider/src/packages/berkeleyRpmDbHelper.h:98:36: note: '<typeprefixerror>tag' declared here
    2024-06-21T11:48:07.834Z    /build/SPECS/wazuh-agent/src/wazuh-wazuh-d51c991/src/data_provider/src/packages/berkeleyRpmDbHelper.h:141:59: error: request for member 'data' in 'data', which is of non-class type 'const int'
    2024-06-21T11:48:07.838Z    /build/SPECS/wazuh-agent/src/wazuh-wazuh-d51c991/src/data_provider/src/packages/berkeleyRpmDbHelper.h:186:13: error: 'DBT' was not declared in this scope
    2024-06-21T11:48:07.839Z    /build/SPECS/wazuh-agent/src/wazuh-wazuh-d51c991/src/data_provider/src/packages/berkeleyRpmDbHelper.h:191:53: error: 'key' was not declared in this scope; did you mean 'key_t'?
    2024-06-21T11:48:07.840Z    /build/SPECS/wazuh-agent/src/wazuh-wazuh-d51c991/src/data_provider/src/packages/berkeleyRpmDbHelper.h:191:58: error: 'data' was not declared in this scope; did you mean 'std::data'?
    2024-06-21T11:48:07.841Z    /build/SPECS/wazuh-agent/src/wazuh-wazuh-d51c991/src/data_provider/src/packages/berkeleyRpmDbHelper.h:197:49: error: 'key' was not declared in this scope; did you mean 'key_t'?
    2024-06-21T11:48:07.841Z    /build/SPECS/wazuh-agent/src/wazuh-wazuh-d51c991/src/data_provider/src/packages/berkeleyRpmDbHelper.h:197:54: error: 'data' was not declared in this scope; did you mean 'std::data'?
    2024-06-21T11:48:08.182Z    /usr/include/c++/9.3.0/bits/predefined_ops.h:283:11: error: void value not ignored as it ought to be
make[2]: Leaving directory '/build/SPECS/wazuh-agent/src/wazuh-wazuh-d51c991/src/shared_modules/rsync/build'
    2024-06-21T11:48:28.017Z    
make[1]: Leaving directory '/build/SPECS/wazuh-agent/src/wazuh-wazuh-d51c991/src'
make: *** [Makefile:835: agent] Error 2
vikman90 commented 3 months ago

Confirmed

While version 4.8.0 does build on Alpine Linux 3.20.1 (g++ 13.2.1), version 4.9.0 does not.

Plan

We've decided not to support version 4.9.0 on this OS.