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

cmake: make check-pc-files hook also check .cmake files #247474

Open
wants to merge 15 commits into
base: staging
Choose a base branch
from

Conversation

chayleaf
Copy link
Contributor

@chayleaf chayleaf commented Aug 6, 2023

Description of changes

#245527 PR author ran into the issue (#144170) where many programs expect CMAKE_INSTALL_LIBDIR & co. to be a relative path, but NixOS sets it to an absolute path. Fedora used to do the same until 2012, but ran into the same issue so it doesn't do that anymore.

Leaving aside whether this should be reconsidered like Fedora did, the #245527 PR author saw the warning about //nix being in a .pc file, so they fixed the code to use CMAKE_INSTALL_FULL_LIBDIR. This got rid of the warning, but the .cmake files still contained //nix. This PR adds a warning for }//nix in .cmake files as well (maybe //nix check would make more sense since it's comparatively less likely that it would be }//nix in .cmake files).

Things done

  • Built on platform(s)
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • For non-Linux: Is sandbox = true set in nix.conf? (See Nix manual)
  • Tested, as applicable:
  • Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
  • Tested basic functionality of all binary files (usually in ./result/bin/)
  • 23.11 Release Notes (or backporting 23.05 Release notes)
    • (Package updates) Added a release notes entry if the change is major or breaking
    • (Module updates) Added a release notes entry if the change is significant
    • (Module addition) Added a release notes entry if adding a new NixOS module
  • Fits CONTRIBUTING.md.

@chayleaf chayleaf force-pushed the cmake-files-prefix-check branch from 2e7ca17 to 8b1cdbc Compare August 7, 2023 21:34
@ofborg ofborg bot requested a review from AndersonTorres August 7, 2023 22:52
Copy link
Member

@AndersonTorres AndersonTorres left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ping me 48h to merge.

@Artturin
Copy link
Member

broken paths in my store
rg -g '*.cmake' '}//nix' /nix/store 2>/dev/null

/nix/store/s26sdagqww1v1sibzsl01r0k461z6iq1-liblapack-3.11/lib/cmake/lapacke-3.11.0/lapacke-config.cmake
8:set(LAPACK_DIR "${_LAPACKE_PREFIX}//nix/store/s26sdagqww1v1sibzsl01r0k461z6iq1-liblapack-3.11/lib/cmake/lapack-3.11.0")


/nix/store/s26sdagqww1v1sibzsl01r0k461z6iq1-liblapack-3.11/lib/cmake/cblas-3.11.0/cblas-config.cmake
8:set(LAPACK_DIR "${_CBLAS_PREFIX}//nix/store/s26sdagqww1v1sibzsl01r0k461z6iq1-liblapack-3.11/lib/cmake/lapack-3.11.0")


/nix/store/ywzg1iaih3i6mlwlpikk49hnnsw9q0iy-rocm-comgr-5.4.4/lib/cmake/amd_comgr/amd_comgr-config.cmake
11:include("${AMD_COMGR_PREFIX}//nix/store/ywzg1iaih3i6mlwlpikk49hnnsw9q0iy-rocm-comgr-5.4.4/lib/cmake/amd_comgr/amd_comgr-targets.cmake")


/nix/store/mvzsvx0g7rwv8in2wvj50h3i1niq6hx5-llvm-11.1.0-dev/lib/cmake/llvm/LLVMConfig.cmake
240:set(LLVM_INCLUDE_DIRS "${LLVM_INSTALL_PREFIX}//nix/store/mvzsvx0g7rwv8in2wvj50h3i1niq6hx5-llvm-11.1.0-dev/include")
241:set(LLVM_LIBRARY_DIRS "${LLVM_INSTALL_PREFIX}//nix/store/b2rdsgmfippafvr9g1w8szj3rp54d0hh-llvm-11.1.0-lib/lib${LLVM_LIBDIR_SUFFIX}")
249:set(LLVM_INCLUDE_DIR "${LLVM_INSTALL_PREFIX}//nix/store/mvzsvx0g7rwv8in2wvj50h3i1niq6hx5-llvm-11.1.0-dev/include")
250:set(LLVM_MAIN_INCLUDE_DIR "${LLVM_INSTALL_PREFIX}//nix/store/mvzsvx0g7rwv8in2wvj50h3i1niq6hx5-llvm-11.1.0-dev/include")
251:set(LLVM_LIBRARY_DIR "${LLVM_INSTALL_PREFIX}//nix/store/b2rdsgmfippafvr9g1w8szj3rp54d0hh-llvm-11.1.0-lib/lib${LLVM_LIBDIR_SUFFIX}")
254:set(LLVM_CMAKE_DIR "${LLVM_INSTALL_PREFIX}//nix/store/mvzsvx0g7rwv8in2wvj50h3i1niq6hx5-llvm-11.1.0-dev/lib/cmake/llvm/")
256:set(LLVM_TOOLS_BINARY_DIR "${LLVM_INSTALL_PREFIX}//nix/store/0jwwzzk21216r8n5zgyqfxjvijrvq90z-llvm-11.1.0/bin")
258:set(LLVM_DEFAULT_EXTERNAL_LIT "${LLVM_INSTALL_PREFIX}//nix/store/0jwwzzk21216r8n5zgyqfxjvijrvq90z-llvm-11.1.0/bin/llvm-lit")
/nix/store/ivy87wayxz5akyvw7cqxwm3fs9qgnfii-llvm-12.0.1-dev/lib/cmake/llvm/LLVMConfig.cmake


