AdaCore / gnatstudio

GNAT Studio is a powerful and lightweight IDE for Ada and SPARK.
399 stars 52 forks source link

GnatStudio.app can't find gnatls #135

Open rogermc2 opened 1 year ago

rogermc2 commented 1 year ago

Mac OSX 13.0.1 (22A400) XCode 14.1 gcc-12 (Homebrew GCC 12.2.0) 12.2.0 GNAT 12.1.0 GnatStudio version 23.0w

When I open an Ada file under GnatStudio version 23.0w, it responds with:

Language server: Could not locate exec gnatls

although 'gnatls` is available:

Roger@Rogers-Mac-mini alire % which gnatls
/opt/GNAT/gnat-x86_64-darwin-12.2.0-1/bin/gnatls
Joebeazelman commented 1 year ago

If you're using Alire, you have to issue "alr edit" command from you project's directory. If not, then it it's probably related to a similar issue I'm having. Python is used throughout Gnat Studio. For reasons unknown, it doesn't always pickup the entire PATH environment when launched.

AnthonyLeonardoGracio commented 1 year ago

Hello @rogermc2 ,

Are you actually using Alire? Normally GNAT Studio should be able to locate any gnatls present in your PATH environment variable.

Also, is your project a native project or a cross/bare-metal one?

Regards,

Joebeazelman commented 8 months ago

Hello @rogermc2 ,

Are you actually using Alire? Normally GNAT Studio should be able to locate any gnatls present in your PATH environment variable.

Also, is your project a native project or a cross/bare-metal one?

Regards,

Yeah, this is a common issue that's hard to troubleshoot. By default, projects are implicitly configured for native targets. You have to explicitly set the target and runtime GPR variables for non-native targets. It's very easy to overlook setting these variables. I recently proposed a feature request to make the user aware of these settings.

rogermc2 commented 8 months ago

I’m not using Alire. My projects are native. I’ve just updated OSX to the latest version and GNAT studio is working but not interacting well presumably due problems with Xcode tools reported elsewhere. I still get the gnatls error but it doesn’t seem to bother me. Programs compile and build OK.

On 15 Jan 2024, at 4:22 am, Joebeazelman @.***> wrote:

Hello @rogermc2 https://github.com/rogermc2 ,

Are you actually using Alire? Normally GNAT Studio should be able to locate any gnatls present in your PATH environment variable.

Also, is your project a native project or a cross/bare-metal one?

Regards,

Yeah, this is a common issue that's hard to troubleshoot. By default, projects are implicitly configured for native targets. You have to explicitly set the target and runtime GPR variables for non-native targets. It's very easy to overlook setting these variables. I recently proposed a feature request to make the user aware of these settings.

— Reply to this email directly, view it on GitHub https://github.com/AdaCore/gnatstudio/issues/135#issuecomment-1891011107, or unsubscribe https://github.com/notifications/unsubscribe-auth/AC7VT6XQ7A6JTEC7GZIUB5LYOQH6BAVCNFSM6AAAAAASFVWFCCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQOJRGAYTCMJQG4. You are receiving this because you were mentioned.