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

libipmctl build dependencies are failing on new alpine image #3482

Open
bobbypage opened this issue Feb 29, 2024 · 2 comments
Open

libipmctl build dependencies are failing on new alpine image #3482

bobbypage opened this issue Feb 29, 2024 · 2 comments

Comments

@bobbypage
Copy link
Collaborator

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
@bobbypage
Copy link
Collaborator Author

For now, on the new release we will disable ipmctl.

cc @Creatone, is this something you're aware and we can followup with a fix?

If not, it may be worth to look into removing ipmctl due to the additional complexities in the build process. Is anyone using or depending on these metrics?

bobbypage added a commit to bobbypage/cadvisor that referenced this issue Feb 29, 2024
See google#3482

Signed-off-by: David Porter <david@porter.me>
bobbypage added a commit to bobbypage/cadvisor that referenced this issue Feb 29, 2024
See google#3482

Signed-off-by: David Porter <david@porter.me>
@samcro1967
Copy link

I am also getting an error trying to build release-v0.49. Looks like the step to build libipmctl has been commented out in the Dockerfile, but the later step to copy the files is not commented out causing a failure.

Step 16/26 : COPY --from=build /usr/local/lib/libpfm.so* /usr/local/lib/
 ---> 258b2104a755
Step 17/26 : COPY --from=build /usr/local/lib/libipmctl.so* /usr/local/lib/
COPY failed: no source files were specified
exit status 1

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

2 participants