Skip to content

Compile bug: undefined reference to SSL_ctrl when building with -DLLAMA_CURL=OFF #16285

@mudler

Description

@mudler

Git commit

72b24d9

Operating systems

Linux

GGML backends

CPU

Problem description & steps to reproduce

Seems that when disabling -DLLAMA_CURL=OFF, we ask to link against openssl, but this is not added to ldflags

First Bad Commit

#16185

Compile command

cmake .. -DBUILD_SHARED_LIBS=OFF -DLLAMA_CURL=OFF -DCPPHTTPLIB_OPENSSL_SUPPORT=OFF -DGGML_NATIVE=OFF -DGGML_AVX=on -DGGML_AV
X2=off -DGGML_AVX512=off -DGGML_FMA=off -DGGML_F16C=off -DBUILD_SHARED_LIBS=OFF -DLLAMA_CURL=OFF -DCPPHTTPLIB_OPENSSL_SUPPORT=OFF -DGGML_NATIVE=OFF -DBUILD_SHARED_LIBS=OFF -DLL
AMA_CURL=OFF -DCPPHTTPLIB_OPENSSL_SUPPORT=OFF -DGGML_NATIVE=OFF && cmake --build . --config Release -j 3

Relevant log output

in function `httplib::SSLClient::process_socket(httplib::ClientImpl::Socket const&, std::chrono::time_point<std
::chrono::_V2::steady_clock, std::chrono::duration<long, std::ratio<1l, 1000000000l> > >, std::function<bool (httplib::Stream&)>)':
66.22 grpc-server.cpp:(.text._ZN7httplib9SSLClient14process_socketERKNS_10ClientImpl6SocketENSt6chrono10time_pointINS5_3_V212steady_clockENS5_8durationIlSt5ratioILl1ELl10000000
00EEEEEESt8functionIFbRNS_6StreamEEE[_ZN7httplib9SSLClient14process_socketERKNS_10ClientImpl6SocketENSt6chrono10time_pointINS5_3_V212steady_clockENS5_8durationIlSt5ratioILl1ELl1000000000EEEEEESt8functionIFbRNS_6StreamEEE]+0xaa): undefined reference to `SSL_ctrl'                                                                                          66.22 /usr/bin/ld: CMakeFiles/grpc-server.dir/grpc-server.cpp.o: in function `httplib::SSLServer::process_and_close_socket(int)':                                               66.22 grpc-server.cpp:(.text._ZN7httplib9SSLServer24process_and_close_socketEi[_ZN7httplib9SSLServer24process_and_close_socketEi]+0x6b5): undefined reference to `SSL_ctrl'
66.56 collect2: error: ld returned 1 exit status

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions