ocaml / ocaml/dune

How are compiled C++ stubs?

Open
#949 6 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

c-bindings help wanted
Dominant language
OCaml
Stars
1.9k
Forks
500
Avg merge
15h 21m
Merged PRs (30d)
277

Description

I’m trying to build software that use dune as build system and have C++ stubs. And compilation fails. I’ve already reported https://github.com/AltGr/ocaml-mccs/issues/12 and https://github.com/janestreet/re2/issues/21.

My understanding is that there are C++ files which must be compiled by a C++ compiler; and dune asks the OCaml compiler whether it knows about a C compiler and uses the result. Is my understanding correct? Is that supposed to work? Can I manually override this to tell dune about a C++ compiler (e.g., to trust the CXX environment variable)?

Contributor guide

Open the contributing guide

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.

Research direction

Start by investigating Dune's compiler detection and C++ stub handling, then review the related reports at ocaml-mccs/issues/12 and janestreet/re2/issues/21. Determine whether C++ stubs are supported and whether the CXX environment variable can be used as an override; document the supported behavior or define the needed configuration change.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp, ocaml
Domain
build-system
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.