Bug 1676119

Summary: tboot: FTBFS in Fedora rawhide/f30
Product: [Fedora] Fedora Reporter: Fedora Release Engineering <releng>
Component: tbootAssignee: Yunying Sun <yunying.sun>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: rawhideCC: dcantrell, eparis, gang.wei, lukasz.hawrylko, sumitx.srivastav, yunying.sun
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: tboot-1.9.10-1.fc30 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-05-28 01:09:44 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1674516    
Attachments:
Description Flags
build.log
none
root.log
none
state.log none

Description Fedora Release Engineering 2019-02-11 22:12:03 UTC
tboot failed to build from source in Fedora rawhide/f30

https://koji.fedoraproject.org/koji/taskinfo?taskID=32502370


For details on the mass rebuild see:

https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
Please fix tboot at your earliest convenience and set the bug's status to
ASSIGNED when you start fixing it. If the bug remains in NEW state for 8 weeks,
tboot will be orphaned. Before branching of Fedora 31,
tboot will be retired, if it still fails to build.

For more details on the FTBFS policy, please visit:
https://fedoraproject.org/wiki/Fails_to_build_from_source

Comment 1 Fedora Release Engineering 2019-02-11 22:12:05 UTC
Created attachment 1533319 [details]
build.log

file build.log too big, will only attach last 1024 bytes

Comment 2 Fedora Release Engineering 2019-02-11 22:12:07 UTC
Created attachment 1533320 [details]
root.log

file root.log too big, will only attach last 1024 bytes

Comment 3 Fedora Release Engineering 2019-02-11 22:12:08 UTC
Created attachment 1533321 [details]
state.log

Comment 4 Fedora Release Engineering 2019-04-26 23:33:33 UTC
Dear Maintainer,

your package has not been built successfully in f30. Action is required from you.

If you can fix your package to build, perform a build in koji, and either create
an update in bodhi, or close this bug without creating an update, if updating is
not appropriate [1]. If you are working on a fix, set the status to ASSIGNED to
acknowledge this. Following the latest policy for such packages [2], your package
can be orphaned if this bug remains in NEW state more than 8 weeks.

[1] https://fedoraproject.org/wiki/Updates_Policy
[2] https://docs.fedoraproject.org/en-US/fesco/Fails_to_build_from_source_Fails_to_install/