253:set(LLVM_INCLUDE_DIRS "${LLVM_INSTALL_PREFIX}//nix/store/ivy87wayxz5akyvw7cqxwm3fs9qgnfii-llvm-12.0.1-dev/include")
254:set(LLVM_LIBRARY_DIRS "${LLVM_INSTALL_PREFIX}//nix/store/k9z2yx0bs8l6py9j7yvih2x5h005n7xj-llvm-12.0.1-lib/lib${LLVM_LIBDIR_SUFFIX}")
262:set(LLVM_INCLUDE_DIR "${LLVM_INSTALL_PREFIX}//nix/store/ivy87wayxz5akyvw7cqxwm3fs9qgnfii-llvm-12.0.1-dev/include")
263:set(LLVM_MAIN_INCLUDE_DIR "${LLVM_INSTALL_PREFIX}//nix/store/ivy87wayxz5akyvw7cqxwm3fs9qgnfii-llvm-12.0.1-dev/include")
264:set(LLVM_LIBRARY_DIR "${LLVM_INSTALL_PREFIX}//nix/store/k9z2yx0bs8l6py9j7yvih2x5h005n7xj-llvm-12.0.1-lib/lib${LLVM_LIBDIR_SUFFIX}")
267:set(LLVM_CMAKE_DIR "${LLVM_INSTALL_PREFIX}//nix/store/ivy87wayxz5akyvw7cqxwm3fs9qgnfii-llvm-12.0.1-dev/lib/cmake/llvm/")
269:set(LLVM_TOOLS_BINARY_DIR "${LLVM_INSTALL_PREFIX}//nix/store/235l9ns0b3912graghp49bww06zlb9fp-llvm-12.0.1/bin")
275:set(LLVM_DEFAULT_EXTERNAL_LIT "${LLVM_INSTALL_PREFIX}//nix/store/235l9ns0b3912graghp49bww06zlb9fp-llvm-12.0.1/bin/llvm-lit")

Gonna generate a bigger list #172150 (comment)

@Artturin
Copy link
Member

Artturin commented Aug 11, 2023

list of files with issues

