intel / ipmctl

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

build error with gcc11 #169

Closed anujm1 closed 1 year ago

anujm1 commented 3 years ago

| /ipmctl/03.00.00.0302-r0/git/DcpmPkg/common/PbrOs.c: In function 'PbrSerializeCtx': | /ipmctl/03.00.00.0302-r0/git/DcpmPkg/common/PbrOs.c:137:3: error: 'os_mkdir' accessing 4096 bytes in a region of size 100 [-Werror=stringop-overflow=] | 137 | os_mkdir(pbr_dir); | | ^~~~~ | compilation terminated due to -Wfatal-errors. | cc1: all warnings being treated as errors

and

| /ipmctl/03.00.00.0302-r0/git/src/os/ini/ini.c: In function 'nvm_ini_dump_to_file': | /ipmctl/03.00.00.0302-r0/git/src/os/ini/ini.c:462:7: error: 'os_mkdir' accessing 4096 bytes in a region of size 1024 [-Werror=stringop-overflow=]

sscargal commented 3 years ago

@anujm1 - Please provide more information about your OS and build environment.

Ubuntu 21.04 distributes gcc-11, but others have not yet migrated to this release. Do you have an option to try an older compiler version?

You could also checkout ipmctl v2.x which works with the current Intel Optane 100|200 Series. Instructions for Building and Installing IPMCTL from Source on Linux

anujm1 commented 3 years ago

I am using Linux, kernel 5.10 with Yocto. I can't use an older compiler version. Fedora has also started using gcc 11 with Fedora 34.

StevenPontsler commented 3 years ago

I think I can see what the warning is about. We will take a look into it soon.