Stream: brlcad

Topic: ext


view this post on Zulip Sean (Aug 03 2021 at 15:16):

@starseeker so besides blowing away the entire build dir, how can I A) rebuild all of ext and B) rebuild just one ext ?

view this post on Zulip Sean (Aug 03 2021 at 15:34):

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

view this post on Zulip Sean (Aug 03 2021 at 15:37):

okay, looks like nuclear option on src/other/ext will work at least on an enable-all build

view this post on Zulip starseeker (Aug 03 2021 at 15:59):

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

view this post on Zulip Sean (Aug 03 2021 at 16:00):

That'll work for me if it works.. the structure of the tree was under there wasn't immediately obvious or recognizable to me

view this post on Zulip starseeker (Aug 03 2021 at 16:00):

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.

view this post on Zulip starseeker (Aug 03 2021 at 16:01):

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

view this post on Zulip Sean (Aug 03 2021 at 16:10):

I think it might help just to get rid of the _BLD suffix

view this post on Zulip Sean (Aug 03 2021 at 16:10):

maybe -prefix too

view this post on Zulip Sean (Aug 03 2021 at 16:11):

maybe renaming src to root or base

view this post on Zulip Sean (Aug 03 2021 at 16:13):

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

view this post on Zulip starseeker (Aug 03 2021 at 16:16):

Hmm. I must not have defined everything needed for the IncrTcl enable all build correctly...

view this post on Zulip Sean (Aug 03 2021 at 16:17):

top-level cache correctly says BUNDLED on everything

view this post on Zulip Sean (Aug 03 2021 at 16:18):

Actually looks like Itcl built successfully, but Itk is the one failing

view this post on Zulip starseeker (Aug 03 2021 at 16:20):

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.

view this post on Zulip Sean (Aug 03 2021 at 16:20):

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

view this post on Zulip starseeker (Aug 03 2021 at 16:21):

TCL_ROOT looks like it is set

view this post on Zulip Sean (Aug 03 2021 at 16:21):

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>'

view this post on Zulip starseeker (Aug 03 2021 at 16:22):

And you said itk is the one that's failing?

view this post on Zulip Sean (Aug 03 2021 at 16:22):

yeah

view this post on Zulip starseeker (Aug 03 2021 at 16:23):

Give me a sec...

view this post on Zulip Sean (Aug 03 2021 at 16:24):

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

view this post on Zulip starseeker (Aug 03 2021 at 16:24):

AH, so it's got the wrong TCL_INCLUDE_PATH and TCL_LIBRARY

view this post on Zulip starseeker (Aug 03 2021 at 16:25):

Are those variables correct in the itcl cache?

view this post on Zulip Sean (Aug 03 2021 at 16:25):

crazy hodge podge there...yeah, those are wrong, and it somehow found a tclsh in an app (Anaconda)

view this post on Zulip Sean (Aug 03 2021 at 16:26):

Ah yeah, they're wrong for Itcl too, but the build happens to work

view this post on Zulip Sean (Aug 03 2021 at 16:26):

