Incomplete description of building examples
Maintainers usually reply within 2 days
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 70/100
- Issue type
- Documentation
- Clarity
- Mostly clear
- Activity status
- Active
- Domain
- build-system, documentation
Research direction
Start with the README build instructions and the examples/Makefile, especially how the examples link against libkrun. Compare the documented BLK=1 NET=1 commands with the successful FEATURE_FLAGS build command in the report. Done means the README clearly documents the flags needed to build the examples and the instructions match the observed working build.
Written by the indexing model from the issue text.
Description
On Ubuntu 26.04 amd64 I tried to follow the README but BLK=1 NET=1 seems to be insufficient:
libkrun$ make BLK=1 NET=1
libkrun$ sudo make BLK=1 NET=1 install
libkrun$ cd examples
libkrun/examples$ make
gcc -o boot_efi boot_efi.c -O2 -g -I../include -lkrun -lkrun_init
/usr/bin/x86_64-linux-gnu-ld.bfd: /tmp/ccMXKDu8.o: in function `listen_shutdown_request':
libkrun/examples/boot_efi.c:172:(.text+0x12a): undefined reference to `krun_vmm_handle_shutdown'
/usr/bin/x86_64-linux-gnu-ld.bfd: libkrun/examples/boot_efi.c:175:(.text+0x159): undefined reference to `krun_error_destroy'
/usr/bin/x86_64-linux-gnu-ld.bfd: /tmp/ccMXKDu8.o: in function `main':
libkrun/examples/boot_efi.c:200:(.text.startup+0x5a): undefined reference to `krun_init_log'
/usr/bin/x86_64-linux-gnu-ld.bfd: libkrun/examples/boot_efi.c:203:(.text.startup+0x6b): undefined reference to `krun_mmio_device_manager_new'
/usr/bin/x86_64-linux-gnu-ld.bfd: libkrun/examples/boot_efi.c:207:(.text.startup+0x73): undefined reference to `krun_console_device_builder'
/usr/bin/x86_64-linux-gnu-ld.bfd: libkrun/examples/boot_efi.c:208:(.text.startup+0x95): undefined reference to `krun_console_builder_add_default_console'
/usr/bin/x86_64-linux-gnu-ld.bfd: libkrun/examples/boot_efi.c:209:(.text.startup+0xac): undefined reference to `krun_console_builder_build'
/usr/bin/x86_64-linux-gnu-ld.bfd: libkrun/examples/boot_efi.c:210:(.text.startup+0xb7): undefined reference to `krun_mmio_device_manager_add'
/usr/bin/x86_64-linux-gnu-ld.bfd: libkrun/examples/boot_efi.c:214:(.text.startup+0xec): undefined reference to `krun_payload_load_firmware'
/usr/bin/x86_64-linux-gnu-ld.bfd: libkrun/examples/boot_efi.c:217:(.text.startup+0x12e): undefined reference to `krun_block_device_new'
/usr/bin/x86_64-linux-gnu-ld.bfd: libkrun/examples/boot_efi.c:219:(.text.startup+0x150): undefined reference to `krun_mmio_device_manager_add'
/usr/bin/x86_64-linux-gnu-ld.bfd: libkrun/examples/boot_efi.c:224:(.text.startup+0x1af): undefined reference to `krun_net_device_new_unixgram_path'
/usr/bin/x86_64-linux-gnu-ld.bfd: libkrun/examples/boot_efi.c:227:(.text.startup+0x1ca): undefined reference to `krun_mmio_device_manager_add'
/usr/bin/x86_64-linux-gnu-ld.bfd: libkrun/examples/boot_efi.c:231:(.text.startup+0x1d9): undefined reference to `krun_rng_device_new'
/usr/bin/x86_64-linux-gnu-ld.bfd: libkrun/examples/boot_efi.c:232:(.text.startup+0x1f0): undefined reference to `krun_mmio_device_manager_add'
/usr/bin/x86_64-linux-gnu-ld.bfd: libkrun/examples/boot_efi.c:234:(.text.startup+0x1ff): undefined reference to `krun_balloon_device_new'
/usr/bin/x86_64-linux-gnu-ld.bfd: libkrun/examples/boot_efi.c:235:(.text.startup+0x216): undefined reference to `krun_mmio_device_manager_add'
/usr/bin/x86_64-linux-gnu-ld.bfd: libkrun/examples/boot_efi.c:239:(.text.startup+0x21b): undefined reference to `krun_vmm_builder_new'
/usr/bin/x86_64-linux-gnu-ld.bfd: libkrun/examples/boot_efi.c:240:(.text.startup+0x239): undefined reference to `krun_vmm_builder_vcpus'
/usr/bin/x86_64-linux-gnu-ld.bfd: libkrun/examples/boot_efi.c:241:(.text.startup+0x257): undefined reference to `krun_vmm_builder_ram_mib'
/usr/bin/x86_64-linux-gnu-ld.bfd: libkrun/examples/boot_efi.c:242:(.text.startup+0x270): undefined reference to `krun_vmm_builder_payload'
/usr/bin/x86_64-linux-gnu-ld.bfd: libkrun/examples/boot_efi.c:243:(.text.startup+0x27d): undefined reference to `krun_vmm_builder_devices'
/usr/bin/x86_64-linux-gnu-ld.bfd: libkrun/examples/boot_efi.c:245:(.text.startup+0x291): undefined reference to `krun_vmm_builder_build'
/usr/bin/x86_64-linux-gnu-ld.bfd: libkrun/examples/boot_efi.c:248:(.text.startup+0x2ab): undefined reference to `krun_vmm_handle'
/usr/bin/x86_64-linux-gnu-ld.bfd: libkrun/examples/boot_efi.c:254:(.text.startup+0x2d5): undefined reference to `krun_vmm_run'
/usr/bin/x86_64-linux-gnu-ld.bfd: libkrun/examples/boot_efi.c:200:(.text.startup+0x36a): undefined reference to `krun_error_message'
/usr/bin/x86_64-linux-gnu-ld.bfd: libkrun/examples/boot_efi.c:200:(.text.startup+0x391): undefined reference to `krun_error_destroy'
collect2: error: ld returned 1 exit status
make: *** [Makefile:41: boot_efi] Error 1
Building libkrun as follows avoided the build error:
make FEATURE_FLAGS="--features ffi,blk,net,vhost-user"
- Dominant language
- Rust
- Stars
- 2.8k
- Forks
- 279
- Avg merge
- 2d 9h
- Merged PRs (30d)
- 28
Getting set up
- No Dockerfile or Docker Compose file
- No pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from libkrun/libkrun
-
virtio-fs (Linux passthrough): debug log in do_lookup panics the fs worker on non-UTF-8 file namesPossibly taken @zcl-g5 claimed this 1 day ago. Open
Difficulty 1/5 Under an hour Newbie friendliness 85/100
Maintainers usually reply within 2 days
-
Difficulty 5/5 Over a week Newbie friendliness 12/100
Maintainers usually reply within 2 days
-
Difficulty 5/5 Over a week Newbie friendliness 35/100
Maintainers usually reply within 2 days
-
All virtiofs shares return ECONNREFUSED in the guest (macOS host, libkrun 1.19.6 + krunkit 1.3.2)Open
Difficulty 4/5 3-5 days Newbie friendliness 45/100
Maintainers usually reply within 2 days
-
RISC-V device-tree in non-conformant with Linux device-tree schemaPossibly taken @xypron claimed this 4 days ago. Open
Difficulty 4/5 3-5 days Newbie friendliness 35/100
Maintainers usually reply within 2 days
Similar issues
-
Difficulty 1/5 1-3 hours Newbie friendliness 72/100
MattA-Official/vwmcp#20 ·
-
documentation good first issue
Difficulty 1/5 1-3 hours Newbie friendliness 88/100
undergroundrap/hatchling#15 ·
-
Progress difficulty filter lists Hard before MediumPossibly taken @Pandamachi claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
sysprog21/codetrial#281 · 1 comment ·
Maintainers usually reply within 1 day
-
CLI: --verdict silently ignores extra program/file argumentsPossibly taken @oxura claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
HigherOrderCO/Bend#1503 ·
-
Add MySQL test coverage for numeric_precision/numeric_scale and seq_in_fk (follow-up to #939)Possibly taken @tosinxt claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
TabularisDB/tabularis#977 · 1 comment ·
Maintainers usually reply within 1 day