On Fri, Nov 26, 2021 at 10:09:19PM +0100, Christian Weisgerber wrote:
> devel/coccinelle failed to build in my latest amd64 bulk build:
>
> /usr/local/bin/ocamlmklib -linkall -o pyml-current/pyml_stubs pyml-current/pyml_stubs.o pyml-current/libpyml_stubs.a
> ar: error: pyml-current/libpyml_stubs.a: No such file or directory
>
> This suspiciously looks like a problem between ocaml and the new
> llvm-ar.
ar rcs pyml-current/libpyml_stubs.a pyml-current/pyml_stubs.o
/usr/local/bin/ocamlmklib -linkall -o pyml-current/pyml_stubs pyml-current/pyml_stubs.o pyml-current/libpyml_stubs.a
fails, but this works
ar rcs pyml-current/libpyml_stubs.a pyml-current/pyml_stubs.o
mv pyml-current/libpyml_stubs.a /tmp/
/usr/local/bin/ocamlmklib -linkall -o pyml-current/pyml_stubs pyml-current/pyml_stubs.o /tmp/libpyml_stubs.a
backporting part of 'Fix Makefile dependencies'
https://github.com/coccinelle/coccinelle/commit/3f93bfbb207b8e73f5f39afdf1c6f4a96038d2e4
works with llvm-ar here
--- /dev/null Sun Nov 28 23:55:08 2021
+++ patches/patch-bundles_Makefile_bundles Sun Nov 28 23:53:52 2021
@@ -0,0 +1,22 @@
+$OpenBSD$
+
+partial backport of 3f93bfbb207b8e73f5f39afdf1c6f4a96038d2e4
+Fix Makefile dependencies
+
+Index: bundles/Makefile.bundles
+--- bundles/Makefile.bundles.orig
++++ bundles/Makefile.bundles
+@@ -75,13 +75,10 @@ $(SRC_DIR)/$(ARCHIVE).cma: $(patsubst %,$(SRC_DIR)/%.c
+ $(SRC_DIR)/$(ARCHIVE).cmxa: $(patsubst %,$(SRC_DIR)/%.cmx,$(OBJS))
+ $(OCAMLOPT_CMD) -a $^ -o $@
+
+-$(SRC_DIR)/$(LIBRARY).a \
+-$(SRC_DIR)/dll$(LIBRARY)_stubs.so \
+ $(SRC_DIR)/lib$(LIBRARY)_stubs.a: \
+ $(patsubst %,$(SRC_DIR)/%_stubs.o,$(C_OBJS))
+ $(OCAMLMKLIB_CMD) -o $(SRC_DIR)/$(LIBRARY)_stubs $^
+
+-$(SRC_DIR)/$(LIBRARY).a \
+ $(SRC_DIR)/dll$(LIBRARY)_stubs.so: $(SRC_DIR)/lib$(LIBRARY)_stubs.a
+
+ %.ml: %.mll .prepare
No comments:
Post a Comment