45 lines
2.0 KiB
Diff
45 lines
2.0 KiB
Diff
From 3e4c1b79a72970c17cb42b21070e61ec634a38bb Mon Sep 17 00:00:00 2001
|
|
From: "Richard W.M. Jones" <rjones@redhat.com>
|
|
Date: Thu, 22 Jun 2023 11:15:27 +0100
|
|
Subject: [PATCH 15/16] tests: Explicitly add -L../plugins/ocaml/.libs to find
|
|
-lnbdkitocaml
|
|
|
|
The actual libnbdkitocaml.so library is located in
|
|
plugins/ocaml/.libs, but we were only specifying plugins/ocaml as the
|
|
search path. How did it ever work? Turns out using LD_LIBRARY_PATH
|
|
set in wrapper.c. It seems unreliable to rely on this, so set the
|
|
path properly, as we are already doing elsewhere.
|
|
---
|
|
tests/test-cc-ocaml.sh | 2 +-
|
|
tests/cc_shebang.ml | 2 +-
|
|
2 files changed, 2 insertions(+), 2 deletions(-)
|
|
|
|
diff --git a/tests/test-cc-ocaml.sh b/tests/test-cc-ocaml.sh
|
|
index db7d252cf..97a1c89e3 100755
|
|
--- a/tests/test-cc-ocaml.sh
|
|
+++ b/tests/test-cc-ocaml.sh
|
|
@@ -56,6 +56,6 @@ cleanup_fn rm -f $out
|
|
rm -f $out
|
|
|
|
nbdkit -v -U - cc $script a=1 b=2 c=3 d=4 \
|
|
- CC="$OCAMLOPT" CFLAGS="-output-obj -runtime-variant _pic -I $abs_top_srcdir/plugins/ocaml -I +unix unix.cmxa -I +threads threads.cmxa NBDKit.cmx -cclib -lnbdkitocaml" \
|
|
+ CC="$OCAMLOPT" CFLAGS="-output-obj -runtime-variant _pic -I $abs_top_srcdir/plugins/ocaml -I +unix unix.cmxa -I +threads threads.cmxa NBDKit.cmx -cclib -L../plugins/ocaml/.libs -cclib -lnbdkitocaml" \
|
|
--run 'nbdinfo --size $uri' > $out
|
|
test "$(cat $out)" -eq $((512 * 2048))
|
|
diff --git a/tests/cc_shebang.ml b/tests/cc_shebang.ml
|
|
index 05ca77b64..57ad85791 100755
|
|
--- a/tests/cc_shebang.ml
|
|
+++ b/tests/cc_shebang.ml
|
|
@@ -4,7 +4,7 @@
|
|
# shell as an impossible command which is ignored. The line below is
|
|
# run by the shell and ignored by OCaml.
|
|
|
|
-exec nbdkit cc "$0" CC=ocamlopt CFLAGS="-output-obj -runtime-variant _pic -I +unix unix.cmxa -I +threads threads.cmxa NBDKit.cmx -cclib -lnbdkitocaml" "$@"
|
|
+exec nbdkit cc "$0" CC=ocamlopt CFLAGS="-output-obj -runtime-variant _pic -I +unix unix.cmxa -I +threads threads.cmxa NBDKit.cmx -cclib -L../plugins/ocaml/.libs -cclib -lnbdkitocaml" "$@"
|
|
*)
|
|
|
|
open Printf
|
|
--
|
|
2.41.0
|
|
|