Optware / Optware-ng

279 stars 52 forks source link

Hardcoded absolute path's in libxslt:1.1.26-2 #30

Closed farioas closed 8 years ago

farioas commented 8 years ago

Here's the aboslute path's in xmslt-config:

the_libs="-L${libdir} -lxslt -L/home/alex/optware/buildroot-mipsel-ng/staging/opt/lib -L/home/alex/optware/buildroot-mipsel-ng/staging/opt/lib -lxml2 -lz -liconv -lm -lm"
if test "$includedir" != "/usr/include"; then
    the_flags="$the_flags -I$includedir `/home/alex/optware/buildroot-mipsel-ng/staging/opt/bin/xml2-config --cflags`"
else
    the_flags="$the_flags `/home/alex/optware/buildroot-mipsel-ng/staging/opt/bin/xml2-config --cflags`"
fi

This cause fail builds some libs, for example lxml:

# pip install lxml
Collecting lxml
  Using cached lxml-3.5.0.tar.gz
Building wheels for collected packages: lxml
  Running setup.py bdist_wheel for lxml
  Complete output from command /opt/bin/python -c "import setuptools;__file__='/tmp/pip-build-cJDqd8/lxml/setup.py';exec(compile(open(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" bdist_wheel -d /tmp/tmpQnL9gepip-wheel-:
  Building lxml version 3.5.0.
  Building without Cython.
  Using build configuration of libxslt 1.1.26
  ERROR: /opt/bin/xslt-config: line 97: /home/alex/optware/buildroot-mipsel-ng/staging/opt/bin/xml2-config: not found

  ** make sure the development packages of libxml2 and libxslt are installed **

  Building against libxml2/libxslt in one of the following directories:
    /opt/lib
    /home/alex/optware/buildroot-mipsel-ng/staging/opt/lib

Temporary solution:

sed -i 's/\/home\/alex\/optware\/buildroot-mipsel-ng\/staging//' /opt/bin/xslt-config
alllexx88 commented 8 years ago

It is simple to fix this, and I will, thanks. However, Optware-ng isn't really aimed at native development. There're some difficulties you might face when doing so. First of all, you must make sure you always pass the correct compile and link flags. Also, cross toolchain paths may be hardcoded in some binaries, like in python, so you may have to look for a way to override those defaults. On top of that, not all Optware-ng packages have headers in them (or have development packages available), so you might have to download source and install the headers manually. And finally, manually compiled and installed packages are harder to trace in comparison to using a package manager (this is true for any Linux distro too).