Skip to content
This repository was archived by the owner on Oct 3, 2024. It is now read-only.
This repository was archived by the owner on Oct 3, 2024. It is now read-only.

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

@Marietto2008

Description

@Marietto2008

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 in this page also on ubuntu 20.04 or I should open a specific bug on the ubuntu's bug tracker ? let me know. thanks.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions