From 1b90e6069623d15c44fb5137c9c580527142d4f7 Mon Sep 17 00:00:00 2001 From: Marcello Seri Date: Tue, 17 Nov 2020 13:42:06 +0100 Subject: [PATCH 01/22] Ehnance testing adding owl-top and owl-zoo Signed-off-by: Marcello Seri --- .github/workflows/workflow.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/workflow.yml b/.github/workflows/workflow.yml index b8e5368..8699084 100644 --- a/.github/workflows/workflow.yml +++ b/.github/workflows/workflow.yml @@ -60,10 +60,10 @@ jobs: echo pwd git clone https://github.com/xianyi/OpenBLAS.git || true cd OpenBLAS - make CC=x86_64-w64-mingw32-gcc FC=x86_64-w64-mingw32-gfortran TARGET=HASWELL - make CC=x86_64-w64-mingw32-gcc FC=x86_64-w64-mingw32-gfortran TARGET=HASWELL PREFIX=/usr/x86_64-w64-mingw32/sys-root/mingw install + make CC=x86_64-w64-mingw32-gcc FC=x86_64-w64-mingw32-gfortran + make CC=x86_64-w64-mingw32-gcc FC=x86_64-w64-mingw32-gfortran PREFIX=/usr/x86_64-w64-mingw32/sys-root/mingw install - name: Build and test owl run: | - opam depext owl - opam install -t owl + opam depext owl owl-top owl-zoo + opam install -t owl owl-top owl-zoo From 9764417011aad169c303ce0d66fa93803cf3af49 Mon Sep 17 00:00:00 2001 From: Marcello Seri Date: Tue, 17 Nov 2020 13:49:27 +0100 Subject: [PATCH 02/22] Re-adding also the c_library_flags Signed-off-by: Marcello Seri --- eigen/dune | 1 + 1 file changed, 1 insertion(+) diff --git a/eigen/dune b/eigen/dune index f8e1e56..3084ec4 100644 --- a/eigen/dune +++ b/eigen/dune @@ -40,5 +40,6 @@ let () = Printf.ksprintf Jbuild_plugin.V1.send {| (include_dirs ../eigen_cpp/lib) (flags :standard %s) ) + (c_library_flags :standard -lstdc++) ) |} eigen_flags From 4e7c3031c4f9f11f9d8c6c156dcc30ddcfef153d Mon Sep 17 00:00:00 2001 From: Marcello Seri Date: Tue, 17 Nov 2020 14:37:48 +0100 Subject: [PATCH 03/22] Try to fix on mac by using gcc Signed-off-by: Marcello Seri --- .github/workflows/workflow.yml | 24 ++++++++++++++---------- CHANGES | 8 ++++++++ test/dune-project | 2 ++ test/test/byte.ml | 11 +++++++++++ test/test/dune | 11 +++++++++++ test/test/native.ml | 11 +++++++++++ 6 files changed, 57 insertions(+), 10 deletions(-) create mode 100644 CHANGES create mode 100644 test/dune-project create mode 100644 test/test/byte.ml create mode 100644 test/test/dune create mode 100644 test/test/native.ml diff --git a/.github/workflows/workflow.yml b/.github/workflows/workflow.yml index 8699084..63db0d9 100644 --- a/.github/workflows/workflow.yml +++ b/.github/workflows/workflow.yml @@ -45,15 +45,11 @@ jobs: with: ocaml-version: ${{ matrix.ocaml-version }} - - name: Install dependencies - run: | - opam pin add eigen.dev . -n - opam depext eigen - opam install eigen --deps-only - - - name: Build project - run: opam exec -- dune build -p eigen - + - name: Use GCC on osx + if: ${{ matrix.os == 'macos-latest' }} + env: + CC: gcc + - name: Install openblas on windows if: ${{ runner.os == 'Windows' }} run: | @@ -63,7 +59,15 @@ jobs: make CC=x86_64-w64-mingw32-gcc FC=x86_64-w64-mingw32-gfortran make CC=x86_64-w64-mingw32-gcc FC=x86_64-w64-mingw32-gfortran PREFIX=/usr/x86_64-w64-mingw32/sys-root/mingw install + - name: Install dependencies + run: | + opam pin add eigen.dev . -n + opam depext eigen owl owl-top owl-zoo + opam install eigen --deps-only + + - name: Build project + run: opam exec -- dune build -p eigen + - name: Build and test owl run: | - opam depext owl owl-top owl-zoo opam install -t owl owl-top owl-zoo diff --git a/CHANGES b/CHANGES new file mode 100644 index 0000000..b68a659 --- /dev/null +++ b/CHANGES @@ -0,0 +1,8 @@ +# 0.4.0 (12-11-2020) + +* Fix bug in linking cmxs files ([#27](https://github.com/owlbarn/eigen/issues/27) @nojb @nilsbecker @dbuenzli) + +# 0.3.0 (22-10-2020) + +* Release 0.3.0, windows compatibility (thanks to @kkirstein) + diff --git a/test/dune-project b/test/dune-project new file mode 100644 index 0000000..239abb7 --- /dev/null +++ b/test/dune-project @@ -0,0 +1,2 @@ +(lang dune 2.7) +(name test) diff --git a/test/test/byte.ml b/test/test/byte.ml new file mode 100644 index 0000000..d9d3224 --- /dev/null +++ b/test/test/byte.ml @@ -0,0 +1,11 @@ +open Owl + +let x = Mat.uniform 3 4 +let y = Mat.uniform 4 5 + +let z1 = Mat.dot x y +let z2 = Arr.contract2 [|(1,0)|] x y + +let () = + let open Owl.Dense.Ndarray.Generic in + Format.printf "%a %a" pp_dsnda z1 pp_dsnda z2 \ No newline at end of file diff --git a/test/test/dune b/test/test/dune new file mode 100644 index 0000000..7c17584 --- /dev/null +++ b/test/test/dune @@ -0,0 +1,11 @@ +(test + (name native) + (modules native) + (libraries owl) + (modes native)) + +(test + (name byte) + (modules byte) + (libraries owl) + (modes byte)) diff --git a/test/test/native.ml b/test/test/native.ml new file mode 100644 index 0000000..d9d3224 --- /dev/null +++ b/test/test/native.ml @@ -0,0 +1,11 @@ +open Owl + +let x = Mat.uniform 3 4 +let y = Mat.uniform 4 5 + +let z1 = Mat.dot x y +let z2 = Arr.contract2 [|(1,0)|] x y + +let () = + let open Owl.Dense.Ndarray.Generic in + Format.printf "%a %a" pp_dsnda z1 pp_dsnda z2 \ No newline at end of file From 784f1159cb181e5958731ff1a47f9899843ade7a Mon Sep 17 00:00:00 2001 From: Marcello Seri Date: Wed, 18 Nov 2020 10:45:42 +0100 Subject: [PATCH 04/22] fixup! Try to fix on mac by using gcc --- test/dune-project | 2 -- test/test/byte.ml | 11 ----------- test/test/dune | 11 ----------- test/test/native.ml | 11 ----------- 4 files changed, 35 deletions(-) delete mode 100644 test/dune-project delete mode 100644 test/test/byte.ml delete mode 100644 test/test/dune delete mode 100644 test/test/native.ml diff --git a/test/dune-project b/test/dune-project deleted file mode 100644 index 239abb7..0000000 --- a/test/dune-project +++ /dev/null @@ -1,2 +0,0 @@ -(lang dune 2.7) -(name test) diff --git a/test/test/byte.ml b/test/test/byte.ml deleted file mode 100644 index d9d3224..0000000 --- a/test/test/byte.ml +++ /dev/null @@ -1,11 +0,0 @@ -open Owl - -let x = Mat.uniform 3 4 -let y = Mat.uniform 4 5 - -let z1 = Mat.dot x y -let z2 = Arr.contract2 [|(1,0)|] x y - -let () = - let open Owl.Dense.Ndarray.Generic in - Format.printf "%a %a" pp_dsnda z1 pp_dsnda z2 \ No newline at end of file diff --git a/test/test/dune b/test/test/dune deleted file mode 100644 index 7c17584..0000000 --- a/test/test/dune +++ /dev/null @@ -1,11 +0,0 @@ -(test - (name native) - (modules native) - (libraries owl) - (modes native)) - -(test - (name byte) - (modules byte) - (libraries owl) - (modes byte)) diff --git a/test/test/native.ml b/test/test/native.ml deleted file mode 100644 index d9d3224..0000000 --- a/test/test/native.ml +++ /dev/null @@ -1,11 +0,0 @@ -open Owl - -let x = Mat.uniform 3 4 -let y = Mat.uniform 4 5 - -let z1 = Mat.dot x y -let z2 = Arr.contract2 [|(1,0)|] x y - -let () = - let open Owl.Dense.Ndarray.Generic in - Format.printf "%a %a" pp_dsnda z1 pp_dsnda z2 \ No newline at end of file From fadcde7efa9c987fd42c4ab7fbc3bd8807706b4e Mon Sep 17 00:00:00 2001 From: Marcello Seri Date: Wed, 18 Nov 2020 10:55:38 +0100 Subject: [PATCH 05/22] GCC makes no difference Signed-off-by: Marcello Seri --- .github/workflows/workflow.yml | 5 ----- 1 file changed, 5 deletions(-) diff --git a/.github/workflows/workflow.yml b/.github/workflows/workflow.yml index 63db0d9..273c4bc 100644 --- a/.github/workflows/workflow.yml +++ b/.github/workflows/workflow.yml @@ -44,11 +44,6 @@ jobs: uses: avsm/setup-ocaml@v1 with: ocaml-version: ${{ matrix.ocaml-version }} - - - name: Use GCC on osx - if: ${{ matrix.os == 'macos-latest' }} - env: - CC: gcc - name: Install openblas on windows if: ${{ runner.os == 'Windows' }} From 8f170a419274375c2aec5cd9b703ef336ff2c6b8 Mon Sep 17 00:00:00 2001 From: Marcello Seri Date: Wed, 18 Nov 2020 10:57:52 +0100 Subject: [PATCH 06/22] Go back to c_library_flags Signed-off-by: Marcello Seri --- eigen_cpp/dune | 1 - 1 file changed, 1 deletion(-) diff --git a/eigen_cpp/dune b/eigen_cpp/dune index b6ddf56..6ac18a1 100644 --- a/eigen_cpp/dune +++ b/eigen_cpp/dune @@ -28,7 +28,6 @@ let () = Printf.ksprintf Jbuild_plugin.V1.send {| -pedantic -O3 -std=c++11 - -lstdc++ %s %s ) From f6101c66da366bbf721de5ca58d25c5ec6352439 Mon Sep 17 00:00:00 2001 From: Marcello Seri Date: Thu, 21 Jan 2021 21:02:57 +0100 Subject: [PATCH 07/22] Use changes from the new dune 2.8 Signed-off-by: Marcello Seri --- dune-project | 3 ++- eigen.opam | 2 +- eigen/dune | 1 - 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/dune-project b/dune-project index 305ab76..c88bce8 100644 --- a/dune-project +++ b/dune-project @@ -1,2 +1,3 @@ -(lang dune 2.0) +(lang dune 2.8) (name eigen) +(use_standard_c_and_cxx_flags true) diff --git a/eigen.opam b/eigen.opam index 4bb534a..1364b37 100644 --- a/eigen.opam +++ b/eigen.opam @@ -12,7 +12,7 @@ build: [ depends: [ "ocaml" {>= "4.02"} "ctypes" {>= "0.14.0"} - "dune" {>= "2.0.0"} + "dune" {>= "2.8.0"} ] synopsis: "Owl's OCaml interface to Eigen3 C++ library" description: diff --git a/eigen/dune b/eigen/dune index 3084ec4..f8e1e56 100644 --- a/eigen/dune +++ b/eigen/dune @@ -40,6 +40,5 @@ let () = Printf.ksprintf Jbuild_plugin.V1.send {| (include_dirs ../eigen_cpp/lib) (flags :standard %s) ) - (c_library_flags :standard -lstdc++) ) |} eigen_flags From ebf3a25df4a392b6f708a7ea373d3e9f3e9c8516 Mon Sep 17 00:00:00 2001 From: Marcello Seri Date: Thu, 21 Jan 2021 22:08:28 +0100 Subject: [PATCH 08/22] Test Signed-off-by: Marcello Seri --- eigen/dune | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eigen/dune b/eigen/dune index f8e1e56..b99fbe8 100644 --- a/eigen/dune +++ b/eigen/dune @@ -35,7 +35,7 @@ let () = Printf.ksprintf Jbuild_plugin.V1.send {| (modules :standard ffi_eigen_generated) (foreign_archives ../eigen_cpp/eigen_cpp_stubs) (foreign_stubs - (language c) + (language cxx) (names eigen_utils_stubs ffi_eigen_generated_stub) (include_dirs ../eigen_cpp/lib) (flags :standard %s) From d3e1ce5ef3fd7505ec2ec4469960aa2378a7c3d2 Mon Sep 17 00:00:00 2001 From: Marcello Seri Date: Thu, 21 Jan 2021 22:43:24 +0100 Subject: [PATCH 09/22] Update Signed-off-by: Marcello Seri --- dune-project | 1 - 1 file changed, 1 deletion(-) diff --git a/dune-project b/dune-project index c88bce8..dcd0ae2 100644 --- a/dune-project +++ b/dune-project @@ -1,3 +1,2 @@ (lang dune 2.8) (name eigen) -(use_standard_c_and_cxx_flags true) From 17efa25746cb3ce92017d30e67f065040edd53c4 Mon Sep 17 00:00:00 2001 From: Marcello Seri Date: Thu, 21 Jan 2021 22:54:28 +0100 Subject: [PATCH 10/22] test Signed-off-by: Marcello Seri --- .github/workflows/workflow.yml | 2 +- eigen/dune | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/workflow.yml b/.github/workflows/workflow.yml index 273c4bc..0faa6da 100644 --- a/.github/workflows/workflow.yml +++ b/.github/workflows/workflow.yml @@ -41,7 +41,7 @@ jobs: ${{ matrix.os }}-${{ matrix.ocaml-version }}- ${{ matrix.os }}- - name: Use OCaml ${{ matrix.ocaml-version }} - uses: avsm/setup-ocaml@v1 + uses: avsm/setup-ocaml@v2 with: ocaml-version: ${{ matrix.ocaml-version }} diff --git a/eigen/dune b/eigen/dune index b99fbe8..f8e1e56 100644 --- a/eigen/dune +++ b/eigen/dune @@ -35,7 +35,7 @@ let () = Printf.ksprintf Jbuild_plugin.V1.send {| (modules :standard ffi_eigen_generated) (foreign_archives ../eigen_cpp/eigen_cpp_stubs) (foreign_stubs - (language cxx) + (language c) (names eigen_utils_stubs ffi_eigen_generated_stub) (include_dirs ../eigen_cpp/lib) (flags :standard %s) From 7aa832a1f118a80a551957a975900272c8f79ed9 Mon Sep 17 00:00:00 2001 From: Marcello Seri Date: Fri, 22 Jan 2021 13:10:20 +0100 Subject: [PATCH 11/22] Try to make it all c++ Signed-off-by: Marcello Seri --- eigen/dune | 2 +- eigen/{eigen_utils_stubs.c => eigen_utils_stubs.cpp} | 0 2 files changed, 1 insertion(+), 1 deletion(-) rename eigen/{eigen_utils_stubs.c => eigen_utils_stubs.cpp} (100%) diff --git a/eigen/dune b/eigen/dune index f8e1e56..b99fbe8 100644 --- a/eigen/dune +++ b/eigen/dune @@ -35,7 +35,7 @@ let () = Printf.ksprintf Jbuild_plugin.V1.send {| (modules :standard ffi_eigen_generated) (foreign_archives ../eigen_cpp/eigen_cpp_stubs) (foreign_stubs - (language c) + (language cxx) (names eigen_utils_stubs ffi_eigen_generated_stub) (include_dirs ../eigen_cpp/lib) (flags :standard %s) diff --git a/eigen/eigen_utils_stubs.c b/eigen/eigen_utils_stubs.cpp similarity index 100% rename from eigen/eigen_utils_stubs.c rename to eigen/eigen_utils_stubs.cpp From 83dcdf03bb911a34d493ffb7b0a501f785296f36 Mon Sep 17 00:00:00 2001 From: Marcello Seri Date: Fri, 22 Jan 2021 13:13:35 +0100 Subject: [PATCH 12/22] Fix error slipped in Signed-off-by: Marcello Seri --- .github/workflows/workflow.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/workflow.yml b/.github/workflows/workflow.yml index 0faa6da..273c4bc 100644 --- a/.github/workflows/workflow.yml +++ b/.github/workflows/workflow.yml @@ -41,7 +41,7 @@ jobs: ${{ matrix.os }}-${{ matrix.ocaml-version }}- ${{ matrix.os }}- - name: Use OCaml ${{ matrix.ocaml-version }} - uses: avsm/setup-ocaml@v2 + uses: avsm/setup-ocaml@v1 with: ocaml-version: ${{ matrix.ocaml-version }} From dbdf7c1b70505579241590b4866d38bdbe287b4c Mon Sep 17 00:00:00 2001 From: Marcello Seri Date: Fri, 22 Jan 2021 13:24:51 +0100 Subject: [PATCH 13/22] Update Signed-off-by: Marcello Seri --- eigen/dune | 2 +- eigen/{eigen_utils_stubs.cpp => eigen_utils_stubs.c} | 0 2 files changed, 1 insertion(+), 1 deletion(-) rename eigen/{eigen_utils_stubs.cpp => eigen_utils_stubs.c} (100%) diff --git a/eigen/dune b/eigen/dune index b99fbe8..f8e1e56 100644 --- a/eigen/dune +++ b/eigen/dune @@ -35,7 +35,7 @@ let () = Printf.ksprintf Jbuild_plugin.V1.send {| (modules :standard ffi_eigen_generated) (foreign_archives ../eigen_cpp/eigen_cpp_stubs) (foreign_stubs - (language cxx) + (language c) (names eigen_utils_stubs ffi_eigen_generated_stub) (include_dirs ../eigen_cpp/lib) (flags :standard %s) diff --git a/eigen/eigen_utils_stubs.cpp b/eigen/eigen_utils_stubs.c similarity index 100% rename from eigen/eigen_utils_stubs.cpp rename to eigen/eigen_utils_stubs.c From 8379d6e112471ab1d6491ea99d4146058d7f84e9 Mon Sep 17 00:00:00 2001 From: Marcello Seri Date: Sat, 10 Apr 2021 13:21:17 +0200 Subject: [PATCH 14/22] Update Signed-off-by: Marcello Seri --- dune-project | 1 + eigen_cpp/dune | 3 +-- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dune-project b/dune-project index dcd0ae2..494ab9b 100644 --- a/dune-project +++ b/dune-project @@ -1,2 +1,3 @@ (lang dune 2.8) (name eigen) +(use_standard_c_and_cxx_flags true) \ No newline at end of file diff --git a/eigen_cpp/dune b/eigen_cpp/dune index 6ac18a1..057040c 100644 --- a/eigen_cpp/dune +++ b/eigen_cpp/dune @@ -2,8 +2,7 @@ let optflags = match Sys.getenv "EIGENCPP_OPTFLAGS" with - | s -> - s + | s -> s | exception Not_found -> "-Ofast -march=native -funroll-loops -ffast-math" From 5978e228e1f051dd3ca2c49040fa30c2ddf255ed Mon Sep 17 00:00:00 2001 From: Marcello Seri Date: Sat, 10 Apr 2021 13:23:15 +0200 Subject: [PATCH 15/22] Improve GH actions order Signed-off-by: Marcello Seri --- .github/workflows/workflow.yml | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/.github/workflows/workflow.yml b/.github/workflows/workflow.yml index 273c4bc..6c0c740 100644 --- a/.github/workflows/workflow.yml +++ b/.github/workflows/workflow.yml @@ -44,25 +44,26 @@ jobs: uses: avsm/setup-ocaml@v1 with: ocaml-version: ${{ matrix.ocaml-version }} - - - name: Install openblas on windows - if: ${{ runner.os == 'Windows' }} - run: | - echo pwd - git clone https://github.com/xianyi/OpenBLAS.git || true - cd OpenBLAS - make CC=x86_64-w64-mingw32-gcc FC=x86_64-w64-mingw32-gfortran - make CC=x86_64-w64-mingw32-gcc FC=x86_64-w64-mingw32-gfortran PREFIX=/usr/x86_64-w64-mingw32/sys-root/mingw install - name: Install dependencies run: | opam pin add eigen.dev . -n - opam depext eigen owl owl-top owl-zoo + opam depext eigen opam install eigen --deps-only - name: Build project run: opam exec -- dune build -p eigen + - name: Install openblas on windows (for testing owl) + if: ${{ runner.os == 'Windows' }} + run: | + echo pwd + git clone https://github.com/xianyi/OpenBLAS.git || true + cd OpenBLAS + make CC=x86_64-w64-mingw32-gcc FC=x86_64-w64-mingw32-gfortran + make CC=x86_64-w64-mingw32-gcc FC=x86_64-w64-mingw32-gfortran PREFIX=/usr/x86_64-w64-mingw32/sys-root/mingw install + - name: Build and test owl run: | + opam depext owl owl-top owl-zoo opam install -t owl owl-top owl-zoo From 5da90bab19edc6fdd908771330becf61d1d06475 Mon Sep 17 00:00:00 2001 From: Marcello Seri Date: Fri, 16 Jul 2021 09:50:52 +0200 Subject: [PATCH 16/22] Update Signed-off-by: Marcello Seri --- eigen/dune | 2 +- eigen_cpp/dune | 2 +- eigen_cpp/eigen_cpp.ml | 1 - 3 files changed, 2 insertions(+), 3 deletions(-) delete mode 100644 eigen_cpp/eigen_cpp.ml diff --git a/eigen/dune b/eigen/dune index f8e1e56..6ddc65f 100644 --- a/eigen/dune +++ b/eigen/dune @@ -33,7 +33,7 @@ let () = Printf.ksprintf Jbuild_plugin.V1.send {| (public_name eigen) (libraries ctypes) (modules :standard ffi_eigen_generated) - (foreign_archives ../eigen_cpp/eigen_cpp_stubs) + (foreign_archives ../eigen_cpp/eigen_cpp) (foreign_stubs (language c) (names eigen_utils_stubs ffi_eigen_generated_stub) diff --git a/eigen_cpp/dune b/eigen_cpp/dune index 057040c..c1395fc 100644 --- a/eigen_cpp/dune +++ b/eigen_cpp/dune @@ -16,7 +16,7 @@ let () = Printf.ksprintf Jbuild_plugin.V1.send {| (include_subdirs unqualified) (foreign_library - (archive_name eigen_cpp_stubs) + (archive_name eigen_cpp) (language cxx) (names eigen_tensor eigen_dsmat eigen_spmat) (include_dirs lib lib/unsupported) diff --git a/eigen_cpp/eigen_cpp.ml b/eigen_cpp/eigen_cpp.ml deleted file mode 100644 index 3c3a727..0000000 --- a/eigen_cpp/eigen_cpp.ml +++ /dev/null @@ -1 +0,0 @@ -let linkme = () From 3704b186cd33870da8a6818d19fbb35f126a0ddc Mon Sep 17 00:00:00 2001 From: Marcello Seri Date: Fri, 16 Jul 2021 10:18:41 +0200 Subject: [PATCH 17/22] Explict dependence on the eigen_cpp compilation artifacts Signed-off-by: Marcello Seri --- eigen/dune | 1 + 1 file changed, 1 insertion(+) diff --git a/eigen/dune b/eigen/dune index 6ddc65f..8142695 100644 --- a/eigen/dune +++ b/eigen/dune @@ -38,6 +38,7 @@ let () = Printf.ksprintf Jbuild_plugin.V1.send {| (language c) (names eigen_utils_stubs ffi_eigen_generated_stub) (include_dirs ../eigen_cpp/lib) + (extra_deps ../eigen_cpp/libeigen_cpp.a ../eigen_cpp/dlleigen_cpp.so) (flags :standard %s) ) ) From a4f033aaef2ded2e4a0abbb2129358cae87fafda Mon Sep 17 00:00:00 2001 From: Marcello Seri Date: Fri, 16 Jul 2021 12:10:18 +0200 Subject: [PATCH 18/22] try to enforce linking' Signed-off-by: Marcello Seri --- eigen/dune | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eigen/dune b/eigen/dune index 8142695..4aadcec 100644 --- a/eigen/dune +++ b/eigen/dune @@ -39,7 +39,7 @@ let () = Printf.ksprintf Jbuild_plugin.V1.send {| (names eigen_utils_stubs ffi_eigen_generated_stub) (include_dirs ../eigen_cpp/lib) (extra_deps ../eigen_cpp/libeigen_cpp.a ../eigen_cpp/dlleigen_cpp.so) - (flags :standard %s) + (flags :standard -l eigen_cpp %s) ) ) |} eigen_flags From ca13b846b37b97cb5b3baf86be830f0fbf1d12ea Mon Sep 17 00:00:00 2001 From: Marcello Seri Date: Fri, 16 Jul 2021 12:29:56 +0200 Subject: [PATCH 19/22] Force linking also against stdc++ Signed-off-by: Marcello Seri --- eigen/dune | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eigen/dune b/eigen/dune index 4aadcec..900e4d3 100644 --- a/eigen/dune +++ b/eigen/dune @@ -39,7 +39,7 @@ let () = Printf.ksprintf Jbuild_plugin.V1.send {| (names eigen_utils_stubs ffi_eigen_generated_stub) (include_dirs ../eigen_cpp/lib) (extra_deps ../eigen_cpp/libeigen_cpp.a ../eigen_cpp/dlleigen_cpp.so) - (flags :standard -l eigen_cpp %s) + (flags :standard -lstdc++ -leigen_cpp %s) ) ) |} eigen_flags From dddd85d51506233c55bcf8c44e19fc5218a927c5 Mon Sep 17 00:00:00 2001 From: Marcello Seri Date: Fri, 16 Jul 2021 12:47:07 +0200 Subject: [PATCH 20/22] Remove extra deps Signed-off-by: Marcello Seri --- eigen/dune | 1 - 1 file changed, 1 deletion(-) diff --git a/eigen/dune b/eigen/dune index 900e4d3..f3d1cd4 100644 --- a/eigen/dune +++ b/eigen/dune @@ -38,7 +38,6 @@ let () = Printf.ksprintf Jbuild_plugin.V1.send {| (language c) (names eigen_utils_stubs ffi_eigen_generated_stub) (include_dirs ../eigen_cpp/lib) - (extra_deps ../eigen_cpp/libeigen_cpp.a ../eigen_cpp/dlleigen_cpp.so) (flags :standard -lstdc++ -leigen_cpp %s) ) ) From 1f4b6e98428a40d043ed59fb26421d013f26d190 Mon Sep 17 00:00:00 2001 From: Marcello Seri Date: Fri, 16 Jul 2021 13:01:07 +0200 Subject: [PATCH 21/22] Add one more linking Signed-off-by: Marcello Seri --- eigen_cpp/dune | 1 + 1 file changed, 1 insertion(+) diff --git a/eigen_cpp/dune b/eigen_cpp/dune index c1395fc..fc9b5eb 100644 --- a/eigen_cpp/dune +++ b/eigen_cpp/dune @@ -27,6 +27,7 @@ let () = Printf.ksprintf Jbuild_plugin.V1.send {| -pedantic -O3 -std=c++11 + -lstdc++ %s %s ) From ee42df60acb4e08a0ae32d69cb87a3871c3ee2f9 Mon Sep 17 00:00:00 2001 From: Marcello Seri Date: Fri, 16 Jul 2021 13:10:47 +0200 Subject: [PATCH 22/22] try to solve the relocation issue Signed-off-by: Marcello Seri --- eigen_cpp/dune | 1 + 1 file changed, 1 insertion(+) diff --git a/eigen_cpp/dune b/eigen_cpp/dune index fc9b5eb..620c877 100644 --- a/eigen_cpp/dune +++ b/eigen_cpp/dune @@ -28,6 +28,7 @@ let () = Printf.ksprintf Jbuild_plugin.V1.send {| -O3 -std=c++11 -lstdc++ + -fno-threadsafe-statics %s %s )