Internal headers (`crypto`, `internal` and `prov`) in `zig-out/include`

Open Beginner friendly
#7 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
64/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Quiet
Tech stack
zig
Domain
build-system

Research direction

Start in build.zig around line 1255, where the issue identifies the OpenSSL header installation. Compare the package's installed include tree with the upstream OpenSSL include tree and check whether consumers require crypto, internal, or prov. Done means confirming the intended exported headers and verifying the resulting zig-out/include layout.

Written by the indexing model from the issue text.

Description

Hi,
I'm new to Zig (2 days now) and I'm working on making https://github.com/kubernetes-client/c/ working with Zig as I'd like to rewrite some of my scripts into Zig as learning projects.

But the library depends on OpenSSL and it imports it in its public header files so when not using system's OpenSSL I do

b.installArtifact(openssl_lib);

so that the library is distributed in a working state when using vendored OpenSSL.

However the OpenSSL library installs some internal include directories, as far as I understand, which I don't think should be installed.

zig-out/include/
├── crypto
├── curl
├── internal
├── kubernetes
├── openssl
└── prov

7 directories, 0 files

The directories have some generic names and as far as my research goes these headers are internal and upstream only exports the openssl directory

/nix/store/dy64cxaygvmjfznysgxk501yds8jij6s-openssl-3.6.1-dev/include
└── openssl

2 directories

So is there a reason why

https://github.com/allyourcodebase/openssl/blob/6b318b447c8ff7529e3a2337a1df2a9b4816fee2/build.zig#L1255

isn't

lib.installHeadersDirectory(b.path("include/openssl"), "openssl", .{});

I'm opening an issue and not a PR as I'm not sure whether I'm missing something. If there are no requirements for those extra directories to be installed I'll gladly open a PR to make that change.

Dominant language
Assembly
Stars
28
Forks
18
PR merge metrics
No merged PRs in 30d

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from allyourcodebase/openssl

All issues in allyourcodebase/openssl

Similar issues

More Build System issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.