You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Feb 21, 2024. It is now read-only.
I am trying to build pyrebox on Debian sid. When building qemu, I get the following error in the config.log file:
config-temp/qemu-conf.c: In function ‘main’:
config-temp/qemu-conf.c:2:25: error: null argument where non-null required (argument 1) [-Werror=nonnull]
2 | int main(void) { return sem_timedwait(0, 0); }
| ^~~~~~~~~~~~~
config-temp/qemu-conf.c:2:25: error: null argument where non-null required (argument 2) [-Werror=nonnull]
cc1: all warnings being treated as errors
It seems to be the issue mentioned here but config-temp is a temporary file, I am not sure what generates it in the compiling process, so not sure how to apply this patch. Any clue where that problem is coming from?
The text was updated successfully, but these errors were encountered:
There are some known problems with the latest versions of GCC. This will require to update the QEMU version that PyREBox relies on. I still need to allocate some time to work on that and make and properly test the upgrade. For the time being, you could try to compile PyREBox with an older GCC version such as gcc 8. This can be easily achieved with the alternatives system in Debian based distros: https://wiki.debian.org/DebianAlternatives
I got it working, it was not a GCC 10 issue, but some weird other problems. One of them is a bug in gcc configure script. The other one that is weird, is that qemu has a -Werror flag enabled by default if it is in a git repository. I solved that by forcing the --disable-werror in the build script (as explained here).
I guess it is not system dependent but I am surprised you never had these issues. Here are the paches if you want to fix them:
diff --git a/build.sh b/build.sh
index f19748fe..97ded8fb 100755
--- a/build.sh+++ b/build.sh@@ -95,7 +95,7 @@ if [ x"${reconfigure}" = xyes ] || [ ! -f ${qemu_path}/config-host.mak ] || [ !
then
qemu_configure_flags='--enable-debug'
fi
- ./configure --disable-docs --disable-libiscsi --target-list=i386-softmmu,x86_64-softmmu ${qemu_configure_flags}+ ./configure --disable-werror --disable-docs --disable-libiscsi --target-list=i386-softmmu,x86_64-softmmu ${qemu_configure_flags}
if [ $? -ne 0 ]; then
echo -e "\n${RED}[!] Could not configure QEMU${NC}\n"
exit 1
diff --git a/qemu/configure b/qemu/configure
index 54179416..a997e94a 100755
--- a/qemu/configure+++ b/qemu/configure@@ -5117,7 +5117,7 @@ fi
sem_timedwait=no
cat > $TMPC << EOF
#include <semaphore.h>
-int main(void) { return sem_timedwait(0, 0); }+int main(void) { sem_t s; struct timespec t = {0}; return sem_timedwait(&s, &t); }
EOF
if compile_prog "" "" ; then
sem_timedwait=yes
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Hi,
I am trying to build pyrebox on Debian sid. When building qemu, I get the following error in the config.log file:
It seems to be the issue mentioned here but config-temp is a temporary file, I am not sure what generates it in the compiling process, so not sure how to apply this patch. Any clue where that problem is coming from?
The text was updated successfully, but these errors were encountered: