bmx-ng/bmk

Pie commit - binaries now classified as "shared library"

GWRon opened this issue · 9 comments

GWRon commented

The latest commit (pie as default: 8fc8042

leads to an error on my linux box:

[100%] Linking:GenusPrime.debug
g++ -m64 -pie -fpie -pthread -o /home/ronny/Arbeit/Programmieren/Projekte/GenusPrime/GenusPrime.debug /home/ronny/Arbeit/Programmieren/Tools/BlitzMaxNG/tmp/ld.tmp -L/usr/X11R6/lib -L/usr/lib -L/home/ronny/Arbeit/Programmieren/Tools/BlitzMaxNG/lib
collect2: fatal error: ld terminated with signal 6 [Abgebrochen]
compilation terminated.
/usr/bin/ld: ld: wcsrtombs.c:94: __wcsrtombs: Zusicherung »data.__outbuf[-1] == '\0'« nicht erfüllt.
Build Error: Failed to link /home/ronny/Arbeit/Programmieren/Projekte/GenusPrime/GenusPrime.debug
Process complete
GWRon commented

I reverted to the version before the commit (so replaced make.bmk and bmk again) and it compiled - so it seems to be exactly this commit

GWRon commented

This is still imminent - what to do, except of upgrading my linux distribution?

GWRon commented

I think for now you should be able to set a default in an external config file to be able to set "no pie" as default on older (and still maintained/updated) distributions.

GWRon commented

Recompiled modules ... and it works.

Generally, any version number bump to bcc or bmk, you should consider a rebuild of your stuff, as things may have changed.
Of course, this is not an issue for people working only on a release version, just for those that are using the bleeding edge code.

GWRon commented

Yes this is true - but recompilation can... take a while (old 2 core cpu: brl and pub took release/debug each 30 minutes). This "compli-fication" could save some time - while of course adding the hassle of maintaining it.

GWRon commented

Files compiled with the new BMK (recompiled modules afterwards) are classified as "shared library" and not normal "binary".

This means you can still execute them via "./appname" or it executes from within MaxIDE but you cannot "double click" in the file managers.

GWRon commented

Users in the syntaxbomb forum describe similar problems.
https://www.syntaxbomb.com/index.php/topic,5613.msg25793/topicseen.html#new

They state that the fix provided by "markcwm" works while your (@woollybah) commit regarding no-pie does not work flawless.

GWRon commented

@woollybah
you replied in #61 but I think it suits more to this issue here.

So your latest commit 1f35c1b only changes params send if you set "nopie" - which isn't done when compiling with MaxIDE.

Also I am not sure what it effectively does - I've set:
bmk_config.bmx:

Global opt_nopie:Int
Global opt_nopie_set:Int
opt_nopie = 1
opt_nopie_set = 1

to disable "pie" - and it used the "unfixed" -pie -fpie. The resulting binaries seemed to work as expected (not sure about "double click").

The main culprit (for me - with my current desktop) should be unaffected by your commit: "pie"-enabled builds are not double-click-able in the file explorer. For reasons unknown to me - maybe it's what you wrote (file managers fault).