Re: cmake prefix buildink question
Manuel Bouyer <[email protected]>
| Newsgroups | gmane.os.netbsd.devel.packages |
|---|---|
| Message-ID | <[email protected]> |
On Sun, Feb 01, 2026 at 09:48:51PM +0000, Taylor R Campbell wrote: > > Date: Sun, 1 Feb 2026 22:05:47 +0100 > > From: Manuel Bouyer <[email protected]> > > > > I'm trying to build wip/freecad, and it chokes because cad/occt's cmake file > > includes path to the buildink directory: > > fgrep .buildlink /usr/pkg/lib/cmake/opencascade/OpenCASCADEVisualizationTargets.cmake > > INTERFACE_LINK_LIBRARIES "TKernel;TKMath;X11;fontconfig;/usr/tmp/cad/occt/work/.buildlink/lib/libfreeimage.so;/usr/tmp/cad/occt/work/.buildlink/lib/libfreetype.so" > > INTERFACE_LINK_LIBRARIES "TKBRep;TKMath;TKernel;TKService;TKShHealing;TKTopAlgo;TKG2d;TKG3d;TKGeomBase;TKMesh;TKGeomAlgo;TKHLR;GL;X11;/usr/tmp/cad/occt/work/.buildlink/lib/libfreetype.so" > > > > I guess this is because the installed files uses the same value as the one > > used to build the package. > > The attached patch works around this, but is there a better way to fix this ? > > I think your approach is the usual one. See, e.g., x11/libfm-qt for > a similar example. > > This came up a lot more about a year ago when we started to sanitize > the paths that cmake looks for, just like we've long done for > non-cmake build systems, to detect undeclared dependencies that will > cause trouble later on down the line. Erstwhile discussion of some of > the fallout: > > https://mail-index.netbsd.org/tech-pkg/2024/12/25/msg030256.html > > Not sure if the INTERFACE_LINK_LIBRARIES issue in particular was > discussed publicly, might have only been in private mail. But some > packages already had this workaround, like textproc/libkolabxml from > 2021. Thanks. I updated my patch to match what's done in textproc/libkolabxml. Running a pbulk again, if it pass I will commit. -- Manuel Bouyer <[email protected]> NetBSD: 26 ans d'experience feront toujours la difference --