tcgbios.c:1519:33: error: taking address of packed member of ‘struct ’ may result in an unaligned pointer value [-Werror=address-of-packed-member]

Bug #1892205 reported by Marietto
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
xen (Ubuntu)
Expired
Undecided
Unassigned

Bug Description

Hello. I was trying to compile the xen tools for enabling GVT for my integrated intel gpu
with xen and the compilation stopped like this :

gcc -m32 -march=i686 -DBUILD_ID -fno-strict-aliasing -std=gnu99 -Wall -Wstrict-prototypes -Wdeclaration-after-statement -Wno-unused-but-set-variable -Wno-unused-local-typedefs -O2 -fomit-frame-pointer -D__XEN_INTERFACE_VERSION__=XEN_LATEST_INTERFACE_VERSION -MMD -MF .tcgbios.o.d -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -mno-tls-direct-seg-refs -DNDEBUG -Werror -fno-stack-protector -fno-exceptions -fno-builtin -msoft-float -I/etc/xen/igvtg-xen/tools/firmware/rombios/32bit/tcgbios/../../../../../tools/include -I.. -I../.. -I../../../../libacpi -fno-pic -fno-PIE -c -o tcgbios.o tcgbios.c
tcgbios.c: In function ‘TCGInterruptHandler’:
tcgbios.c:1519:33: error: taking address of packed member of ‘struct ’ may result in an unaligned pointer value [-Werror=address-of-packed-member]
1519 | &regs->u.r32.edx);
| ^~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors

I see that thig bug has been discussed here :

https://bugs.gentoo.org/689082

and resolved here :

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c58b86194ce19d54a2f47d4712cb237b1f880ebb

but on gentoo ! basically I don't know if (and how) I can fix this error on ubuntu 20.04. I don't know if I can use the patches suggested on the gentoo gitweb also on ubuntu 20.04.

You can find the discussion here : https://github.com/intel/gvt-linux/issues/168

I'm using GCC version 9.

Tags: bot-comment
Marietto (marietto2008)
description: updated
Revision history for this message
Ubuntu Foundations Team Bug Bot (crichton) wrote :

Thank you for taking the time to report this bug and helping to make Ubuntu better. It seems that your bug report is not filed about a specific source package though, rather it is just filed against Ubuntu in general. It is important that bug reports be filed about source packages so that people interested in the package can find the bugs about it. You can find some hints about determining what package your bug might be about at https://wiki.ubuntu.com/Bugs/FindRightPackage. You might also ask for help in the #ubuntu-bugs irc channel on Freenode.

To change the source package that this bug is filed about visit https://bugs.launchpad.net/ubuntu/+bug/1892205/+editstatus and add the package name in the text box next to the word Package.

[This is an automated message. I apologize if it reached you inappropriately; please just reply to this message indicating so.]

tags: added: bot-comment
Marietto (marietto2008)
affects: ubuntu → gcc-9 (Ubuntu)
Matthias Klose (doko)
affects: gcc-9 (Ubuntu) → xen (Ubuntu)
Revision history for this message
Paride Legovini (paride) wrote :

[Copypaste from LP: #1892475]

Hello Marietto,

If I understand correctly you are having problems compiling igvtg-xen from the upstream source code. In this case this bug tracker is not the right place where to report this issue, as we use it to track bugs in Ubuntu, and not issues or incompatibilities with third-party projects. This unless the problem you hit is a problem with the (Ubuntu packaged) GCC, but I don't think this is the case; more likely there's an incompatibility between igvtg-xen and the version of gcc/glibc in Focal, which is however working as expected.

You can find pointers to get help for this sort of problem here: https://ubuntu.com/support/community-support

If you believe that this is really a bug, then you may find it helpful to read "How to report bugs effectively" http://www.chiark.greenend.org.uk/~sgtatham/bugs.html. We'd be grateful if you would then provide a more complete description of the problem, explain why you believe this is specifically a bug in Ubuntu, and then change the bug status back to New. Thanks!

Changed in xen (Ubuntu):
status: New → Incomplete
Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for xen (Ubuntu) because there has been no activity for 60 days.]

Changed in xen (Ubuntu):
status: Incomplete → Expired
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.