intel / ipmctl

BSD 3-Clause "New" or "Revised" License
184 stars 62 forks source link

Failed to build ipmctl on Ubuntu 20.04 #199

Closed fidencio closed 1 year ago

fidencio commented 1 year ago
root@44e8dc00be81:/ipmctl# ./updateedk.sh 
BaseTools folder exists
MdeModulePkg folder exists
MdePkg folder exists
ShellPkg folder exists
edksetup.bat exists
Copying BaseTools folder
Copying MdeModulePkg folder
Copying MdePkg folder
Copying ShellPkg folder
root@44e8dc00be81:/ipmctl# mkdir build
root@44e8dc00be81:/ipmctl# cd build/
root@44e8dc00be81:/ipmctl/build# cmake -DRELEASE=ON -DCMAKE_INSTALL_PREFIX=/usr/local ..
cmake version: 3.16.3
-- The C compiler identification is GNU 9.4.0
-- The CXX compiler identification is GNU 9.4.0
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Found Git: /usr/bin/git (found version "2.25.1") 
VERSION:03.00.00.0483
CMAKE_BUILD_TYPE:Release
-- Found PythonInterp: /usr/bin/python3.8 (found version "3.8.10") 
-- Found a2x: /usr/bin/a2x  
-- Found asciidoctor: /usr/bin/asciidoctor (found version "2.0.10") 
-- Found asciidoc: /usr/bin/asciidoc  
-- Found PkgConfig: /usr/bin/pkg-config (found version "0.29.1") 
-- Checking for module 'libndctl>=58.2'
--   Found libndctl, version 67+
-- Checking for module 'systemd'
--   No package 'systemd' found
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Failed
-- Looking for pthread_create in pthreads
-- Looking for pthread_create in pthreads - not found
-- Looking for pthread_create in pthread
-- Looking for pthread_create in pthread - found
-- Found Threads: TRUE  
BUILD_TYPE:Release
OS_TYPE:linux
LIB_TYPE:SHARED
COMPILER:/usr/bin/cc
SYSROOT:
TOOLCHAIN:
CMAKE_INSTALL_DATAROOTDIR not defined. Creating a new definition with value: share
INI_INSTALL_FILEPATH definition create with value: /usr/local/share
-- Checking for module 'systemd'
--   No package 'systemd' found
-- Configuring done
-- Generating done
-- Build files have been written to: /ipmctl/build
root@44e8dc00be81:/ipmctl/build# make -j all
/usr/bin/cmake -S/ipmctl -B/ipmctl/build --check-build-system CMakeFiles/Makefile.cmake 0
/usr/bin/cmake -E cmake_progress_start /ipmctl/build/CMakeFiles /ipmctl/build/CMakeFiles/progress.marks
make -f CMakeFiles/Makefile2 all
make[1]: Entering directory '/ipmctl/build'
make -f CMakeFiles/iniconfig.dir/build.make CMakeFiles/iniconfig.dir/depend
make -f CMakeFiles/manpage.dir/build.make CMakeFiles/manpage.dir/depend
make -f CMakeFiles/stringdefs.dir/build.make CMakeFiles/stringdefs.dir/depend
make[2]: Entering directory '/ipmctl/build'
cd /ipmctl/build && /usr/bin/cmake -E cmake_depends "Unix Makefiles" /ipmctl /ipmctl /ipmctl/build /ipmctl/build /ipmctl/build/CMakeFiles/iniconfig.dir/DependInfo.cmake --color=
make -f CMakeFiles/ipmctl_os_interface.dir/build.make CMakeFiles/ipmctl_os_interface.dir/depend
make[2]: Entering directory '/ipmctl/build'
cd /ipmctl/build && /usr/bin/cmake -E cmake_depends "Unix Makefiles" /ipmctl /ipmctl /ipmctl/build /ipmctl/build /ipmctl/build/CMakeFiles/stringdefs.dir/DependInfo.cmake --color=
make[2]: Entering directory '/ipmctl/build'
cd /ipmctl/build && /usr/bin/cmake -E cmake_depends "Unix Makefiles" /ipmctl /ipmctl /ipmctl/build /ipmctl/build /ipmctl/build/CMakeFiles/manpage.dir/DependInfo.cmake --color=
make[2]: Entering directory '/ipmctl/build'
cd /ipmctl/build && /usr/bin/cmake -E cmake_depends "Unix Makefiles" /ipmctl /ipmctl /ipmctl/build /ipmctl/build /ipmctl/build/CMakeFiles/ipmctl_os_interface.dir/DependInfo.cmake --color=
Scanning dependencies of target iniconfig
make[2]: Leaving directory '/ipmctl/build'
make -f CMakeFiles/iniconfig.dir/build.make CMakeFiles/iniconfig.dir/build
Scanning dependencies of target ipmctl_os_interface
Scanning dependencies of target stringdefs
make[2]: Entering directory '/ipmctl/build'
Scanning dependencies of target manpage
make[2]: Leaving directory '/ipmctl/build'
make -f CMakeFiles/manpage.dir/build.make CMakeFiles/manpage.dir/build
[  0%] Generating INI Default Config File
make[2]: Leaving directory '/ipmctl/build'
make -f CMakeFiles/stringdefs.dir/build.make CMakeFiles/stringdefs.dir/build
make[2]: Entering directory '/ipmctl/build'
/usr/bin/cc -E -P -D__LINUX__ /ipmctl/src/os/ini/ipmctl_default.c > /ipmctl/src/os/ini/ipmctl_default.i
make[2]: Entering directory '/ipmctl/build'
make[2]: Leaving directory '/ipmctl/build'
/usr/bin/python3.8 /ipmctl/src/os/ini/ini_auto_gen_default_config.py /ipmctl/src/os/ini/ipmctl_default.i /ipmctl/output/release/ipmctl_default.conf
make -f CMakeFiles/ipmctl_os_interface.dir/build.make CMakeFiles/ipmctl_os_interface.dir/build
make[2]: Entering directory '/ipmctl/build'
[  1%] Generating String Definitions
[  2%] Generating man pages
/usr/bin/python3.8 /ipmctl/src/os/efi_shim/os_efi_hii_auto_gen_strings.py
/usr/bin/asciidoctor -b manpage -a mansource=ipmctl -a manmanual="ipmctl" -a ipmctl_version=03.00.00.0483 -a os_build=1 -a manpage=1 -D /ipmctl/output/release/manpage /ipmctl/Documentation/ipmctl/ipmctl.txt /ipmctl/Documentation/ipmctl/Discovery/ipmctl-show-dimm.txt /ipmctl/Documentation/ipmctl/Discovery/ipmctl-show-memory-resources.txt /ipmctl/Documentation/ipmctl/Discovery/ipmctl-show-socket.txt /ipmctl/Documentation/ipmctl/Discovery/ipmctl-show-system-capabilities.txt /ipmctl/Documentation/ipmctl/Discovery/ipmctl-show-topology.txt /ipmctl/Documentation/ipmctl/Memory_Subsystem_Provisioning/ipmctl-create-goal.txt /ipmctl/Documentation/ipmctl/Memory_Subsystem_Provisioning/ipmctl-delete-goal.txt /ipmctl/Documentation/ipmctl/Memory_Subsystem_Provisioning/ipmctl-dump-goal.txt /ipmctl/Documentation/ipmctl/Memory_Subsystem_Provisioning/ipmctl-load-goal.txt /ipmctl/Documentation/ipmctl/Memory_Subsystem_Provisioning/ipmctl-show-goal.txt /ipmctl/Documentation/ipmctl/Persistent_Memory_Provisioning/ipmctl-show-region.txt /ipmctl/Documentation/ipmctl/Instrumentation/ipmctl-set-sensor.txt /ipmctl/Documentation/ipmctl/Instrumentation/ipmctl-show-performance.txt /ipmctl/Documentation/ipmctl/Instrumentation/ipmctl-show-sensor.txt /ipmctl/Documentation/ipmctl/Support_and_Maintenance/ipmctl-set-preferences.txt /ipmctl/Documentation/ipmctl/Support_and_Maintenance/ipmctl-dump-support-data.txt /ipmctl/Documentation/ipmctl/Support_and_Maintenance/ipmctl-help.txt /ipmctl/Documentation/ipmctl/Support_and_Maintenance/ipmctl-set-dimm.txt /ipmctl/Documentation/ipmctl/Support_and_Maintenance/ipmctl-show-firmware.txt /ipmctl/Documentation/ipmctl/Support_and_Maintenance/ipmctl-show-preferences.txt /ipmctl/Documentation/ipmctl/Support_and_Maintenance/ipmctl-load-dimm.txt /ipmctl/Documentation/ipmctl/Support_and_Maintenance/ipmctl-version.txt /ipmctl/Documentation/ipmctl/Debug/ipmctl-show-pcd.txt /ipmctl/Documentation/ipmctl/Debug/ipmctl-delete-pcd.txt /ipmctl/Documentation/ipmctl/Debug/ipmctl-dump-debug-log.txt /ipmctl/Documentation/ipmctl/Debug/ipmctl-inject-error.txt /ipmctl/Documentation/ipmctl/Debug/ipmctl-show-cap.txt /ipmctl/Documentation/ipmctl/Debug/ipmctl-show-cel.txt /ipmctl/Documentation/ipmctl/Debug/ipmctl-start-diagnostic.txt /ipmctl/Documentation/ipmctl/Debug/ipmctl-show-system.txt /ipmctl/Documentation/ipmctl/Debug/ipmctl-show-error-log.txt /ipmctl/Documentation/ipmctl/Debug/ipmctl-show-session.txt /ipmctl/Documentation/ipmctl/Debug/ipmctl-start-session.txt /ipmctl/Documentation/ipmctl/Debug/ipmctl-stop-session.txt /ipmctl/Documentation/ipmctl/Debug/ipmctl-load-session.txt /ipmctl/Documentation/ipmctl/Debug/ipmctl-dump-session.txt
[  3%] Building C object CMakeFiles/ipmctl_os_interface.dir/src/os/linux/lnx_acpi.c.o
[  4%] Building C object CMakeFiles/ipmctl_os_interface.dir/src/os/linux/lnx_adapter_passthrough.c.o
/usr/bin/cc -DHAVE_C99 -DINI_INSTALL_FILEPATH=\"/usr/local/share/ipmctl/\" -DOS_BUILD -DPCD_CACHE_ENABLED -DPLAYBACK_RECORD_SUPPORTED -D_GNU_SOURCE -D__LINUX__ -D__VERSION_NUMBER__=03.00.00.0483 -I/ipmctl/src/os -I/ipmctl/src/os/linux -I/ipmctl/DcpmPkg/common -I/ipmctl/DcpmPkg/cli -I/ipmctl/src/os/nvm_api -I/ipmctl/src/os/s_string -I/ipmctl/MdePkg/Include -I/ipmctl/MdePkg/Include/Uefi -I/ipmctl/src/os/efi_shim  -DNO_MSABI_VA_FUNCS -std=c99 -Wformat -Wformat-security -D_XOPEN_SOURCE=500 -Wall -Wfatal-errors -MMD -fPIC -fno-strict-aliasing -fstack-protector-strong -O3 -DNDEBUG -O2 -fno-strict-aliasing -D_FORTIFY_SOURCE=2 -Werror   -fvisibility=hidden -o CMakeFiles/ipmctl_os_interface.dir/src/os/linux/lnx_acpi.c.o   -c /ipmctl/src/os/linux/lnx_acpi.c
/usr/bin/cc -DHAVE_C99 -DINI_INSTALL_FILEPATH=\"/usr/local/share/ipmctl/\" -DOS_BUILD -DPCD_CACHE_ENABLED -DPLAYBACK_RECORD_SUPPORTED -D_GNU_SOURCE -D__LINUX__ -D__VERSION_NUMBER__=03.00.00.0483 -I/ipmctl/src/os -I/ipmctl/src/os/linux -I/ipmctl/DcpmPkg/common -I/ipmctl/DcpmPkg/cli -I/ipmctl/src/os/nvm_api -I/ipmctl/src/os/s_string -I/ipmctl/MdePkg/Include -I/ipmctl/MdePkg/Include/Uefi -I/ipmctl/src/os/efi_shim  -DNO_MSABI_VA_FUNCS -std=c99 -Wformat -Wformat-security -D_XOPEN_SOURCE=500 -Wall -Wfatal-errors -MMD -fPIC -fno-strict-aliasing -fstack-protector-strong -O3 -DNDEBUG -O2 -fno-strict-aliasing -D_FORTIFY_SOURCE=2 -Werror   -fvisibility=hidden -o CMakeFiles/ipmctl_os_interface.dir/src/os/linux/lnx_adapter_passthrough.c.o   -c /ipmctl/src/os/linux/lnx_adapter_passthrough.c
[  5%] Building C object CMakeFiles/ipmctl_os_interface.dir/src/os/linux/lnx_adapter.c.o
/usr/bin/cc -DHAVE_C99 -DINI_INSTALL_FILEPATH=\"/usr/local/share/ipmctl/\" -DOS_BUILD -DPCD_CACHE_ENABLED -DPLAYBACK_RECORD_SUPPORTED -D_GNU_SOURCE -D__LINUX__ -D__VERSION_NUMBER__=03.00.00.0483 -I/ipmctl/src/os -I/ipmctl/src/os/linux -I/ipmctl/DcpmPkg/common -I/ipmctl/DcpmPkg/cli -I/ipmctl/src/os/nvm_api -I/ipmctl/src/os/s_string -I/ipmctl/MdePkg/Include -I/ipmctl/MdePkg/Include/Uefi -I/ipmctl/src/os/efi_shim  -DNO_MSABI_VA_FUNCS -std=c99 -Wformat -Wformat-security -D_XOPEN_SOURCE=500 -Wall -Wfatal-errors -MMD -fPIC -fno-strict-aliasing -fstack-protector-strong -O3 -DNDEBUG -O2 -fno-strict-aliasing -D_FORTIFY_SOURCE=2 -Werror   -fvisibility=hidden -o CMakeFiles/ipmctl_os_interface.dir/src/os/linux/lnx_adapter.c.o   -c /ipmctl/src/os/linux/lnx_adapter.c
[  6%] Building C object CMakeFiles/ipmctl_os_interface.dir/src/os/linux/lnx_common.c.o
In file included from /ipmctl/src/os/linux/lnx_acpi.c:11:
/ipmctl/MdePkg/Include/Base.h:319: error: "NULL" redefined [-Werror]
  319 | #define NULL  ((VOID *) 0)
      | 
