Skip to content

libipmctl build dependencies are failing on new alpine image #3482

@bobbypage

Description

@bobbypage

cAdvisor currently links against https://github.com/intel/ipmctl/ and compiles it on x86-64 to support certain metrics that require libipmctl. The following metrics depend on the library:

`machine_nvm_avg_power_budget_watts` | Gauge |  NVM power budget | watts | | libipmctl
`machine_nvm_capacity` | Gauge | NVM capacity value labeled by NVM mode (memory mode or app direct mode) | bytes | | libipmctl

After upgrading to alpine 3.18, the build is no longer passing with the library (make release):

#12 4.261 /usr/bin/python /go/ipmctl/src/os/ini/ini_auto_gen_default_config.py /go/ipmctl/src/os/ini/ipmctl_default.i /go/ipmctl/output/release/ipmctl_default.conf
#12 4.284 make[2]: Leaving directory '/go/ipmctl/output'
#12 4.290 [  7%] Built target stringdefs
#12 4.297 /go/ipmctl/src/os/linux/lnx_adapter_passthrough.c: In function 'ioctl_passthrough_fw_cmd':
#12 4.297 /go/ipmctl/src/os/linux/lnx_adapter_passthrough.c:447:76: error: the comparison will always evaluate as 'false' for the address of 'InputPayload' will never be NULL [-Werror=address]
#12 4.297   447 |         else if ((p_fw_cmd->InputPayloadSize > 0 && p_fw_cmd->InputPayload == NULL) ||
#12 4.297       |                                                                            ^~
#12 4.297 compilation terminated due to -Wfatal-errors.
#12 4.297 cc1: all warnings being treated as errors
#12 4.298 make[2]: *** [CMakeFiles/ipmctl_os_interface.dir/build.make:107: CMakeFiles/ipmctl_os_interface.dir/src/os/linux/lnx_adapter_passthrough.c.o] Error 1
#12 4.298 make[2]: *** Waiting for unfinished jobs....
#12 4.301 /usr/bin/cmake -E remove -f /go/ipmctl/src/os/ini/ipmctl_default.i
#12 4.307 make[2]: Leaving directory '/go/ipmctl/output'
#12 4.313 [  7%] Built target iniconfig
#12 4.320 /go/ipmctl/src/os/linux/lnx_system.c: In function 'get_supported_block_sizes':
#12 4.320 /go/ipmctl/src/os/linux/lnx_system.c:401:52: error: 'ND_DEVICE_NAMESPACE_BLK' undeclared (first use in this function); did you mean 'ND_DEVICE_NAMESPACE_IO'?
#12 4.320   401 |                                         (nstype == ND_DEVICE_NAMESPACE_BLK))
#12 4.320       |                                                    ^~~~~~~~~~~~~~~~~~~~~~~
#12 4.320       |                                                    ND_DEVICE_NAMESPACE_IO
#12 4.320 compilation terminated due to -Wfatal-errors.
#12 4.321 make[2]: *** [CMakeFiles/ipmctl_os_interface.dir/build.make:149: CMakeFiles/ipmctl_os_interface.dir/src/os/linux/lnx_system.c.o] Error 1
#12 4.366 make[2]: Leaving directory '/go/ipmctl/output'
#12 4.366 make[1]: *** [CMakeFiles/Makefile2:111: CMakeFiles/ipmctl_os_interface.dir/all] Error 2
#12 4.366 make[1]: Leaving directory '/go/ipmctl/output'
#12 4.366 make: *** [Makefile:139: all] Error 2
#12 ERROR: process "/bin/sh -c if [ \"$(uname --machine)\" = \"x86_64\" ]; then     git clone -b v02.00.00.3885 https://github.com/intel/ipmctl/ &&     cd ipmctl &&     mkdir output &&     cd output &&     cmake -DRELEASE=ON -DCMAKE_INSTALL_PREFIX=/ -DCMAKE_INSTALL_LIBDIR=/usr/local/lib .. &&     make -j all &&     make install; fi" did not complete successfully: exit code: 2
------
 > [build  5/12] RUN if [ "$(uname --machine)" = "x86_64" ]; then     git clone -b v02.00.00.3885 https://github.com/intel/ipmctl/ &&     cd ipmctl &&     mkdir output &&     cd output &&     cmake -DRELEASE=ON -DCMAKE_INSTALL_PREFIX=/ -DCMAKE_INSTALL_LIBDIR=/usr/local/lib .. &&     make -j all &&     make install; fi:
#12 4.320 /go/ipmctl/src/os/linux/lnx_system.c:401:52: error: 'ND_DEVICE_NAMESPACE_BLK' undeclared (first use in this function); did you mean 'ND_DEVICE_NAMESPACE_IO'?
#12 4.320   401 |                                         (nstype == ND_DEVICE_NAMESPACE_BLK))
#12 4.320       |                                                    ^~~~~~~~~~~~~~~~~~~~~~~
#12 4.320       |                                                    ND_DEVICE_NAMESPACE_IO
#12 4.320 compilation terminated due to -Wfatal-errors.
#12 4.321 make[2]: *** [CMakeFiles/ipmctl_os_interface.dir/build.make:149: CMakeFiles/ipmctl_os_interface.dir/src/os/linux/lnx_system.c.o] Error 1
#12 4.366 make[2]: Leaving directory '/go/ipmctl/output'
#12 4.366 make[1]: *** [CMakeFiles/Makefile2:111: CMakeFiles/ipmctl_os_interface.dir/all] Error 2
#12 4.366 make[1]: Leaving directory '/go/ipmctl/output'
#12 4.366 make: *** [Makefile:139: all] Error 2

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions