Thanks for the report. The patch that introduced the shared library and the patch that
split libspdk_thread out of libspdk_util did not get properly merged, so libspdk_thread
was missing from libspdk.so.
Please try with this patch:
https://review.gerrithub.io/#/c/spdk/spdk/+/417171
Thanks,
-- Daniel
From: SPDK [mailto:spdk-bounces@lists.01.org] On Behalf Of Great Wizard
Sent: Thursday, June 28, 2018 1:50 AM
To: spdk(a)lists.01.org
Subject: [SPDK] Shared Library Alone Doesn't Allow BlobFS Creation
Hi.
I saw a commit referencing the ability to build a shared library in SPDK now, stating
"The combined library includes all components of SPDK and is intended to make linking
against SPDK easier.". I tried to make a simple program initiating a (broken) blobfs,
but at compilation time I'm required to link to -lspdk_thread to get it to build.
#include "../../../include/spdk/blob.h"
int main(int argc, char const *argv[])
{
spdk_fs_init(NULL, NULL, NULL, NULL, NULL);
return 0;
}
gcc test.c -o test -lspdk gives errors about undefined references to spdk_io_channel and
thread functions.
gcc test.c -o test -lspdk -lspdk_thread builds fine.
Am I misunderstanding when I think of the shared library as a sort of "one library
fits all" library that means I typically wouldn't need to link anything else?
Thanks for your time.