compilation terminated due to -Wfatal-errors.
[  6%] Building C object CMakeFiles/ipmctl_os_interface.dir/src/os/linux/lnx_api.c.o
cc1: all warnings being treated as errors
/usr/bin/cc -DHAVE_C99 -DINI_INSTALL_FILEPATH=\"/usr/local/share/ipmctl/\" -DOS_BUILD -DPCD_CACHE_ENABLED -DPLAYBACK_RECORD_SUPPORTED -D_GNU_SOURCE -D__LINUX__ -D__VERSION_NUMBER__=03.00.00.0483 -I/ipmctl/src/os -I/ipmctl/src/os/linux -I/ipmctl/DcpmPkg/common -I/ipmctl/DcpmPkg/cli -I/ipmctl/src/os/nvm_api -I/ipmctl/src/os/s_string -I/ipmctl/MdePkg/Include -I/ipmctl/MdePkg/Include/Uefi -I/ipmctl/src/os/efi_shim  -DNO_MSABI_VA_FUNCS -std=c99 -Wformat -Wformat-security -D_XOPEN_SOURCE=500 -Wall -Wfatal-errors -MMD -fPIC -fno-strict-aliasing -fstack-protector-strong -O3 -DNDEBUG -O2 -fno-strict-aliasing -D_FORTIFY_SOURCE=2 -Werror   -fvisibility=hidden -o CMakeFiles/ipmctl_os_interface.dir/src/os/linux/lnx_common.c.o   -c /ipmctl/src/os/linux/lnx_common.c
/usr/bin/cmake -E remove -f /ipmctl/src/os/ini/ipmctl_default.i
[  7%] Building C object CMakeFiles/ipmctl_os_interface.dir/src/os/linux/lnx_system.c.o
/usr/bin/cc -DHAVE_C99 -DINI_INSTALL_FILEPATH=\"/usr/local/share/ipmctl/\" -DOS_BUILD -DPCD_CACHE_ENABLED -DPLAYBACK_RECORD_SUPPORTED -D_GNU_SOURCE -D__LINUX__ -D__VERSION_NUMBER__=03.00.00.0483 -I/ipmctl/src/os -I/ipmctl/src/os/linux -I/ipmctl/DcpmPkg/common -I/ipmctl/DcpmPkg/cli -I/ipmctl/src/os/nvm_api -I/ipmctl/src/os/s_string -I/ipmctl/MdePkg/Include -I/ipmctl/MdePkg/Include/Uefi -I/ipmctl/src/os/efi_shim  -DNO_MSABI_VA_FUNCS -std=c99 -Wformat -Wformat-security -D_XOPEN_SOURCE=500 -Wall -Wfatal-errors -MMD -fPIC -fno-strict-aliasing -fstack-protector-strong -O3 -DNDEBUG -O2 -fno-strict-aliasing -D_FORTIFY_SOURCE=2 -Werror   -fvisibility=hidden -o CMakeFiles/ipmctl_os_interface.dir/src/os/linux/lnx_api.c.o   -c /ipmctl/src/os/linux/lnx_api.c
make[2]: *** [CMakeFiles/ipmctl_os_interface.dir/build.make:66: CMakeFiles/ipmctl_os_interface.dir/src/os/linux/lnx_acpi.c.o] Error 1
make[2]: *** Waiting for unfinished jobs....
/usr/bin/cc -DHAVE_C99 -DINI_INSTALL_FILEPATH=\"/usr/local/share/ipmctl/\" -DOS_BUILD -DPCD_CACHE_ENABLED -DPLAYBACK_RECORD_SUPPORTED -D_GNU_SOURCE -D__LINUX__ -D__VERSION_NUMBER__=03.00.00.0483 -I/ipmctl/src/os -I/ipmctl/src/os/linux -I/ipmctl/DcpmPkg/common -I/ipmctl/DcpmPkg/cli -I/ipmctl/src/os/nvm_api -I/ipmctl/src/os/s_string -I/ipmctl/MdePkg/Include -I/ipmctl/MdePkg/Include/Uefi -I/ipmctl/src/os/efi_shim  -DNO_MSABI_VA_FUNCS -std=c99 -Wformat -Wformat-security -D_XOPEN_SOURCE=500 -Wall -Wfatal-errors -MMD -fPIC -fno-strict-aliasing -fstack-protector-strong -O3 -DNDEBUG -O2 -fno-strict-aliasing -D_FORTIFY_SOURCE=2 -Werror   -fvisibility=hidden -o CMakeFiles/ipmctl_os_interface.dir/src/os/linux/lnx_system.c.o   -c /ipmctl/src/os/linux/lnx_system.c
make[2]: Leaving directory '/ipmctl/build'
[  8%] Building C object CMakeFiles/ipmctl_os_interface.dir/src/os/os_common.c.o
make[2]: Leaving directory '/ipmctl/build'
/usr/bin/cc -DHAVE_C99 -DINI_INSTALL_FILEPATH=\"/usr/local/share/ipmctl/\" -DOS_BUILD -DPCD_CACHE_ENABLED -DPLAYBACK_RECORD_SUPPORTED -D_GNU_SOURCE -D__LINUX__ -D__VERSION_NUMBER__=03.00.00.0483 -I/ipmctl/src/os -I/ipmctl/src/os/linux -I/ipmctl/DcpmPkg/common -I/ipmctl/DcpmPkg/cli -I/ipmctl/src/os/nvm_api -I/ipmctl/src/os/s_string -I/ipmctl/MdePkg/Include -I/ipmctl/MdePkg/Include/Uefi -I/ipmctl/src/os/efi_shim  -DNO_MSABI_VA_FUNCS -std=c99 -Wformat -Wformat-security -D_XOPEN_SOURCE=500 -Wall -Wfatal-errors -MMD -fPIC -fno-strict-aliasing -fstack-protector-strong -O3 -DNDEBUG -O2 -fno-strict-aliasing -D_FORTIFY_SOURCE=2 -Werror   -fvisibility=hidden -o CMakeFiles/ipmctl_os_interface.dir/src/os/os_common.c.o   -c /ipmctl/src/os/os_common.c
In file included from /ipmctl/src/os/linux/lnx_adapter_passthrough.c:14:
/ipmctl/MdePkg/Include/Base.h:319: error: "NULL" redefined [-Werror]
  319 | #define NULL  ((VOID *) 0)
      | 
