facebook / CacheLib

Pluggable in-process caching engine to build and scale high performance services

Home Page:https://www.cachelib.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

error occurres when building in ubuntu22.04&20.04

hyperjlord opened this issue · comments

A few days ago i still can build CacheLib normally, but today when I built it as what README said, I always met an error which is like:

/usr/bin/ld: lib/libfizz.so.1.0.0: undefined reference to `softaes_block_encrypt'
collect2: error: ld returned 1 exit status
make[2]: *** [CMakeFiles/BogoShim.dir/build.make:125: bin/fizz-bogoshim] Error 1
make[1]: *** [CMakeFiles/Makefile2:141: CMakeFiles/BogoShim.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
/usr/bin/ld: lib/libfizz.so.1.0.0: undefined reference to `softaes_block_encrypt'
collect2: error: ld returned 1 exit status
make[2]: *** [CMakeFiles/FizzTool.dir/build.make:221: bin/fizz] Error 1
make[1]: *** [CMakeFiles/Makefile2:167: CMakeFiles/FizzTool.dir/all] Error 2
make: *** [Makefile:156: all] Error 2
build-package.sh: error: make failed
build.sh: error: failed to build dependency 'fizz'

I met the same error both in Ubuntu 22.04 and Ubuntu 20.04.,and It seems that the building workflow in this repo also failed because of the same reason. Is there any solution?

i see this problem too.
fizz of tag v2023.06.08.00 is ok
it seems that fizz add some features

image
image

A few days ago i still can build CacheLib normally, but today when I built it as what README said, I always met an error which is like:

/usr/bin/ld: lib/libfizz.so.1.0.0: undefined reference to `softaes_block_encrypt'
collect2: error: ld returned 1 exit status
make[2]: *** [CMakeFiles/BogoShim.dir/build.make:125: bin/fizz-bogoshim] Error 1
make[1]: *** [CMakeFiles/Makefile2:141: CMakeFiles/BogoShim.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
/usr/bin/ld: lib/libfizz.so.1.0.0: undefined reference to `softaes_block_encrypt'
collect2: error: ld returned 1 exit status
make[2]: *** [CMakeFiles/FizzTool.dir/build.make:221: bin/fizz] Error 1
make[1]: *** [CMakeFiles/Makefile2:167: CMakeFiles/FizzTool.dir/all] Error 2
make: *** [Makefile:156: all] Error 2
build-package.sh: error: make failed
build.sh: error: failed to build dependency 'fizz'

I met the same error both in Ubuntu 22.04 and Ubuntu 20.04.,and It seems that the building workflow in this repo also failed because of the same reason. Is there any solution?

one way to workaroud it to modify contrib/update-submodules.sh by setting git checkout --force "v2023.06.08.00" in the fbthrift part

@zhyq0520 Thanks for providing the workaround.

FYI, the following fix in fizz had been submitted a day ago, but it could take some time to be propagated to cachelib.

diff --git a/fizz/CMakeLists.txt b/fizz/CMakeLists.txt
index e0ffc90a..e594289f 100644
--- a/fizz/CMakeLists.txt
+++ b/fizz/CMakeLists.txt
@@ -233,6 +233,7 @@ set(FIZZ_SOURCES
   third-party/libsodium-aegis/aegis256/aesni/aead_aegis256_aesni.c
   third-party/libsodium-aegis/aegis256/armcrypto/aead_aegis256_armcrypto.c
   third-party/libsodium-aegis/aegis256/soft/aead_aegis256_soft.c
+  third-party/libsodium-aegis/private/softaes.c
 )

A few days ago i still can build CacheLib normally, but today when I built it as what README said, I always met an error which is like:

/usr/bin/ld: lib/libfizz.so.1.0.0: undefined reference to `softaes_block_encrypt'
collect2: error: ld returned 1 exit status
make[2]: *** [CMakeFiles/BogoShim.dir/build.make:125: bin/fizz-bogoshim] Error 1
make[1]: *** [CMakeFiles/Makefile2:141: CMakeFiles/BogoShim.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
/usr/bin/ld: lib/libfizz.so.1.0.0: undefined reference to `softaes_block_encrypt'
collect2: error: ld returned 1 exit status
make[2]: *** [CMakeFiles/FizzTool.dir/build.make:221: bin/fizz] Error 1
make[1]: *** [CMakeFiles/Makefile2:167: CMakeFiles/FizzTool.dir/all] Error 2
make: *** [Makefile:156: all] Error 2
build-package.sh: error: make failed
build.sh: error: failed to build dependency 'fizz'

I met the same error both in Ubuntu 22.04 and Ubuntu 20.04.,and It seems that the building workflow in this repo also failed because of the same reason. Is there any solution?

one way to workaroud it to modify contrib/update-submodules.sh by setting git checkout --force "v2023.06.08.00" in the fbthrift part

Thank you for your help, It does work for me.

A few days ago i still can build CacheLib normally, but today when I built it as what README said, I always met an error which is like:

/usr/bin/ld: lib/libfizz.so.1.0.0: undefined reference to `softaes_block_encrypt'
collect2: error: ld returned 1 exit status
make[2]: *** [CMakeFiles/BogoShim.dir/build.make:125: bin/fizz-bogoshim] Error 1
make[1]: *** [CMakeFiles/Makefile2:141: CMakeFiles/BogoShim.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
/usr/bin/ld: lib/libfizz.so.1.0.0: undefined reference to `softaes_block_encrypt'
collect2: error: ld returned 1 exit status
make[2]: *** [CMakeFiles/FizzTool.dir/build.make:221: bin/fizz] Error 1
make[1]: *** [CMakeFiles/Makefile2:167: CMakeFiles/FizzTool.dir/all] Error 2
make: *** [Makefile:156: all] Error 2
build-package.sh: error: make failed
build.sh: error: failed to build dependency 'fizz'

I met the same error both in Ubuntu 22.04 and Ubuntu 20.04.,and It seems that the building workflow in this repo also failed because of the same reason. Is there any solution?

one way to workaroud it to modify contrib/update-submodules.sh by setting git checkout --force "v2023.06.08.00" in the fbthrift part

Thank you for your help! This problem seems to have been solved without modifying contrib/update-submodules.sh. executing git clone over again just work.