Re: [PATCH blktests] src/Makefile: fix static linking of miniublk

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Aug 03, 2023 / 17:20, Theodore Ts'o wrote:
> When using static linking, the libraries need to be placed after the
> .o or .c files so they are searched.  Otherwise, the build will fail:
> 
> cc -O2 -Wall -Wshadow  -DHAVE_LINUX_BLKZONED_H  -D_GNU_SOURCE -lpthread -luring -o miniublk miniublk.c
> /bin/ld: /tmp/ccfjiUvb.o: in function `ublk_ctrl_init':
> miniublk.c:(.text+0xaeb): undefined reference to `io_uring_queue_init_params'
> /bin/ld: /tmp/ccfjiUvb.o: in function `ublk_queue_deinit':
> miniublk.c:(.text+0xb73): undefined reference to `io_uring_unregister_ring_fd'
> /bin/ld: miniublk.c:(.text+0xb85): undefined reference to `io_uring_unregister_files'
> /bin/ld: /tmp/ccfjiUvb.o: in function `ublk_io_handler_fn':
> miniublk.c:(.text+0xd62): undefined reference to `io_uring_queue_init_params'
> /bin/ld: miniublk.c:(.text+0xd77): undefined reference to `io_uring_register_ring_fd'
> /bin/ld: miniublk.c:(.text+0xd8c): undefined reference to `io_uring_register_files'
> /bin/ld: miniublk.c:(.text+0xe94): undefined reference to `io_uring_submit_and_wait_timeout'
> /bin/ld: /tmp/ccfjiUvb.o: in function `__ublk_ctrl_cmd':
> miniublk.c:(.text+0x14a6): undefined reference to `io_uring_submit'
> /bin/ld: miniublk.c:(.text+0x1533): undefined reference to `__io_uring_get_cqe'
> collect2: error: ld returned 1 exit status
> make: *** [Makefile:61: miniublk] Error 1
> 
> Fixes: d42fe976 ("src: add mini ublk source code")
> Signed-off-by: Theodore Ts'o <tytso@xxxxxxx>

Thanks, applied!



[Index of Archives]     [Linux RAID]     [Linux SCSI]     [Linux ATA RAID]     [IDE]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Device Mapper]

  Powered by Linux