(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

view this post on Zulip starseeker (Aug 03 2021 at 16:27):

OK, so TCL_ROOT isn't doing what it should

view this post on Zulip starseeker (Aug 03 2021 at 16:27):

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

view this post on Zulip starseeker (Aug 03 2021 at 16:29):

Another possibility is the CMakeFindFrameworks may be messing with things...

view this post on Zulip starseeker (Aug 03 2021 at 16:30):

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

view this post on Zulip starseeker (Aug 03 2021 at 16:31):

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

view this post on Zulip starseeker (Aug 03 2021 at 16:32):

/me adds this to the "get all of this converted to Qt" motivation pile...

view this post on Zulip Sean (Aug 03 2021 at 16:34):

I can't find where it's discovering Anaconda from, any ideas?

view this post on Zulip Sean (Aug 03 2021 at 16:34):

it's not mentioned in the output/error logs

view this post on Zulip starseeker (Aug 03 2021 at 16:34):

Is /Applications/Anaconda3/anaconda3/bin/ in your path?

view this post on Zulip Sean (Aug 03 2021 at 16:35):

ah, why yes, yes it is. it has a suite of command line tools.

view this post on Zulip Sean (Aug 03 2021 at 16:36):

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.

view this post on Zulip starseeker (Aug 03 2021 at 16:39):

(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.)

view this post on Zulip Sean (Aug 03 2021 at 16:41):

Do you recall what is/was wrong with the system FindTCL?

view this post on Zulip Sean (Aug 03 2021 at 16:41):

looks like there's three now.. FindTCL, FindTclstub and FindTclsh

view this post on Zulip Sean (Aug 03 2021 at 16:41):

at least as of 3.21.1

view this post on Zulip starseeker (Aug 03 2021 at 16:42):

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.

view this post on Zulip starseeker (Aug 03 2021 at 16:43):

I tried to use the default versions, but it got really messy really quick.

view this post on Zulip Sean (Aug 03 2021 at 16:44):

doesn't respect TCL_ROOT because it doesn't have that at all from what I see

view this post on Zulip Sean (Aug 03 2021 at 16:45):

FindWish is another

view this post on Zulip starseeker (Aug 03 2021 at 16:45):

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.

view this post on Zulip starseeker (Aug 03 2021 at 16:46):

Ah, right - no TCL_ROOT support was a deal breaker.

view this post on Zulip Sean (Aug 03 2021 at 16:46):

what does keeping them in sync mean?

view this post on Zulip Sean (Aug 03 2021 at 16:46):

we don't keep x11 and other Find things in sync, right? We just use them

view this post on Zulip starseeker (Aug 03 2021 at 16:47):

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.

view this post on Zulip starseeker (Aug 03 2021 at 16:48):

I have a vague recollection that they weren't all reliably consistent on what they would find, but it's been a while

view this post on Zulip Sean (Aug 03 2021 at 16:48):

ah I see we do have a FindX11, but not others like PNG, libz, etc?

view this post on Zulip Sean (Aug 03 2021 at 16:48):

a while == 5 years? :)

view this post on Zulip starseeker (Aug 03 2021 at 16:48):

Also, having to do multiple find packages for a single ThirdParty build seriously breaks the assumptions used by that function.

view this post on Zulip starseeker (Aug 03 2021 at 16:49):

I tried to remove a bunch of the local copies some time back and use as much of the system included setup as possible.

view this post on Zulip starseeker (Aug 03 2021 at 16:50):

I'd have to check what the deal was/is with FindX11 - I think Mac might have complicated life with that one

view this post on Zulip Sean (Aug 03 2021 at 16:50):

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

view this post on Zulip starseeker (Aug 03 2021 at 16:50):

In general yes, and I did try to do that - the Tcl setup was a no-go though

view this post on Zulip Sean (Aug 03 2021 at 16:50):

I don't doubt we'll need some of them still, but maybe a few could go

view this post on Zulip Sean (Aug 03 2021 at 16:51):

yeah, I kind of remember X11 being a mess

view this post on Zulip starseeker (Aug 03 2021 at 16:52):

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.

view this post on Zulip starseeker (Aug 03 2021 at 17:05):

At least in my testing here, itcl is pulling in FindTCL.cmake from its local CMake

view this post on Zulip starseeker (Aug 03 2021 at 17:06):

So the question is why would it be finding the wrong thing...

view this post on Zulip starseeker (Aug 03 2021 at 17:17):

/me is suspicious of CMakeFindFrameworks

view this post on Zulip starseeker (Aug 03 2021 at 17:29):

@Sean I can't reproduce that failure locally :-(

view this post on Zulip starseeker (Aug 03 2021 at 17:33):

Can you try it while commenting out the include(CMakeFindFrameworks) line?


Last updated: Oct 09 2024 at 00:44 UTC