Compile issues on Ubuntu 20.04.5 LTS

Hello all,

I have been running into some issues getting this application compiled here on Ubuntu 20.04.5 LTS.

At first I saw a number of errors related to libhidapi, and discovered that this distro only ships with an older version of that, which was 0.9.0.

I removed libhidapi-dev from my system, grabbed the source code and built/installed libhidapi version 0.13.1 from scratch and installed that into my system.

Now the build of wfview completes without issue, but attempting to run it results in the following error:
wfview: symbol lookup error: wfview: undefined symbol: hid_version

Any suggestions on where to go from here?

Hi Chris,

Did you make sure to do make clean when you upgraded libhidapi?

That error sounds like it’s trying to use the symbol in the older library. Maybe purge your build directory and run qmake and make again on a new build directory.

Just a hunch.

–E
de W6EL

Yes, I made sure to run make clean from the build directory and hit it again, but no change unfortunately.

I just tried it again, completely trashing and re-creating the build directory, ran qmake and make once more and it successfully compiles but fails to run with the same error message.

Did you also remove the “not -dev” packages?

You may want to search on your computer and see which libraries are installed and on-path. And make sure to run sudo ldconfig after making system changes.

–E
de W6EL

No, I had not removed them. And that seemed to be exactly my problem.
I found these two packages:
libhidapi-hidraw0 libhidapi-libusb0

I had previously installed a package, avrdude, which had included one or both of those as dependencies.
I went ahead and removed all 3.

After that I cleaned out the build directory, re-ran qmake then make and it compiled just fine and now, it runs!

Thanks for the help!

Edit to add:
I wanted to reinstall avrdude, but it was throwing a fit thinking that its dependencies were not satisfied.
If I let apt install those I have a feeling it would have broken wfview again.

I did some reading and found that I could use the ‘checkinstall’ command to generate a .deb package of the libhidapi I had built from source, and list both libhidapi-hidraw0, and libhidapi-libusb0 as entries in the “Provides” line. This allowed me to reinstall avrdude without also having to pull back in the older versions of those libraries, since apt realized my homebrew package already provided those pieces.

1 Like