Re: [GNC-dev] Resolving symlinks in _br_find_exe in binreloc.c

2020-05-23 Thread Mike Alexander
On 22 May 2020, at 13:32, John Ralls wrote: Even if you say GNC_UNINSTALLED=1 GNC_BUILDDIR=`pwd` bin/gnucash ? Not that I'm suggesting you shouldn't fix binreloc, I just wonder if the uninstalled bypass is broken. GNC_BUILDDIR works, but it has some other side effects which may not be des

Re: [GNC-dev] Resolving symlinks in _br_find_exe in binreloc.c

2020-05-22 Thread John Ralls
> On May 21, 2020, at 10:39 PM, Mike Alexander wrote: > > I started down this rabbit hole because running the Mac build of GnuCash from > the build directory fails without this fix. I'll try to make it work at least > in MacOS. > > Even if you say GNC_UNINSTALLED=1 GNC_BUILDDIR=`pwd` bi

Re: [GNC-dev] Resolving symlinks in _br_find_exe in binreloc.c

2020-05-22 Thread Geert Janssens
I remember having some discussion about this in the past (I believe on irc) about binreloc and a potential c++ replacement. Perhaps it's one of the links in the SO you refer to, I don't remember exactly. One of the issues with binreloc is it doesn't work well for our bindings (python & guile)

Re: [GNC-dev] Resolving symlinks in _br_find_exe in binreloc.c

2020-05-21 Thread Mike Alexander
On 21 May 2020, at 14:41, John Ralls wrote: The code that we have is gnomified from the original autopackage.org version. I agree it's pretty awful; the comparison of sizeof(ptr) to SSIZE_MAX particularly so; trying to allocate SSIZE_MAX-1 in the impossible case that sizeof(ptr) > SSIZE_MAX bo

Re: [GNC-dev] Resolving symlinks in _br_find_exe in binreloc.c

2020-05-21 Thread John Ralls
> On May 21, 2020, at 12:55 AM, Mike Alexander wrote: > > I've had some fixes in binreloc.c for some time that I'm trying to clean up > and commit. Part of the problem is that _br_find_exe doesn't work at all for > non-Aqua Mac builds (i.e. using X11). I've fixed this by calling > _NSGetE

[GNC-dev] Resolving symlinks in _br_find_exe in binreloc.c

2020-05-21 Thread Mike Alexander
I've had some fixes in binreloc.c for some time that I'm trying to clean up and commit. Part of the problem is that _br_find_exe doesn't work at all for non-Aqua Mac builds (i.e. using X11). I've fixed this by calling _NSGetExecutablePath if GNC_PLATFORM_OSX is set and MAC_INTEGRATION is not