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

meson setup fails with 'Dependency "glib-2.0" not found' #3

Closed
geerlingguy opened this issue Oct 29, 2024 · 10 comments
Closed

meson setup fails with 'Dependency "glib-2.0" not found' #3

geerlingguy opened this issue Oct 29, 2024 · 10 comments

Comments

@geerlingguy
Copy link

Trying this on an Ubuntu 24.04 install on AmpereOne, I'm getting the following message when running the build script:

Run-time dependency glib-2.0 found: NO (tried pkgconfig)

../meson.build:926:10: ERROR: Dependency "glib-2.0" not found, tried pkgconfig

A full log can be found at /home/ubuntu/qemu-coremark/qemu-9.1.0/build/meson-logs/meson-log.txt

ERROR: meson setup failed

From that log...

-----------
Command line: `cc /home/ubuntu/qemu-coremark/qemu-9.1.0/scripts/xen-detect.c -o /home/ubuntu/qemu-coremark/qemu-9.1.0/build/meson-private/tmpuwkfbowk/output.exe -D_FILE_OFFSET_BITS=64 -O0 -std=gnu11 -DCONFIG_XEN_CTRL_INTERFACE_VERSION=40701` -> 1
stderr:
/home/ubuntu/qemu-coremark/qemu-9.1.0/scripts/xen-detect.c:105:12: fatal error: xenctrl.h: No such file or directory
  105 |   #include <xenctrl.h>
      |            ^~~~~~~~~~~
compilation terminated.
-----------
Pkg-config binary for 1 is cached.
Determining dependency 'glib-2.0' with pkg-config executable '/usr/bin/pkg-config'
env[PKG_CONFIG_PATH]: 
-----------
Called: `/usr/bin/pkg-config --modversion glib-2.0` -> 1
stderr:
Package glib-2.0 was not found in the pkg-config search path.
Perhaps you should add the directory containing `glib-2.0.pc'
to the PKG_CONFIG_PATH environment variable
Package 'glib-2.0', required by 'virtual:world', not found
-----------
Run-time dependency glib-2.0 found: NO (tried pkgconfig)

../meson.build:926:10: ERROR: Dependency "glib-2.0" not found, tried pkgconfig
@bexcran
Copy link
Collaborator

bexcran commented Oct 29, 2024

What does grep ID_LIKE /etc/os-release show on your system?

@geerlingguy
Copy link
Author

@bexcran

ubuntu@ubuntu:~$ grep ID_LIKE /etc/os-release
ID_LIKE=debian

@geerlingguy
Copy link
Author

@bexcran - After manually installing libglib-2.0-dev, it seems like the build is progressing further.

@geerlingguy
Copy link
Author

Hmm... now the launch script is showing VM 0 failed to start:

Running QEMU VMs...............................................
Checking if VMs successfully started.
QEMU VM 0 failed to start. See /tmp/qemu0.log for details.

Log file contents:

ubuntu@ubuntu:~/qemu-coremark$ cat /tmp/qemu0.log
WARNING: Image format was not specified for 'json:{"fat-type": 0, "dir": "phoronix-test-suite", "driver": "vvfat", "floppy": false, "rw": true, "write-target": {"driver": "qcow", "file": {"driver": "file", "filename": "/var/tmp/vl.VW2TW2"}}}' and probing guessed raw.
         Automatically detecting the format is dangerous for raw images, write operations on block 0 will be restricted.
         Specify the 'raw' format explicitly to remove the restrictions.
Could not access KVM kernel module: Permission denied
qemu-system-aarch64: failed to initialize kvm: Permission denied

@geerlingguy
Copy link
Author

If I try running the script with sudo it then shows me a bunch of permission denied warnings from subprocesses.

I'm only in the following groups:

ubuntu@ubuntu:~/qemu-coremark$ groups
ubuntu adm cdrom sudo dip plugdev lxd ollama

Do I need to ad myself to any more groups to make this work?

@bexcran
Copy link
Collaborator

bexcran commented Oct 29, 2024

Try adding yourself to the kvm group.
You can check if that's the correct group by doing ls -l /dev/kvm and looking at the group.

@geerlingguy
Copy link
Author

Hooray!

sudo usermod -a -G kvm ubuntu

Then logout / login, and now ./launch_qemu.sh seems to be working.

@geerlingguy
Copy link
Author

ubuntu@ubuntu:~/qemu-coremark$ ./run_pts.sh 2
47 instances of pts/coremark running in parallel in arm64 VMs!
Round 1 - Total CoreMark Score is: 4697344
Round 2 - Total CoreMark Score is: 4684524

@joespeed
Copy link
Collaborator

@geerlingguy now try it on x86 😁

@geerlingguy
Copy link
Author

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