- Platform information: QNap 119
- Hardware: Atmel
- Java Runtime Environment: JRE 1,8,0
- openHAB version:
- Issue of the topic: Java crashing due to dodgy link in libNRJavaSerial_HF.so
I’m just setting up Openhab 2.1.0 on my little debian server.
It’s running Jessie, so I have glibc2.19. All is fine until I ser up my AEON Zstick to be on port /dev/ttyACM0. Then java crashes. Having looked through posts on this forum it’s clear to me that Ihave exactly the same issue as [SOLVED] Z-Wave dongle makes openhab crash
I have nrjavaserial-3.12.0-OH as described in https://github.com/openhab/openhab-core/issues/111
When it tries to connect to the port it creates these files -openhab2/userdata/tmp/libNRJavaSerial_root_0/libNRJavaSerial.so and
and when i check those I see they have an undefined link (although I cant find the post that identifies that at present.
Any help and suggestions most gratefully welcomed
This is the post that describes my problem exactly
And from that, when I do $ nm -n libNRJavaSerial_HF.so | grep __fdelt_chk
I get U __fdelt_chk
I’ve made some progress. I managed to cross compile the library for atmel platform and use D_FORTIFY_SOURCE=0 so that there is no attempt to call the missing function.
Sure enough, when I do nm -n on the library, the fdelt_chk symbol is not there.
However, I’m still getting a lync erro when openhab attempts to open the serial port. Only no I do not know which symbol it’s failing on. Can anyone tell me how I can identify the unmet dependency? Is there some logging option I could use? or a piece of noddy c code I could use to call the library without Openhab?
well I’ve made some progress. I added another couple of compiler flags and got rid of the unmet dependencies.
Next I found that the native code was being compiled for atmelv7 processor and mine is a v5. So I found out how to flag that in the makefile.
So I now have an NRJavaSerial that is fit for my old linux platform.
However, I have a RXTXlib version crash as per https://github.com/NeuronRobotics/nrjavaserial/issues/54
So I’m now in search of exactly where that is. I’ve done a find to see if I have an old version of the lib in my java path on the target - but nothing shows up there.
I’ll keep digging as I feel (after three weeks!), that I’m close and I’m determined to get it working.
As ever, any thoughts on how to narrow in on this will be gratefully received.
Well I finally cracked it. It was trying to load the drive for armHF first, and failing. So I weeded all the make/build for the HF variant, and changed NativeResource.java to stop it trying to load it. And then it loaded my arm driver and worked straight away