Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Gentoo 4.1 template qubes-core-qrexec-4.1.18 fails compiling #12

Open
loztcf opened this issue Feb 27, 2023 · 6 comments
Open

Gentoo 4.1 template qubes-core-qrexec-4.1.18 fails compiling #12

loztcf opened this issue Feb 27, 2023 · 6 comments

Comments

@loztcf
Copy link

loztcf commented Feb 27, 2023

Qubes OS release

Gentoo 4.1 template.

Brief summary

qubes-core-qrexec fails compiling

<command-line>: error: "_FORTIFY_SOURCE" redefined [-Werror]

Steps to reproduce

Start the template, enter:

echo "sync-git-clone-extra-opts = --branch release4.1" >> /etc/portage/repos.conf/qubes.conf
rm -rf /var/db/repos/qubes
emerge --sync qubes && emerge --ask --verbose --update --deep --newuse @world

Expected behavior

Updated qubes-core-qrexec.

Actual behavior

Starts updating but fails compiling qubes-core-qrexec.

>>> Emerging (1 of 15) app-emulation/qubes-core-qrexec-4.1.18::qubes
 * Fetching files in the background.
 * To view fetch progress, run in another terminal:
 * tail -f /var/log/emerge-fetch.log
>>> Unpacking source...
 * Repository id: QubesOS_qubes-core-qrexec.git
 * To override fetched repository properties, use:
 *   EGIT_OVERRIDE_REPO_QUBESOS_QUBES_CORE_QREXEC
 *   EGIT_OVERRIDE_BRANCH_QUBESOS_QUBES_CORE_QREXEC
 *   EGIT_OVERRIDE_COMMIT_QUBESOS_QUBES_CORE_QREXEC
 *   EGIT_OVERRIDE_COMMIT_DATE_QUBESOS_QUBES_CORE_QREXEC
 *
 * Fetching https://github.com/QubesOS/qubes-core-qrexec.git ...
git fetch https://github.com/QubesOS/qubes-core-qrexec.git +refs/tags/v4.1.18:refs/tags/v4.1.18
git symbolic-ref refs/git-r3/app-emulation/qubes-core-qrexec/0/__main__ refs/tags/v4.1.18
 * Checking out https://github.com/QubesOS/qubes-core-qrexec.git to /var/tmp/portage/app-emulation/qubes-core-qrexec-4.1.18/work/qubes-core-qrexec-4.1.18 ...
git checkout --quiet refs/tags/v4.1.18
GIT update -->
   repository:               https://github.com/QubesOS/qubes-core-qrexec.git
   at the commit:            9aa4f16df267cf26406bf7793e1e8b6cdc969a09
