Conversation
Build taishi-i/dynet (the dynet38 PyPI distribution, a Python 3.8+ wheel fork of clab/dynet) for riscv64. setup.py downloads DyNet's pinned Eigen snapshot, builds libdynet with CMake and the Cython _dynet extension against it; cibuildwheel drives that as upstream's own wheel workflow does, and the test step runs upstream's tests/python/test.py as its Travis job did. The fork pushes no 2.2 tag. Pin the build_macos_wheels branch tip, 3c9f35de, whose only differences from master are the CMake 4 and Cython 3 compatibility fixes the latest 2.2 wheels (cp314) needed, and which still declares version="2.2". Three patches: - skip -march=native on RISC-V, which riscv64 GCC rejects outright; - give mem.cc a posix_memalign() fallback, since GCC ships <mm_malloc.h> for x86 only; - point license_files at the real LICENSE.txt plus Eigen's MPL-2.0 text, since upstream's "../LICENSE.txt" matches nothing and its wheels ship no licence at all. cp314t is left out, as upstream builds no free-threaded wheel.
luhenry
added a commit
that referenced
this pull request
Sep 25, 2026
Contributor
|
All three 2.2 jobs compiled libdynet and _dynet, then died in
bdist_wheel with "[Errno 2] No such file or directory: 'LICENSE.txt'".
setuptools resolves license_files against the working directory, and
DyNet's build_py os.chdir()s into build/<py>-64bit/python for the rest
of the build, so the relative LICENSE.txt/LICENSE.eigen-mpl2 names from
the licence patch only exist from the source root. Absolute paths are
rejected by setuptools ("should be relative"), so the patch now copies
both files into that directory right after the chdir.
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
dynet382.2Compiles the DyNet C++ library (CMake, pinned Eigen snapshot) and its Cython
_dynetextension; this is a prerequisite for a separate nagisa port, which depends on dynet38. Upstream publishes no riscv64 wheel and no sdist.Mirrors upstream's
build_macos_wheels.yml.Differs from upstream
3c9f35de- upstream pushes no 2.2 tag; this is the tree its latest 2.2 wheels came fromMatrix: cp312, cp313, cp314 - upstream builds no free-threaded wheel.
Testing
tests/python/test.py, from its Travis job)License: Wheel bundles Eigen headers (MPL-2.0); upstream ships no licence text at all, so the build adds DyNet's and Eigen's.
Patches
0001-cmake-don-t-pass-march-native-on-RISC-V.patch- To upstream. riscv64 GCC rejects-march=native. riscv64-only.0002-mem-fall-back-to-posix_memalign-when-mm_malloc.h-is-.patch- To upstream.<mm_malloc.h>is x86-only in GCC. riscv64-only.0003-setup.py-ship-DyNet-s-and-Eigen-s-licences-in-the-wh.patch- To upstream. Wheel ships no licences. Reproduces on x86.Built on cp312; 60 passed, 0 skipped.