The autopackage code has the following problems:
- The code for enable-binreloc=auto (which was previously the default) checked the build environment rather than the execution environment.
- autopackage code prevents running inkscape from the build directory. (This problem is reduced if the source directory and the build directory are the same.)
It should fall back to using the configure-supplied PREFIX value.
- Also, there are a few problems with prefix.cpp code that make me wonder what other problems the autopackage code has:
- br_locate uses sscanf("%x-%x") and unsigned ints whereas linux/fs/proc/array.c uses printf("%08lx-%08lx") and unsigned longs. This presumably leads to bugs on 64-bit platforms.
- br_prepend_prefix needlessly requires that its path argument be writable.
- br_strcat uses calloc, only to write over the space. It in effect calculates strlen(str1) 3 times and strlen(str2) twice.
- br_strndup has buffer overflow if size excedes the length of str by more than one.
- br_extract_prefix doesn't behave as its documentation indicates. Also it does an unnecessary strndup when it could use memrchr.
Therefore I've changed configure.in to default to enable-binreloc=no. Autopackage binary builders, you may wish to add --enable-binreloc to your configure options.
pjrm.