Not sure if this should go here or in Embedded...
I'm trying to build an RPi.GPIO module for FreeBSD to allow Python programs to easily interact with GPIO on a Raspberry Pi. Apparently under Raspian it is as easy as running
Here is what I got on FreeBSD on a RPi2:-
Any ideas as to what is missing here?
I'm trying to build an RPi.GPIO module for FreeBSD to allow Python programs to easily interact with GPIO on a Raspberry Pi. Apparently under Raspian it is as easy as running
pip3 install RPi.GPIO
Here is what I got on FreeBSD on a RPi2:-
Code:
RPi.GPIO
Using cached RPi.GPIO-0.6.3.tar.gz
Installing collected packages: RPi.GPIO
Running setup.py install for RPi.GPIO ... [?25l- \ | / error
Complete output from command /usr/local/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-ax9qhiic/RPi.GPIO/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-ah575x8n-record/install-record.txt --single-version-externally-managed --compile:
running install
running build
running build_py
creating build
creating build/lib.freebsd-11.1-RELEASE-arm-3.6
creating build/lib.freebsd-11.1-RELEASE-arm-3.6/RPi
copying RPi/__init__.py -> build/lib.freebsd-11.1-RELEASE-arm-3.6/RPi
creating build/lib.freebsd-11.1-RELEASE-arm-3.6/RPi/GPIO
copying RPi/GPIO/__init__.py -> build/lib.freebsd-11.1-RELEASE-arm-3.6/RPi/GPIO
running build_ext
building 'RPi._GPIO' extension
creating build/temp.freebsd-11.1-RELEASE-arm-3.6
creating build/temp.freebsd-11.1-RELEASE-arm-3.6/source
/usr/bin/cc -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -O2 -pipe -fno-strict-aliasing -fPIC -I/usr/local/include/python3.6m -c source/py_gpio.c -o build/temp.freebsd-11.1-RELEASE-arm-3.6/source/py_gpio.o
source/py_gpio.c:87:4: error: function definition is not allowed here
{
^
source/py_gpio.c:143:10: warning: implicit declaration of function 'cleanup_one' is invalid in C99 [-Wimplicit-function-declaration]
cleanup_one();
^
source/py_gpio.c:200:24: error: function definition is not allowed here
int setup_one(void) {
^
source/py_gpio.c:293:13: warning: implicit declaration of function 'setup_one' is invalid in C99 [-Wimplicit-function-declaration]
if (!setup_one())
^
source/py_gpio.c:345:21: error: function definition is not allowed here
int output(void) {
^
source/py_gpio.c:419:18: error: called object type 'PyObject *' (aka 'struct _object *') is not a function or function pointer
if (!output())
~~~~~~^
source/py_gpio.c:475:18: error: called object type 'PyObject *' (aka 'struct _object *') is not a function or function pointer
if (!output())
~~~~~~^
source/py_gpio.c:581:32: warning: comparison of integers of different signs: 'const int' and 'unsigned int' [-Wsign-compare]
if (*(*pin_to_gpio+chan) == gpio)
~~~~~~~~~~~~~~~~~~~~ ^ ~~~~
3 warnings and 5 errors generated.
error: command '/usr/bin/cc' failed with exit status 1
----------------------------------------
[31mCommand "/usr/local/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-ax9qhiic/RPi.GPIO/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-ah575x8n-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-build-ax9qhiic/RPi.GPIO/[0m
[?25hroot@rpi2:~
Any ideas as to what is missing here?