Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot install to system paths #3

Open
MakisH opened this issue Aug 9, 2023 · 2 comments
Open

Cannot install to system paths #3

MakisH opened this issue Aug 9, 2023 · 2 comments
Labels
bug Something isn't working

Comments

@MakisH
Copy link
Member

MakisH commented Aug 9, 2023

With:

    - name: Install preCICE
      uses: precice/setup-precice-action@main
      with:
        precice-version: develop
        install-prefix: /usr

I get the following error (logs):

Install the project...
-- Install configuration: "Release"
-- Installing: /usr/lib/x86_64-linux-gnu/libprecice.so.3.0.0
CMake Error at cmake_install.cmake:72 (file):
  file INSTALL cannot copy file
  "/home/runner/work/openfoam-adapter/openfoam-adapter/precice/build/libprecice.so.3.0.0"
  to "/usr/lib/x86_64-linux-gnu/libprecice.so.3.0.0": Success.


make: *** [Makefile:120: install] Error 1
Error: Process completed with exit code 2.

Same with /usr/local, which is the mentioned as default in the README.md.

I don't know what is the common practice in Actions, but maybe we need a sudo before the make install here, at least in case this is a system path.

@davidscn
Copy link
Member

davidscn commented Sep 3, 2024

I am hitting the same error. Since GitHub deletes the log files after a while, let me put the raw log here

Install the project...
-- Install configuration: "Release"
-- Installing: /usr/local/lib/libprecice.so.3.1.2
-- Installing: /usr/local/lib/libprecice.so.3
-- Set runtime path of "/usr/local/lib/libprecice.so.3.1.2" to ""
-- Installing: /usr/local/lib/libprecice.so
-- Installing: /usr/local/include/precice/Version.h
-- Installing: /usr/local/include/precice/Exceptions.hpp
-- Installing: /usr/local/include/precice/Participant.hpp
-- Installing: /usr/local/include/precice/Tooling.hpp
-- Installing: /usr/local/include/precice/Types.hpp
-- Installing: /usr/local/include/precice/precice.hpp
-- Installing: /usr/local/include/precice/span.hpp
-- Installing: /usr/local/include/precice/export.h
-- Installing: /usr/local/include/precice/preciceC.h
-- Installing: /usr/local/include/precice/preciceFortran.hpp
-- Installing: /usr/local/bin/precice-tools
-- Set runtime path of "/usr/local/bin/precice-tools" to ""
-- Installing: /usr/local/bin/precice-profiling
-- Installing: /usr/local/share/precice/examples
-- Installing: /usr/local/share/precice/examples/solverdummies
-- Installing: /usr/local/share/precice/examples/solverdummies/c
-- Installing: /usr/local/share/precice/examples/solverdummies/c/CMakeLists.txt
-- Installing: /usr/local/share/precice/examples/solverdummies/c/solverdummy.c
-- Installing: /usr/local/share/precice/examples/solverdummies/c/README.md
-- Installing: /usr/local/share/precice/examples/solverdummies/fortran
-- Installing: /usr/local/share/precice/examples/solverdummies/fortran/CMakeLists.txt
-- Installing: /usr/local/share/precice/examples/solverdummies/fortran/solverdummy.f90
-- Installing: /usr/local/share/precice/examples/solverdummies/fortran/README.md
-- Installing: /usr/local/share/precice/examples/solverdummies/precice-config.xml
-- Installing: /usr/local/share/precice/examples/solverdummies/cpp
-- Installing: /usr/local/share/precice/examples/solverdummies/cpp/CMakeLists.txt
-- Installing: /usr/local/share/precice/examples/solverdummies/cpp/solverdummy.cpp
-- Installing: /usr/local/share/precice/examples/solverdummies/cpp/test.cmake
-- Installing: /usr/local/share/precice/examples/solverdummies/cpp/README.md
-- Installing: /usr/local/share/precice/examples/solverdummies/README.md
-- Installing: /usr/local/lib/cmake/precice/preciceTargets.cmake
-- Installing: /usr/local/lib/cmake/precice/preciceTargets-release.cmake
-- Installing: /usr/local/lib/cmake/precice/preciceConfig.cmake
-- Installing: /usr/local/lib/cmake/precice/preciceConfigVersion.cmake
-- Installing: /usr/local/share/man/man1
-- Installing: /usr/local/share/man/man1/precice-tools.1.gz
-- Installing: /usr/local/lib/pkgconfig
-- Installing: /usr/local/lib/pkgconfig/libprecice.pc
-- Installing: /usr/local/share/doc/libprecice3/copyright
-- Installing: /usr/local/share/lintian/overrides/libprecice3
-- Installing: /usr/local/share/doc/libprecice3/changelog.gz
Run echo "PATH=$HOME/precice/bin:$PATH" >> $GITHUB_ENV
Run ls -l $HOME/precice/
ls: cannot access '/github/home/precice/': No such file or directory

where I am using

    - name: build preCICE
      uses: precice/setup-precice-action@main
      with:
        precice-version: develop
        install-prefix: /usr/local

If I use a released version (precice-version: v3.1.2) then it succeeds. If I skip specifying the install prefix, it works as well. The issue as that the action tries to export the installation paths according to the default install-prefix (/github/home/precice/), which doesn't exist if preCICE was not installed there. Thus, the solution would be to check if this is hard-coded and use the user-input here instead.

@MakisH
Copy link
Member Author

MakisH commented Sep 4, 2024

I don't remember more details, but I think it's a good time to try again using this in the OpenFOAM adapter (where the original logs come from).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants