Skip to content

[Bug]: openssl fatal error: openssl/opensslconf.h: No such file or directory #3388

Open
@korDen

Description

@korDen

What happened?

Added openssl as the dependency, but including <openssl/bn.h> fails with

external/openssl+/include/openssl/macros.h:14:10: fatal error: openssl/opensslconf.h: No such file or directory
14 | #include <openssl/opensslconf.h>
| ^~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.

Version

Development (host) and target OS/architectures:

Output of bazel --version:
bazel 8.0.0

Version of relevant rules from the WORKSPACE or MODULE.bazel file:
bazel_dep(name = "openssl", version = "3.3.1.bcr.0")

Language(s) and/or frameworks involved:
c++

How to reproduce

MODULE.bazel

bazel_dep(name = "openssl", version = "3.3.1.bcr.0")

test.cpp

#include <openssl/bn.h>

run bazel build test

boringssl works:

cc_library(
	name = "test",
	srcs = ["test.cpp"],
	deps = ["@boringssl//:ssl"],
)

openssl doesn't:

cc_library(
	name = "test",
	srcs = ["test.cpp"],
	deps = ["@openssl//:ssl"],
)

external/openssl+/include/openssl/macros.h:14:10: fatal error: openssl/opensslconf.h: No such file or directory
14 | #include <openssl/opensslconf.h>
| ^~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.

Any other information?

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions