Skip to content

Conversation

@angt
Copy link
Collaborator

@angt angt commented Nov 12, 2025

No description provided.

@ggerganov
Copy link
Member

This does not build on Mac:

cmake -B build-boring -DLLAMA_BUILD_BORINGSSL=ON
cmake --build build-boring -j
[100%] Building CXX object tools/server/CMakeFiles/llama-server.dir/server.cpp.o
In file included from /Users/ggerganov/development/github/llama.cpp/tools/server/server.cpp:2:
In file included from /Users/ggerganov/development/github/llama.cpp/tools/server/utils.hpp:12:
/Users/ggerganov/development/github/llama.cpp/common/../vendor/cpp-httplib/httplib.h:340:10: fatal error: 'openssl/err.h' file not found
  340 | #include <openssl/err.h>
      |          ^~~~~~~~~~~~~~~
1 error generated.
make[2]: *** [tools/server/CMakeFiles/llama-server.dir/server.cpp.o] Error 1
make[1]: *** [tools/server/CMakeFiles/llama-server.dir/all] Error 2

@angt
Copy link
Collaborator Author

angt commented Nov 12, 2025

It worked for me because I tested OpenSSL just before I guess..

Signed-off-by: Adrien Gallouët <angt@huggingface.co>
@angt
Copy link
Collaborator Author

angt commented Nov 12, 2025

Fixed, I thought I could put the library in PRIVATE but the header still exposes all the SSL stuff.

angt added 6 commits November 19, 2025 08:29
Signed-off-by: Adrien Gallouët <angt@huggingface.co>
Signed-off-by: Adrien Gallouët <angt@huggingface.co>
Signed-off-by: Adrien Gallouët <angt@huggingface.co>
Signed-off-by: Adrien Gallouët <angt@huggingface.co>
Signed-off-by: Adrien Gallouët <angt@huggingface.co>
Signed-off-by: Adrien Gallouët <angt@huggingface.co>
@angt angt requested a review from CISC as a code owner November 20, 2025 10:32
@angt
Copy link
Collaborator Author

angt commented Nov 20, 2025

I've added the ci for windows and macos

@ggerganov do you want to update release in the same PR?

Copy link
Collaborator

@CISC CISC left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

On an (un)related note I see we have these:

ctest -L 'main|curl' --verbose --timeout 900

ctest -L 'main|curl' --verbose --timeout 900

But I can't see that we are using the curl test label anywhere?

@ggerganov
Copy link
Member

Is there a way to use OpenSSL for the CI?

A bit worried about making BoringSSL the default since from their site, they don't recommend that:

image

@angt
Copy link
Collaborator Author

angt commented Nov 20, 2025

I've found this:

set(TEST_TARGET test-eval-callback)
if(NOT ${CMAKE_SYSTEM_PROCESSOR} MATCHES "s390x")
add_test(NAME ${TEST_TARGET}
COMMAND llama-eval-callback --hf-repo ggml-org/models --hf-file tinyllamas/stories260K.gguf --model stories260K.gguf --prompt hello --seed 42 -ngl 0)
else()
add_test(NAME ${TEST_TARGET}
COMMAND llama-eval-callback --hf-repo ggml-org/models --hf-file tinyllamas/stories260K-be.gguf --model stories260K-be.gguf --prompt hello --seed 42 -ngl 0)
endif()
set_property(TEST ${TEST_TARGET} PROPERTY LABELS eval-callback curl)

@angt
Copy link
Collaborator Author

angt commented Nov 20, 2025

I've used OpenSSL for linux: #17235

For windows and macos, I really recommend BoringSSL. I know the message from Google is kind of scary, but the OpenSSL API has always been respected (they can't patch the entire world to link against BoringSSL anyway) and it is the best choice in my opinion, for safety and portability.

That's said, I plan to add other libraries in the future, mostly to reduce compilation time by using the native OS stack when available.

@github-actions github-actions bot added the devops improvements to build systems and github actions label Nov 20, 2025
Copy link
Member

@ggerganov ggerganov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see, I missed #17235

I think this change for the CI is OK.

For my understanding, what is the reason for preferring BoringSSL over OpenSSL for Windows and Mac?

@angt
Copy link
Collaborator Author

angt commented Nov 20, 2025

I use OpenSSL on Linux only because it's super easy to have the libssl-dev and link against it, making the build faster when you don’t have to publish the binary. For installama.sh, I always statically link to BoringSSL.

@ggerganov
Copy link
Member

If the only concern is build time, I think that for the releases we'll want to use OpenSSL as it is not that important to reduce the build time there.

@CISC CISC merged commit 28175f8 into ggml-org:master Nov 21, 2025
75 checks passed
@angt
Copy link
Collaborator Author

angt commented Nov 22, 2025

@ggerganov, just thinking, why not keep tinyllamas/stories260K.gguf in the models directory like other tests? Is this legacy or a voluntary way to keep a download test?

@ggerganov
Copy link
Member

The other ggufs in models are vocab-only models for tokenizer tests.

The stories260K.gguf is small enough to keep in models, but it would be an exception since the tests also download other models that we don't want to store in the repo. So I don't think there is a good reason to change it.

Anico2 added a commit to Anico2/llama.cpp that referenced this pull request Jan 15, 2026
* cmake: add option to build and link BoringSSL

Signed-off-by: Adrien Gallouët <angt@huggingface.co>

* cmake : fix typo

Signed-off-by: Adrien Gallouët <angt@huggingface.co>

* cmake : disable boringssl test and asm by default

Signed-off-by: Adrien Gallouët <angt@huggingface.co>

* cmake : skip bssl

Signed-off-by: Adrien Gallouët <angt@huggingface.co>

* cmake : disable fips

Signed-off-by: Adrien Gallouët <angt@huggingface.co>

* cmake : fix cmake --install

Signed-off-by: Adrien Gallouët <angt@huggingface.co>

* ci : use boringssl for windows and mac

Signed-off-by: Adrien Gallouët <angt@huggingface.co>

---------

Signed-off-by: Adrien Gallouët <angt@huggingface.co>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

devops improvements to build systems and github actions

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants