trainman419 / python-cec

Other
170 stars 42 forks source link

Error during Setup on Raspberry Pi #2

Closed peterdemartini closed 10 years ago

peterdemartini commented 10 years ago

Hi,

I installed the dependencies on my nearly out of the box Raspberry Pi. Unfortunately I am getting a compile error in the setup script. Maybe I am missing something. I have tried running it in sudo mode too - but not luck. Any help would be much appreciated.

$ python setup.py install
running install
running build
running build_ext
building 'cec' extension
gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -I/usr/include/python2.7 -c cec.cpp -o build/temp.linux-armv6l-2.7/cec.o
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for Ada/C/ObjC but not for C++ [enabled by default]
gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -I/usr/include/python2.7 -c device.cpp -o build/temp.linux-armv6l-2.7/device.o
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for Ada/C/ObjC but not for C++ [enabled by default]
device.cpp: In function ‘PyObject* Device_new(PyTypeObject*, PyObject*, PyObject*)’:
device.cpp:180:37: error: expected ‘)’ before ‘PRIX64’
device.cpp:180:51: warning: conversion lacks type at end of format [-Wformat]
device.cpp:180:51: warning: too many arguments for format [-Wformat-extra-args]
device.cpp:180:51: warning: conversion lacks type at end of format [-Wformat]
device.cpp:180:51: warning: too many arguments for format [-Wformat-extra-args]
error: command 'gcc' failed with exit status 1
trainman419 commented 10 years ago

This is a compile error. It looks like the integer types on the Raspberry Pi don't support some of the more obscure 64-bit print specifiers.

Try the latest version.

Also be aware that the stock libcec that's packaged with raspbian is not compiled with Raspberry Pi support.

peterdemartini commented 10 years ago

Thanks for speedy response. When you say upgrade to the latest version, what do you mean? Latest version of Python or raspbian?

trainman419 commented 10 years ago

By latest version I mean the latest version of the python-cec library.

peterdemartini commented 10 years ago

I see. I am still getting the same error after a git pull. Let me know if you need any more information from me.

trainman419 commented 10 years ago

If the symbol it's complaining about is now PRIx64 (note changed case), then there's something non-standard about your system's inttypes.h header. I have a Raspberry Pi back home and I can take a look at this in a few days.

If you're still seeing the exact same error then you don't have the latest revision.

You may also want to try checking out the last stable release, 0.1.1 with git checkout 0.1.1

peterdemartini commented 10 years ago

Well...running git checkout 0.1.1 did fix the issue. Thanks again for all the help.

trainman419 commented 10 years ago

I tested this on my Pi and tracked it down to a header/#define problem. It's now fixed in master.