Another problem with library paths
Ilja Honkonen <[email protected]> Wed, 30 Sep 2015 12:16:58 -0400
| Newsgroups | gmane.comp.file-systems.zero-install.devel |
|---|---|
| Message-ID | <[email protected]> |
Hello I stumbled upon more path errors when trying to install PCRE following http://www.linuxfromscratch.org/blfs/view/svn/general/pcre.html. Attached pcre.xml gives this when I try to run pcregrep: dyld: Library not loaded: /private/var/folders/ff/m6cylxhd2csdz9fh62g3djtm0000gq/T/0compile-wSab_U/pcre-any-any/lib/libpcre.1.dylib Referenced from: /Users/iljah/.local/share/0install.net/site-packages/file/Users__iljah__0inst-test__lfs__pcre__pcre.xml/8.37-x86_64/bin/pcregrep Reason: image not found Trace/BPT trap: 5 The reason is (otool -L .../8.37-x86_64/bin/pcregrep): /usr/lib/libz.1.dylib (compatibility version 1.0.0, current version 1.2.5) /usr/lib/libbz2.1.0.dylib (compatibility version 1.0.0, current version 1.0.5) /private/var/folders/ff/m6cylxhd2csdz9fh62g3djtm0000gq/T/0compile-wSab_U/pcre-any-any/lib/libpcre.1.dylib (compatibility version 4.0.0, current version 4.5.0) /private/var/folders/ff/m6cylxhd2csdz9fh62g3djtm0000gq/T/0compile-wSab_U/pcre-any-any/lib/libpcreposix.0.dylib (compatibility version 1.0.0, current version 1.3.0) /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1197.1.1) So 0install/compile didn't adjust the executable for some reason. What does work is to emulate a proper destdir install with the attached pcre_correct.xml. After running 0compile, copy things from temporary directory to final destination with: cp -r /tmp$HOME/ $HOME and run 0install run pcre/pcre_correct.xml Usage: pcregrep [-AaBCcDdeFfHhIilLMNnoqrsuVvwx] [long options] [pattern] [files] Type `pcregrep --help' for more information and the long options. Could support for this be added to 0install so path adjustments could be skipped completely? Two things should suffice: 1) make e.g. PREFIX refer to final destination within interface so correct --prefix can be given to configure 2) Do the above copy (something like cp -r $DISTDIR$HOME $HOME) instead of regular one (cp -r $DISTDIR $PREFIX ?) when e.g. compile:destdir = 'true' is set With these ./configure --prefix=$PREFIX && make && make DESTDIR=$DISTDIR install should do the right thing. Thanks Ilja ------------------------------------------------------------------------------ _______________________________________________ Zero-install-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/zero-install-devel
pcre.xml
(text/xml, 888 B)
<?xml version = '1.0' ?>
<interface
xmlns = 'http://zero-install.sourceforge.net/2004/injector/interface'
xmlns:compile = 'http://zero-install.sourceforge.net/2006/namespaces/0compile'
>
<name>pcre</name>
<summary>pcre</summary>
<implementation compile:dup-src = 'true' id = '.' local-path = '.' version = '8.37' arch = '*-src'>
<command name = 'compile' shell-command = 'patch -Np1 --directory $BUILDDIR -i pcre-8.37-upstream_fixes-1.patch && $BUILDDIR/configure --prefix=$DISTDIR --enable-unicode-properties --enable-pcre16 --enable-pcre32 --enable-pcregrep-libz --enable-pcregrep-libbz2 --enable-pcretest-libreadline --disable-static && make && make install'>
<compile:implementation arch = '*-*'>
<command name = 'run' path = 'bin/pcregrep'></command>
</compile:implementation>
</command>
</implementation>
</interface>
pcre_correct.xml
(text/xml, 1012 B)
<?xml version = '1.0' ?>
<interface
xmlns = 'http://zero-install.sourceforge.net/2004/injector/interface'
xmlns:compile = 'http://zero-install.sourceforge.net/2006/namespaces/0compile'
>
<name>pcre</name>
<summary>pcre</summary>
<implementation compile:dup-src = 'true' id = '.' local-path = '.' version = '8.37' arch = '*-src'>
<command name = 'compile' shell-command = 'patch -Np1 --directory $BUILDDIR -i pcre-8.37-upstream_fixes-1.patch && $BUILDDIR/configure --prefix=$HOME/.local/share/0install.net/site-packages/file/Users__iljah__0inst-test__lfs__pcre__pcre_5f_correct.xml/8.37-x86_64 --enable-unicode-properties --enable-pcre16 --enable-pcre32 --enable-pcregrep-libz --enable-pcregrep-libbz2 --enable-pcretest-libreadline --disable-static && make && make DESTDIR=/tmp install'>
<compile:implementation arch = '*-*'>
<command name = 'run' path = 'bin/pcregrep'></command>
</compile:implementation>
</command>
</implementation>
</interface>