editing Makefile after configure stage to disable -Werror
A message that is not in the archive (sent off-list or not yet received): [email protected]
i cleaned out -Werror wherever possible with command:
sed -i 's/-Werror//g' $(find . -type f -exec egrep -l _no_Werror {} \;)
and elfutils is builded
вт, 31 авг. 2021 г. в 09:41, Ivan Riabtsov via lists.yoctoproject.org <[email protected]>:
Quoted 42 lines
Hello, I have the following error:
../../elfutils-0.166/libelf/libelfP.h:53:30: error: ‘__elf64_msize’ specifies less restrictive attribute than its target ‘elf64_fsize’:
‘const’ [-Werror=missing-attributes]i try to solve this by patch:
diff -Naur
elfutils-0.166_orig/libelf/libelfP.helfutils-0.166/libelf/libelfP.hlibelf/libelfP.h 2021-08-30 19:38:44.866175082 +0300 renamed from libelf/libelfP.h 2016-01-12 15:49:19.000000000 +0300 +3
-0@@ -48,6 +48,8 @@ /* Helper Macros to write 32 bit and 64 bit functions. */ +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wmissing-attributes" #define __elfw2_(Bits, Name) __elf##Bits##_##Name #define elfw2_(Bits, Name) elf##Bits##_##Name #define ElfW2_(Bits, Name) Elf##Bits##_##Name@@ -632,4 +634,5 @@ #define INVALID_NDX(ndx, type, data) \ unlikely ((data)->d_size / sizeof (type) <= (unsigned int) (ndx)) +#pragma GCC diagnostic pop #endif /* libelfP.h */But the patch does not work, error appears again.
i try to add --disable-werror to configure flags, but i have follows warning:
configure: WARNING: unrecognized options: --disable-werror.
The only solution to the problem I could think of is editing the
Makefileafter configuration, please tell me how this can be done?
Quoted 5 lines · Ivan Riabtsov
i cleaned out -Werror wherever possible with command:
sed -i 's/-Werror//g' $(find . -type f -exec egrep -l
_no_Werror{} \;)and elfutils is builded
Please try backporting this fix
https://sourceware.org/git/?p=elfutils.git;a=commit;h=a01938d584b91e747167bb4b3f30ec300c4d6e43
if this is not enough then I think you just need to edit config/eu.am to remove -Werror and perhaps thats enough, but upstream elfutils is generally receptive to Werror issues, so I would also suggest that in parallel you report it
upstream as well.
Quoted 49 lines
вт, 31 авг. 2021 г. в 09:41, Ivan Riabtsov via lists.yoctoproject.org <[email protected]>:
Quoted 46 lines
Hello, I have the following error:
../../elfutils-0.166/libelf/libelfP.h:53:30: error: ‘__elf64_msize’ specifies less restrictive attribute than its target ‘elf64_fsize’:
‘const’ [-Werror=missing-attributes]i try to solve this by patch:
diff -Naur
elfutils-0.166_orig/libelf/libelfP.helfutils-0.166/libelf/libelfP.hlibelf/libelfP.h 2021-08-30 19:38:44.866175082 +0300 renamed from libelf/libelfP.h 2016-01-12 15:49:19.000000000 +0300 +3
-0@@ -48,6 +48,8 @@ /* Helper Macros to write 32 bit and 64 bit functions. */ +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wmissing-attributes" #define __elfw2_(Bits, Name) __elf##Bits##_##Name #define elfw2_(Bits, Name) elf##Bits##_##Name #define ElfW2_(Bits, Name) Elf##Bits##_##Name@@ -632,4 +634,5 @@ #define INVALID_NDX(ndx, type, data) \ unlikely ((data)->d_size / sizeof (type) <= (unsigned int) (ndx)) +#pragma GCC diagnostic pop #endif /* libelfP.h */But the patch does not work, error appears again.
i try to add --disable-werror to configure flags, but i have follows warning:
configure: WARNING: unrecognized options: --disable-werror.
The only solution to the problem I could think of is editing the
Makefileafter configuration, please tell me how this can be done?