Skip to content

Fix mac install #2378

Merged
dellaert merged 1 commit intodevelopfrom
fix/mac_install_path
Feb 1, 2026
Merged

Fix mac install #2378
dellaert merged 1 commit intodevelopfrom
fix/mac_install_path

Conversation

@dellaert
Copy link
Copy Markdown
Member

@dellaert dellaert commented Feb 1, 2026

There was a change to this line 2 months ago that broke linking in GTDynamics. Changing this line to use @rpath fixes it.

@dellaert dellaert requested a review from varunagrawal February 1, 2026 00:43
@varunagrawal
Copy link
Copy Markdown
Contributor

That's so interesting. I've been compiling and using GTDynamics without any issue on an M1 macbook, so I'm wondering if it's something deeper?

@dellaert
Copy link
Copy Markdown
Member Author

dellaert commented Feb 1, 2026

@varunagrawal I think it was you who changed that line. So can you check whether this works for you as well? The CI will also tell of course.

I ran into issues with this multiple times now, myself and when helping a student set up GTDynamics. This PR seems to fix it.

@varunagrawal
Copy link
Copy Markdown
Contributor

Approving, but I'm legitimately concerned there is something more going on since this issue is coming up for you now.

@dellaert
Copy link
Copy Markdown
Member Author

dellaert commented Feb 1, 2026

Happened on my Mac, and same issue on a fresh Mac from a student. MIne is M1, student is M2

@varunagrawal
Copy link
Copy Markdown
Contributor

Okay here's the explanation on why this PR works and we didn't see this until now.
By setting CMAKE_INSTALL_NAME_DIR to @rpath we are forcing CMake to embed the RPATH to any executable which loads and links to gtsam. This was not happening before so unless the system and CMake variables were set properly, it would cause Library not found issues.

I am convinced this is the correct fix.

@dellaert dellaert merged commit e215830 into develop Feb 1, 2026
34 checks passed
@dellaert dellaert deleted the fix/mac_install_path branch February 1, 2026 02:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants