You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello,
This question is related to my own question #5110 and another related question #4902 . I have successfully been able to create the amalgamation files botan_all.h and .cpp for different platforms and hardware: x86_64 Linux, Windows and MacOS and arm64 Linux and Mac and I have CMake decide which botan amalgamated files to include based on what it finds when the build happens for my custom app. I am building a static botan library first before linking that to my targets. Here is my configure command for the Linux and Windows (on Linux and/or Mac I am using a combination of Clang 18.1 and GCC 15.2 (Linux only) and Windows it is MSVC++). Everything works, builds and runs. Using Botan 3.10 source. It is a research project and I hope to release it as public repo soon and highlight how Botan has made it super easy to architect the app. Configure commands:
In amalgamated build where my cmake will build the botan static library, do the following configure.py setting matter at all?
--with-debug-info --no-optimizations --debug-mode
I am assuming they may not since I am compiling the botan_all.h and cpp into my own static library. Or will those settings depend on whether I am compiling a Debug version or a Release version and what optimizations I am setting in my Cmake build. If I am wrong, please let me know so that I can regenerate the botan files for release without those settings.
If I do not include "--disable-shared", I get a warning that this is an Amalgamated build request and hence that option should be turned on. Why is that? Why can I not create a shared library that can be dynamically loaded by the app as needed to keep the final binary size small? This is more of a curiosity question.
This is my first foray into crypto and C++ programming, if I have this wrong, please let me know.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
Hello,
This question is related to my own question #5110 and another related question #4902 . I have successfully been able to create the amalgamation files botan_all.h and .cpp for different platforms and hardware: x86_64 Linux, Windows and MacOS and arm64 Linux and Mac and I have CMake decide which botan amalgamated files to include based on what it finds when the build happens for my custom app. I am building a static botan library first before linking that to my targets. Here is my configure command for the Linux and Windows (on Linux and/or Mac I am using a combination of Clang 18.1 and GCC 15.2 (Linux only) and Windows it is MSVC++). Everything works, builds and runs. Using Botan 3.10 source. It is a research project and I hope to release it as public repo soon and highlight how Botan has made it super easy to architect the app. Configure commands:
Linux:
.
/configure.py --with-build-dir=build-minimal-amalg --disable-deprecated-features --with-debug-info --no-optimizations --debug-mode --minimized-build --amalgamation --cpu=x86_64 --cc=clang --cc-bin=/usr/bin/clang++-18 --cxxflags="-stdlib=libc++ -I/usr/lib/llvm-18/include/c++/v1" --ldflags="-stdlib=libc++ -L/usr/lib/llvm-18/lib -Wl,-rpath,/usr/lib/llvm-18/lib -lc++ -lc++abi" --enable-modules=ml_kem,x25519,x448,chacha20poly1305,aes,gcm,sha2_32,sha2_64,blake2,blake2s,system_rng,hex,hkdf --disable-sharedWindows:
python ./configure.py --with-build-dir=build-minimal-amalg --disable-deprecated-features --with-debug-info --no-optimizations --debug-mode --minimized-build --amalgamation --cpu=x86_64 --enable-modules=ml_kem,x25519,x448,chacha20poly1305,aes,gcm,sha2_32,sha2_64,blake2,blake2s,system_rng,hex,hkdf --disable-shared --cc=msvc --cc-bin="C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.44.35207\bin\Hostx64\x64\cl.exe"Two questions:
--with-debug-info --no-optimizations --debug-modeI am assuming they may not since I am compiling the botan_all.h and cpp into my own static library. Or will those settings depend on whether I am compiling a Debug version or a Release version and what optimizations I am setting in my Cmake build. If I am wrong, please let me know so that I can regenerate the botan files for release without those settings.
This is my first foray into crypto and C++ programming, if I have this wrong, please let me know.
Thanks
Nadeem
Beta Was this translation helpful? Give feedback.
All reactions