/nix/store/5afks5dl2khfjg23h5pk9pgsr9briqdh-xcfun-2.1.1/share/cmake/XCFun/XCFunConfig.cmake
/nix/store/ywzg1iaih3i6mlwlpikk49hnnsw9q0iy-rocm-comgr-5.4.4/lib/cmake/amd_comgr/amd_comgr-config.cmake
/nix/store/gp76ik4wvam5i25vs3kqi1fn35hh78mv-organicmaps-2023.06.04-13/lib/cmake/GTest/GTestTargets.cmake
/nix/store/b0xb3amv5ld874a2vr6yh54a6hk3w191-osqp-0.6.3/lib/cmake/osqp/osqp-targets.cmake
/nix/store/b0xb3amv5ld874a2vr6yh54a6hk3w191-osqp-0.6.3/lib/cmake/qdldl/qdldl-targets.cmake
/nix/store/17gr22vh552zwn58in83d26rjikaarbf-pcmsolver-1.3.0/share/cmake/PCMSolver/PCMSolverConfig.cmake
/nix/store/yjas7bkpg9cyiir904z4jrqcqdx6mxpq-proj-7.2.1-dev/lib/cmake/proj4/proj4-config.cmake
/nix/store/yjas7bkpg9cyiir904z4jrqcqdx6mxpq-proj-7.2.1-dev/lib/cmake/proj/proj-config.cmake
/nix/store/4lfvzg66519pjh2h4bkmajaj59z6677b-mongocxx-3.8.0/lib/cmake/libmongocxx-3.8.0/libmongocxx-config.cmake
/nix/store/4lfvzg66519pjh2h4bkmajaj59z6677b-mongocxx-3.8.0/lib/cmake/libbsoncxx-3.8.0/libbsoncxx-config.cmake
/nix/store/vprc2wdclcdn87awf9gn3gjpb51mj8c5-nanomsg-1.1.5/lib/cmake/nanomsg-1.1.5/nanomsg-config.cmake
/nix/store/jdf28lsv6v8cmz6p92hn0wsxxj9nim61-oatpp-1.3.0/lib/cmake/oatpp-1.3.0/oatppConfig.cmake
/nix/store/yfl662rc9hpb2n2is5qaj82671drq19n-opensubdiv-3.5.0-dev/lib/cmake/OpenSubdiv/OpenSubdivConfig.cmake
/nix/store/zv3ri1npz45w2f8msgys35q4v9z0msm4-llvm-12.0.1-dev/lib/cmake/llvm/LLVMConfig.cmake
/nix/store/dxdcq36g7ynx652fn8f9s9bm3i7isflw-llvm-11.1.0-dev/lib/cmake/llvm/LLVMConfig.cmake
/nix/store/l2qfy1jxa1mjdc65hy0vavcw3wmjj4qv-llvm-5.0.2-dev/lib/cmake/llvm/LLVMConfig.cmake
/nix/store/26fn0cgc93sjyri1myj8hzs34fz1cknh-llvm-10.0.1-dev/lib/cmake/llvm/LLVMConfig.cmake
/nix/store/p4nkx3wkklhb4kznp61w55s5653ag0v9-llvm-13.0.1-dev/lib/cmake/llvm/LLVMConfig.cmake
/nix/store/l9rs70r49cwis3bw4g6bb8jj3l516kd9-llvm-5.0.2-dev/lib/cmake/llvm/LLVMConfig.cmake
/nix/store/wijvkmbpbq97m7svinm6a2z8sjbh4z3a-llvm-6.0.1-dev/lib/cmake/llvm/LLVMConfig.cmake
/nix/store/1r5v35yknzyri35abyc5366fi2fnzqc6-llvm-9.0.1-dev/lib/cmake/llvm/LLVMConfig.cmake
/nix/store/j5ssy7vc977hiq4jn4mhqvq49nwjz480-llvm-7.1.0-dev/lib/cmake/llvm/LLVMConfig.cmake
/nix/store/84r20pgn14mzjrrq189if01mnzdvgwy9-llvm-8.0.1-dev/lib/cmake/llvm/LLVMConfig.cmake
/nix/store/iklcpvfzvdvy1v61c8cjyb58jwvhf4s7-llvm-7.1.0-dev/lib/cmake/llvm/LLVMConfig.cmake
/nix/store/bbhz4fqkjjmgx8kw8mhj4s2azpra21ln-llvm-8.0.1-dev/lib/cmake/llvm/LLVMConfig.cmake
/nix/store/n2mxn48s7mh0sgbhzr6nf18disqms3nr-llvm-9.0.1-dev/lib/cmake/llvm/LLVMConfig.cmake
/nix/store/pi2ym3ra02b788k6zbjbhvg005qhzbrz-llvm-6.0.1-dev/lib/cmake/llvm/LLVMConfig.cmake
/nix/store/j61q41l798p2m40n5jy6lb2fnlpd0jmy-liblapack-3.11/lib/cmake/lapacke-3.11.0/lapacke-config.cmake
/nix/store/j61q41l798p2m40n5jy6lb2fnlpd0jmy-liblapack-3.11/lib/cmake/cblas-3.11.0/cblas-config.cmake
/nix/store/mxrzlq0l2rm74qfdilzdkp0qp68wjf12-itk-5.3.0/lib/cmake/ITK-5.3/Modules/SimpleITKFilters.cmake
/nix/store/mxrzlq0l2rm74qfdilzdkp0qp68wjf12-itk-5.3.0/lib/cmake/ITK-5.3/Modules/ITKWatersheds.cmake
/nix/store/mxrzlq0l2rm74qfdilzdkp0qp68wjf12-itk-5.3.0/lib/cmake/ITK-5.3/Modules/ITKVoronoi.cmake
/nix/store/mxrzlq0l2rm74qfdilzdkp0qp68wjf12-itk-5.3.0/lib/cmake/ITK-5.3/Modules/ITKVideoFiltering.cmake
/nix/store/mxrzlq0l2rm74qfdilzdkp0qp68wjf12-itk-5.3.0/lib/cmake/ITK-5.3/Modules/ITKVideoIO.cmake
/nix/store/mxrzlq0l2rm74qfdilzdkp0qp68wjf12-itk-5.3.0/lib/cmake/ITK-5.3/Modules/ITKZLIB.cmake
/nix/store/mxrzlq0l2rm74qfdilzdkp0qp68wjf12-itk-5.3.0/lib/cmake/ITK-5.3/Modules/ITKVtkGlue.cmake
/nix/store/mxrzlq0l2rm74qfdilzdkp0qp68wjf12-itk-5.3.0/lib/cmake/ITK-5.3/Modules/ITKVideoCore.cmake
/nix/store/mxrzlq0l2rm74qfdilzdkp0qp68wjf12-itk-5.3.0/lib/cmake/ITK-5.3/Modules/ITKTransformFactory.cmake
/nix/store/mxrzlq0l2rm74qfdilzdkp0qp68wjf12-itk-5.3.0/lib/cmake/ITK-5.3/Modules/ITKVTK.cmake
/nix/store/mxrzlq0l2rm74qfdilzdkp0qp68wjf12-itk-5.3.0/lib/cmake/ITK-5.3/Modules/ITKVNLInstantiation.cmake
/nix/store/mxrzlq0l2rm74qfdilzdkp0qp68wjf12-itk-5.3.0/lib/cmake/ITK-5.3/Modules/ITKSpatialObjects.cmake
/nix/store/mxrzlq0l2rm74qfdilzdkp0qp68wjf12-itk-5.3.0/lib/cmake/ITK-5.3/Modules/ITKTransform.cmake
/nix/store/mxrzlq0l2rm74qfdilzdkp0qp68wjf12-itk-5.3.0/lib/cmake/ITK-5.3/Modules/ITKThresholding.cmake
/nix/store/mxrzlq0l2rm74qfdilzdkp0qp68wjf12-itk-5.3.0/lib/cmake/ITK-5.3/Modules/ITKTestKernel.cmake
/nix/store/mxrzlq0l2rm74qfdilzdkp0qp68wjf12-itk-5.3.0/lib/cmake/ITK-5.3/Modules/ITKVNL.cmake
/nix/store/mxrzlq0l2rm74qfdilzdkp0qp68wjf12-itk-5.3.0/lib/cmake/ITK-5.3/Modules/ITKSignedDistanceFunction.cmake
/nix/store/mxrzlq0l2rm74qfdilzdkp0qp68wjf12-itk-5.3.0/lib/cmake/ITK-5.3/Modules/ITKSuperPixel.cmake
/nix/store/mxrzlq0l2rm74qfdilzdkp0qp68wjf12-itk-5.3.0/lib/cmake/ITK-5.3/Modules/ITKTIFF.cmake
/nix/store/mxrzlq0l2rm74qfdilzdkp0qp68wjf12-itk-5.3.0/lib/cmake/ITK-5.3/Modules/ITKStatistics.cmake
/nix/store/mxrzlq0l2rm74qfdilzdkp0qp68wjf12-itk-5.3.0/lib/cmake/ITK-5.3/Modules/ITKSpatialFunction.cmake
/nix/store/mxrzlq0l2rm74qfdilzdkp0qp68wjf12-itk-5.3.0/lib/cmake/ITK-5.3/Modules/ITKSmoothing.cmake
/nix/store/mxrzlq0l2rm74qfdilzdkp0qp68wjf12-itk-5.3.0/lib/cmake/ITK-5.3/Modules/ITKRegistrationCommon.cmake
/nix/store/mxrzlq0l2rm74qfdilzdkp0qp68wjf12-itk-5.3.0/lib/cmake/ITK-5.3/Modules/ITKReview.cmake
/nix/store/mxrzlq0l2rm74qfdilzdkp0qp68wjf12-itk-5.3.0/lib/cmake/ITK-5.3/Modules/ITKRegistrationMethodsv4.cmake
/nix/store/mxrzlq0l2rm74qfdilzdkp0qp68wjf12-itk-5.3.0/lib/cmake/ITK-5.3/Modules/ITKQuadEdgeMesh.cmake
/nix/store/mxrzlq0l2rm74qfdilzdkp0qp68wjf12-itk-5.3.0/lib/cmake/ITK-5.3/Modules/ITKRegionGrowing.cmake
/nix/store/mxrzlq0l2rm74qfdilzdkp0qp68wjf12-itk-5.3.0/lib/cmake/ITK-5.3/Modules/ITKPolynomials.cmake
/nix/store/mxrzlq0l2rm74qfdilzdkp0qp68wjf12-itk-5.3.0/lib/cmake/ITK-5.3/Modules/ITKPath.cmake
/nix/store/mxrzlq0l2rm74qfdilzdkp0qp68wjf12-itk-5.3.0/lib/cmake/ITK-5.3/Modules/ITKPDEDeformableRegistration.cmake
/nix/store/mxrzlq0l2rm74qfdilzdkp0qp68wjf12-itk-5.3.0/lib/cmake/ITK-5.3/Modules/ITKQuadEdgeMeshFiltering.cmake
/nix/store/mxrzlq0l2rm74qfdilzdkp0qp68wjf12-itk-5.3.0/lib/cmake/ITK-5.3/Modules/ITKPNG.cmake
/nix/store/mxrzlq0l2rm74qfdilzdkp0qp68wjf12-itk-5.3.0/lib/cmake/ITK-5.3/Modules/ITKOpenJPEG.cmake
/nix/store/mxrzlq0l2rm74qfdilzdkp0qp68wjf12-itk-5.3.0/lib/cmake/ITK-5.3/Modules/ITKNrrdIO.cmake
/nix/store/mxrzlq0l2rm74qfdilzdkp0qp68wjf12-itk-5.3.0/lib/cmake/ITK-5.3/Modules/ITKNarrowBand.cmake
/nix/store/mxrzlq0l2rm74qfdilzdkp0qp68wjf12-itk-5.3.0/lib/cmake/ITK-5.3/Modules/ITKOptimizers.cmake
/nix/store/mxrzlq0l2rm74qfdilzdkp0qp68wjf12-itk-5.3.0/lib/cmake/ITK-5.3/Modules/ITKNetlib.cmake
/nix/store/mxrzlq0l2rm74qfdilzdkp0qp68wjf12-itk-5.3.0/lib/cmake/ITK-5.3/Modules/ITKNIFTI.cmake
/nix/store/mxrzlq0l2rm74qfdilzdkp0qp68wjf12-itk-5.3.0/lib/cmake/ITK-5.3/Modules/ITKMetaIO.cmake
/nix/store/mxrzlq0l2rm74qfdilzdkp0qp68wjf12-itk-5.3.0/lib/cmake/ITK-5.3/Modules/ITKMesh.cmake
/nix/store/mxrzlq0l2rm74qfdilzdkp0qp68wjf12-itk-5.3.0/lib/cmake/ITK-5.3/Modules/ITKOptimizersv4.cmake
/nix/store/mxrzlq0l2rm74qfdilzdkp0qp68wjf12-itk-5.3.0/lib/cmake/ITK-5.3/Modules/ITKMetricsv4.cmake
/nix/store/mxrzlq0l2rm74qfdilzdkp0qp68wjf12-itk-5.3.0/lib/cmake/ITK-5.3/Modules/ITKMarkovRandomFieldsClassifiers.cmake
/nix/store/mxrzlq0l2rm74qfdilzdkp0qp68wjf12-itk-5.3.0/lib/cmake/ITK-5.3/Modules/ITKKWSys.cmake
/nix/store/mxrzlq0l2rm74qfdilzdkp0qp68wjf12-itk-5.3.0/lib/cmake/ITK-5.3/Modules/ITKMathematicalMorphology.cmake
/nix/store/mxrzlq0l2rm74qfdilzdkp0qp68wjf12-itk-5.3.0/lib/cmake/ITK-5.3/Modules/ITKLabelMap.cmake
/nix/store/mxrzlq0l2rm74qfdilzdkp0qp68wjf12-itk-5.3.0/lib/cmake/ITK-5.3/Modules/ITKLabelVoting.cmake
/nix/store/mxrzlq0l2rm74qfdilzdkp0qp68wjf12-itk-5.3.0/lib/cmake/ITK-5.3/Modules/ITKMINC.cmake
/nix/store/mxrzlq0l2rm74qfdilzdkp0qp68wjf12-itk-5.3.0/lib/cmake/ITK-5.3/Modules/ITKLIBLBFGS.cmake
/nix/store/mxrzlq0l2rm74qfdilzdkp0qp68wjf12-itk-5.3.0/lib/cmake/ITK-5.3/Modules/ITKLevelSets.cmake
/nix/store/mxrzlq0l2rm74qfdilzdkp0qp68wjf12-itk-5.3.0/lib/cmake/ITK-5.3/Modules/ITKKLMRegionGrowing.cmake
/nix/store/mxrzlq0l2rm74qfdilzdkp0qp68wjf12-itk-5.3.0/lib/cmake/ITK-5.3/Modules/ITKJPEG.cmake
/nix/store/mxrzlq0l2rm74qfdilzdkp0qp68wjf12-itk-5.3.0/lib/cmake/ITK-5.3/Modules/ITKLevelSetsv4.cmake
/nix/store/mxrzlq0l2rm74qfdilzdkp0qp68wjf12-itk-5.3.0/lib/cmake/ITK-5.3/Modules/ITKImageStatistics.cmake
/nix/store/mxrzlq0l2rm74qfdilzdkp0qp68wjf12-itk-5.3.0/lib/cmake/ITK-5.3/Modules/ITKImageNoise.cmake
/nix/store/mxrzlq0l2rm74qfdilzdkp0qp68wjf12-itk-5.3.0/lib/cmake/ITK-5.3/Modules/ITKImageSources.cmake
/nix/store/mxrzlq0l2rm74qfdilzdkp0qp68wjf12-itk-5.3.0/lib/cmake/ITK-5.3/Modules/ITKImageLabel.cmake
/nix/store/mxrzlq0l2rm74qfdilzdkp0qp68wjf12-itk-5.3.0/lib/cmake/ITK-5.3/Modules/ITKImageFusion.cmake
/nix/store/mxrzlq0l2rm74qfdilzdkp0qp68wjf12-itk-5.3.0/lib/cmake/ITK-5.3/Modules/ITKImageIntensity.cmake
/nix/store/mxrzlq0l2rm74qfdilzdkp0qp68wjf12-itk-5.3.0/lib/cmake/ITK-5.3/Modules/ITKImageGrid.cmake
/nix/store/mxrzlq0l2rm74qfdilzdkp0qp68wjf12-itk-5.3.0/lib/cmake/ITK-5.3/Modules/ITKIntegratedTest.cmake
/nix/store/mxrzlq0l2rm74qfdilzdkp0qp68wjf12-itk-5.3.0/lib/cmake/ITK-5.3/Modules/ITKImageGradient.cmake
/nix/store/mxrzlq0l2rm74qfdilzdkp0qp68wjf12-itk-5.3.0/lib/cmake/ITK-5.3/Modules/ITKImageFunction.cmake
/nix/store/mxrzlq0l2rm74qfdilzdkp0qp68wjf12-itk-5.3.0/lib/cmake/ITK-5.3/Modules/ITKImageFeature.cmake
/nix/store/mxrzlq0l2rm74qfdilzdkp0qp68wjf12-itk-5.3.0/lib/cmake/ITK-5.3/Modules/ITKImageFrequency.cmake
/nix/store/mxrzlq0l2rm74qfdilzdkp0qp68wjf12-itk-5.3.0/lib/cmake/ITK-5.3/Modules/ITKImageCompose.cmake
/nix/store/mxrzlq0l2rm74qfdilzdkp0qp68wjf12-itk-5.3.0/lib/cmake/ITK-5.3/Modules/ITKIOXML.cmake
/nix/store/mxrzlq0l2rm74qfdilzdkp0qp68wjf12-itk-5.3.0/lib/cmake/ITK-5.3/Modules/ITKIOVTK.cmake
/nix/store/mxrzlq0l2rm74qfdilzdkp0qp68wjf12-itk-5.3.0/lib/cmake/ITK-5.3/Modules/ITKIOTransformMatlab.cmake
/nix/store/mxrzlq0l2rm74qfdilzdkp0qp68wjf12-itk-5.3.0/lib/cmake/ITK-5.3/Modules/ITKImageAdaptors.cmake
/nix/store/mxrzlq0l2rm74qfdilzdkp0qp68wjf12-itk-5.3.0/lib/cmake/ITK-5.3/Modules/ITKImageFilterBase.cmake
/nix/store/mxrzlq0l2rm74qfdilzdkp0qp68wjf12-itk-5.3.0/lib/cmake/ITK-5.3/Modules/ITKIOTransformMINC.cmake
/nix/store/mxrzlq0l2rm74qfdilzdkp0qp68wjf12-itk-5.3.0/lib/cmake/ITK-5.3/Modules/ITKImageCompare.cmake
/nix/store/mxrzlq0l2rm74qfdilzdkp0qp68wjf12-itk-5.3.0/lib/cmake/ITK-5.3/Modules/ITKIOTransformHDF5.cmake
/nix/store/mxrzlq0l2rm74qfdilzdkp0qp68wjf12-itk-5.3.0/lib/cmake/ITK-5.3/Modules/ITKIOTransformInsightLegacy.cmake
/nix/store/mxrzlq0l2rm74qfdilzdkp0qp68wjf12-itk-5.3.0/lib/cmake/ITK-5.3/Modules/ITKIOTransformBase.cmake
/nix/store/mxrzlq0l2rm74qfdilzdkp0qp68wjf12-itk-5.3.0/lib/cmake/ITK-5.3/Modules/ITKIOStimulate.cmake
/nix/store/mxrzlq0l2rm74qfdilzdkp0qp68wjf12-itk-5.3.0/lib/cmake/ITK-5.3/Modules/ITKIOSpatialObjects.cmake
/nix/store/mxrzlq0l2rm74qfdilzdkp0qp68wjf12-itk-5.3.0/lib/cmake/ITK-5.3/Modules/ITKIOSiemens.cmake
/nix/store/mxrzlq0l2rm74qfdilzdkp0qp68wjf12-itk-5.3.0/lib/cmake/ITK-5.3/Modules/ITKIOTIFF.cmake
/nix/store/mxrzlq0l2rm74qfdilzdkp0qp68wjf12-itk-5.3.0/lib/cmake/ITK-5.3/Modules/ITKIONRRD.cmake
/nix/store/mxrzlq0l2rm74qfdilzdkp0qp68wjf12-itk-5.3.0/lib/cmake/ITK-5.3/Modules/ITKIOPNG.cmake
/nix/store/mxrzlq0l2rm74qfdilzdkp0qp68wjf12-itk-5.3.0/lib/cmake/ITK-5.3/Modules/ITKIONIFTI.cmake
/nix/store/mxrzlq0l2rm74qfdilzdkp0qp68wjf12-itk-5.3.0/lib/cmake/ITK-5.3/Modules/ITKIOMeshVTK.cmake
/nix/store/mxrzlq0l2rm74qfdilzdkp0qp68wjf12-itk-5.3.0/lib/cmake/ITK-5.3/Modules/ITKIOMeshOFF.cmake
/nix/store/mxrzlq0l2rm74qfdilzdkp0qp68wjf12-itk-5.3.0/lib/cmake/ITK-5.3/Modules/ITKIORAW.cmake
/nix/store/mxrzlq0l2rm74qfdilzdkp0qp68wjf12-itk-5.3.0/lib/cmake/ITK-5.3/Modules/ITKIOMeta.cmake
/nix/store/mxrzlq0l2rm74qfdilzdkp0qp68wjf12-itk-5.3.0/lib/cmake/ITK-5.3/Modules/ITKIOMeshGifti.cmake
/nix/store/mxrzlq0l2rm74qfdilzdkp0qp68wjf12-itk-5.3.0/lib/cmake/ITK-5.3/Modules/ITKIOMeshFreeSurfer.cmake
/nix/store/mxrzlq0l2rm74qfdilzdkp0qp68wjf12-itk-5.3.0/lib/cmake/ITK-5.3/Modules/ITKIOMeshBase.cmake
/nix/store/mxrzlq0l2rm74qfdilzdkp0qp68wjf12-itk-5.3.0/lib/cmake/ITK-5.3/Modules/ITKIOMeshBYU.cmake
/nix/store/mxrzlq0l2rm74qfdilzdkp0qp68wjf12-itk-5.3.0/lib/cmake/ITK-5.3/Modules/ITKIOMeshOBJ.cmake
/nix/store/mxrzlq0l2rm74qfdilzdkp0qp68wjf12-itk-5.3.0/lib/cmake/ITK-5.3/Modules/ITKIOJPEG2000.cmake
/nix/store/mxrzlq0l2rm74qfdilzdkp0qp68wjf12-itk-5.3.0/lib/cmake/ITK-5.3/Modules/ITKIOMesh.cmake
/nix/store/mxrzlq0l2rm74qfdilzdkp0qp68wjf12-itk-5.3.0/lib/cmake/ITK-5.3/Modules/ITKIOJPEG.cmake
/nix/store/mxrzlq0l2rm74qfdilzdkp0qp68wjf12-itk-5.3.0/lib/cmake/ITK-5.3/Modules/ITKIOMRC.cmake
/nix/store/mxrzlq0l2rm74qfdilzdkp0qp68wjf12-itk-5.3.0/lib/cmake/ITK-5.3/Modules/ITKIOLSM.cmake
/nix/store/mxrzlq0l2rm74qfdilzdkp0qp68wjf12-itk-5.3.0/lib/cmake/ITK-5.3/Modules/ITKIOIPL.cmake
/nix/store/mxrzlq0l2rm74qfdilzdkp0qp68wjf12-itk-5.3.0/lib/cmake/ITK-5.3/Modules/ITKIOImageBase.cmake
/nix/store/mxrzlq0l2rm74qfdilzdkp0qp68wjf12-itk-5.3.0/lib/cmake/ITK-5.3/Modules/ITKIOHDF5.cmake
/nix/store/mxrzlq0l2rm74qfdilzdkp0qp68wjf12-itk-5.3.0/lib/cmake/ITK-5.3/Modules/ITKIOGDCM.cmake
/nix/store/mxrzlq0l2rm74qfdilzdkp0qp68wjf12-itk-5.3.0/lib/cmake/ITK-5.3/Modules/ITKIOGIPL.cmake
/nix/store/mxrzlq0l2rm74qfdilzdkp0qp68wjf12-itk-5.3.0/lib/cmake/ITK-5.3/Modules/ITKIOMINC.cmake
/nix/store/mxrzlq0l2rm74qfdilzdkp0qp68wjf12-itk-5.3.0/lib/cmake/ITK-5.3/Modules/ITKIOGE.cmake
/nix/store/mxrzlq0l2rm74qfdilzdkp0qp68wjf12-itk-5.3.0/lib/cmake/ITK-5.3/Modules/ITKIOBruker.cmake
/nix/store/mxrzlq0l2rm74qfdilzdkp0qp68wjf12-itk-5.3.0/lib/cmake/ITK-5.3/Modules/ITKIOCSV.cmake
/nix/store/mxrzlq0l2rm74qfdilzdkp0qp68wjf12-itk-5.3.0/lib/cmake/ITK-5.3/Modules/ITKIOBioRad.cmake
/nix/store/mxrzlq0l2rm74qfdilzdkp0qp68wjf12-itk-5.3.0/lib/cmake/ITK-5.3/Modules/ITKIOBMP.cmake
/nix/store/mxrzlq0l2rm74qfdilzdkp0qp68wjf12-itk-5.3.0/lib/cmake/ITK-5.3/Modules/ITKHDF5.cmake
/nix/store/mxrzlq0l2rm74qfdilzdkp0qp68wjf12-itk-5.3.0/lib/cmake/ITK-5.3/Modules/ITKGPURegistrationCommon.cmake
/nix/store/mxrzlq0l2rm74qfdilzdkp0qp68wjf12-itk-5.3.0/lib/cmake/ITK-5.3/Modules/ITKGoogleTest.cmake
/nix/store/mxrzlq0l2rm74qfdilzdkp0qp68wjf12-itk-5.3.0/lib/cmake/ITK-5.3/Modules/ITKGPUSmoothing.cmake
/nix/store/mxrzlq0l2rm74qfdilzdkp0qp68wjf12-itk-5.3.0/lib/cmake/ITK-5.3/Modules/ITKGPUFiniteDifference.cmake
/nix/store/mxrzlq0l2rm74qfdilzdkp0qp68wjf12-itk-5.3.0/lib/cmake/ITK-5.3/Modules/ITKGPUImageFilterBase.cmake
/nix/store/mxrzlq0l2rm74qfdilzdkp0qp68wjf12-itk-5.3.0/lib/cmake/ITK-5.3/Modules/ITKGPUCommon.cmake
/nix/store/mxrzlq0l2rm74qfdilzdkp0qp68wjf12-itk-5.3.0/lib/cmake/ITK-5.3/Modules/ITKGPUPDEDeformableRegistration.cmake
/nix/store/mxrzlq0l2rm74qfdilzdkp0qp68wjf12-itk-5.3.0/lib/cmake/ITK-5.3/Modules/ITKGPUAnisotropicSmoothing.cmake
/nix/store/mxrzlq0l2rm74qfdilzdkp0qp68wjf12-itk-5.3.0/lib/cmake/ITK-5.3/Modules/ITKGPUThresholding.cmake
/nix/store/mxrzlq0l2rm74qfdilzdkp0qp68wjf12-itk-5.3.0/lib/cmake/ITK-5.3/Modules/ITKGIFTI.cmake
/nix/store/mxrzlq0l2rm74qfdilzdkp0qp68wjf12-itk-5.3.0/lib/cmake/ITK-5.3/Modules/ITKGDCM.cmake
/nix/store/mxrzlq0l2rm74qfdilzdkp0qp68wjf12-itk-5.3.0/lib/cmake/ITK-5.3/Modules/ITKFiniteDifference.cmake
/nix/store/mxrzlq0l2rm74qfdilzdkp0qp68wjf12-itk-5.3.0/lib/cmake/ITK-5.3/Modules/ITKExpat.cmake
/nix/store/mxrzlq0l2rm74qfdilzdkp0qp68wjf12-itk-5.3.0/lib/cmake/ITK-5.3/Modules/ITKFFT.cmake
/nix/store/mxrzlq0l2rm74qfdilzdkp0qp68wjf12-itk-5.3.0/lib/cmake/ITK-5.3/Modules/ITKEigen3.cmake
/nix/store/mxrzlq0l2rm74qfdilzdkp0qp68wjf12-itk-5.3.0/lib/cmake/ITK-5.3/Modules/ITKDoubleConversion.cmake
/nix/store/mxrzlq0l2rm74qfdilzdkp0qp68wjf12-itk-5.3.0/lib/cmake/ITK-5.3/Modules/ITKFastMarching.cmake
/nix/store/mxrzlq0l2rm74qfdilzdkp0qp68wjf12-itk-5.3.0/lib/cmake/ITK-5.3/Modules/ITKDiffusionTensorImage.cmake
/nix/store/mxrzlq0l2rm74qfdilzdkp0qp68wjf12-itk-5.3.0/lib/cmake/ITK-5.3/Modules/ITKDisplacementField.cmake
/nix/store/mxrzlq0l2rm74qfdilzdkp0qp68wjf12-itk-5.3.0/lib/cmake/ITK-5.3/Modules/ITKDenoising.cmake
/nix/store/mxrzlq0l2rm74qfdilzdkp0qp68wjf12-itk-5.3.0/lib/cmake/ITK-5.3/Modules/ITKDICOMParser.cmake
/nix/store/mxrzlq0l2rm74qfdilzdkp0qp68wjf12-itk-5.3.0/lib/cmake/ITK-5.3/Modules/ITKEigen.cmake
/nix/store/mxrzlq0l2rm74qfdilzdkp0qp68wjf12-itk-5.3.0/lib/cmake/ITK-5.3/Modules/ITKDeconvolution.cmake
/nix/store/mxrzlq0l2rm74qfdilzdkp0qp68wjf12-itk-5.3.0/lib/cmake/ITK-5.3/Modules/ITKConnectedComponents.cmake
/nix/store/mxrzlq0l2rm74qfdilzdkp0qp68wjf12-itk-5.3.0/lib/cmake/ITK-5.3/Modules/ITKCurvatureFlow.cmake
/nix/store/mxrzlq0l2rm74qfdilzdkp0qp68wjf12-itk-5.3.0/lib/cmake/ITK-5.3/Modules/ITKDeformableMesh.cmake
/nix/store/mxrzlq0l2rm74qfdilzdkp0qp68wjf12-itk-5.3.0/lib/cmake/ITK-5.3/Modules/ITKConvolution.cmake
/nix/store/mxrzlq0l2rm74qfdilzdkp0qp68wjf12-itk-5.3.0/lib/cmake/ITK-5.3/Modules/ITKDistanceMap.cmake
/nix/store/mxrzlq0l2rm74qfdilzdkp0qp68wjf12-itk-5.3.0/lib/cmake/ITK-5.3/Modules/ITKCommon.cmake
/nix/store/mxrzlq0l2rm74qfdilzdkp0qp68wjf12-itk-5.3.0/lib/cmake/ITK-5.3/Modules/ITKColormap.cmake
/nix/store/mxrzlq0l2rm74qfdilzdkp0qp68wjf12-itk-5.3.0/lib/cmake/ITK-5.3/Modules/ITKBinaryMathematicalMorphology.cmake
/nix/store/mxrzlq0l2rm74qfdilzdkp0qp68wjf12-itk-5.3.0/lib/cmake/ITK-5.3/Modules/ITKAnisotropicSmoothing.cmake
/nix/store/mxrzlq0l2rm74qfdilzdkp0qp68wjf12-itk-5.3.0/lib/cmake/ITK-5.3/Modules/ITKAntiAlias.cmake
/nix/store/mxrzlq0l2rm74qfdilzdkp0qp68wjf12-itk-5.3.0/lib/cmake/ITK-5.3/Modules/ITKClassifiers.cmake
/nix/store/mxrzlq0l2rm74qfdilzdkp0qp68wjf12-itk-5.3.0/lib/cmake/ITK-5.3/Modules/GenericLabelInterpolator.cmake
/nix/store/mxrzlq0l2rm74qfdilzdkp0qp68wjf12-itk-5.3.0/lib/cmake/ITK-5.3/Modules/ITKBiasCorrection.cmake
/nix/store/mxrzlq0l2rm74qfdilzdkp0qp68wjf12-itk-5.3.0/lib/cmake/ITK-5.3/Modules/AdaptiveDenoising.cmake
/nix/store/mxrzlq0l2rm74qfdilzdkp0qp68wjf12-itk-5.3.0/lib/cmake/ITK-5.3/ITKConfig.cmake
/nix/store/0mz1lryg5fcby20mhvb5y0f6v18k9a4h-hal-hardware-analyzer-3.3.0/share/cmake/hal/halConfig.cmake
/nix/store/z9l8yb4b57f6d2x10nspmbcddqzr1kzl-embree-2.17.4/lib/cmake/embree-2.17.4/embree-config.cmake
/nix/store/8v156a3f3lqdk89jhbmk2cngizw61j3x-gammaray-2.11.3/lib/cmake/GammaRay/GammaRayTarget.cmake
/nix/store/1apprm02cbnq485p427cq5hfrk8nldc0-GameNetworkingSockets-1.4.1/lib/cmake/GameNetworkingSockets/GameNetworkingSockets.cmake
/nix/store/n4xvap3cc5j6yq5j1vh10fdbb6kwr82b-coost-3.0.0/lib/cmake/coost/coostTargets.cmake
/nix/store/6ajkg91j2qlkvgrczlsvsdmir8rlzqww-cppe-0.3.1/share/cmake/cppe/cppeConfig.cmake
/nix/store/hjhs7awm569gw1sxj1zpmpmpbjidfzd0-dkh-1.2/share/cmake/dkh/dkhConfig.cmake
/nix/store/c4wrrglq3cih9kkyirvra67x6g1x5l09-bpp-core-2.4.1/lib/cmake/bpp-core/bpp-core-targets.cmake
/nix/store/qnw8zdsszymq3764pgnqz2n6s85c29cg-bpp-seq-2.4.1/lib/cmake/bpp-seq/bpp-seq-targets.cmake
/nix/store/fyfdjiii0nw6hqbdbc5nl0cddvpg1kr0-bpp-popgen-2.4.1/lib/cmake/bpp-popgen/bpp-popgen-targets.cmake
/nix/store/02c8wrvl09vz84sy34b8r52s0f9bbxga-bpp-phyl-2.4.1/lib/cmake/bpp-phyl/bpp-phyl-targets.cmake
/nix/store/xwzl8997mixy3kzdslfmgzp4dx4vx1ah-cgal-4.14.2/lib/cmake/CGAL/CGALConfig.cmake

