public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
* F29 Build Issue.
@ 2019-03-13 13:27 Andrew J. Hutton
  2019-03-13 14:02 ` Ryszard Knop
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Andrew J. Hutton @ 2019-03-13 13:27 UTC (permalink / raw)
  To: edk2-devel

Unsure if this is a missing build dependency (since there doesn't appear 
to be a check for this) am I missing a make dep or configure step 
somewhere?

This is stock F29, following the website instructions; the make -C 
BaseTools/Source/C results in the following errror:

make[1]: Entering directory 
'/home/ajh/KVM/Clover/edk2/BaseTools/Source/C/GenVtf'
cc  -c -MD -fshort-wchar -fno-strict-aliasing -Wall -Werror 
-Wno-deprecated-declarations -nostdlib -c -g  -I .. -I ../Include/Common 
-I ../Include/ -I ../Include/IndustryStandard -I ../Common/ -I .. -I . 
-I ../Include/X64/  GenVtf.c -o GenVtf.o
GenVtf.c: In function ‘CreateFitTableAndInitialize’:
GenVtf.c:1473:3: error: ‘strncpy’ output truncated before terminating 
nul copying 8 bytes from a string of the same length 
[-Werror=stringop-truncation]
    strncpy ((CHAR8 *) &FitStartPtr->CompAddress, FIT_SIGNATURE, 8);  // 
"_FIT_ "
    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors
make[1]: *** [../Makefiles/footer.makefile:27: GenVtf.o] Error 1
make[1]: Leaving directory 
'/home/ajh/KVM/Clover/edk2/BaseTools/Source/C/GenVtf'
make: *** [GNUmakefile:73: GenVtf] Error 2
make: Leaving directory '/home/ajh/KVM/Clover/edk2/BaseTools/Source/C'



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: F29 Build Issue.
  2019-03-13 13:27 F29 Build Issue Andrew J. Hutton
@ 2019-03-13 14:02 ` Ryszard Knop
  2019-03-13 14:11 ` Andrew Fish
  2019-03-14  9:34 ` Laszlo Ersek
  2 siblings, 0 replies; 5+ messages in thread
From: Ryszard Knop @ 2019-03-13 14:02 UTC (permalink / raw)
  To: Andrew J. Hutton, edk2-devel

Hi,
GenVtf is removed from EDK2, since it's IPF specific and no longer
used. Commit 64ab2c82e8f61e881eb16849e1b188361b00c4a7 deleted it from the upstream tree, so if you don't need IPF support, you can just remove this tool.
Richard

