Ubuntu 18.04 mistaking executable as shared library


I was running into a small issue that even though my application successfully compiled in QT Creator it was not creating a clickable executable. This was happening even though “allow executing file as program” was enabled. When I clicked it would come up with the error. “There is no application installed for ‘shared library’ files”. I did some googling and found that this was a problem with newer ubuntu distros.

Solved it by putting the following into the qps file :grin::

of.linkerFlags: ['-no-pie']

And now it generates the clickable executable successfully and I can set it up in crontab to start automatically.

Just noting it here incase anyone else has the same problem. Perhaps in future OF versions it could be the default to have that linker flag enabled!


Thanks! I’ve noticed this before but never found a way to solve it. I’ll look into it and add it to the default flags if it’s not a problem with something else


btw, if you could open a github issue explaining this that would be really helpful


thanks for the tip

@arturo if (according to this post) it’s a security feature, is it still relevant to have this flag set as default, knowing it could be set per project ?

and so maybe this information could be emphasized somewhere.

or, if you think it’s an unexpected behavior, i can open a issue on github ?


I know it’s a security features but it’s just related to avoiding buffer overflows or somthing similar which is probably not super important for OF and being able to run applications by double clicking on them is pretty useful.

My main concern is that libraries are compiled with this flag so it might be that more complex applications that call into c++ libraries like poco or opencv might fail to link when this is enabled.

In any case if you can open a github issue that would be useful so i remember to look into it