Giter Club home page Giter Club logo

Comments (6)

Hi-Angel avatar Hi-Angel commented on August 17, 2024

Okay, I did a quick stab at fixing this. Beforehand, the solution is to run pkg-config --cflags libzfs to infer CFLAGS.

A workaround mentioned in #90 was to set --prefix. I figured, when it's set, this branch that changes CFLAGS gets executed, so some modifications around it required.

Unfortunately I have no idea why is there even a branch matching libzfs.h specifically, nor I have any guess what the variable $zof means. All of that requires further digging and I'm out of time I could dedicate to this problem. Hopefully it will help someone.

from py-libzfs.

Hi-Angel avatar Hi-Angel commented on August 17, 2024

To future readers: there are further bugs in build system: if you apply the workaround with prefix, make still gonna fail with make: /usr/local/bin/python2.7: Command not found. But what's notable in this output is that apparently the bindings this project provides are for old and unmaintained python 2. So using py-libzfs is not future proof.

I've heard 0.8.x ZFS versins provide some python bindings of their own, so I think this is the way forward. For older versions apparently one have to fallback to parsing zfs commands output manually.

from py-libzfs.

mcdonc avatar mcdonc commented on August 17, 2024

@Hi-Angel FWIW, this is just a bug, I just tested it on Py 3.7 and it appears to work fine after modifying the Makefile to point at a py 3 venv. Probably rather than a configure script and a Makefile, the project could use setuptools-ish processes for building the extensions, just a matter of missing roundtuits likely.

from py-libzfs.

 avatar commented on August 17, 2024

But what's notable in this output is that apparently the bindings this project provides are for old and unmaintained python 2. So using py-libzfs is not future proof.

You can build py-libzfs for whatever Python version you like. We are targeting 3.8 at the moment, but you can use make PYTHON=python3.7 for example to build for Python 3.7, or whatever version you have installed. Defaulting to 2.7 is probably just an oversight.

Unfortunately I have no idea why is there even a branch matching libzfs.h specifically, nor I have any guess what the variable $zof means. All of that requires further digging and I'm out of time I could dedicate to this problem. Hopefully it will help someone.

The reason for this complexity is twofold: partly that libzfs is not supposed to be a public interface in ZFS, it's an internal private library that has an unstable and unclean API; and on top of that there are several different ZFS implementations on different platforms that put headers in different places, require different build flags, and have different function signatures within libzfs. $zof is referring to https://github.com/zfsonfreebsd/ZoF

from py-libzfs.

Hi-Angel avatar Hi-Angel commented on August 17, 2024

I see, thanks

there are several different ZFS implementations on different platforms that put headers in different places, require different build flags

Doesn't pkg-config cover this?

from py-libzfs.

 avatar commented on August 17, 2024

No, there are a few configurations where ZFS isn't a package at all, it's part of the FreeBSD base system. There is no pkg-config in that case.

from py-libzfs.

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.