Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - dchr

Pages: [1]
1
QB64 Discussion / Problems compiling to executables on Linux
« on: September 09, 2018, 07:16:16 am »
Dear all,

recently, I experienced an issue that may or may not be related to another recent thread on this forum ("QB64 v1.2 on Linux and OS/X has big problems!").

I noticed this on a fresh install of QB64 (latest stable version) on the latest release of Linux Mint as well a few days ago - both the QB64 executable itself, as well as the compiled executables themselves, could not be executed by double-clicking them in the file manager (although, in my case at least, the compilation itself worked), because they were misidentified as "shared libraries" instead of executables (all permissions are set correctly). Running them from the terminal window works fine, though.

I am not entirely sure myself what the root of the issue is, but gcc, by default, compiled them as shared libraries instead of executables:

https://bugs.launchpad.net/ubuntu/+source/shared-mime-info/+bug/1639531

I have since managed to fix the problem for the QB64 executable by adding the -no-pie compiler switch to the setup script, following a suggestion in this thread:

https://stackoverflow.com/questions/45329372/ubuntu-recognizes-executable-as-shared-library-and-wont-run-it-by-clicking

But obviously this has the side effect of the executable not being position-independent any more. If the fix does indeed have something to do with setting compiler / linker switches, this might require some adjustments to the QB64 code to restore the default behaviour on certain Linux distros. Has anyone else experienced this problem?

Hello, QB64 community, by the way! Pleased to meet you.

Pages: [1]