Comment 5 Yunying Sun 2019-05-07 03:18:25 UTC
tboot still fails to build in f30 & master(f31). Errors found from build logs(https://koji.fedoraproject.org/koji/taskinfo?taskID=34693044):
common/acpi.c: In function 'find_table':
common/acpi.c:188:38: error: taking address of packed member of 'struct acpi_xsdt' may result in an unaligned pointer value [-Werror=address-of-packed-member]
  188 |         for ( uint64_t *curr_table = xsdt->table_offsets;
      |                                      ^~~~
common/acpi.c:205:38: error: taking address of packed member of 'struct acpi_rsdt' may result in an unaligned pointer value [-Werror=address-of-packed-member]
  205 |         for ( uint32_t *curr_table = rsdt->table_offsets;
      |                                      ^~~~
common/boot.S: Assembler messages:
common/boot.S:417: Warning: ignoring fill value in section `.bss.page_aligned'
common/boot.S:421: Warning: ignoring fill value in section `.bss.page_aligned'
common/boot.S:426: Warning: ignoring fill value in section `.bss.page_aligned'
gcc -Wall -Wformat-security -Werror -Wstrict-prototypes -Wextra -Winit-self -Wswitch-default -Wunused-parameter -Wwrite-strings -Wlogical-op -Wno-missing-field-initializers -fno-strict-aliasing -std=gnu99 -Wno-array-bounds -g -DDEBUG -m32 -march=i686 -nostdinc -fno-builtin -fno-common -fno-strict-aliasing -fomit-frame-pointer -pipe -iwithprefix include -I/builddir/build/BUILD/tboot-1.9.8/tboot/include -I/builddir/build/BUILD/tboot-1.9.8/include -msoft-float  -fno-stack-protector  -fno-stack-check -DTBOOT_CHANGESET=\""2018-10-18 13:00 +0800 1.9.8"\" -O2 -c common/e820.c -o common/e820.o
common/cmdline.c: In function 'parse_com_psbdf':
common/cmdline.c:311:19: error: taking address of packed member of 'struct <anonymous>' may result in an unaligned pointer value [-Werror=address-of-packed-member]
  311 |                   &g_com_port.comc_psbdf.bus,
      |                   ^~~~~~~~~~~~~~~~~~~~~~~~~~
common/cmdline.c:312:19: error: taking address of packed member of 'struct <anonymous>' may result in an unaligned pointer value [-Werror=address-of-packed-member]
  312 |                   &g_com_port.comc_psbdf.slot,
      |                   ^~~~~~~~~~~~~~~~~~~~~~~~~~~
common/cmdline.c:313:19: error: taking address of packed member of 'struct <anonymous>' may result in an unaligned pointer value [-Werror=address-of-packed-member]
  313 |                   &g_com_port.comc_psbdf.func);
      |                   ^~~~~~~~~~~~~~~~~~~~~~~~~~~
common/cmdline.c: In function 'parse_com_pbbdf':
common/cmdline.c:322:19: error: taking address of packed member of 'struct <anonymous>' may result in an unaligned pointer value [-Werror=address-of-packed-member]
  322 |                   &g_com_port.comc_pbbdf.bus,
      |                   ^~~~~~~~~~~~~~~~~~~~~~~~~~
common/cmdline.c:323:19: error: taking address of packed member of 'struct <anonymous>' may result in an unaligned pointer value [-Werror=address-of-packed-member]
  323 |                   &g_com_port.comc_pbbdf.slot,
      |                   ^~~~~~~~~~~~~~~~~~~~~~~~~~~
common/cmdline.c:324:19: error: taking address of packed member of 'struct <anonymous>' may result in an unaligned pointer value [-Werror=address-of-packed-member]
  324 |                   &g_com_port.comc_pbbdf.func);
      |                   ^~~~~~~~~~~~~~~~~~~~~~~~~~~

The errors is caused by gcc9 introducing flag '-Werror=address-of-packed-member'. Suppose fixes needed from upstream. 

@Lukas, is that something you could help with?

Comment 6 Yunying Sun 2019-05-13 02:07:43 UTC
Got a patch from Lukasz. I will work on adding a patch to Fedora tboot package.

Comment 7 Fedora Update System 2019-05-14 08:09:55 UTC
tboot-1.9.10-1.fc30 has been submitted as an update to Fedora 30. https://bodhi.fedoraproject.org/updates/FEDORA-2019-434af3da45

Comment 8 Fedora Update System 2019-05-15 00:53:00 UTC
tboot-1.9.10-1.fc30 has been pushed to the Fedora 30 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2019-434af3da45

Comment 9 Fedora Update System 2019-05-28 01:09:44 UTC
tboot-1.9.10-1.fc30 has been pushed to the Fedora 30 stable repository. If problems still persist, please make note of it in this bug report.

Comment 10 Sumit 2020-03-20 13:23:54 UTC
I am trying to use tboot-1.9.11 also tried with tboot-1.9.10 in fedora31. But getting the above error mentioned.
taking tboot source from: wget http://downloads.sourceforge.net/project/tboot/tboot/tboot-1.9.11.tar.gz

Can you suggest how this error can be solved ?

    [exec]      [exec] gcc -D__ASSEMBLY__ -Wall -Wformat-security -Werror -Wstrict-prototypes -Wextra -Winit-self -Wswitch-default -Wunused-parameter -Wwrite-strings -Wlogical-op -Wno-missing-field-initializers -fno-strict-aliasing -Wno-array-bounds -g -DDEBUG -m32 -I/root/rpmbuild/BUILD/tboot-1.9.11/safestringlib/include -march=i686 -nostdinc -fno-builtin -fno-common -fno-strict-aliasing -fomit-frame-pointer -pipe -iwithprefix include -I/root/rpmbuild/BUILD/tboot-1.9.11/tboot/include -I/root/rpmbuild/BUILD/tboot-1.9.11/include -msoft-float -fno-stack-protector -fno-stack-check -DTBOOT_CHANGESET=\""2019-11-25 16:00 +0200 1.9.11"\" -O2 -c common/boot.S -o common/boot.o
     [exec]      [exec] gcc -Wall -Wformat-security -Werror -Wstrict-prototypes -Wextra -Winit-self -Wswitch-default -Wunused-parameter -Wwrite-strings -Wlogical-op -Wno-missing-field-initializers -fno-strict-aliasing -std=gnu99 -Wno-array-bounds -g -DDEBUG -m32 -I/root/rpmbuild/BUILD/tboot-1.9.11/safestringlib/include -march=i686 -nostdinc -fno-builtin -fno-common -fno-strict-aliasing -fomit-frame-pointer -pipe -iwithprefix include -I/root/rpmbuild/BUILD/tboot-1.9.11/tboot/include -I/root/rpmbuild/BUILD/tboot-1.9.11/include -msoft-float  -fno-stack-protector  -fno-stack-check -DTBOOT_CHANGESET=\""2019-11-25 16:00 +0200 1.9.11"\" -O2 -c common/acpi.c -o common/acpi.o
     [exec]      [exec] gcc -Wall -Wformat-security -Werror -Wstrict-prototypes -Wextra -Winit-self -Wswitch-default -Wunused-parameter -Wwrite-strings -Wlogical-op -Wno-missing-field-initializers -fno-strict-aliasing -std=gnu99 -Wno-array-bounds -g -DDEBUG -m32 -I/root/rpmbuild/BUILD/tboot-1.9.11/safestringlib/include -march=i686 -nostdinc -fno-builtin -fno-common -fno-strict-aliasing -fomit-frame-pointer -pipe -iwithprefix include -I/root/rpmbuild/BUILD/tboot-1.9.11/tboot/include -I/root/rpmbuild/BUILD/tboot-1.9.11/include -msoft-float  -fno-stack-protector  -fno-stack-check -DTBOOT_CHANGESET=\""2019-11-25 16:00 +0200 1.9.11"\" -O2 -c common/cmdline.c -o common/cmdline.o
     [exec]      [exec] common/acpi.c: In function 'find_table':
     [exec]      [exec] common/acpi.c: In function 'find_table':
     [exec]      [exec] common/acpi.c:186:38: error: taking address of packed member of 'struct acpi_xsdt' may result in an unaligned pointer value [-Werror=address-of-packed-member]
     [exec]      [exec] common/acpi.c:186:38: error: taking address of packed member of 'struct acpi_xsdt' may result in an unaligned pointer value [-Werror=address-of-packed-member]
     [exec]      [exec]   186 |         for ( uint64_t *curr_table = xsdt->table_offsets;
     [exec]      [exec]       |                                      ^~~~
     [exec]      [exec]   186 |         for ( uint64_t *curr_table = xsdt->table_offsets;
     [exec]      [exec]       |                                      ^~~~
     [exec]      [exec] common/acpi.c:203:38: error: taking address of packed member of 'struct acpi_rsdt' may result in an unaligned pointer value [-Werror=address-of-packed-member]
     [exec]      [exec] common/acpi.c:203:38: error: taking address of packed member of 'struct acpi_rsdt' may result in an unaligned pointer value [-Werror=address-of-packed-member]
     [exec]      [exec]   203 |         for ( uint32_t *curr_table = rsdt->table_offsets;
     [exec]      [exec]       |                                      ^~~~
     [exec]      [exec] common/boot.S: Assembler messages:
     [exec]      [exec]   203 |         for ( uint32_t *curr_table = rsdt->table_offsets;
     [exec]      [exec]       |                                      ^~~~
     [exec]      [exec] common/boot.S: Assembler messages:
     [exec]      [exec] common/boot.S:417: Warning: ignoring fill value in section `.bss.page_aligned'
     [exec]      [exec] common/boot.S:417: Warning: ignoring fill value in section `.bss.page_aligned'
     [exec]      [exec] common/boot.S:421: Warning: ignoring fill value in section `.bss.page_aligned'
     [exec]      [exec] common/boot.S:426: Warning: ignoring fill value in section `.bss.page_aligned'
     [exec]      [exec] common/boot.S:421: Warning: ignoring fill value in section `.bss.page_aligned'
     [exec]      [exec] common/boot.S:426: Warning: ignoring fill value in section `.bss.page_aligned'
     [exec]      [exec] common/cmdline.c: In function 'parse_com_psbdf':
     [exec]      [exec] common/cmdline.c: In function 'parse_com_psbdf':
     [exec]      [exec] common/cmdline.c:311:19: error: taking address of packed member of 'struct <anonymous>' may result in an unaligned pointer value [-Werror=address-of-packed-member]
     [exec]      [exec]   311 |                   &g_com_port.comc_psbdf.bus,
     [exec]      [exec] common/cmdline.c:311:19: error: taking address of packed member of 'struct <anonymous>' may result in an unaligned pointer value [-Werror=address-of-packed-member]
     [exec]      [exec]   311 |                   &g_com_port.comc_psbdf.bus,
     [exec]      [exec]       |                   ^~~~~~~~~~~~~~~~~~~~~~~~~~
     [exec]      [exec]       |                   ^~~~~~~~~~~~~~~~~~~~~~~~~~
     [exec]      [exec] common/cmdline.c:312:19: error: taking address of packed member of 'struct <anonymous>' may result in an unaligned pointer value [-Werror=address-of-packed-member]
     [exec]      [exec]   312 |                   &g_com_port.comc_psbdf.slot,
     [exec]      [exec] common/cmdline.c:312:19: error: taking address of packed member of 'struct <anonymous>' may result in an unaligned pointer value [-Werror=address-of-packed-member]
     [exec]      [exec]   312 |                   &g_com_port.comc_psbdf.slot,
     [exec]      [exec]       |                   ^~~~~~~~~~~~~~~~~~~~~~~~~~~
     [exec]      [exec]       |                   ^~~~~~~~~~~~~~~~~~~~~~~~~~~
     [exec]      [exec] common/cmdline.c:313:19: error: taking address of packed member of 'struct <anonymous>' may result in an unaligned pointer value [-Werror=address-of-packed-member]
     [exec]      [exec] common/cmdline.c:313:19: error: taking address of packed member of 'struct <anonymous>' may result in an unaligned pointer value [-Werror=address-of-packed-member]
     [exec]      [exec]   313 |                   &g_com_port.comc_psbdf.func);
     [exec]      [exec]       |                   ^~~~~~~~~~~~~~~~~~~~~~~~~~~
     [exec]      [exec] common/cmdline.c: In function 'parse_com_pbbdf':
     [exec]      [exec]   313 |                   &g_com_port.comc_psbdf.func);
     [exec]      [exec]       |                   ^~~~~~~~~~~~~~~~~~~~~~~~~~~
     [exec]      [exec] common/cmdline.c: In function 'parse_com_pbbdf':
     [exec]      [exec] common/cmdline.c:322:19: error: taking address of packed member of 'struct <anonymous>' may result in an unaligned pointer value [-Werror=address-of-packed-member]
     [exec]      [exec]   322 |                   &g_com_port.comc_pbbdf.bus,
     [exec]      [exec] common/cmdline.c:322:19: error: taking address of packed member of 'struct <anonymous>' may result in an unaligned pointer value [-Werror=address-of-packed-member]
     [exec]      [exec]   322 |                   &g_com_port.comc_pbbdf.bus,
     [exec]      [exec]       |                   ^~~~~~~~~~~~~~~~~~~~~~~~~~
     [exec]      [exec]       |                   ^~~~~~~~~~~~~~~~~~~~~~~~~~
     [exec]      [exec] common/cmdline.c:323:19: error: taking address of packed member of 'struct <anonymous>' may result in an unaligned pointer value [-Werror=address-of-packed-member]
     [exec]      [exec]   323 |                   &g_com_port.comc_pbbdf.slot,
     [exec]      [exec] common/cmdline.c:323:19: error: taking address of packed member of 'struct <anonymous>' may result in an unaligned pointer value [-Werror=address-of-packed-member]
     [exec]      [exec]   323 |                   &g_com_port.comc_pbbdf.slot,
     [exec]      [exec]       |                   ^~~~~~~~~~~~~~~~~~~~~~~~~~~
     [exec]      [exec]       |                   ^~~~~~~~~~~~~~~~~~~~~~~~~~~
     [exec]      [exec] common/cmdline.c:324:19: error: taking address of packed member of 'struct <anonymous>' may result in an unaligned pointer value [-Werror=address-of-packed-member]
     [exec]      [exec]   324 |                   &g_com_port.comc_pbbdf.func);
     [exec]      [exec] common/cmdline.c:324:19: error: taking address of packed member of 'struct <anonymous>' may result in an unaligned pointer value [-Werror=address-of-packed-member]
     [exec]      [exec]   324 |                   &g_com_port.comc_pbbdf.func);
     [exec]      [exec]       |                   ^~~~~~~~~~~~~~~~~~~~~~~~~~~
     [exec]      [exec]       |                   ^~~~~~~~~~~~~~~~~~~~~~~~~~~
     [exec]      [exec] cc1: all warnings being treated as errors
     [exec]      [exec] make[2]: *** [Makefile:130: common/acpi.o] Error 1
     [exec]      [exec] cc1: all warnings being treated as errors
     [exec]      [exec] make[2]: *** [Makefile:130: common/acpi.o] Error 1
     [exec]      [exec] make[2]: *** Waiting for unfinished jobs....
     [exec]      [exec] make[2]: *** Waiting for unfinished jobs....
     [exec]      [exec] make[2]: Leaving directory '/root/rpmbuild/BUILD/tboot-1.9.11/tboot'
     [exec]      [exec] make[1]: Leaving directory '/root/rpmbuild/BUILD/tboot-1.9.11'
     [exec]      [exec]
     [exec]      [exec]
     [exec]      [exec] RPM build errors:
     [exec]      [exec] {standard input}: Assembler messages:
     [exec]      [exec] {standard input}:2795: Warning: ignoring changed section attributes for .text
     [exec]      [exec] {standard input}: Assembler messages:
     [exec]      [exec] {standard input}:2795: Warning: ignoring changed section attributes for .text
     [exec]      [exec] cc1: all warnings being treated as errors
     [exec]      [exec] make[2]: *** [Makefile:130: common/cmdline.o] Error 1
     [exec]      [exec] cc1: all warnings being treated as errors
     [exec]      [exec] make[2]: *** [Makefile:130: common/cmdline.o] Error 1
     [exec]      [exec] make[1]: *** [Makefile:53: build-tboot] Error 2
     [exec]      [exec] make: *** [Makefile:48: build] Error 2
     [exec]      [exec] error: Bad exit status from /var/tmp/rpm-tmp.4K01nF (%build)
     [exec]      [exec] make[1]: *** [Makefile:53: build-tboot] Error 2
     [exec]      [exec] make: *** [Makefile:48: build] Error 2
     [exec]      [exec] error: Bad exit status from /var/tmp/rpm-tmp.4K01nF (%build)
     [exec]      [exec]     Bad exit status from /var/tmp/rpm-tmp.4K01nF (%build)
     [exec]      [exec]     Bad exit status from /var/tmp/rpm-tmp.4K01nF (%build)
     [exec]      [exec] Failed to generate tboot binary
     [exec]      [exec] mv: cannot stat '': No such file or directory
     [exec]      [exec] mv: cannot stat '': No such file or directory
     [exec] [INFO] ------------------------------------------------------------------------
     [exec] [INFO] Reactor Summary:
     [exec] [INFO]
     [exec] [INFO] hex2bin-dist 1.0 ................................... SUCCESS [  2.778 s]
     [exec] [INFO] mtwilson-maven-build-contrib-features 1.1 .......... SUCCESS [  0.011 s]
     [exec] [INFO] tboot-dist 1.9.11 .................................. FAILURE [  1.578 s]
     [exec] [INFO] ------------------------------------------------------------------------
     [exec] [INFO] BUILD FAILURE

Comment 11 Yunying Sun 2020-03-25 07:18:30 UTC
We've discussed this through email. Suppose the issue has been fixed with the same patch included in 1.9.10 package.