On Wed, 2019-03-13 at 09:27 -0400, Andrew J. Hutton wrote:
> Unsure if this is a missing build dependency (since there doesn't
> appear 
> to be a check for this) am I missing a make dep or configure step 
> somewhere?
> 
> This is stock F29, following the website instructions; the make -C 
> BaseTools/Source/C results in the following errror:
> 
> make[1]: Entering directory 
> '/home/ajh/KVM/Clover/edk2/BaseTools/Source/C/GenVtf'
> cc  -c -MD -fshort-wchar -fno-strict-aliasing -Wall -Werror 
> -Wno-deprecated-declarations -nostdlib -c -g  -I .. -I
> ../Include/Common 
> -I ../Include/ -I ../Include/IndustryStandard -I ../Common/ -I .. -I
> . 
> -I ../Include/X64/  GenVtf.c -o GenVtf.o
> GenVtf.c: In function ‘CreateFitTableAndInitialize’:
> GenVtf.c:1473:3: error: ‘strncpy’ output truncated before
> terminating 
> nul copying 8 bytes from a string of the same length 
> [-Werror=stringop-truncation]
>     strncpy ((CHAR8 *) &FitStartPtr->CompAddress, FIT_SIGNATURE, 8); 
> // 
> "_FIT_ "
>     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> cc1: all warnings being treated as errors
> make[1]: *** [../Makefiles/footer.makefile:27: GenVtf.o] Error 1
> make[1]: Leaving directory 
> '/home/ajh/KVM/Clover/edk2/BaseTools/Source/C/GenVtf'
> make: *** [GNUmakefile:73: GenVtf] Error 2
> make: Leaving directory
> '/home/ajh/KVM/Clover/edk2/BaseTools/Source/C'
> 
> _______________________________________________
> edk2-devel mailing list
> edk2-devel@lists.01.org
> https://lists.01.org/mailman/listinfo/edk2-devel



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: F29 Build Issue.
  2019-03-13 13:27 F29 Build Issue Andrew J. Hutton
  2019-03-13 14:02 ` Ryszard Knop
@ 2019-03-13 14:11 ` Andrew Fish
  2019-03-14  9:34 ` Laszlo Ersek
  2 siblings, 0 replies; 5+ messages in thread
From: Andrew Fish @ 2019-03-13 14:11 UTC (permalink / raw)
  To: Andrew J. Hutton; +Cc: edk2-devel

Andrew,

This looks like a newer warning added in GCC 8 -Wall?

BaseTools/Source/C/GenVtf/GenVtf.h:46:#define   FIT_SIGNATURE           "_FIT_   " 

So it looks like the intent is to copy the 8 chars in the string, but not the NULL. That is the intent of  -Werror=stringop-truncation.

I think this code needs to replace strncpy with memcpy. Please file a bugzilla: https://bugzilla.tianocore.org

Thanks,

Andrew Fish

> On Mar 13, 2019, at 6:27 AM, Andrew J. Hutton <andrew.john.hutton@gmail.com> wrote:
> 
> Unsure if this is a missing build dependency (since there doesn't appear to be a check for this) am I missing a make dep or configure step somewhere?
> 
> This is stock F29, following the website instructions; the make -C BaseTools/Source/C results in the following errror:
> 
> make[1]: Entering directory '/home/ajh/KVM/Clover/edk2/BaseTools/Source/C/GenVtf'
> cc  -c -MD -fshort-wchar -fno-strict-aliasing -Wall -Werror -Wno-deprecated-declarations -nostdlib -c -g  -I .. -I ../Include/Common -I ../Include/ -I ../Include/IndustryStandard -I ../Common/ -I .. -I . -I ../Include/X64/  GenVtf.c -o GenVtf.o
> GenVtf.c: In function ‘CreateFitTableAndInitialize’:
> GenVtf.c:1473:3: error: ‘strncpy’ output truncated before terminating nul copying 8 bytes from a string of the same length [-Werror=stringop-truncation]
>    strncpy ((CHAR8 *) &FitStartPtr->CompAddress, FIT_SIGNATURE, 8);  // "_FIT_ "
>    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> cc1: all warnings being treated as errors
> make[1]: *** [../Makefiles/footer.makefile:27: GenVtf.o] Error 1
> make[1]: Leaving directory '/home/ajh/KVM/Clover/edk2/BaseTools/Source/C/GenVtf'
> make: *** [GNUmakefile:73: GenVtf] Error 2
> make: Leaving directory '/home/ajh/KVM/Clover/edk2/BaseTools/Source/C'
> 
> _______________________________________________
> edk2-devel mailing list
> edk2-devel@lists.01.org
> https://lists.01.org/mailman/listinfo/edk2-devel



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: F29 Build Issue.
  2019-03-13 13:27 F29 Build Issue Andrew J. Hutton
  2019-03-13 14:02 ` Ryszard Knop
  2019-03-13 14:11 ` Andrew Fish
@ 2019-03-14  9:34 ` Laszlo Ersek
  2019-03-14 17:04   ` Gao, Liming
  2 siblings, 1 reply; 5+ messages in thread
From: Laszlo Ersek @ 2019-03-14  9:34 UTC (permalink / raw)
  To: Andrew J. Hutton, edk2-devel

On 03/13/19 14:27, Andrew J. Hutton wrote:
> Unsure if this is a missing build dependency (since there doesn't appear
> to be a check for this) am I missing a make dep or configure step
> somewhere?
> 
> This is stock F29, following the website instructions; the make -C
> BaseTools/Source/C results in the following errror:
> 
> make[1]: Entering directory
> '/home/ajh/KVM/Clover/edk2/BaseTools/Source/C/GenVtf'
> cc  -c -MD -fshort-wchar -fno-strict-aliasing -Wall -Werror
> -Wno-deprecated-declarations -nostdlib -c -g  -I .. -I ../Include/Common
> -I ../Include/ -I ../Include/IndustryStandard -I ../Common/ -I .. -I .
> -I ../Include/X64/  GenVtf.c -o GenVtf.o
> GenVtf.c: In function ‘CreateFitTableAndInitialize’:
> GenVtf.c:1473:3: error: ‘strncpy’ output truncated before terminating
> nul copying 8 bytes from a string of the same length
> [-Werror=stringop-truncation]
>    strncpy ((CHAR8 *) &FitStartPtr->CompAddress, FIT_SIGNATURE, 8);  //
> "_FIT_ "
>    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> cc1: all warnings being treated as errors
> make[1]: *** [../Makefiles/footer.makefile:27: GenVtf.o] Error 1
> make[1]: Leaving directory
> '/home/ajh/KVM/Clover/edk2/BaseTools/Source/C/GenVtf'
> make: *** [GNUmakefile:73: GenVtf] Error 2
> make: Leaving directory '/home/ajh/KVM/Clover/edk2/BaseTools/Source/C'

The edk2 codebase that you are consuming is too old. The above symptom
should not be present since commit 1d212a83df0e
("BaseTools/header.makefile: add "-Wno-stringop-truncation"", 2018-03-05).

The command line you quoted also misses "-Wno-unused-result", so I think
you must be missing commit 202726b3ceb3 ("BaseTools Makefile: Enable O2
option for GCC tool chain", 2016-10-08) as well.

I assume clover still uses an edk2 checkout that's 2.5+ years old at
this point.

Thanks,
Laszlo


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: F29 Build Issue.
  2019-03-14  9:34 ` Laszlo Ersek
