Re: Fixing absolute install fails on OSX

Ilja Honkonen <[email protected]> Sun, 13 Sep 2015 23:19:22 -0400
Newsgroups gmane.comp.file-systems.zero-install.devel
Message-ID <[email protected]>
>>>> Absolute install
>>>> name=/private/var/folders/ff/m6cylxhd2csdz9fh62g3djtm0000gq/T/0compile-GFyugS/gcc-any-any/lib/libcilkrts.5.dylib
>>>> in
>>>> /private/var/folders/ff/m6cylxhd2csdz9fh62g3djtm0000gq/T/0compile-GFyugS/gcc-any-any/lib/libcilkrts.5.dylib;
>>>> fixing...
>>> suspect it's trying to replace some full path names with relative
>>> paths, since otherwise the binary it compiled can't be relocated.
>> Could I work around this by using DESTDIR? From gcc docs:
>> Installation into a temporary staging area or into a chroot jail can be
>> achieved with the command
>>        make DESTDIR=path-to-rootdir install
>> where path-to-rootdir is the absolute path of a directory relative to
>> which all installation paths will be interpreted. Note that the
>> directory specified by DESTDIR need not exist yet; it will be created if
>> necessary.
> Possibly - let us know if it works! I know we've distributed gcc-based
> languages before (gdc) with 0install, so it should work. It might be a
> case of modifying 0compile to skip that error.

Doesn't look like destdir would work here because --prefix is the final 
directory according to https://stackoverflow.com/questions/11307465 but 
$DISTDIR (where 0compile docs say to put the result in) is 
/private/var/folders/ff/m6cylxhd2csdz9fh62g3djtm0000gq/T/0compile-T8poWD/gcc-any-any 
instead of e.g. 
$HOME/.local/share/0install.net/site-packages/file/$home..__0inst-test__lfs__gcc_gcc.xml/5.2.0-x86_64/. 
Why wouldn't $DISTDIR point to final location? Since I can probably 
guess where gcc would end up at this hack might work: $SRCDIR/configure 
--prefix=/final/path/guess ... && make && make DESTDIR=$DISTDIR install. 
Is there a way to find out where 0compile will move things after 
compilation?
Ilja

------------------------------------------------------------------------------