>>> Source unpacked in /var/tmp/portage/app-emulation/qubes-core-qrexec-4.1.18/work
>>> Preparing source in /var/tmp/portage/app-emulation/qubes-core-qrexec-4.1.18/work/qubes-core-qrexec-4.1.18 ...
gpg: inserting ownertrust of 6
>>> Source prepared.
>>> Configuring source in /var/tmp/portage/app-emulation/qubes-core-qrexec-4.1.18/work/qubes-core-qrexec-4.1.18 ...
>>> Source configured.
>>> Compiling source in /var/tmp/portage/app-emulation/qubes-core-qrexec-4.1.18/work/qubes-core-qrexec-4.1.18 ...
make -j6 DESTDIR=/var/tmp/portage/app-emulation/qubes-core-qrexec-4.1.18/image SYSTEMD=1 BACKEND_VMM=xen LIBDIR=/usr/lib64 all-base
make all -C libqrexec
make[1]: Entering directory '/var/tmp/portage/app-emulation/qubes-core-qrexec-4.1.18/work/qubes-core-qrexec-4.1.18/libqrexec'
gcc unix-server.c -c -o unix-server.o -I. -I../libqrexec -g -O2 -Wall -Wextra -Werror -I/usr/include/vchan-xen  -fstack-protector -D_FORTIFY_SOURCE=2 -fstack-protector-strong -fPIC -std=gnu11 -D_POSIX_C_SOURCE=20
0809L -D_GNU_SOURCE -march=native -O2 -pipe -march=native -O2 -pipe -MD -MP -MF unix-server.o.dep
<command-line>: error: "_FORTIFY_SOURCE" redefined [-Werror]
<built-in>: note: this is the location of the previous definition
cc1: all warnings being treated as errors
make[1]: *** [Makefile:41: unix-server.o] Error 1
make[1]: Leaving directory '/var/tmp/portage/app-emulation/qubes-core-qrexec-4.1.18/work/qubes-core-qrexec-4.1.18/libqrexec'
make[1]: *** Waiting for unfinished jobs....
make[1]: Entering directory '/var/tmp/portage/app-emulation/qubes-core-qrexec-4.1.18/work/qubes-core-qrexec-4.1.18/libqrexec'
gcc txrx-vchan.c -c -o txrx-vchan.o -I. -I../libqrexec -g -O2 -Wall -Wextra -Werror -I/usr/include/vchan-xen  -fstack-protector -D_FORTIFY_SOURCE=2 -fstack-protector-strong -fPIC -std=gnu11 -D_POSIX_C_SOURCE=2008
09L -D_GNU_SOURCE -march=native -O2 -pipe -march=native -O2 -pipe -MD -MP -MF txrx-vchan.o.dep
<command-line>: error: "_FORTIFY_SOURCE" redefined [-Werror]
<built-in>: note: this is the location of the previous definition
cc1: all warnings being treated as errors
make[1]: *** [Makefile:41: txrx-vchan.o] Error 1
make[1]: Leaving directory '/var/tmp/portage/app-emulation/qubes-core-qrexec-4.1.18/work/qubes-core-qrexec-4.1.18/libqrexec'
make[1]: Entering directory '/var/tmp/portage/app-emulation/qubes-core-qrexec-4.1.18/work/qubes-core-qrexec-4.1.18/libqrexec'
gcc write-stdin.c -c -o write-stdin.o -I. -I../libqrexec -g -O2 -Wall -Wextra -Werror -I/usr/include/vchan-xen  -fstack-protector -D_FORTIFY_SOURCE=2 -fstack-protector-strong -fPIC -std=gnu11 -D_POSIX_C_SOURCE=20
0809L -D_GNU_SOURCE -march=native -O2 -pipe -march=native -O2 -pipe -MD -MP -MF write-stdin.o.dep
<command-line>: error: "_FORTIFY_SOURCE" redefined [-Werror]
<built-in>: note: this is the location of the previous definition
cc1: all warnings being treated as errors
make[1]: *** [Makefile:41: write-stdin.o] Error 1
make[1]: Leaving directory '/var/tmp/portage/app-emulation/qubes-core-qrexec-4.1.18/work/qubes-core-qrexec-4.1.18/libqrexec'
make[1]: Entering directory '/var/tmp/portage/app-emulation/qubes-core-qrexec-4.1.18/work/qubes-core-qrexec-4.1.18/libqrexec'
gcc ioall.c -c -o ioall.o -I. -I../libqrexec -g -O2 -Wall -Wextra -Werror -I/usr/include/vchan-xen  -fstack-protector -D_FORTIFY_SOURCE=2 -fstack-protector-strong -fPIC -std=gnu11 -D_POSIX_C_SOURCE=200809L -D_GNU
_SOURCE -march=native -O2 -pipe -march=native -O2 -pipe -MD -MP -MF ioall.o.dep
<command-line>: error: "_FORTIFY_SOURCE" redefined [-Werror]
<built-in>: note: this is the location of the previous definition
cc1: all warnings being treated as errors
make[1]: *** [Makefile:41: ioall.o] Error 1
make[1]: Leaving directory '/var/tmp/portage/app-emulation/qubes-core-qrexec-4.1.18/work/qubes-core-qrexec-4.1.18/libqrexec'
make[1]: Entering directory '/var/tmp/portage/app-emulation/qubes-core-qrexec-4.1.18/work/qubes-core-qrexec-4.1.18/libqrexec'
gcc buffer.c -c -o buffer.o -I. -I../libqrexec -g -O2 -Wall -Wextra -Werror -I/usr/include/vchan-xen  -fstack-protector -D_FORTIFY_SOURCE=2 -fstack-protector-strong -fPIC -std=gnu11 -D_POSIX_C_SOURCE=200809L -D_G
NU_SOURCE -march=native -O2 -pipe -march=native -O2 -pipe -MD -MP -MF buffer.o.dep
<command-line>: error: "_FORTIFY_SOURCE" redefined [-Werror]
<built-in>: note: this is the location of the previous definition
cc1: all warnings being treated as errors
make[1]: *** [Makefile:41: buffer.o] Error 1
make[1]: Leaving directory '/var/tmp/portage/app-emulation/qubes-core-qrexec-4.1.18/work/qubes-core-qrexec-4.1.18/libqrexec'
make[1]: Entering directory '/var/tmp/portage/app-emulation/qubes-core-qrexec-4.1.18/work/qubes-core-qrexec-4.1.18/libqrexec'
gcc exec.c -c -o exec.o -I. -I../libqrexec -g -O2 -Wall -Wextra -Werror -I/usr/include/vchan-xen  -fstack-protector -D_FORTIFY_SOURCE=2 -fstack-protector-strong -fPIC -std=gnu11 -D_POSIX_C_SOURCE=200809L -D_GNU_S
OURCE -march=native -O2 -pipe -march=native -O2 -pipe -MD -MP -MF exec.o.dep
<command-line>: error: "_FORTIFY_SOURCE" redefined [-Werror]
<built-in>: note: this is the location of the previous definition
cc1: all warnings being treated as errors
make[1]: *** [Makefile:41: exec.o] Error 1
make[1]: Leaving directory '/var/tmp/portage/app-emulation/qubes-core-qrexec-4.1.18/work/qubes-core-qrexec-4.1.18/libqrexec'
make: *** [Makefile:23: all-base] Error 2
 * ERROR: app-emulation/qubes-core-qrexec-4.1.18::qubes failed (compile phase):
 *   emake failed
 *
 * If you need support, post the output of `emerge --info '=app-emulation/qubes-core-qrexec-4.1.18::qubes'`,
 * the complete build log and the output of `emerge -pqv '=app-emulation/qubes-core-qrexec-4.1.18::qubes'`.
 * The complete build log is located at '/var/tmp/portage/app-emulation/qubes-core-qrexec-4.1.18/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/app-emulation/qubes-core-qrexec-4.1.18/temp/environment'.
 * Working directory: '/var/tmp/portage/app-emulation/qubes-core-qrexec-4.1.18/work/qubes-core-qrexec-4.1.18'
 * S: '/var/tmp/portage/app-emulation/qubes-core-qrexec-4.1.18/work/qubes-core-qrexec-4.1.18'

