I'm building cst-3.3.0 using Ubuntu 22.04 with gcc 11.3.0. The resulting binary cst (which on previous versions was around 2.4MiB large) is now some Kb large:
-rwxrwxr-x 1 user user 234896 Jan 27 13:57 ./code/obj.linux64/cst
-rwxrwxr-x 1 user user 127008 Jan 27 13:57 ./release/linux64/bin/cst
When I try to use it to sign/encrypt, I get a segfault:
Install SRK
Install CSFK
Segmentation fault (core dumped)
Can you properly build cst with similar environment?
Thanks
Héctor
解決済! 解決策の投稿を見る。
Ubuntu 18.04 works fine. The problem is Ubuntu 22.04.
Apparently there is an issue with binutils (version >= 2.37) objcopy --weaken that is used by cst-tool Makefile. I could fix it with a patch to code/cst/code/build/make/rules.mk. See https://github.com/digi-embedded/meta-digi/commit/fbc92e45b3d19ca0313f80245a1d5574eb69ff3a
Regards
Wow this solution was a life saver. I was just trying to build cst 3.3.1 from source using the all of the NXP defaults along with openssl 1.1.1q on Ubuntu 22.04.2 using gcc 11.3.0. The build looks totally clean until run-time when calls are made to openssl when it SEGVs.
Beware this is a nasty bug that corrupts the dynamic linkage of the cst code to openssl's interfaces (it was BIO_s_file() in my case). All of this mess just so a dev could overload err_msg().
Hello,
Please try to use CST (3.3.0) with OpenSSL 1.0.2. and ubuntu 18.04
https://community.nxp.com/message/1316736
Regards
Ubuntu 18.04 works fine. The problem is Ubuntu 22.04.
Apparently there is an issue with binutils (version >= 2.37) objcopy --weaken that is used by cst-tool Makefile. I could fix it with a patch to code/cst/code/build/make/rules.mk. See https://github.com/digi-embedded/meta-digi/commit/fbc92e45b3d19ca0313f80245a1d5574eb69ff3a
Regards