Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compilation problems under Opensuse 12.3 #26

Open
dubakdubak opened this issue Feb 28, 2014 · 1 comment
Open

Compilation problems under Opensuse 12.3 #26

dubakdubak opened this issue Feb 28, 2014 · 1 comment

Comments

@dubakdubak
Copy link

I've been struggling with the compilation of TEMPered and hidapi and can't find any suitable solution. I've built the hidapi 0.5.2 successfully , just needed to add the "-lpthread" to the LIBS=....
Then hidapi builds OK. What I find strange is, that if I run hidtest, I get the following:

Device Found
type: 0c45 7402
path: 0003:0003:01
serial_number: (null)
Manufacturer: RDing
Product: TEMPerHumiV1.1

unable to open device

Does the "unable to open device" mean anything?

But the real problems I get are when building the TEMPered:
[ 6%] Building C object libtempered/CMakeFiles/tempered-shared.dir/type_hid/sht1x.c.o
[ 13%] Building C object libtempered/CMakeFiles/tempered-shared.dir/type_hid/ntc.c.o
/home/myuser/TEMPered/libtempered/type_hid/ntc.c: In function âtempered_type_hid_read_sensor_group_ntcâ:
/home/myuser/TEMPered/libtempered/type_hid/ntc.c:8:66: warning: unused parameter âgroupâ [-Wunused-parameter]
/home/myuser/TEMPered/libtempered/type_hid/ntc.c:9:41: warning: unused parameter âgroup_dataâ [-Wunused-parameter]
/home/myuser/TEMPered/libtempered/type_hid/ntc.c: In function âtempered_type_hid_get_temperature_ntcâ:
/home/myuser/TEMPered/libtempered/type_hid/ntc.c:20:60: warning: unused parameter âtempCâ [-Wunused-parameter]
[ 20%] Building C object libtempered/CMakeFiles/tempered-shared.dir/type_hid/fm75.c.o
[ 26%] Building C object libtempered/CMakeFiles/tempered-shared.dir/type_hid/common.c.o
In file included from /home/myuser/TEMPered/libtempered/type_hid/internal.h:4:0,
from /home/myuser/TEMPered/libtempered/type_hid/common.c:9:
/home/myuser/hidapi/hidapi/hidapi.h:32:30: warning: redefinition of typedef âhid_deviceâ [-pedantic]
In file included from /home/myuser/TEMPered/libtempered/type_hid/common.c:5:0:
/home/myuser/hidapi/hidapi/hidapi.h:32:30: note: previous declaration of âhid_deviceâ was here
In file included from /home/myuser/TEMPered/libtempered/type_hid/internal.h:4:0,
from /home/myuser/TEMPered/libtempered/type_hid/common.c:9:
/home/myuser/hidapi/hidapi/hidapi.h:34:10: error: redefinition of âstruct hid_device_infoâ
In file included from /home/myuser/TEMPered/libtempered/type_hid/common.c:5:0:
/home/myuser/hidapi/hidapi/hidapi.h:34:10: note: originally defined here
In file included from /home/myuser/TEMPered/libtempered/type_hid/internal.h:4:0,
from /home/myuser/TEMPered/libtempered/type_hid/common.c:9:
/home/myuser/hidapi/hidapi/hidapi.h:69:56: error: conflicting types for âhid_enumerateâ
In file included from /home/myuser/TEMPered/libtempered/type_hid/common.c:5:0:
/home/myuser/hidapi/hidapi/hidapi.h:69:56: note: previous declaration of âhid_enumerateâ was here
In file included from /home/myuser/TEMPered/libtempered/type_hid/internal.h:4:0,
from /home/myuser/TEMPered/libtempered/type_hid/common.c:9:
/home/myuser/hidapi/hidapi/hidapi.h:82:37: error: conflicting types for âhid_free_enumerationâ
In file included from /home/myuser/TEMPered/libtempered/type_hid/common.c:5:0:
/home/myuser/hidapi/hidapi/hidapi.h:82:37: note: previous declaration of âhid_free_enumerationâ was here
/home/myuser/TEMPered/libtempered/type_hid/common.c: In function âtempered_type_hid_initâ:
/home/myuser/TEMPered/libtempered/type_hid/common.c:17:2: warning: implicit declaration of function âhid_initâ [-Wimplicit-function-declaration]
/home/myuser/TEMPered/libtempered/type_hid/common.c: In function âtempered_type_hid_exitâ:
/home/myuser/TEMPered/libtempered/type_hid/common.c:31:2: warning: implicit declaration of function âhid_exitâ [-Wimplicit-function-declaration]
/home/myuser/TEMPered/libtempered/type_hid/common.c: In function âtempered_type_hid_enumerateâ:
/home/myuser/TEMPered/libtempered/type_hid/common.c:61:43: error: âstruct hid_device_infoâ has no member named âinterface_numberâ
/home/myuser/TEMPered/libtempered/type_hid/common.c:92:33: error: âstruct hid_device_infoâ has no member named âinterface_numberâ
/home/myuser/TEMPered/libtempered/type_hid/common.c: In function âtempered_type_hid_queryâ:
/home/myuser/TEMPered/libtempered/type_hid/common.c:359:2: warning: implicit declaration of function âhid_read_timeoutâ [-Wimplicit-function-declaration]
make[2]: *** [libtempered/CMakeFiles/tempered-shared.dir/type_hid/common.c.o] Error 1
make[1]: *** [libtempered/CMakeFiles/tempered-shared.dir/all] Error 2
make: *** [all] Error 2

Any clues????

@ghost
Copy link

ghost commented May 16, 2014

I don't know if I can help, but I will try. I too spent about three days (off and on) working to get everything to compile correctly on Ubuntu. It all works now, but there were a few twists and turns.

When you say you were able to get hidapi to build correctly did you follow the instructions under the README? Did you get any errors at all during the ./bootstrap or ./configure process? Same for make and make install - any errors? Did you do this with root permissions?

If I remember correctly, I saw similar errors. The problem turned out to be that I tried to build and install hidapi without root permissions.

@dubakdubak
Copy link
Author

I didn't have any problems compiling hidapi. Just followed the instruction under README and that was it.
Could you provide me your source that you've modified and which compiles under Ubuntu?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant