alexlarsson / gnome-sdk-images

5 stars 1 forks source link

Content of xml2-config and xslt-config is completely broken #14

Open thiblahute opened 8 years ago

thiblahute commented 8 years ago
thiblahute ~/devel/hotdoc/hotdoc/build/xdg-app (xdgapp) $ cat /usr/bin/xslt-config
#!/bin/sh
echo '--should-not-have-used-/usr/bin/xslt-config'
exit 1

thiblahute ~/devel/hotdoc/hotdoc/build/xdg-app (xdgapp) $ cat /usr/bin/xml2-config 
#!/bin/sh
echo '--should-not-have-used-/usr/bin/xml2-config'
exit 1

Leading to build failure installing pylxml2:

thiblahute ~/devel/hotdoc/hotdoc/build/xdg-app (xdgapp) $ pip2 install lxml==3.5.0 --install-option="--prefix=/app/"
You are using pip version 7.1.0, however version 8.0.2 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
/usr/lib/python2.7/site-packages/pip/commands/install.py:198: UserWarning: Disabling all use of wheels due to the use of --build-options / --global-options / --install-options.
  cmdoptions.check_install_build_global(options)
Collecting lxml==3.5.0
  Using cached lxml-3.5.0.tar.gz
    Complete output from command python setup.py egg_info:
    Building lxml version 3.5.0.
    Building without Cython.
    Using build configuration of libxslt --should-not-have-used-/usr/bin/xslt-config
    Traceback (most recent call last):
      File "<string>", line 20, in <module>
      File "/tmp/pip-build-J64eQ1/lxml/setup.py", line 233, in <module>
        **setup_extra_options()
      File "/tmp/pip-build-J64eQ1/lxml/setup.py", line 144, in setup_extra_options
        STATIC_CFLAGS, STATIC_BINARIES)
      File "setupinfo.py", line 105, in ext_modules
        versions_ok |= check_min_version(lib_versions[1], (1, 1, 23), 'libxslt')
      File "setupinfo.py", line 345, in check_min_version
        version = tuple(map(int, version.split('.')[:3]))
    ValueError: invalid literal for int() with base 10: '--should-not-have-used-/usr/bin/xslt-config'

I am currently working around that with:

echo '#!/bin/sh' > /app/bin/xml2-config
echo 'pkg-config libxml-2.0 $*' > /app/bin/xml2-config
chmod +x  /app/bin/xml2-config

echo '#!/bin/sh' > /app/bin/xslt-config
echo 'pkg-config libxslt $*' > /app/bin/xslt-config
chmod +x  /app/bin/xslt-config
``

but... meh! :)
alexlarsson commented 8 years ago

Yeah, yocto (used as the base) does this for everything, as they want people to move to pkg-config. Its kind of a pain, but it would be a lot of work to undo all that...

thiblahute commented 8 years ago

Heh, they kept llvm-config (I also need it so it is a good thing :))

thiblahute commented 8 years ago

We should start to share our findings and workarounds for app bundlers!