blk/CMakeLists.txt: generate interface library if libblk is disabled#60305
blk/CMakeLists.txt: generate interface library if libblk is disabled#60305MaxKellermann merged 1 commit intoceph:mainfrom
libblk is disabled#60305Conversation
If all the libraries which `libblk` wraps (i.e. Bluestore, AIO, SPDK, ZBD) are disabled, then the build aborts with a linker failure: ``` c++ [...] -o bin/ceph-mon [...] -lblk [...] mold: fatal: library not found: blk collect2: error: ld returned 1 exit status ``` This is because `blk` is used (via `os`) but if the `add_library()` directive is skipped, `cmake` attempts to look up a library with that name. Signed-off-by: Max Kellermann <[email protected]>
|
Bug fix PR nearly two months without a review. Posting a useless comment to keep your bot from marking it stale. |
|
It's been another month. |
|
@MaxKellermann hi Max, thank you for this fix. but i think the reason why we linked where we don't link |
|
@tchaikov, that would be another way to fix this build failure; but I decided against it because it would require fixes in 3 places ( |
|
thanks, Max. i will take a closer look at it and get back to you in this week. |
a dummy library is indeed simpler. thanks! |
|
Can one of the admins verify this patch? |
|
jenkins test api |
|
jenkins test make check arm64 |
If all the libraries which
libblkwraps (i.e. Bluestore, AIO, SPDK, ZBD) are disabled, then the build aborts with a linker failure:This is because
blkis used (viaos) but if theadd_library()directive is skipped,cmakeattempts to look up a library with that name.Checklist