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
gammu-smsd-inject & gammu-smsd-monitor not working #194
Comments
I'm not sure, as both seem work just fine when compiled natively on ARM, it has to be something with your cross compiler setup. Have you tried to debug the crash? |
Hello Nijel, Older versions like 1.33 and 1.35 runs fine - both smsd-monitor and smsd-inject. |
If you can install gdb on the target, that is probably easiest way to debug it. Also if you can find first version which is crashing it could help us diagnose the problem. |
Hello Nijel, undefined reference to `pthread_sigmask' I can fix it by addind link_libraries(pthread) to CMakeLists.txt. Then it crosscompiles ok, but monitor and inject are not working - Segmentation fault. I hope this would help. |
Hint: in current git version - 1.37.3 I dont get pthread error during crosscompile, but still got Segmentation fault in monitor and inject. |
I've looked at changes between 1.36.6 and 1.36.7 and I don't see any relevant changes in the SMSD code (see 1.36.6...1.36.7)... |
I've managed to run gdbserver at my arm target device. Using gdb at my Ubuntu I've tried to debug gammu-smsd-monitor and I'm getting: Program received signal SIGSEGV, Segmentation fault. Will this help? |
Not really, you probably don't have any debug symbols. Rebuild gammu with |
I've continued today and I've got: Can you guide how to go ahead with that? I'm new to gdb |
Just run it (r) and once it crashes get backtrace (bt). This is what I need :-) |
I guess it's not working using gdbserver, as I cant run normal gdb at arm host machine. Can we arrange some kind of remote session so You can have a look at it? This is what I've mangaed to get: (gdb) target remote 192.168.1.115:2000 Program received signal SIGSEGV, Segmentation fault. |
I've never used gdbserver, but looking at your your log, load symbols just when it crashes and then run |
Any luck debugging this? |
Unfortunately not, gdbserver is not working as expected (and not as you told about normal gdb debugging). |
What is strange is that gammu and gammu-smsd works while gammu-smsd-monitor and gammu-smsd-inject do not. Especially with inject as it's pretty much same as gammu + gammu-smsd, it processes command line and connects to the database using same functions as these two (the monitor does some shared memory access, so that might be different) Do they do at least something? Do you have strace available to see how far they get? |
Hello Michal, Today I've again crosscompiled 1.37.4 - no errors during compilation time. Here's output of strace:
What I've also did is try to crosscompile newest - 1.37.91 (with same cmake command) and it was unsuccessfull:
|
This is required for set_property(... APPEND_STRING ...) Issue #194 Signed-off-by: Michal Čihař <michal@cihar.com>
As for the crash, it dies pretty early, maybe even before reaching main() (at least it doesn't attempt to read configuration what is one of very first things it does). So this is clearly some crosscompiling issue rather than something in the code. |
Hello Michal, Unfortunately both monitor and inject dont work, both've got segmentation faults.
|
This still looks like the crash in the program startup, even before |
I don't think anything changed here:
Anything more I can do during crosscompiling, any cmake flag to pass? |
Sorry, I have no clue how to proceed. It seems to be compilation issue as we don't even reach |
Hello Michal, |
Looks like the cross compiler toolchain has problem with some of the features we're using. In case you want to dig deeper into this, try commenting out MACRO_TUNE_COMPILER lines from CMakeLists.txt |
Hello,
I'm crosscompiling gammu 1.37.0 for ARM architechture.
Both gammu and gammu-smsd binaries are working well, however gammu-smsd-inject and gammu-smsd-monitor are not, I've got "Segmentation fault" error at my ARM platform.
As I checked all files are compiled properly to ARM arch. What can be the issue, or what I need to provide to check this?
The text was updated successfully, but these errors were encountered: