Thanks, I changed the entries in the pybind11 portfile as well as in the OpenImageIO portfile to point to Python 2.7. and it compiles without complaints.

But importing the final module into python fails (python crashes):

>>> import OpenImageIO as oii
Fatal Python error: PyThreadState_Get: no current thread

Vcpkg uses its own python2.7 libs which are for python 2.7.15 whereas the installed python interpreter is version 2.7.14. Any idea what I can try?

haggi


Am 05.05.2020 um 16:00 schrieb Simon Björk:
You can build Python2.7 bindings with OIIO. I don't know why they changed to Python3, but in \vcpkg-master\ports\pybind11\portfile.make you can replace Python3 with Python2.


-------------------------------
Simon Björk
Compositor/TD

+46 (0)70-2859503
www.bjorkvisuals.com <http://www.bjorkvisuals.com>


Den tis 5 maj 2020 kl 10:36 skrev haggi <ha...@haggi.de <mailto:ha...@haggi.de>>:

    Hi,

    I tried to compile the current OIIO 2.2.3 myself. The reason why I
    not
    use vcpkg is that I need the python2.7 bindings, with vcpkg I was
    unable
    to build a working 2.7 python library.

    So I decieded to try it myself. I use cmake-gui and try to build a
    static version of the OIIO libs. My plan is to use only the required
    libs to builds to build oiio and if everything works I would try to
    include more plugins step by step. I was able to build the
    OpenImageIO
    libs and almost all the tools. Only the oiiotool refuses to
    compile with
    this error:

    Error    C2664    'OpenImageIO_v2_2::ArgParse::Arg
    &OpenImageIO_v2_2::ArgParse::Arg::action(int (__cdecl *)(int,const
    char
    **))': cannot convert argument 1 from 'void (__cdecl
    *)(OpenImageIO_v2_2::span<const char *const ,-1>)' to
    'OpenImageIO_v2_2::ArgParse::ArgAction &&' oiiotool
    D:\UserDatenHaggi\Documents\coding\oiio\src\oiiotool\oiiotool.cpp 5652

    The line in the oiiotool.cpp is this one:

         ap.arg("--info")
           .help("Print resolution and basic info on all inputs, detailed
    metadata if -v is also used (options: format=xml:verbose=1)")
           .action(set_printinfo);

    Then I tried to compile the oiio python plugin with pybind11-2.5.0
    and
    get this errormessage:

    d:\userdatenhaggi\documents\coding\oiio\src\python\py_oiio.h(270):
    error
    C2662: 'pybind11::buffer_info pybind11::buffer::request(bool)':
    cannot
    convert 'this' pointer from 'const pybind11::buffer' to
    'pybind11::buffer &'

    What is this line:

    template<typename T>
    inline bool
    py_buffer_to_stdvector(std::vector<T>& vals, const py::buffer& obj)
    {
              OIIO_DASSERT(py::isinstance<py::buffer>(obj));
    270>>    oiio_bufinfo binfo(obj.request());
             bool ok = true;


    I'd really appreciate if anyone could give me a hint what I can do to
    solve these problems.

    Thanks a lot.

    haggi

    _______________________________________________
    Oiio-dev mailing list
    Oiio-dev@lists.openimageio.org <mailto:Oiio-dev@lists.openimageio.org>
    http://lists.openimageio.org/listinfo.cgi/oiio-dev-openimageio.org


_______________________________________________
Oiio-dev mailing list
Oiio-dev@lists.openimageio.org
http://lists.openimageio.org/listinfo.cgi/oiio-dev-openimageio.org
_______________________________________________
Oiio-dev mailing list
Oiio-dev@lists.openimageio.org
http://lists.openimageio.org/listinfo.cgi/oiio-dev-openimageio.org

Reply via email to