LLVM's have to be fixed before merge
and preferably all or most of the others

@AndersonTorres AndersonTorres added the 2.status: blocked by pr/issue Another PR or issue is preventing this from being completed label Aug 11, 2023
@chayleaf
Copy link
Contributor Author

chayleaf commented Aug 11, 2023

this will take a while, as each LLVM version needs to be changed separately (in order to create proper fixes that don't just satisfy this hook's check but are more thorough)

edit: just found an issue - LLVM actually builds as-is, so the check doesn't work. I checked it the wrong way, it works fine

@ofborg ofborg bot requested a review from AndersonTorres August 11, 2023 17:24
@chayleaf chayleaf force-pushed the cmake-files-prefix-check branch from f0281f7 to d0f31e2 Compare August 11, 2023 18:13
@AndersonTorres
Copy link
Member

Such llvm patches can be submitted to upstream?

@chayleaf
Copy link
Contributor Author

chayleaf commented Aug 11, 2023

it's already upstreamed, it's only a problem on old LLVM versions (<15, but it's almost completely fixed on 14), see ex. llvm/llvm-project@ac0d1d5

@chayleaf
Copy link
Contributor Author

chayleaf commented Aug 11, 2023

I haven't tested whether all LLVMs build yet, but overall I think I got rid of all instances of "improper prefix usage" (in particular, in LLVM 14 it was being used indirectly to calculate install prefix based on the assumption that LLVM_INSTALL_PACKAGE_DIR is a relative dir). It's fine from LLVM 15 onwards.

When it comes to the other libraries, it's better to upstream it rather than create hacks (and care needs to be taken to avoid CMake build scripts indirectly relying on relative prefixes where NixOS passes absolute ones, like LLVM 14). I'll try to do it, though I don't have that much time so it will take a while.

@chayleaf chayleaf force-pushed the cmake-files-prefix-check branch from 554fe80 to 34ccd34 Compare August 12, 2023 14:03
@chayleaf chayleaf force-pushed the cmake-files-prefix-check branch from 8347393 to 467a7c4 Compare August 13, 2023 18:38
@wegank wegank added the 2.status: merge conflict This PR has merge conflicts with the target branch label Mar 20, 2024
@wegank wegank added the 2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md label Jul 4, 2024
@mrexodia
Copy link

mrexodia commented Aug 8, 2024

@chayleaf

Leaving aside whether this should be reconsidered like Fedora did

Do you have any links to discussions they had from that time? The fix proposed by the hook is to use CMAKE_INSTALL_FULL_LIBDIR, but this appears to conflict with how Meson is doing it (at least according to this post: https://www.bassi.io/articles/2018/03/15/pkg-config-and-paths/). It is also breaking the ability for pkg-config (and <package>Config.cmake files) to be relocatable, so it seems like a confusing solution to me...

@stale stale bot removed the 2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md label Aug 8, 2024
@wegank wegank added the 2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md label Jan 2, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
2.status: blocked by pr/issue Another PR or issue is preventing this from being completed 2.status: merge conflict This PR has merge conflicts with the target branch 2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md 10.rebuild-darwin: 501+ 10.rebuild-darwin: 5001+ 10.rebuild-darwin-stdenv This PR causes stdenv to rebuild 10.rebuild-linux: 501+ 10.rebuild-linux: 5001+
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants