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

MacOs installation issue. Libraries should be copied to bin. #417

Closed
jgalan opened this issue May 9, 2023 · 1 comment
Closed

MacOs installation issue. Libraries should be copied to bin. #417

jgalan opened this issue May 9, 2023 · 1 comment
Labels
bug Something isn't working

Comments

@jgalan
Copy link
Member

jgalan commented May 9, 2023

Recently we experienced some issues with make install not copying the restG4 binary and other components required. It seems the following PR #394 solved the problem.

That this is the case was confirmed at the following post at the rest-forum https://rest-forum.unizar.es/t/macos-installation-issue-missing-files-headers-bin/573/5

However, there are still some issues with some libraries (e.g. libRestRestG4.dylib) not being copied, as mentioned by @heucheld who states those libraries need to be copied to the bin directory.

Although I don't understand very much why those libraries should be at the bin directory we could create a condition for MacOs so that those libraries are installed to bin?

Perhaps we should understand better why those libraries need to be copied to bin and if this happens at any MacOs version.

@jgalan
Copy link
Member Author

jgalan commented May 9, 2023

I see that at the main CMakeLists.txt there is an exception for copying the files to the bin directory.

if (CMAKE_SYSTEM_NAME MATCHES "Darwin") # we must call library install here in
    # MacOs
    foreach (lib ${rest_libraries})
        install(
            TARGETS ${lib}
            RUNTIME DESTINATION bin
            LIBRARY DESTINATION bin
            ARCHIVE DESTINATION lib)
    endforeach ()

    foreach (exe ${rest_exes})
        install(
            TARGETS ${exe}
            RUNTIME DESTINATION bin
            LIBRARY DESTINATION bin
            ARCHIVE DESTINATION lib)
    endforeach ()

    # Copy pcm files to bin
    install(
        CODE "
    file(GLOB PCMFiles \"\${CMAKE_CURRENT_SOURCE_DIR}/rootdict/*.pcm\")
    file(COPY \${PCMFiles} DESTINATION \${CMAKE_INSTALL_PREFIX}/bin)
    ")

endif ()

Probably we need to add the exception somewhere else.

@jgalan jgalan added the bug Something isn't working label May 9, 2023
@jgalan jgalan linked a pull request May 9, 2023 that will close this issue
@jgalan jgalan closed this as completed May 19, 2023
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

Successfully merging a pull request may close this issue.

1 participant