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

Bad file install locations #1771

Open
sambler opened this issue Feb 20, 2024 · 1 comment
Open

Bad file install locations #1771

sambler opened this issue Feb 20, 2024 · 1 comment
Labels
bug Crash or wrong behavior of an existing feature. build / testing / port / CI Affecting the build system, tests, platform support, porting, or continuous integration.

Comments

@sambler
Copy link
Contributor

sambler commented Feb 20, 2024

Problem

The 1.13.6.1 release installs some new files that are not in acceptable locations.

All .cmake files should be installed into one location. Extra support scripts should be installed under share not at the top of the filesystem.

Expected behavior:

A clean install with files in expected locations

Actual behavior:

cmake config files and extra support scripts are installed into two locations.

Versions

  • OSL branch/version: 1.13.6.1

Solution

llvm_macros.cmake should have DESTINATION ${OSL_CONFIG_INSTALL_DIR} to put it with the other cmake files.

The serialize-bc.py script would be better installed somewhere like DESTINATION ${CMAKE_INSTALL_DATADIR}/build-scripts

@GvMariani
Copy link

Confirmed here, with latest 1.13.7.0: llvm_macros.cmake ends up in /usr/cmake and serialize-bc.py in /usr/build-scripts.

The llvm_macros.cmake place you propose is OK AFAICT, but the serialize-bc.py one does not look right: if I'm not reading wrongly, llvm_macroscmake calls serialize-bc.py with the following statement:
`# Serialize the linked bitcode into a CPP file

set ( src_bc_cpp "${CMAKE_CURRENT_BINARY_DIR}/${output_name}.bc.cpp" )

add_custom_command ( OUTPUT ${src_bc_cpp}
    COMMAND ${Python_EXECUTABLE} "${_THIS_MODULE_BASE_DIR}/../build-scripts/serialize-bc.py"
        ${linked_src_bc} ${src_bc_cpp} ${output_name}
    DEPENDS "${_THIS_MODULE_BASE_DIR}/../build-scripts/serialize-bc.py" ${linked_src_bc}
    ${exec_headers} ${PROJECT_PUBLIC_HEADERS}
    WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}" )`

So you cannot put the python file everywhere: the build-scripts should go in a directory above the one where llvm_macros.cmake resides, otherwise the above command won't work...
However this is a weird path for python files, at least in my distro.

@lgritz lgritz added bug Crash or wrong behavior of an existing feature. build / testing / port / CI Affecting the build system, tests, platform support, porting, or continuous integration. labels May 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Crash or wrong behavior of an existing feature. build / testing / port / CI Affecting the build system, tests, platform support, porting, or continuous integration.
Projects
None yet
Development

No branches or pull requests

3 participants