Can't install Phidgets ROS driver - ros

I have installed the Phidgets libraries following the following link and the "Hello World" example was working, but when I install the Phidgets ROS driver, I get this error:
fatal error: libphidgets/phidget21.h: No such file or directory compilation terminated.
What's causing this? The libraries have been installed by the Linux driver, right?

Phidgets, in their infinite wisdom desired to abandon the "phidget21" architecture and now have a completely different and incompatible phidgets22 driver architecture. When you installed the libraries from their web site, you can only get the version 22 driver architecture :( -- hint, version 21 is still out there on GitHub, so if you go find it, download and install everything should work as expected. Someone will need to migrate all the ROS code to the newer version 22 architecture for this to work as expected.

Related

C5105 and other compiler warnings when building with Github Actions / WinSDK 10.0.17763.0

A couple of days ago I have started to migrate my CMake-based C++ library project from Travis CI to GitHub Actions. I immediately ran into trouble with the windows-latest runner (link to runner specs). After many wasted hours I tracked down the issue to the Windows SDK that CMake selects when it generates the build system.
On a local VM where I tried to replicate the runner environment CMake always selects the SDK version 10.0.18362.0, because no other SDK is installed on that system. On the runner system, though, there seem to be several SDKs installed (cf. the runner specs), and CMake by default selects SDK version 10.0.17763.0.
The actual problem: With 10.0.17763.0 selected, as soon as the first file is being compiled the compiler starts spewing out C5105 warnings like the following (line breaks added by me for better readability):
C:\Program Files (x86)\Windows Kits\10\Include\10.0.17763.0\ucrt\corecrt_search.h(188,5):
warning C5105: macro expansion producing 'defined' has undefined behavior
[D:\a\libsgfcplusplus\libsgfcplusplus\build\src\libsgfcplusplus_shared_objects.vcxproj]
C:\Program Files (x86)\Windows Kits\10\Include\10.0.17763.0\ucrt\stdlib.h(79,5):
warning C5105: macro expansion producing 'defined' has undefined behavior
[D:\a\libsgfcplusplus\libsgfcplusplus\build\src\libsgfcplusplus_shared_objects.vcxproj]
[...]
Eventually there are also errors which cause the build to fail. The first of these errors is this:
C:\Program Files (x86)\Windows Kits\10\Include\10.0.17763.0\um\oaidl.h(487,17):
error C2059: syntax error: '/'
[D:\a\libsgfcplusplus\libsgfcplusplus\build\src\libsgfcplusplus_shared_objects.vcxproj]
When I force CMake to use a different SDK, by setting CMAKE_SYSTEM_VERSION to 10.0.18362.0, all problems go away and the build works fine.
Before I go down that road of forcing CMake to do something it doesn't want to do, I wanted to ask for advice if someone can recommend a better approach?
Also of interest would be if someone could explain what's actually going on here? How is it possible that MSVC has problems parsing Microsoft's own system header files when using one SDK version, and no problem at all when using another SDK version? Link to a build log in case someone is interested, but this might go away soon when I delete the branch.
In the meantime I managed to reproduce the problem on my local VM by installing the component "Windows 10 SDK (10.0.17763.0)" in the Visual Studio Installer. On the VM CMake still defaults to 10.0.18362.0, but when I force it to use 10.0.17763.0 like this
cd build
cmake -DCMAKE_SYSTEM_VERSION="10.0.17763.0" ..
then I get the same build failure as on the Github Actions runner. At least I can now say that it's not the Github Actions runner that is at fault.
On the other hand I also can't see how my project should be the culprit. I certainly don't do anything special that should make the project build with one Windows SDK, but not with the other.
Lacking the time (and the will) to further investigate the issue, for the moment I decided to follow the path of least resistance and am now building with these lines in the project's build.yml:
cd build
cmake -DCMAKE_SYSTEM_VERSION="10.0.18362.0" ..
cmake --build . --config Release

Unable to Load Dart SDK on Raspberry Pi Zero W

I'm trying to get the Dart SDK on a Pi Zero W.
When I download the SDK archive, extract it, and put it in the /usr/lib folder manually, I get segmentation faults when I try to run any of the command line tools. I reflashed the memory card (32GB, so plenty large) from scratch from an x64 machine and pre-loaded the SDK as well to help ensure that there wasn't any funky Pi file corruption and got the same result.
Though I was sure it wouldn't work, I loaded the ARM7 version of the SDK, and got executable file format incompatibility errors that were not surprising.
I downloaded the .deb package, and got a warning that the file was not meant for my Pi and that I might break things, so I didn't try to install it.
I used the apt-get instructions from the Dart website and that failed with the error "E: Unable to locate package dart" which seems to indicate that I had the incorrect name for the package (note: I copied and pasted it directly from the Dart website). I tried to look through the repository contents, and assuming that I looked at the correct file, there were not any Dart entries in it, so the error is not surprising.
My Linux competence is suspect, so I could use any ideas. I'd prefer not to build the SDK from scratch as, in my experience, open source build instructions almost always assume that the user needs to know/do something that is not explicitly listed in the instructions, so that tends to be a 2-hour effort that ultimately fails (pretty sure I'm not the only one who's had that experience).
Thoughts, anyone?
That is not going to work. Your problem is that "Pi Zero W" is a "1GHz single-core ARMv6 CPU (BCM2835)" CPU which means it can only execute programs for the ARMv6 architecture or lower.
Dart does have a minimum requirement for ARMv7 since they removed support for ARMv6 early this year: https://github.com/dart-lang/sdk/issues/42069
The support was never that great for ARMv6 (I did have an old Raspberry Pi) and programs was running really slow with missing support for FFI. So my recommendation is to get a board which supports ARMv7 or ARMv8 (ARM64) which works really great.

libpng error in application compiled by bazel

I am using ubuntu 17.04 to compile tensorflow c++ program related to alexnet that use libpng.
libpng warning: Application was compiled with png.h from libpng-1.6.23
libpng warning: Application is running with png.c from libpng-1.2.53
libpng error: Incompatible libpng version in application and library
When I run the program I get error of uncompatible libpng error and the program halts with segmentation fault.
What is the reason behind it and how can I solve it.
It sounds like you compiled your application with libpng-1.6.23 and at runtime your app tried to use libpng-1.2.53. The two versions are not compatible, so you get a segfault.
There are two possibilities here:
If you're running your program on the same machine you're building on, you have two versions of libpng installed. Use a tool (like slocate) to find the versions and uninstall one of them.
If you're running your program on a different machine(s) than the one you built on. Upgrade libpng to 1.6.23 on those machines.

NWRFCSDK causing issue with Ubuntu 12.10, 13.04 and Mac Mavericks

For our project we want to communicate with SAP and for that we are planning to use following:
RUBY1.9, sapnwrfc gem and NWRFCSDK
We have download the Linux x86_64 bit version of NWRFCSDK. As Ubuntu and Mac both works on Linux and Unix base operating system. We have expected that 'nwrfcsdk' will work with the above mentioned OSes.
During installation process we have followed these steps:
`
ruby setup.rb config --with-nwrfcsdk-dir=/usr/sap/nwrfcsdk
ruby setup.rb setup`
We are getting various errors. In Ubuntu when we run ruby setup.rb config command it fails.
Whereas in Mac it completes the Config command execution, however it fails on SETUP step and it shows this error
setup.rb:658: warning: Insecure world writable dir /usr/local in PATH, mode 040777
linking shared-object nwsaprfc.bundle
ld: warning: ignoring file /usr/sap/nwrfcsdk/lib/libsapucum.so, file was built for unsupported file format which is not the architecture being linked (x86_64)
ld: warning: ignoring file /usr/sap/nwrfcsdk/lib/libsapnwrfc.so, file was built for unsupported file format which is not the architecture being linked (x86_64)`
We have tried all possible ways and problem is coming with libsap files. Because it creates a nwrfcsdk.bundle for ruby which application is not able to load due to failure of libsapucum.so and libsapnwrfc.so
We got confirmation from the SAP team that they do not support Mac OSX and that is the reason it is not working in Mavericks.
However to make it work in Ubuntu 32bit we have got the other installer and that worked perfectly for the Ubuntu.
NWRFCSDK for 32 bit, SAP RFC SDK 6.40 Linux on IA32 32bit
I hope this will help others.

Linux Version of Z3: Dependency On Old libgmp.so.3

Z3's dependency on libgmp.so.3 is unresolved in the linux package, leaving the user to provide this library. However, this library is very old and is not readily available.
Does anyone know a method for getting around this issue? I am currently running x86_64 and cannot get around this missing dependency without a great deal of hassle.
Is it possible the linux packages could be fixed such they include the expected library in the distribution?
You can get GMP3 by executing sudo apt install libgmp3-dev.
I'm not a Linux expert, but this is the command I used to install GMP before I compiled Z3.
When I installed the virtual machine for running Linux 64, I think I didn't find a package for the more recent versions of GMP.
I will try again. If it doesn't work, I will download the most recent GMP tar ball and build it from scratch.
BTW, the Z3 for Linux 32 comes with two .so files. One of them has GMP statically linked.
The trick I used for building this .so file didn't work for the 64 bit version.
As I said, I'm not a Linux expert, any suggestions on how to build a better Z3 library for Linux x86_64 users are welcome.

Resources