@starseeker so besides blowing away the entire build dir, how can I A) rebuild all of ext and B) rebuild just one ext ?
yikes, well that didn't work... tried blowing away src/other/ext and re-running cmake (okay) + make (nope). dependency tracking ends up all shot to hell. ... hm, lesse if cd'ing into src/other/ext will do the trick
okay, looks like nuclear option on src/other/ext will work at least on an enable-all build
My sense is that they're not really designing the ExternalProject setup to support that very well - if I remember correctly, I usually deal with a single ext dep by (for example) cd-ing into src/other/ext/NETPBM_BLD-prefix/src/NETPBM_BLD-build and working with that individual build (make + make install) directly
That'll work for me if it works.. the structure of the tree was under there wasn't immediately obvious or recognizable to me
I think the blowing away build/src/other/ext and redoing cmake + make is the only way I've found to redo all of them.
Yes, I've considered trying to define custom dir structures for that so it's a little less obtuse, but it was fairly low down on the original priority list and I never went back to it
I think it might help just to get rid of the _BLD suffix
maybe -prefix too
maybe renaming src to root or base
anyways, I think I'm honing in on my issue.. looks like I'm back to incrTcl finding system Tcl on Mac despite it being an enable-all build??
I'm trying to get set up to text/fix the locale_t issue I introduced
Hmm. I must not have defined everything needed for the IncrTcl enable all build correctly...
top-level cache correctly says BUNDLED on everything
Actually looks like Itcl built successfully, but Itk is the one failing
OK. The src/other/ext/itcl.cmake file's ExternalProject_Add for itcl should be passing in a TCL_ROOT variable that has find_package(TCL) looking in the install directory.
ITCL_BLD-cfgcmd.txt is this:
cmd='/usr/local/Cellar/cmake/3.21.1/bin/cmake;-DCMAKE_INSTALL_PREFIX=/Users/morrison/brlcad.main/.build/extinstall/itcl3.4;$<$<NOT:$<BOOL:>>:-DCMAKE_BUILD_TYPE=>;-DBIN_DIR=bin;-DLIB_DIR=lib;-DSHARED_DIR=;-DINCLUDE_DIR=include;-DCMAKE_SKIP_BUILD_RPATH=FALSE;-DCMAKE_INSTALL_RPATH_USE_LINK_PATH=TRUE;-DCMAKE_INSTALL_RPATH=/Users/morrison/brlcad.main/.build/lib/itcl3.4;-DTCL_ENABLE_TK=ON;-DTCL_ROOT=$<$<BOOL:ON>:/Users/morrison/brlcad.main/.build>;-DTCL_VERSION=8.6;-GUnix Makefiles;<SOURCE_DIR><SOURCE_SUBDIR>'
Which I think looks okay? Looks like it's pulling Tcl and tk from the build dir
TCL_ROOT looks like it is set
Itk is:
cmd='/usr/local/Cellar/cmake/3.21.1/bin/cmake;-DCMAKE_INSTALL_PREFIX=/Users/morrison/brlcad.main/.build/extinstall/itk3;-DBIN_DIR=bin;-DLIB_DIR=lib;-DSHARED_DIR=;-DINCLUDE_DIR=include;-DCMAKE_SKIP_BUILD_RPATH=FALSE;-DCMAKE_INSTALL_RPATH_USE_LINK_PATH=TRUE;-DCMAKE_INSTALL_RPATH=/Users/morrison/brlcad.main/.build/lib/itk3.4;$<$<NOT:$<BOOL:>>:-DCMAKE_BUILD_TYPE=>;-DTCL_ENABLE_TK=ON;-DTCL_ROOT=$<$<BOOL:ON>:/Users/morrison/brlcad.main/.build>;-DITCL_ROOT=$<$<BOOL:ON>:/Users/morrison/brlcad.main/.build>;-DTCL_VERSION=8.6;-GUnix Makefiles;<SOURCE_DIR><SOURCE_SUBDIR>'
And you said itk is the one that's failing?
yeah
Give me a sec...
Here's the cache:
(base) morrison@agua ITK_BLD-build % pwd
/Users/morrison/brlcad.main/.build/src/other/ext/ITK_BLD-prefix/src/ITK_BLD-build
(base) morrison@agua ITK_BLD-build % grep TCL CMakeCache.txt
ITCL_INCLUDE_PATH:PATH=/Users/morrison/brlcad.main/.build/include
ITCL_LIBRARY:FILEPATH=/Users/morrison/brlcad.main/.build/lib/itcl3.4/libitcl3.4.dylib
ITCL_ROOT:UNINITIALIZED=/Users/morrison/brlcad.main/.build
ITCL_STUB_LIBRARY:FILEPATH=/Users/morrison/brlcad.main/.build/lib/itcl3.4/libitclstub.a
TCL_ENABLE_TK:UNINITIALIZED=ON
TCL_INCLUDE_PATH:PATH=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.3.sdk/System/Library/Frameworks/Tcl.framework/Headers
TCL_LIBRARY:FILEPATH=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.3.sdk/System/Library/Frameworks/tcl.framework
TCL_ROOT:UNINITIALIZED=/Users/morrison/brlcad.main/.build
TCL_STUB_LIBRARY:FILEPATH=/Applications/Anaconda3/anaconda3/lib/libtclstub8.6.a
TCL_TCLSH:FILEPATH=/Applications/Anaconda3/anaconda3/bin/tclsh
TCL_VERSION:UNINITIALIZED=8.6
//Details about finding ITCL
FIND_PACKAGE_MESSAGE_DETAILS_ITCL:INTERNAL=[/Users/morrison/brlcad.main/.build/lib/itcl3.4/libitcl3.4.dylib][/Users/morrison/brlcad.main/.build/lib/itcl3.4/libitclstub.a][/Users/morrison/brlcad.main/.build/include][v()]
//Details about finding TCL
FIND_PACKAGE_MESSAGE_DETAILS_TCL:INTERNAL=[/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.3.sdk/System/Library/Frameworks/tcl.framework][/Applications/Anaconda3/anaconda3/lib/libtclstub8.6.a][/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.3.sdk/System/Library/Frameworks/Tcl.framework/Headers][/Applications/Anaconda3/anaconda3/bin/tclsh][v()]
//Details about finding TCLTK
FIND_PACKAGE_MESSAGE_DETAILS_TCLTK:INTERNAL=[/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.3.sdk/System/Library/Frameworks/tcl.framework][/Applications/Anaconda3/anaconda3/lib/libtclstub8.6.a][/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.3.sdk/System/Library/Frameworks/Tcl.framework/Headers][/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.3.sdk/System/Library/Frameworks/tk.framework][/Applications/Anaconda3/anaconda3/lib/libtkstub8.6.a][/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.3.sdk/System/Library/Frameworks/Tk.framework/Headers][v()]
//ADVANCED property for variable: ITCL_INCLUDE_PATH
ITCL_INCLUDE_PATH-ADVANCED:INTERNAL=1
//ADVANCED property for variable: ITCL_LIBRARY
ITCL_LIBRARY-ADVANCED:INTERNAL=1
//ADVANCED property for variable: ITCL_STUB_LIBRARY
ITCL_STUB_LIBRARY-ADVANCED:INTERNAL=1
//ADVANCED property for variable: TCL_INCLUDE_PATH
TCL_INCLUDE_PATH-ADVANCED:INTERNAL=1
//ADVANCED property for variable: TCL_LIBRARY
TCL_LIBRARY-ADVANCED:INTERNAL=1
//ADVANCED property for variable: TCL_STUB_LIBRARY
TCL_STUB_LIBRARY-ADVANCED:INTERNAL=1
//ADVANCED property for variable: TCL_TCLSH
TCL_TCLSH-ADVANCED:INTERNAL=1
AH, so it's got the wrong TCL_INCLUDE_PATH and TCL_LIBRARY
Are those variables correct in the itcl cache?
crazy hodge podge there...yeah, those are wrong, and it somehow found a tclsh in an app (Anaconda)
Ah yeah, they're wrong for Itcl too, but the build happens to work
(base) morrison@agua ITCL_BLD-build % pwd
/Users/morrison/brlcad.main/.build/src/other/ext/ITCL_BLD-prefix/src/ITCL_BLD-build
(base) morrison@agua ITCL_BLD-build % grep TCL CMakeCache.txt
# For build in directory: /Users/morrison/brlcad.main/.build/src/other/ext/ITCL_BLD-prefix/src/ITCL_BLD-build
CMAKE_PROJECT_NAME:STATIC=ITCL
ITCL_BINARY_DIR:STATIC=/Users/morrison/brlcad.main/.build/src/other/ext/ITCL_BLD-prefix/src/ITCL_BLD-build
ITCL_IS_TOP_LEVEL:STATIC=ON
ITCL_SOURCE_DIR:STATIC=/Users/morrison/brlcad.main/src/other/ext/itcl3
TCL_ENABLE_TK:UNINITIALIZED=ON
TCL_INCLUDE_PATH:PATH=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.3.sdk/System/Library/Frameworks/Tcl.framework/Headers
TCL_LIBRARY:FILEPATH=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.3.sdk/System/Library/Frameworks/tcl.framework
TCL_ROOT:UNINITIALIZED=/Users/morrison/brlcad.main/.build
TCL_STUB_LIBRARY:FILEPATH=/Applications/Anaconda3/anaconda3/lib/libtclstub8.6.a
TCL_TCLSH:FILEPATH=/Applications/Anaconda3/anaconda3/bin/tclsh
TCL_VERSION:UNINITIALIZED=8.6
CMAKE_CACHEFILE_DIR:INTERNAL=/Users/morrison/brlcad.main/.build/src/other/ext/ITCL_BLD-prefix/src/ITCL_BLD-build
//Details about finding TCL
FIND_PACKAGE_MESSAGE_DETAILS_TCL:INTERNAL=[/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.3.sdk/System/Library/Frameworks/tcl.framework][/Applications/Anaconda3/anaconda3/lib/libtclstub8.6.a][/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.3.sdk/System/Library/Frameworks/Tcl.framework/Headers][/Applications/Anaconda3/anaconda3/bin/tclsh][v()]
//Details about finding TCLTK
FIND_PACKAGE_MESSAGE_DETAILS_TCLTK:INTERNAL=[/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.3.sdk/System/Library/Frameworks/tcl.framework][/Applications/Anaconda3/anaconda3/lib/libtclstub8.6.a][/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.3.sdk/System/Library/Frameworks/Tcl.framework/Headers][/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.3.sdk/System/Library/Frameworks/tk.framework][/Applications/Anaconda3/anaconda3/lib/libtkstub8.6.a][/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.3.sdk/System/Library/Frameworks/Tk.framework/Headers][v()]
//ADVANCED property for variable: TCL_INCLUDE_PATH
TCL_INCLUDE_PATH-ADVANCED:INTERNAL=1
//ADVANCED property for variable: TCL_LIBRARY
TCL_LIBRARY-ADVANCED:INTERNAL=1
//ADVANCED property for variable: TCL_STUB_LIBRARY
TCL_STUB_LIBRARY-ADVANCED:INTERNAL=1
//ADVANCED property for variable: TCL_TCLSH
TCL_TCLSH-ADVANCED:INTERNAL=1
OK, so TCL_ROOT isn't doing what it should
At a guess it's probably getting the vanilla CMake FindTCL.cmake - I had to mod it pretty heavily IIRC for it to handle what we need for this
Another possibility is the CMakeFindFrameworks may be messing with things...
I'd suggest putting a message("Loading this file") or some such in src/other/ext/itcl/CMake/FindTCL.cmake to try and determine if it's actually pulling in that version
If it's grabbing that one then we need to figure out why TCL_ROOT isn't working, if it isn't then we need to force the build to use the local FindTCL
/me adds this to the "get all of this converted to Qt" motivation pile...
I can't find where it's discovering Anaconda from, any ideas?
it's not mentioned in the output/error logs
Is /Applications/Anaconda3/anaconda3/bin/ in your path?
ah, why yes, yes it is. it has a suite of command line tools.
starseeker said:
I'd suggest putting a message("Loading this file") or some such in src/other/ext/itcl/CMake/FindTCL.cmake to try and determine if it's actually pulling in that version
Trying this.
(Getting an ENABLE_ALL build going so I can diagnose, assuming Linux can reproduce this... - I've not been building that configuration much to keep cycle times shorter.)
Do you recall what is/was wrong with the system FindTCL?
looks like there's three now.. FindTCL, FindTclstub and FindTclsh
at least as of 3.21.1
Yeah, that was one problem - keeping those all synced was an issue. Another was (at least for CMake at the time I was doing the work) the default find_package(TCL) was generating some sort of warnings. If I'm remember correctly it also didn't respect the TCL_ROOT setting.
I tried to use the default versions, but it got really messy really quick.
doesn't respect TCL_ROOT because it doesn't have that at all from what I see
FindWish is another
Yeah, trying to keep all those in sync was virtually impossible with the third party management and variable passing needed for the local third party copies.
Ah, right - no TCL_ROOT support was a deal breaker.
what does keeping them in sync mean?
we don't keep x11 and other Find things in sync, right? We just use them
I mean making sure FindTcl, FindTclsh, FindWish, etc. are all the same page. Particularly if I'm needing to pass in variables to override their default search behaviors.
I have a vague recollection that they weren't all reliably consistent on what they would find, but it's been a while
ah I see we do have a FindX11, but not others like PNG, libz, etc?
a while == 5 years? :)
Also, having to do multiple find packages for a single ThirdParty build seriously breaks the assumptions used by that function.
I tried to remove a bunch of the local copies some time back and use as much of the system included setup as possible.
I'd have to check what the deal was/is with FindX11 - I think Mac might have complicated life with that one
I'm just wondering if the default system Find's might actually be less work for what we need at this point, given we require 3.12+ and we could bump that up if needed, rather than fight it
In general yes, and I did try to do that - the Tcl setup was a no-go though
I don't doubt we'll need some of them still, but maybe a few could go
yeah, I kind of remember X11 being a mess
We'll have to check which of our Find* files are in 3.12 - the majority aren't (too specific) but there may be some.
At least in my testing here, itcl is pulling in FindTCL.cmake from its local CMake
So the question is why would it be finding the wrong thing...
/me is suspicious of CMakeFindFrameworks
@Sean I can't reproduce that failure locally :-(
Can you try it while commenting out the include(CMakeFindFrameworks) line?
Last updated: Jan 09 2025 at 00:46 UTC