Closed jgrevich closed 11 years ago
I get similar errors in 32-bit Ubuntu Precise:
WARNING!!! method 'GetNodeNeighbors': Argument '_return._nodeNeighbors' size mismatch (src=96 tgt=8) - CHECK GENERATED CODE!
WARNING!!! method 'GetValueAsFloat': Argument '_return.o_value' size mismatch (src=64 tgt=32) - CHECK GENERATED CODE!
WARNING!!! method 'SetValue_Float': Argument '_value' size mismatch (src=64 tgt=32) - CHECK GENERATED CODE!
WARNING!!! method 'GetAssociations': Argument '_return.o_associations' size mismatch (src=96 tgt=8) - CHECK GENERATED CODE!
defining BeginControllerCommand_callback
WARNING!!! target argument '* _callback' not bound to a source node - needs patching...
WARNING!!! target argument 'void* _context' not bound to a source node - needs patching...
WARNING!!! method 'GetAllScenes': Argument '_return._sceneIds' size mismatch (src=96 tgt=8) - CHECK GENERATED CODE!
WARNING!!! method 'AddSceneValue_Float': Argument '_value' size mismatch (src=64 tgt=32) - CHECK GENERATED CODE!
WARNING!!! method 'SceneGetValueAsFloat': Argument '_return.o_value' size mismatch (src=64 tgt=32) - CHECK GENERATED CODE!
WARNING!!! method 'SetSceneValue_Float': Argument '_value' size mismatch (src=64 tgt=32) - CHECK GENERATED CODE!
WARNING!!! method 'GetDriverStatistics': Argument '_return._data' size mismatch (src=608 tgt=448) - CHECK GENERATED CODE!
I'm not sure if the above warnings are related to why it fails, but here is the part that is failing:
g++ -o ozwd -g -L/usr/lib/ -L/usr/local/lib -L/usr/local/lib/thrift -L../BoostStomp -Wl,-rpath=../open-zwave/cpp/lib/linux/ -Wl,-rpath=../BoostStomp -Wl,-rpath=/usr/local/lib Main.o gen-cpp/RemoteManager.o gen-cpp/ozw_constants.o gen-cpp/ozw_types.o -lgnutls -ludev -lboost_thread -lboost_program_options -lboost_filesystem -lboost_system -lthrift -lbooststomp ../open-zwave/cpp/lib/linux/libopenzwave.so
../open-zwave/cpp/lib/linux/libopenzwave.so: undefined reference to `udev_enumerate_scan_devices'
../open-zwave/cpp/lib/linux/libopenzwave.so: undefined reference to `udev_new'
../open-zwave/cpp/lib/linux/libopenzwave.so: undefined reference to `udev_list_entry_get_name'
../open-zwave/cpp/lib/linux/libopenzwave.so: undefined reference to `udev_enumerate_get_list_entry'
../open-zwave/cpp/lib/linux/libopenzwave.so: undefined reference to `udev_list_entry_get_next'
../open-zwave/cpp/lib/linux/libopenzwave.so: undefined reference to `udev_device_new_from_syspath'
../open-zwave/cpp/lib/linux/libopenzwave.so: undefined reference to `udev_unref'
../open-zwave/cpp/lib/linux/libopenzwave.so: undefined reference to `udev_device_get_devnode'
../open-zwave/cpp/lib/linux/libopenzwave.so: undefined reference to `udev_enumerate_unref'
../open-zwave/cpp/lib/linux/libopenzwave.so: undefined reference to `udev_device_new_from_devnum'
../open-zwave/cpp/lib/linux/libopenzwave.so: undefined reference to `udev_enumerate_new'
../open-zwave/cpp/lib/linux/libopenzwave.so: undefined reference to `udev_device_get_parent_with_subsystem_devtype'
../open-zwave/cpp/lib/linux/libopenzwave.so: undefined reference to `udev_device_unref'
../open-zwave/cpp/lib/linux/libopenzwave.so: undefined reference to `udev_device_get_sysattr_value'
../open-zwave/cpp/lib/linux/libopenzwave.so: undefined reference to `udev_enumerate_add_match_subsystem'
collect2: ld returned 1 exit status
make: *** [ozwd] Error 1
you need to add -ludev (package libudev-dev in debian-based distros) so as to link against the udev library, which is the Linux device management subsystem (see: http://en.wikipedia.org/wiki/Udev )
@ekarak Thanks for the pointer, I got it working.
-ludev was there but needed to be linked at the end of the compile statement for me:
g++ -o ozwd -g -L/usr/lib/ -L/usr/local/lib -L/usr/local/lib/thrift -L../BoostStomp -Wl,-rpath=../open-zwave/cpp/lib/linux/ -Wl,-rpath=../BoostStomp -Wl,-rpath=/usr/local/lib Main.o gen-cpp/RemoteManager.o gen-cpp/ozw_constants.o gen-cpp/ozw_types.o -lgnutls -lboost_thread -lboost_program_options -lboost_filesystem -lboost_system -lthrift -lbooststomp ../open-zwave/cpp/lib/linux/libopenzwave.so -ludev
Compiled on 64bit Ubuntu Precise. I assume the same for 32-bit, regardless I'll test it out.
Any idea how to get around this? Looks like the source sizes are 64bit whilst the tgt is 32.
I'm not sure how to handle the "not bound to a source node" error, any suggestions?