[SPDK] Re: how to deploy and run spdk in centos7

Felipe Franciosi <felipe at nutanix.com>
Newsgroups dev.linux.lists.spdk
Message-ID <[email protected]>

> On Apr 14, 2020, at 5:04 PM, Alexey Marchuk <alexeymar(a)mellanox.com> wrote:
> 
> I tried to compile SPDK on Ubuntu 18.04 and run it on Centos 7.7 (CPU arch was the same), at least spdk_tgt failed due to libcrypto dependency:
> error while loading shared libraries: libcrypto.so.1.1: cannot open shared object file: No such file or directory
> Centos: $ locate libcrypto
> /usr/lib64/libcrypto.so
> /usr/lib64/libcrypto.so.1.0.2k
> /usr/lib64/libcrypto.so.10
> 
> As you can Centos provides libcrypto.so.10 while Ubuntu uses libcrypro.so.1.1. If you install/compile the same version of this library then I believe it should work. Or you may use another Centos version which provides the same libcrypto version as Ubuntu
> Ubuntu: $ ldd spdk_tgt
> libcrypto.so.1.1 => /usr/lib/x86_64-linux-gnu/libcrypto.so.1.1
> Centos: $ ldd spdk_tgt
> libcrypto.so.1.1 => not found

Alternatively, you can setup a docker container of centos7 and build
it in there on your Ubuntu machine. In combination with systems like
"mock", that is a much preferred way to cross-compile across Linux
distros. For example:

$ docker run -ti centos:centos7
Unable to find image 'centos:centos7' locally
centos7: Pulling from library/centos
Digest: sha256:4a701376d03f6b39b8c2a8f4a8e499441b0d567f9ab9d58e4991de4472fb813c
Status: Downloaded newer image for centos:centos7
[root(a)6c4ab3740af9 /]# cat /etc/redhat-release
CentOS Linux release 7.7.1908 (Core)
[root(a)6c4ab3740af9 /]#

And then:
[root(a)6c4ab3740af9 /]# yum install -y libssh-devel
...
[root(a)6c4ab3740af9 /]# ls /lib64/libcrypto*
/lib64/libcrypto.so.1.0.2k  /lib64/libcrypto.so.10
[root(a)6c4ab3740af9 /]#

F.

> 
> Best regards,
> Alexey Marchuk
> 
> -----Original Message-----
> From: Walker, Benjamin <benjamin.walker(a)intel.com> 
> Sent: Tuesday, April 14, 2020 5:26 PM
> To: Storage Performance Development Kit <spdk(a)lists.01.org>
> Subject: [SPDK] Re: how to deploy and run spdk in centos7
> 
> 
> 
>> -----Original Message-----
>> From: Yang, Ziye <ziye.yang(a)intel.com>
>> Sent: Monday, April 13, 2020 8:05 PM
>> To: Storage Performance Development Kit <spdk(a)lists.01.org>
>> Subject: [SPDK] Re: how to deploy and run spdk in centos7
>> 
>> Hi Xianghong,
>> 
>> Can you make sure that the machine which has ubuntu is same as the 
>> machine which has centos? If not, the complied binary may fail to run 
>> on centos. Because when you build SPDK/DPDK on ubuntu, it detects the 
>> CPU type and leverages some features from CPU to optimize some 
>> functions with CPU instructions. If there are no such instructions on 
>> the machine which has centos, it will fail to execute.
> 
> If this does end up being the problem, you can add the --target-arch parameter to SPDK's configure script to choose a specific architecture to build for.
> 
>> 
>> 
>> 
>> 
>> Best Regards
>> Ziye Yang
>> 
>> -----Original Message-----
>> From: mengxianghong2008(a)126.com <mengxianghong2008(a)126.com>
>> Sent: Tuesday, April 14, 2020 10:33 AM
>> To: spdk(a)lists.01.org
>> Subject: [SPDK] how to deploy and run spdk in centos7
>> 
>> I build spdk at unbuntu, after build, how can I deploy it and run at centos7?
>> Anyone can give me a doc or link to instructure me, best wishes!!!
>> _______________________________________________
>> SPDK mailing list -- spdk(a)lists.01.org To unsubscribe send an email to 
>> spdk-leave(a)lists.01.org 
>> _______________________________________________
>> SPDK mailing list -- spdk(a)lists.01.org To unsubscribe send an email to 
>> spdk-leave(a)lists.01.org
> _______________________________________________
> SPDK mailing list -- spdk(a)lists.01.org
> To unsubscribe send an email to spdk-leave(a)lists.01.org
> _______________________________________________
> SPDK mailing list -- spdk(a)lists.01.org
> To unsubscribe send an email to spdk-leave(a)lists.01.org
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.