@ 2019-03-14 17:04   ` Gao, Liming
  0 siblings, 0 replies; 5+ messages in thread
From: Gao, Liming @ 2019-03-14 17:04 UTC (permalink / raw)
  To: Laszlo Ersek, Andrew J. Hutton, edk2-devel@lists.01.org

This is seemly deprecated https://github.com/tianocore/buildtools-BaseTools. We should use BaseTools in https://github.com/tianocore/edk2.

> -----Original Message-----
> From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf Of Laszlo Ersek
> Sent: Thursday, March 14, 2019 2:34 AM
> To: Andrew J. Hutton <andrew.john.hutton@gmail.com>; edk2-devel@lists.01.org
> Subject: Re: [edk2] F29 Build Issue.
> 
> On 03/13/19 14:27, Andrew J. Hutton wrote:
> > Unsure if this is a missing build dependency (since there doesn't appear
> > to be a check for this) am I missing a make dep or configure step
> > somewhere?
> >
> > This is stock F29, following the website instructions; the make -C
> > BaseTools/Source/C results in the following errror:
> >
> > make[1]: Entering directory
> > '/home/ajh/KVM/Clover/edk2/BaseTools/Source/C/GenVtf'
> > cc  -c -MD -fshort-wchar -fno-strict-aliasing -Wall -Werror
> > -Wno-deprecated-declarations -nostdlib -c -g  -I .. -I ../Include/Common
> > -I ../Include/ -I ../Include/IndustryStandard -I ../Common/ -I .. -I .
> > -I ../Include/X64/  GenVtf.c -o GenVtf.o
> > GenVtf.c: In function ‘CreateFitTableAndInitialize’:
> > GenVtf.c:1473:3: error: ‘strncpy’ output truncated before terminating
> > nul copying 8 bytes from a string of the same length
> > [-Werror=stringop-truncation]
> >    strncpy ((CHAR8 *) &FitStartPtr->CompAddress, FIT_SIGNATURE, 8);  //
> > "_FIT_ "
> >    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> > cc1: all warnings being treated as errors
> > make[1]: *** [../Makefiles/footer.makefile:27: GenVtf.o] Error 1
> > make[1]: Leaving directory
> > '/home/ajh/KVM/Clover/edk2/BaseTools/Source/C/GenVtf'
> > make: *** [GNUmakefile:73: GenVtf] Error 2
> > make: Leaving directory '/home/ajh/KVM/Clover/edk2/BaseTools/Source/C'
> 
> The edk2 codebase that you are consuming is too old. The above symptom
> should not be present since commit 1d212a83df0e
> ("BaseTools/header.makefile: add "-Wno-stringop-truncation"", 2018-03-05).
> 
> The command line you quoted also misses "-Wno-unused-result", so I think
> you must be missing commit 202726b3ceb3 ("BaseTools Makefile: Enable O2
> option for GCC tool chain", 2016-10-08) as well.
> 
> I assume clover still uses an edk2 checkout that's 2.5+ years old at
> this point.
> 
> Thanks,
> Laszlo
> _______________________________________________
> edk2-devel mailing list
> edk2-devel@lists.01.org
> https://lists.01.org/mailman/listinfo/edk2-devel

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2019-03-14 17:04 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-03-13 13:27 F29 Build Issue Andrew J. Hutton
2019-03-13 14:02 ` Ryszard Knop
2019-03-13 14:11 ` Andrew Fish
2019-03-14  9:34 ` Laszlo Ersek
2019-03-14 17:04   ` Gao, Liming

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox