Skip to contentSkip to conversation

Issue of erofs use zstd

DISCUSSION 肖淼森 via Linux-erofs 2 participants 5 messages Jul 15, 2024 – Jul 18, 2024

lore
Share & tools
lore
#0 lore raw

Hi GaoXiang,

We just update the last erofs version, and want to test the zstd compress feature.

But it will throw some error when using the mkfs.erofs making the new image, could you help to check? thanks!

error :

mi@mi-HP-ProDesk-680-G6-PCI-Microtower-PC:~/xiaoms/Project/erofs/test$ /home/mi/xiaoms/Project/erofs/sourcecode/erofs-utils/mkfs/mkfs.erofs -lzstd  srcd.erofs.img srcd/
/home/mi/xiaoms/Project/erofs/sourcecode/erofs-utils/mkfs/mkfs.erofs: symbol lookup error: /home/mi/xiaoms/Project/erofs/sourcecode/erofs-utils/mkfs/mkfs.erofs: undefined symbol: ZSTD_compress2

My PC compile environment as blew:

Linux mi-HP-ProDesk-680-G6-PCI-Microtower-PC 5.4.0-150-generic #167~18.04.1-Ubuntu SMP Wed May 24 00:51:42 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux

*** Zstandard CLI (64-bit) v1.5.6, by Yann Collet ***

mi@mi-HP-ProDesk-680-G6-PCI-Microtower-PC:~/xiaoms/Project/erofs/sourcecode/erofs-utils$ ./configure --with-libzstd
checking for a BSD-compatible install... /usr/bin/install -c
...
checking zstd.h usability... yes
checking zstd.h presence... yes
checking for zstd.h... yes
checking for ZSTD_compress2 in -lzstd... yes
checking whether ZSTD_compress2 is declared... yes
checking for ZSTD_getFrameContentSize... yes
checking that generated files are newer than configure... done
configure: creating ./config.status
config.status: creating Makefile
config.status: creating man/Makefile
config.status: creating lib/Makefile
config.status: creating mkfs/Makefile
config.status: creating dump/Makefile
config.status: creating fuse/Makefile
config.status: creating fsck/Makefile
config.status: creating config.h
config.status: config.h is unchanged
config.status: executing depfiles commands
config.status: executing libtool commands
mi@mi-HP-ProDesk-680-G6-PCI-Microtower-PC:~/xiaoms/Project/erofs/sourcecode/erofs-utils$ make
make  all-recursive
make[1]: 进入目录“/home/mi/xiaoms/Project/erofs/sourcecode/erofs-utils”
Making all in man
make[2]: 进入目录“/home/mi/xiaoms/Project/erofs/sourcecode/erofs-utils/man”
make[2]: 对“all”无需做任何事。
make[2]: 离开目录“/home/mi/xiaoms/Project/erofs/sourcecode/erofs-utils/man”
Making all in lib
make[2]: 进入目录“/home/mi/xiaoms/Project/erofs/sourcecode/erofs-utils/lib”
make[2]: 对“all”无需做任何事。
make[2]: 离开目录“/home/mi/xiaoms/Project/erofs/sourcecode/erofs-utils/lib”
Making all in mkfs
make[2]: 进入目录“/home/mi/xiaoms/Project/erofs/sourcecode/erofs-utils/mkfs”
/bin/sh ../libtool  --tag=CC   --mode=link gcc -Wall -I../include -g -O2 -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64   -o mkfs.erofs mkfs_erofs-main.o ../lib/liberofs.la  -luuid -llz4  -lz  -L/usr/local/lib -lzstd
libtool: link: gcc -Wall -I../include -g -O2 -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -o mkfs.erofs mkfs_erofs-main.o  ../lib/.libs/liberofs.a -luuid -llz4 -lz -L/usr/local/lib -lzstd
make[2]: 离开目录“/home/mi/xiaoms/Project/erofs/sourcecode/erofs-utils/mkfs”

#/******本邮件及其附件含有小米公司的保密信息,仅限于发送给上面地址中列出的个人或群组。禁止任何其他人以任何形式使用(包括但不限于全部或部分地泄露、复制、或散发)本邮件中的信息。如果您错收了本邮件,请您立即电话或邮件通知发件人并删除本邮件! This e-mail and its attachments contain confidential information from XIAOMI, which is intended only for the person or entity whose address is listed above. Any use of the information contained herein in any way (including, but not limited to, total or partial disclosure, reproduction, or dissemination) by persons other than the intended recipient(s) is prohibited. If you receive this e-mail in error, please notify the sender by phone or email immediately and delete it!******/#

#1 lore raw
Quoted 6 lines · 肖淼森 via Linux-erofs

Hi GaoXiang,

We just update the last erofs version, and want to test the zstd compress feature.

But it will throw some error when using the mkfs.erofs making the new image, could you help to check? thanks!

Please fix your own environment issue yourself, thanks.

This mailing list is not used for discussing such out-of-topic issue.

Thanks,
Gao Xiang

#2 lore raw
Quoted 9 lines · Gao Xiang
Quoted 5 lines · 肖淼森 via Linux-erofs

Hi GaoXiang,

We just update the last erofs version, and want to test the zstd compress feature.

Quoted 8 lines
Quoted 1 line

But it will throw some error when using the mkfs.erofs making the new image, could you help to check? thanks!

Please fix your own environment issue yourself, thanks.

This mailing list is not used for discussing such out-of-topic issue.

Thanks,
Gao Xiang

This may be due to having multiple versions of zstd lib available in your environment. Please check which one it is linking with and which one it is loading.

Thanks,
Sandeep.

#3 lore raw
Quoted 14 lines · Sandeep Dhavale
Quoted 13 lines · Gao Xiang
Quoted 6 lines · 肖淼森 via Linux-erofs

Hi GaoXiang,

We just update the last erofs version, and want to test the zstd compress feature.

But it will throw some error when using the mkfs.erofs making the new image, could you help to check? thanks!

Please fix your own environment issue yourself, thanks.

Quoted 7 lines
Quoted 4 lines

This mailing list is not used for discussing such out-of-topic issue.

Thanks,
Gao Xiang

This may be due to having multiple versions of zstd lib available in your environment. Please check which one it is linking with and which one it is loading.

Agreed, anyway, currently erofs-utils uses pkg-config to generate linker flags, but it may have no way to what library version is finally loaded.

Thanks,
Gao Xiang

Quoted 3 lines

Thanks,
Sandeep.

#4 lore raw

Hi Gao Xiang,Sandeep Dhavale

Thanks for your suggestions !

I have fix this issue:The old zstd have removed, but some lod zstd lib(so) still alive in usr/lib/, that cause this issue.

________________________________
发件人: Gao Xiang <[email protected]>
发送时间: 2024年7月18日 5:49:54
收件人: Sandeep Dhavale
抄送: 肖淼森; [email protected]
主题: [External Mail]Re: Issue of erofs use zstd

[外部邮件] 此邮件来源于小米公司外部,请谨慎处理。若对邮件安全性存疑,请将邮件转发给[email protected]进行反馈

Quoted 14 lines · Sandeep Dhavale
Quoted 13 lines · Gao Xiang
Quoted 6 lines · 肖淼森 via Linux-erofs

Hi GaoXiang,

We just update the last erofs version, and want to test the zstd compress feature.

But it will throw some error when using the mkfs.erofs making the new image, could you help to check? thanks!

Please fix your own environment issue yourself, thanks.

Quoted 7 lines
Quoted 4 lines

This mailing list is not used for discussing such out-of-topic issue.

Thanks,
Gao Xiang

This may be due to having multiple versions of zstd lib available in your environment. Please check which one it is linking with and which one it is loading.

Agreed, anyway, currently erofs-utils uses pkg-config to generate linker flags, but it may have no way to what library version is finally loaded.

Thanks,
Gao Xiang

Quoted 3 lines

Thanks,
Sandeep.

#/******本邮件及其附件含有小米公司的保密信息,仅限于发送给上面地址中列出的个人或群组。禁止任何其他人以任何形式使用(包括但不限于全部或部分地泄露、复制、或散发)本邮件中的信息。如果您错收了本邮件,请您立即电话或邮件通知发件人并删除本邮件! This e-mail and its attachments contain confidential information from XIAOMI, which is intended only for the person or entity whose address is listed above. Any use of the information contained herein in any way (including, but not limited to, total or partial disclosure, reproduction, or dissemination) by persons other than the intended recipient(s) is prohibited. If you receive this e-mail in error, please notify the sender by phone or email immediately and delete it!******/#