Comments (6)
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.
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.
@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.
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.
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.
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)
- ZFS 2.0 issue HOT 1
- Need a way to get just one property of a dataset HOT 4
- pip package HOT 2
- Zpool unavailable, __getstate__() returns KeyError: 'unsup_feat' HOT 2
- Build failure on recent FreeBSD 14-CURRENT HOT 3
- Memory leak
- Segmentation fault if zfs kernel module is not loaded
- Documentation of available methods, especially send() and receive() HOT 2
- Intermittent EINVAL in ZFSPool.sync
- ZFS_IOC_SEND_PROGRESS requires the name of the snapshot currently being transferred
- build breaks on systems without ZPOOL_STATUS_ERRATA, ZPOOL_STATUS_REBUILDING HOT 2
- ZFSException doesn't round-trip through pickle correctly
- Segmentation fault caused by Asyncio concurrent access to properties HOT 4
- Build failure due to zpool_search_import() missing on FreeBSD-current HOT 8
- build breaks on systems without ZFS_PROP_USEROBJUSED, etc. HOT 1
- snapshots_serialized(props=["createtxg"], ...) misformats the data
- Expose libzfs.zpool_refresh_stats
- Add stubs for static analysis (PR accepted?)
- Create release Tags HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from py-libzfs.