Replies: 4 comments
-
To make it work in your example, you can add the following stanza to
(this is equivalent to adding a file You will also need to remove the I agree the workaround is not very satisfying and that a bit more flexibility would be useful in this case. |
Beta Was this translation helpful? Give feedback.
-
Thanks for the tip @nojb ! It worked! It would still be great to have a more convenient way of specifying "I want all dirs included for my foreign build", as opposed to explicitly listing out any |
Beta Was this translation helpful? Give feedback.
-
Note that you can use globs in the |
Beta Was this translation helpful? Give feedback.
-
@grievejia I'm considering this question as resolved by nojb's advice. Feel free to create more issues or re-open this one if you have any more questions. |
Beta Was this translation helpful? Give feedback.
-
Expected Behavior
I'm trying to build a 3rd-party C library as part of my project using foreign build sandboxing.
I closely followed the instructions in the doc, but found out that my build failed because it cannot find files under any subdirectories whose name starts with
_
. Looking into the_build
directory, I can confirm that files under those directories were just non-existent in the first place.I understand the need to ignore those dirs when building OCaml sources. But dropping them for foreign libraries do not make too much sense for me.
Is there a good way to work around this problem at the moment? Ideally I would like to avoid making any changes to any pathnames of the 3rd-party library itself.
Actual Behavior
I expect all source files, regardless of their path names, get copied into the
_build
directoryReproduction
Here's a small repro:
In my real setup, the actions would be more complicated (e.g.
cd vendor && ./configure && make foo && cp libfoo.a ../libfoo.a
). But this small example should be sufficient to demonstrate the crux of the problem here.Specifications
dune
(output ofdune --version
): 2.9.0ocaml
(output ofocamlc --version
): 4.12.0Additional information
dune
with the--verbose
flag): https://gist.github.com/grievejia/bec0c7c4fdd0546793aca817659d320fBeta Was this translation helpful? Give feedback.
All reactions