humanoid-path-planner / hpp-doc

Documentation for project Humanoid Path Planner
https://humanoid-path-planner.github.io/hpp-doc
ISC License
30 stars 23 forks source link

Installation not working on OSX #104

Closed ymontmarin closed 4 months ago

ymontmarin commented 4 months ago

When compiling this last package for conda I encoutered an error for the OSX build. See: https://github.com/conda-forge/hpp-doc-feedstock/pull/4 .

With the release 5.1.0, compare to the release 4.15.0, the installation is not working on OSX any more (but still work on Linux).

The error is (extracted from the CI ):

make[2]: Entering directory '$SRC_DIR/build'
[100%] Generating graphDep.dot
$SRC_DIR/scripts/packageDep --quiet --output $SRC_DIR/build/graphDep.dot hpp-fcl hpp-util hpp-statistics pinocchio hpp-pinocchio hpp-core hpp-corbaserver hpp-constraints hpp-manipulation hpp-manipulation-urdf hpp-manipulation-corba gepetto-viewer gepetto-viewer-corba hpp-gepetto-viewer hpp_tutorial
make[2]: /Users/runner/miniforge3/conda-bld/hpp-doc_1721293752921/work/scripts/packageDep: No such file or directory
make[2]: *** [CMakeFiles/generate-html.dir/build.make:76: graphDep.dot] Error 127
make[2]: Leaving directory '$SRC_DIR/build'
make[1]: *** [CMakeFiles/Makefile2:1382: CMakeFiles/generate-html.dir/all] Error 2
make[1]: Leaving directory '$SRC_DIR/build'
make: *** [Makefile:149: all] Error 2

It looks like the file packageDep located in the folder scripts of the repository, is unreadable on OSX.

I already checked that both the Linux and the OSX build use the same source.

When exploring differences between 4.15.0 and 5.1.0 the only thing I spotted related to this file is :

diff --git a/default.nix b/default.nix
new file mode 100644
index 0000000..530794e
--- /dev/null
+++ b/default.nix
@@ -0,0 +1,58 @@
+{
+  lib,
+  stdenv,
+  cmake,
+  doxygen,
+  hpp-practicals,
+  hpp-tutorial,
+  libsForQt5,
+  pkg-config,
+  python3Packages,
+}:
+
+stdenv.mkDerivation {
+  pname = "hpp-doc";
+  version = "5.0.0";
+
+  src = lib.fileset.toSource {
+    root = ./.;
+    fileset = lib.fileset.unions [
+      ./CMakeLists.txt
+      ./doc
+      ./package.xml
+      ./scripts
+    ];
+  };
+
+  prePatch = ''
+    substituteInPlace scripts/auto-install-hpp.sh \
+      --replace-fail /bin/bash ${stdenv.shell}
+    substituteInPlace scripts/install-tar-on-remote \
+      --replace-fail /bin/bash ${stdenv.shell}
+    substituteInPlace scripts/generate-tar-doc \
+      --replace-fail /bin/sh ${stdenv.shell}
+    substituteInPlace scripts/packageDep \
+      --replace-fail /usr/bin/python ${python3Packages.python.interpreter}
+  '';
+
+  strictDeps = true;
+
+  nativeBuildInputs = [
+    cmake
+    doxygen
+    libsForQt5.wrapQtAppsHook
+    pkg-config
+  ];
+  buildInputs = [ libsForQt5.qtbase ];
+  propagatedBuildInputs = [
+    hpp-practicals
+    hpp-tutorial
+  ];
+
+  meta = {
+    description = "Documentation for project Humanoid Path Planner";
+    homepage = "https://github.com/humanoid-path-planner/hpp-doc";
+    license = lib.licenses.bsd2;
+    maintainers = [ lib.maintainers.nim65s ];
+  };
+}

But I could not find any relevant cause.

Do you have an idea of what could cause the OSX build to fail ?

ymontmarin commented 4 months ago

@nim65s do you have any insight on this issue ? Sadly, I do not have any non-arm architecture to test locally.

Thank you

nim65s commented 4 months ago

It is not clear which file is missing.

Can you add a ls -l scripts or something to check the existence of this /Users/runner/miniforge3/conda-bld/hpp-doc_1721293752921/work/scripts/packageDep file ? And a ls -l /usr/bin to check the existence of /usr/bin/python ?

ymontmarin commented 4 months ago

Thank you ! I am going to try with that :)

ymontmarin commented 4 months ago

It works :)