Comments (6)
What is the clang2py full command line you are using?
from ctypeslib.
What is the clang2py full command line you are using?
clang2py demo.h
.
I also tried clang2py -o demo.py demo.h
but the resulting demo.py
file is just as empty.
edit: demo.h is the header file as given in the opening message.
from ctypeslib.
side note: clang2py exits with exit code 0. There is just no output whatsoever.
Here is a full output for reference:
root@1c9918f0e4cd:/workspace# cat demo.h
#pragma once
#define AVALUE 10
typedef enum {
something,
somethingelse,
} anEnum;
root@1c9918f0e4cd:/workspace# clang2py demo.h
root@1c9918f0e4cd:/workspace#
from ctypeslib.
@lbureau-billettiqueservices bottom line it's a dependency issue with the python bindings from clang.
Solution
pending a better error message in the next release, uses this to install ctypeslib2
pip install clang==11 ctypeslib2
Explainer
docker.io/python:3.8.16 will default to python3.8 installed in /usr/local/bin/python3.8
on the same container, there is a /usr/bin/python3.9
-
When you run llvm.sh it does not apt install a python package for clang.
you could install it, but that won't solve your issue - apt install python3-clang-11
if you installed that, it would install the clang 11 package in /usr/lib/python3.9/site-packages.
That won't help you , because the container would run /usr/local/bin/python3.8 -
When you install ctypeslib2, the current version is 2.3.2 from pypi, it has a loose dependency on python-clang
the latest version of the python-clang package on pypi is clang16 released recently.
the ctypeslib2 v2.3.2 package doesn't like that apparently and errors out silently.
if you force the installation of the v11 python-clang package, it will properly work. -
If you install the latest code from this repo, the error is a bit clearer.
Conclusion: I need to push a new ctypeslib package on pypi
from ctypeslib.
warning messages are added in v2.3.3, it does not silently fail
from ctypeslib.
Thanks for the fantastic support @trolldbois , i'm going to test your solution asap.
from ctypeslib.
Related Issues (20)
- Define with parenthesis not parsed HOT 1
- clang2py not installed in "/usr/bin" HOT 1
- define didn't convert to python HOT 1
- Add if Windows 32bit use WinDLL instead CDLL HOT 1
- Use of "-r" option makes clang2py crash HOT 2
- do not support enum without name HOT 3
- Nested named structs names are not detected. HOT 8
- ctypeslib2 gives following error on any anaconda environment whenever installed with pip. HOT 3
- AttributeError: 'Output' object has no attribute 'options' HOT 1
- clang dependecy issue in version 2.3.2 (ubuntu 20.04) HOT 6
- Macro values with parenthesis are not converted HOT 2
- File format has no dynamic symbol table HOT 1
- get_version() access violation on clang 17.0.2 HOT 2
- C++ interface HOT 1
- Add __slots__ to structs HOT 4
- macOS quirks HOT 1
- as_dict() is broken for arrays of Structures
- anonymous union got incorrect name HOT 1
- solve windows clang-17.0.6 get_version() access violation exception
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 ctypeslib.