Giter VIP home page Giter VIP logo

Comments (5)

jcupitt avatar jcupitt commented on August 18, 2024

Hello @rebkwok,

Thanks for reporting this -- it was using vips_image_get_fields(), a feature only added in libvips 8.5. This used to work, since in ABI mode references are only looked up when they are used. In API mode (the new default in 2.1), all references are compiled at install time, so the undefined ref makes install fail.

git master pyvips now tests the libvips version number before attempting to wrap vips_image_get_fields(). Would you be able to test it? Just clone the repo and install from there.

from pyvips.

rebkwok avatar rebkwok commented on August 18, 2024

I tried installing from the latest commit on master

pip install git+git://github.com/jcupitt/pyvips.git@bc35d3c12f71db49bbf37cddb09dc8b5d9b79b16

But similar errors (although no reference to vips_image_get_fields() that I can see):

Collecting git+git://github.com/jcupitt/pyvips.git@bc35d3c12f71db49bbf37cddb09dc8b5d9b79b16
  Cloning git://github.com/jcupitt/pyvips.git (to bc35d3c12f71db49bbf37cddb09dc8b5d9b79b16) to /tmp/pip-wj65t_ha-build
  Could not find a tag or branch 'bc35d3c12f71db49bbf37cddb09dc8b5d9b79b16', assuming commit.
Collecting cffi>=1.0.0 (from pyvips==2.1.2)
  Using cached cffi-1.11.5-cp36-cp36m-manylinux1_x86_64.whl
Collecting pkgconfig (from pyvips==2.1.2)
Collecting pycparser (from cffi>=1.0.0->pyvips==2.1.2)
Installing collected packages: pycparser, cffi, pkgconfig, pyvips
  Running setup.py install for pyvips ... error
    Complete output from command /.virtualenvs/venv/bin/python3.6 -u -c "import setuptools, tokenize;__file__='/tmp/pip-wj65t_ha-build/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-mezy41dz-record/install-record.txt --single-version-externally-managed --compile --install-headers /.virtualenvs/venv/include/site/python3.6/pyvips:
    running install
    running build
    running build_py
    creating build
    creating build/lib.linux-x86_64-3.6
    creating build/lib.linux-x86_64-3.6/pyvips
    copying pyvips/pyvips_build.py -> build/lib.linux-x86_64-3.6/pyvips
    copying pyvips/voperation.py -> build/lib.linux-x86_64-3.6/pyvips
    copying pyvips/gobject.py -> build/lib.linux-x86_64-3.6/pyvips
    copying pyvips/enums.py -> build/lib.linux-x86_64-3.6/pyvips
    copying pyvips/vobject.py -> build/lib.linux-x86_64-3.6/pyvips
    copying pyvips/gvalue.py -> build/lib.linux-x86_64-3.6/pyvips
    copying pyvips/vimage.py -> build/lib.linux-x86_64-3.6/pyvips
    copying pyvips/error.py -> build/lib.linux-x86_64-3.6/pyvips
    copying pyvips/__init__.py -> build/lib.linux-x86_64-3.6/pyvips
    copying pyvips/base.py -> build/lib.linux-x86_64-3.6/pyvips
    copying pyvips/version.py -> build/lib.linux-x86_64-3.6/pyvips
    copying pyvips/decls.py -> build/lib.linux-x86_64-3.6/pyvips
    copying pyvips/vinterpolate.py -> build/lib.linux-x86_64-3.6/pyvips
    running build_ext
    generating cffi module 'build/temp.linux-x86_64-3.6/_libvips.c'
    creating build/temp.linux-x86_64-3.6
    building '_libvips' extension
    creating build/temp.linux-x86_64-3.6/build
    creating build/temp.linux-x86_64-3.6/build/temp.linux-x86_64-3.6
    x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -DMAGICKCORE_HDRI_ENABLE=0 -DMAGICKCORE_QUANTUM_DEPTH=16 -DMAGICKCORE_HDRI_ENABLE=0 -DMAGICKCORE_QUANTUM_DEPTH=16 -I/usr/include/libgsf-1 -I/usr/include/libxml2 -I/usr/include/x86_64-linux-gnu//ImageMagick-6 -I/usr/include/ImageMagick-6 -I/usr/include/x86_64-linux-gnu//ImageMagick-6 -I/usr/include/ImageMagick-6 -I/usr/include/orc-0.4 -I/usr/include/OpenEXR -I/usr/include/openslide -I/usr/lib/x86_64-linux-gnu/hdf5/serial/include -I/usr/include/pango-1.0 -I/usr/include/harfbuzz -I/usr/include/pango-1.0 -I/usr/include/freetype2 -I/usr/include/x86_64-linux-gnu -I/usr/include/libpng12 -I/usr/include/libexif -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/python3.6m -I/.virtualenvs/venv/include/python3.6m -c build/temp.linux-x86_64-3.6/_libvips.c -o build/temp.linux-x86_64-3.6/build/temp.linux-x86_64-3.6/_libvips.o
    build/temp.linux-x86_64-3.6/_libvips.c: In function ā€˜_cffi_checkfld__GValueā€™:
    build/temp.linux-x86_64-3.6/_libvips.c:4529:25: warning: initialization from incompatible pointer type [-Wincompatible-pointer-types]
       { uint64_t(*tmp)[2] = &p->data; (void)tmp; }
                             ^
    build/temp.linux-x86_64-3.6/_libvips.c: In function ā€˜_cffi_checkfld__VipsImageā€™:
    build/temp.linux-x86_64-3.6/_libvips.c:4569:25: error: ā€˜VipsImage {aka struct _VipsImage}ā€™ has no member named ā€˜parent_instanceā€™
       { VipsObject *tmp = &p->parent_instance; (void)tmp; }
                             ^
    build/temp.linux-x86_64-3.6/_libvips.c: In function ā€˜_cffi_checkfld__VipsObjectā€™:
    build/temp.linux-x86_64-3.6/_libvips.c:4587:22: error: ā€˜VipsObject {aka struct _VipsObject}ā€™ has no member named ā€˜parent_instanceā€™
       { GObject *tmp = &p->parent_instance; (void)tmp; }
                          ^
    build/temp.linux-x86_64-3.6/_libvips.c:4590:19: warning: initialization from incompatible pointer type [-Wincompatible-pointer-types]
       { void * *tmp = &p->argument_table; (void)tmp; }
                       ^
    In file included from /usr/include/sched.h:28:0,
                     from /usr/include/pthread.h:23,
                     from /usr/include/glib-2.0/glib/deprecated/gthread.h:128,
                     from /usr/include/glib-2.0/glib.h:107,
                     from /usr/include/vips/vips.h:85,
                     from build/temp.linux-x86_64-3.6/_libvips.c:493:
    build/temp.linux-x86_64-3.6/_libvips.c: At top level:
    build/temp.linux-x86_64-3.6/_libvips.c:4775:24: error: ā€˜VipsImage {aka struct _VipsImage}ā€™ has no member named ā€˜parent_instanceā€™
       { "parent_instance", offsetof(VipsImage, parent_instance),
                            ^
    build/temp.linux-x86_64-3.6/_libvips.c:4776:47: error: ā€˜VipsImage {aka struct _VipsImage}ā€™ has no member named ā€˜parent_instanceā€™
                            sizeof(((VipsImage *)0)->parent_instance),
                                                   ^
    In file included from /usr/include/sched.h:28:0,
                     from /usr/include/pthread.h:23,
                     from /usr/include/glib-2.0/glib/deprecated/gthread.h:128,
                     from /usr/include/glib-2.0/glib.h:107,
                     from /usr/include/vips/vips.h:85,
                     from build/temp.linux-x86_64-3.6/_libvips.c:493:
    build/temp.linux-x86_64-3.6/_libvips.c:4781:24: error: ā€˜VipsObject {aka struct _VipsObject}ā€™ has no member named ā€˜parent_instanceā€™
       { "parent_instance", offsetof(VipsObject, parent_instance),
                            ^
    build/temp.linux-x86_64-3.6/_libvips.c:4782:48: error: ā€˜VipsObject {aka struct _VipsObject}ā€™ has no member named ā€˜parent_instanceā€™
                            sizeof(((VipsObject *)0)->parent_instance),
                                                    ^
    error: command 'x86_64-linux-gnu-gcc' failed with exit status 1

    ----------------------------------------
Command "/.virtualenvs/venv/bin/python3.6 -u -c "import setuptools, tokenize;__file__='/tmp/pip-wj65t_ha-build/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-mezy41dz-record/install-record.txt --single-version-externally-managed --compile --install-headers /.virtualenvs/venv/include/site/python3.6/pyvips" failed with error code 1 in /tmp/pip-wj65t_ha-build/```

from pyvips.

jcupitt avatar jcupitt commented on August 18, 2024

OK, fixed that too. Could you try again?

I built and installed libvips 8.2 and it now works for me here.

from pyvips.

rebkwok avatar rebkwok commented on August 18, 2024

šŸ‘ All looking good here too. Thanks for the quick fix!

from pyvips.

jcupitt avatar jcupitt commented on August 18, 2024

woo, I'll push out an update. Thanks again!

from pyvips.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    šŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. šŸ“ŠšŸ“ˆšŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ā¤ļø Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.