flathub / com.jetbrains.CLion

https://flathub.org/apps/details/com.jetbrains.CLion
8 stars 8 forks source link

Need Help Accessing /usr/lib ( and lib64 ) for CMake Configuration #86

Closed mohammadRezaeian closed 2 months ago

mohammadRezaeian commented 2 months ago

Hi

Thank you for creating this package for Flathub. I'm a C++ developer currently using the Qt framework for my projects. I'd like to configure my CMake to access /usr/lib.

I'm facing an issue when building my software using CLion installed via Flatpak. Specifically, after configuring my project, I encounter errors during the build process. Interestingly, when I use the manually downloaded tar file from JetBrains to run CLion, I do not encounter any issues with the same configuration.

When attempting to grant Flatpak access to /usr/lib, I receive the following error messages:

vbnet Copy code F: Not sharing "/usr/lib" with sandbox: Path "/usr" is reserved by Flatpak F: Not sharing "/usr/lib64" with sandbox: Path "/usr" is reserved by Flatpak Could you please assist me with resolving this issue?

Once again, thank you for your hard work.

appelgriebsch commented 2 months ago

Hey,

AFAIK this goes against how Flatpaks work. The whole idea of running an application via a flatpak bundle is to not caring about what's in your /usr/bin or /usr/local/bin. In case you need libs for your C++ application to build successfully in the flatpak version of CLion you need to source the external libs into your local project repo, so they can be find and used from there (instead of the system installed once). This also makes sense to have consistent builds as the version of the lib on your system may diverge from the one you require in your code over time...