Author Topic: Can't add X11 to search directory  (Read 10630 times)

Offline BlueHazzard

  • Developer
  • Lives here!
  • *****
  • Posts: 3353
Re: Can't add X11 to search directory
« Reply #15 on: January 14, 2022, 06:46:24 pm »
Quote
dl.flathub.org.
Is this a flatpak installation? So this could  be IS the reason... Flatpack and codeblocks do not like each other, because flatpack applications run in a sandbox and do not have access to system resources, where libraries and header are... This is the reason for your problems...


Offline AzureZero

  • Multiple posting newcomer
  • *
  • Posts: 13
Re: Can't add X11 to search directory
« Reply #16 on: January 17, 2022, 08:14:17 pm »
Yeah I found that out after the terminal didn't see Codeblocks as a program.

Thanks for helping me through this as I would not of expected it to be an issue of the software centre choosing a flatpak installation which has issues.

It might be a good idea to pin that Flatpak installs will likely have issues, and that installation should be done via the terminal and not the software centre as the software centre may only install flatpak versions when a non-flatpak version is available via the terminal.
It should also help lessen the chance of this problem coming up again and causing two or more people to bang their head against a coding wall. Well one sign of the issue for checking is if headers in the usr/include folder can't be found, it likely is a flatpak installation issue.

Maybe a pinned FAQ of problems could help folks find some of the rare problems and it's solution.

Offline sodev

  • Regular
  • ***
  • Posts: 497
Re: Can't add X11 to search directory
« Reply #17 on: January 17, 2022, 09:22:59 pm »
On the other hand, whoever is building the flatpak could simply update the permissions to allow access to the host filesystem, depending on security requirements read-only to (almost) everything and write-access only to the home directory.

Offline BlueHazzard

  • Developer
  • Lives here!
  • *****
  • Posts: 3353
Re: Can't add X11 to search directory
« Reply #18 on: January 18, 2022, 01:15:52 am »
We are not the maintainer for the flat pack distribution, we even didn't knew this exists.
Some time ago a user asked if he could distribute the flat pack and one of our devs said, that this is not a good idea, because of the file access rights (like you experienced)...
At this time i looked at this and it was not possible to add only read permission, or at least i did not find it...

On the other hand, whoever is building the flatpak could simply update the permissions to allow access to the host filesystem, depending on security requirements read-only to (almost) everything and write-access only to the home directory.
So you say, this is now possible?
It would be great to have some flatpack codeblocks... Will have to look into it....

Offline sodev

  • Regular
  • ***
  • Posts: 497
Re: Can't add X11 to search directory
« Reply #19 on: January 18, 2022, 05:41:48 pm »
I have only quite limited Flatpak experience, for the single application i'm building for Flatpak i didn't need to read the footnotes. I'm afraid for CodeBlocks the footnotes do apply: Sandbox Permissions. So on second thought, looks like it's kind of impossible to create a general purpose CodeBlocks Flatpak, due to the path conflicts you need major adaptions of the project to access libraries of the host. Sorry for the misinformation.

However, a possible Flatpak scenario could be to create very specific distributions that contain all required libraries for a specific use case. This way you don't have to pollute the host with such libraries, you could use fixed versions different from the host and the user doesn't need to setup his system to use them. Looking at you, school teachers and the like ;).