>>> Failed to emerge app-emulation/qubes-core-qrexec-4.1.18, Log file:

>>>  '/var/tmp/portage/app-emulation/qubes-core-qrexec-4.1.18/temp/build.log'

 * Messages for package app-emulation/qubes-core-qrexec-4.1.18:

 * ERROR: app-emulation/qubes-core-qrexec-4.1.18::qubes failed (compile phase):
 *   emake failed
 *
 * If you need support, post the output of `emerge --info '=app-emulation/qubes-core-qrexec-4.1.18::qubes'`,
 * the complete build log and the output of `emerge -pqv '=app-emulation/qubes-core-qrexec-4.1.18::qubes'`.
 * The complete build log is located at '/var/tmp/portage/app-emulation/qubes-core-qrexec-4.1.18/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/app-emulation/qubes-core-qrexec-4.1.18/temp/environment'.
 * Working directory: '/var/tmp/portage/app-emulation/qubes-core-qrexec-4.1.18/work/qubes-core-qrexec-4.1.18'
 * S: '/var/tmp/portage/app-emulation/qubes-core-qrexec-4.1.18/work/qubes-core-qrexec-4.1.18'
@fepitre
Copy link
Owner

fepitre commented Feb 27, 2023

Which template version are you using? If you use an old one, I think you need to update your system before Qubes packages. I would recommend to use the latest build I've done few days ago (enable community testing repository).

@loztcf
Copy link
Author

loztcf commented Feb 28, 2023

It's a usually daily updated Template.
I updated my system excluding the qubes packages today and it still keeps failing.

I think it has to do with gentoo's compiler patches which do include -D_FORTIFY_SOURCE=2 if -O2 or higher are used.
https://gitweb.gentoo.org/proj/gcc-patches.git/tree/12.2.0/gentoo/01_all_default-fortify-source.patch

Use of -Werror in the Makefile causes the build to fail then.

This is not just a case for qubes-core-qrexec. This happens with qubes-gpg-split as well.
Every other qubes package I have tested works so far.

Similar issues at other projects include:
https://tracker.ceph.com/issues/13920
https://bugs.gentoo.org/893278

@colons
Copy link

colons commented Jun 1, 2023

i've been just --excludeing these two packages while doing updates for months because of this. is there a workaround that i can use?

@colons
Copy link

colons commented Aug 13, 2023

this is now also happening with qubes-libvchan-xen. im getting worried about missing important fixes

@fepitre
Copy link
Owner

fepitre commented Aug 13, 2023

Please send fixes on Qubes OS repository. I've not reproduce it on my last attempt neither.

@colons
Copy link

colons commented Aug 13, 2023

i think something resembling ceph/ceph#6739 is probably what needs to happen, but i don't know how to test (or even make) such a change locally

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants