Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » Developing U++ » U++ Developers corner » Different getenv("PATH") and $PATH on macos M1 (for libclang.dylib)
Re: Different getenv("PATH") and $PATH on macos [message #59495 is a reply to message #59494] Fri, 06 January 2023 09:47 Go to previous messageGo to previous message
fudadmin is currently offline  fudadmin
Messages: 1321
Registered: November 2005
Location: Kaunas, Lithuania
Ultimate Contributor
Administrator
Novo wrote on Fri, 06 January 2023 05:06


Yes, it is set. But it is set not by a shell.
According to Set system-wide PATH environment variable for Mac OS GUI apps which is dated 2020 setting PATH via /etc/launchd.conf works.
Comments to "How to set PATH for Finder-launched applications" say that this doesn't work ...
Sys("sh -c \'echo $PATH\'") is a hack. This is not a Macos way. You are not supposed to use shell on Mac. Macos itself doesn't launch shell on login.


My strong guess that the PATH is set by the shell. But by the wrong shell...
And I am coming to conclusion because of macports and brew and/or X11 subsystem.
Quote:

This is why I personally wouldn't recommend to use PATH in GUI apps on Mac.

Legally Macos is Unix (and Linux and different flavors of BSD are not), but practically it is something different Smile

I do not know what you need PATH for, but I believe there should be a different way of solving your problem.

Novo, you need to tell this to Mirek or create your own Pull Request on ultimate/ultimate github...

It not me who needs PATH. It is Ultimate++'s theide which uses PATH and tries to look for libclang in the wrog places... Smile

As I wrote in the first opening message at the very top of this thread:
fudadmin wrote on Wed, 04 January 2023 03:36
$PATH has got a lot more than getenv("PATH")
One of the reasons why theide can't find libclang.
How to load libclang - that's a different question...

[Updated on: Fri, 06 January 2023 09:49]

Report message to a moderator

 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Compilation on Linux +GUI,X11
Next Topic: Cannot link with obj generated on custom build step.
Goto Forum:
  


Current Time: Tue Apr 29 22:35:17 CEST 2025

Total time taken to generate the page: 0.01152 seconds