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

[QEMU] try updating #4506

Merged
merged 15 commits into from
Feb 28, 2022
Merged

[QEMU] try updating #4506

merged 15 commits into from
Feb 28, 2022

Conversation

simeonschaub
Copy link
Member

No description provided.

@giordano
Copy link
Member

Again only the 3 famous platforms are going on, so this likely does a try_run-like check...

@simeonschaub
Copy link
Member Author

Yeah, I almost expected that, I just wanted to see what happened for the other platforms. How much do we care about non-linux and non-x86 platforms here? I'll look into the musl failures, but I mainly just care about those platforms.

@simeonschaub
Copy link
Member Author

Any ideas about why the musl builds would import sysinfo.h twice from two different locations?

[13:50:18] In file included from /opt/x86_64-linux-musl/x86_64-linux-musl/sys-root/usr/include/linux/kernel.h:5,
[13:50:18]                  from /opt/x86_64-linux-musl/x86_64-linux-musl/sys-root/usr/include/linux/netlink.h:5,
[13:50:18]                  from ../linux-user/syscall.c:115:
[13:50:18] /opt/x86_64-linux-musl/x86_64-linux-musl/sys-root/usr/include/linux/sysinfo.h:8:8: error: redefinition of ‘struct sysinfo’
[13:50:18]  struct sysinfo {
[13:50:18]         ^~~~~~~
[13:50:18] In file included from ../linux-user/syscall.c:51:
[13:50:18] /opt/x86_64-linux-musl/x86_64-linux-musl/sys-root/usr/include/sys/sysinfo.h:10:8: note: originally defined here
[13:50:18]  struct sysinfo {
[13:50:18]         ^~~~~~~

@giordano
Copy link
Member

Missing guards?

@simeonschaub
Copy link
Member Author

Hmm, do you know where these headers are coming from?

@simeonschaub
Copy link
Member Author

Ah, I think I found something helpful: https://patchwork.ozlabs.org/project/ltp/patch/[email protected]/#2562630

@simeonschaub
Copy link
Member Author

Is this warning something to worry about?

##[warning]Linked library libutil.so.1 could not be resolved and could not be auto-mapped

Comment on lines +17 to +48
+typedef union _sigval {
+ int sival_int;
+ void *sival_ptr;
+} sigval_t;
+
+/*
+ * This works because the alignment is ok on all current architectures
+ * but we leave open this being overridden in the future
+ */
+#ifndef __ARCH_SIGEV_PREAMBLE_SIZE
+#define __ARCH_SIGEV_PREAMBLE_SIZE (sizeof(int) * 2 + sizeof(sigval_t))
+#endif
+
+#define SIGEV_MAX_SIZE 64
+#define SIGEV_PAD_SIZE ((SIGEV_MAX_SIZE - __ARCH_SIGEV_PREAMBLE_SIZE) \
+ / sizeof(int))
+
+typedef struct _sigevent {
+ sigval_t sigev_value;
+ int sigev_signo;
+ int sigev_notify;
+ union {
+ int _pad[SIGEV_PAD_SIZE];
+ int _tid;
+
+ struct {
+ void (*_function)(sigval_t);
+ void *_attribute; /* really pthread_attr_t */
+ } _sigev_thread;
+ } _sigev_un;
+} sigevent_t;
+
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is copied from the asm-generic/siginfo.h headers. No idea if this is actually kosher...

@simeonschaub simeonschaub marked this pull request as ready for review February 26, 2022 21:42
@@ -30,20 +38,51 @@ echo '#!/bin/true ' > /usr/bin/Rez
echo '#!/bin/true ' > /usr/bin/SetFile
chmod +x /usr/bin/Rez
chmod +x /usr/bin/SetFile
make -j${nproc}
make -j${nproc} || true
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this still necessary?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, the build process tries to delete a non-existent file in cleanup, which should be harmless. I tried patching the Makefile, but it didn't work and I thought it probably isn't worth the trouble over just ignoring the return code

Q/Qemu/build_tarballs.jl Outdated Show resolved Hide resolved
Co-authored-by: Mosè Giordano <[email protected]>
Q/Qemu/build_tarballs.jl Outdated Show resolved Hide resolved
Q/Qemu/build_tarballs.jl Outdated Show resolved Hide resolved
@giordano
Copy link
Member

[22:50:36] ninja: job failed: cc -m64 -mcx16  -o tests/qtest/rtas-test tests/qtest/rtas-test.p/rtas-test.c.o -I/workspace/destdir/include -Wl,--as-needed -Wl,--no-undefined -pie -Wl,--whole-archive tests/qtest/libqos/libqos.fa -Wl,--no-whole-archive -Wl,--warn-common -Wl,-z,relro -Wl,-z,now -fstack-protector-strong -Wno-unused-result -Wl,-rpath,/workspace/destdir/lib -Wl,-rpath-link,/workspace/destdir/lib -Wl,--start-group libqemuutil.a subprojects/libvhost-user/libvhost-user-glib.a subprojects/libvhost-user/libvhost-user.a tests/qtest/libqos/libqos.fa -lutil -L/workspace/destdir/lib -lgio-2.0 -lgobject-2.0 -lglib-2.0 -L/workspace/destdir/lib -lgio-2.0 -lgobject-2.0 -lglib-2.0 -pthread -L/workspace/destdir/lib -lgmodule-2.0 -lglib-2.0 -lm /workspace/destdir/lib/libpixman-1.so -L/workspace/destdir/lib -lgmodule-2.0 -lglib-2.0 -Wl,--end-group
[22:50:36] /opt/x86_64-linux-gnu/bin/../lib/gcc/x86_64-linux-gnu/8.1.0/../../../../x86_64-linux-gnu/bin/ld: libqemuutil.a.p/util_qsp.c.o: undefined reference to symbol 'clock_gettime@@GLIBC_2.2.5'
[22:50:36] /opt/x86_64-linux-gnu/bin/../lib/gcc/x86_64-linux-gnu/8.1.0/../../../../x86_64-linux-gnu/bin/ld: /opt/x86_64-linux-gnu/bin/../x86_64-linux-gnu/sys-root/lib64/librt.so.1: error adding symbols: DSO missing from command line
[22:50:36] collect2: error: ld returned 1 exit status

clock_gettime requires -lrt (which isn't there unless I'm missing something)

@giordano
Copy link
Member

@simeonschaub
Copy link
Member Author

Yeah I'm looking into it. Seems to be only for tests though

@giordano
Copy link
Member

Of course in https://gitlab.com/qemu-project/qemu/-/blob/fa435db8ce1dff3b15e3f59a12f55f7b3a347b08/meson_options.txt there isn't an option to disable tests, I think you'll have to comment out subdir('tests') in https://gitlab.com/qemu-project/qemu/-/blob/fa435db8ce1dff3b15e3f59a12f55f7b3a347b08/meson.build#L3311

@simeonschaub
Copy link
Member Author

Ok, that seems to have fixed it

@giordano
Copy link
Member

Awesome! It'd be good to upstream the relevant patches (for the tests you'd need to add an option to meson_options.txt to disable tests and use it in meson.build)

@simeonschaub
Copy link
Member Author

Ok, I will

@giordano giordano merged commit 79ff6a0 into JuliaPackaging:master Feb 28, 2022
@simeonschaub simeonschaub deleted the sds/qemu branch February 28, 2022 00:35
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

Successfully merging this pull request may close these issues.

2 participants