Forum › Forums › Official Releases › antiX-21/22 “Grup Yorum” › Cannot run compiled executables with click; zzzFM sees them as shared libraries
- This topic has 7 replies, 4 voices, and was last updated Dec 31-12:49 am by Anonymous.
-
AuthorPosts
-
December 29, 2021 at 11:04 pm #74077
Anonymous
I’m actually having this exact issue:
https://stackoverflow.com/questions/45329372/ubuntu-recognizes-executable-as-shared-library-and-wont-run-it-by-clicking
Yes, link talks about Ubuntu, but I’m seeing it here as well.I was trying to initiate myself into C/C++, and started with few exercises. Using CMake and Make to build. From command line no problems, but tried from zzzFM out of curiosity, and the issue.
To clarify, this seems to happen with executables locally build with CMake/Make, not with common programs such as web browsers and games.
The OP himself in the link solved it by issuing the option “-no-pie”.
After reading this I did some more searches and few tests of mine. Found that, according to the “file” command, certainly the locally built executables are “LSB pie executables”, while other programs such as games and web browsers are just “LSB executables”.
Also read that, supposedly, PIE executables are a recent, more secure “standard” (or something like that), and that this was the reason why distros’ compilers were shipped with this default.The OP in the link considers this PIE thing as the one responsible of not being able to run compiled executables with the file browser.
But I’m still a bit confused overall, and wanted to try asking for a bit of advise here.—By chance, has anyone here experimented this particular issue, either on AntiX itself or other different distro? I know I should see it myself, but currently don’t have other different distro installed at hand…
—If this were a “new more secure standard”, shouldn’t all Linux binaries be built like this then?
Thanks beforehand for your help.
December 30, 2021 at 1:18 am #74083Forum Admin
Dave
::Do you have the proper permissions set on the newly compiled executable for execution? This is most often the case for me…
I am doubtful that it is the pie flag. For example packageinstaller, firefox, geany, galculator, etc also have the pie flag.Computers are like air conditioners. They work fine until you start opening Windows. ~Author Unknown
December 30, 2021 at 2:55 am #74090Anonymous
::seems to happen with executables locally build with CMake/Make
Yes, it may be related to –no-pie compiler flag. Refer to the docs for the specific version of CMake that you are using (mismatched docs may contain irrelevant/incorrect details)
ref:
https://stackoverflow.com/questions/45329372/ubuntu-recognizes-executable-as-shared-library-and-wont-run-it-by-clicking
and
https://cmake.org/cmake/help/latest/policy/CMP0083.htmlIf this were a “new more secure standard”,shouldn’t all Linux binaries be built like this then?Not a “standard”, rather it is a changed — across CMake versions — implicit default value (of a flag, compiler option)
December 30, 2021 at 4:43 am #74092Anonymous
::Do you have the proper permissions set on the newly compiled executable for execution? This is most often the case for me…
I am doubtful that it is the pie flag. For example packageinstaller, firefox, geany, galculator, etc also have the pie flag.Yes, it has proper permissions. Otherwise it would not launch from command line neither, as mentioned.
Never came to mind those examples… and turn to be the perfect ones!
Try browsing /usr/bin with zzzFM and “running” any of them by double-clicking or with Enter key, to see what I’m trying to talk about.
Heck, they even have the same “icon” as .so libraries, instead of the one for “pure” executables!@skidoo:
Yes, that first link of yours is exactly the one I posted.
What I’m still heavily wondering (and would need to find a way to find out) is whether it happens on other distros, with different DEs and different file managers…December 30, 2021 at 8:19 am #74097Member
sybok
::I know that there was an issue reported in this forum that someone attempted to run a binary on a partition mounted with defaults which overrode ‘exec’ to ‘noexec’.
Since you managed to run from CLI, this may not apply, but it could be worth an explicit check if this is not the case.December 30, 2021 at 12:56 pm #74132Forum Admin
Dave
::Try browsing /usr/bin with zzzFM and “running” any of them by double-clicking or with Enter key, to see what I’m trying to talk about.
Heck, they even have the same “icon” as .so libraries, instead of the one for “pure” executables!None of the binaries in /usr/bin launch by clicking on them in spacefm for me…
Is the option enabled in spacefm preferences. It seems to make no difference to me.Computers are like air conditioners. They work fine until you start opening Windows. ~Author Unknown
December 30, 2021 at 7:51 pm #74187Anonymous
::I’m trying all of this in AntiX live CD. No binaries being run from any external storage. Just double-checked.
I do have the zzzFM “Run executables with click” preference enabled, with same results.
It seems to only make a difference with “pure” “LSB executable” binaries; only examples that currently come to mind at least right now are web browsers Firefox (direct download from website, not from repos), and Pale Moon (also from website).
Surprisingly Librewolf, when unpacking the AppImage, is also a PIE executable…December 31, 2021 at 12:49 am #74191Anonymous
::Ok, did some additional stuff.
First, finally was able to test in a non-Debian-based distro. The “issue” doesn’t seem to happen there.
Second, did more internet searches after this. It seems that, in general Linux, while it may work in several cases, it’s not very “common” practice to run the direct binaries from file manager. In fact, it would seem to be kind of a “debatable” topic in some forums.
Anyway, thanks everyone for your attention and help.
-
AuthorPosts
- You must be logged in to reply to this topic.