compilation terminated due to -Wfatal-errors.
In file included from /ipmctl/src/os/linux/lnx_common.c:14:
/ipmctl/MdePkg/Include/Base.h:319: error: "NULL" redefined [-Werror]
  319 | #define NULL  ((VOID *) 0)
      | 
compilation terminated due to -Wfatal-errors.
cc1: all warnings being treated as errors
make[2]: *** [CMakeFiles/ipmctl_os_interface.dir/build.make:118: CMakeFiles/ipmctl_os_interface.dir/src/os/linux/lnx_common.c.o] Error 1
cc1: all warnings being treated as errors
make[2]: *** [CMakeFiles/ipmctl_os_interface.dir/build.make:92: CMakeFiles/ipmctl_os_interface.dir/src/os/linux/lnx_adapter_passthrough.c.o] Error 1
[  8%] Built target stringdefs
[  8%] Built target iniconfig
In file included from /ipmctl/src/os/linux/lnx_system.c:27:
/ipmctl/MdePkg/Include/Base.h:319: error: "NULL" redefined [-Werror]
  319 | #define NULL  ((VOID *) 0)
      | 
compilation terminated due to -Wfatal-errors.
cc1: all warnings being treated as errors
make[2]: *** [CMakeFiles/ipmctl_os_interface.dir/build.make:131: CMakeFiles/ipmctl_os_interface.dir/src/os/linux/lnx_system.c.o] Error 1
In file included from /ipmctl/MdePkg/Include/Uefi/UefiBaseType.h:16,
                 from /ipmctl/MdePkg/Include/Uefi.h:17,
                 from /ipmctl/src/os/linux/lnx_api.c:15:
/ipmctl/MdePkg/Include/Base.h:319: error: "NULL" redefined [-Werror]
  319 | #define NULL  ((VOID *) 0)
      | 
compilation terminated due to -Wfatal-errors.
cc1: all warnings being treated as errors
make[2]: *** [CMakeFiles/ipmctl_os_interface.dir/build.make:105: CMakeFiles/ipmctl_os_interface.dir/src/os/linux/lnx_api.c.o] Error 1
make[2]: Leaving directory '/ipmctl/build'
make[1]: *** [CMakeFiles/Makefile2:248: CMakeFiles/ipmctl_os_interface.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
gzip -f /ipmctl/output/release/manpage/*.1
make[2]: Leaving directory '/ipmctl/build'
[  8%] Built target manpage
make[1]: Leaving directory '/ipmctl/build'
make: *** [Makefile:144: all] Error 2
root@44e8dc00be81:/ipmctl/build# git log -1 HEAD
commit eca59dc53741c7f9d0ac5320ef790a1932a9a499 (HEAD -> master, tag: v03.00.00.0483, origin/master, origin/HEAD)
Author: Steven Pontsler <steven.pontsler@intel.com>
Date:   Fri Mar 3 14:45:12 2023 -0800

    Update default version to 0483.
root@44e8dc00be81:/ipmctl/build# 
fidencio commented 1 year ago

This is currently blocking Kata Containers CI.

nolanhergert commented 1 year ago

Thanks Fabiano. We've root caused this to be a discrepancy between our internal EDK2 and the public-facing EDK2. We will work on publishing a fix in the next few weeks.

StevenPontsler commented 1 year ago

@fidencio -- cane you see if pre-release v03.00.00.0484 fixes this issue?

if you are not using rpmbuild.sh be sure to run patch_OS.sh or otherwise make sure the patches are applied.

StevenPontsler commented 1 year ago

I made re-release v03.00.00.0485 with the fix patch.