-
Notifications
You must be signed in to change notification settings - Fork 603
Link step of libMediaPlayer.so unsuccessful due to not finding lintl #381
Comments
Hello thevamad, What platform are you running your cross compiler on? Are you sure that libintl is installed? If not, this link may be helpful: what is libintl and where can I get it?. If you are sure it is installed, you may just need to add it to the link path. I hope this helps, |
Crosscompiler runs on an Ubuntu 16 virtual machine. |
Hi @thevamad, Unfortunately, we haven't cross-compiled for OpenWRT so it's hard to help out in depth without actually having done the compilation. Could you run a make with the flags Thanks, |
I managed to get past this problem to get it to compile fully yesterday afternoon. I had to use the following directive in the CMakeLists.txt. There are 2 places where libintl.so was being generated. One was from gettext and another from a standard C library (I think). I had previously tried linking one and linking the other worked. Before I had also tried several relative paths off an environment variable.. Anyhow, the following worked. I would prefer not to change this file as it is downloaded as part of the build process and will try to instead incorporate this in as a patch. This is my first attempt at building something on Linux so I'm still trying to figure things out. set(CMAKE_CXX_STANDARD 11) # C++11... Thanks for looking into it! |
@sanjayrd : When I run sampleapp on the hardware I get a "Bus error" .. Do you happen to know what I might be missing ? I tried searching for the error in the source code but I dont see any hits. Does it have to do with a dependency ? |
Hi @thevamad, What is the Bus error you are seeing? Are there additional details? If not, when you launch the SampleApp, you can also try setting the environment variable Thanks, |
root@OpenWrt:/usr/bin# TZ=UTC ./SampleApp AlexaClientSDKConfig.json Even if I dont supply the additional arguments, the same thing happens (I would have expected a printf to trigger). So, I just have to set GST_DEBUG=5 and then run SampleApp ? I dont see anything different :( |
@thevamad , Ryan |
That is what I get. Can you please tell me what got built wrong based on the output below ? |
For GStreamer Logging:
For SDK Logging:
|
Sorry I was out of the office yesterday. Still no luck.. I get the same bus error. I dont believe anything is actually running. So it might be a compile issue like Ryan suggested. |
@thevamad if you have strace on the target you could try to put strace in front you you will see which system call causes the bus error. Even if you don't have strace it is pretty strait forward to cross compile it and it is small. There will be a ton of output but it will prove if the SampleApp is running or not. Ryan |
@ryan-esty : I will try strace now. Thanks so much for the suggestion. |
That helped. I'm new to linux and OpenWRT. Looks like the SampleApp executable is looking for library dependencies using a hardcoded path on my virtual machine that I used to build the code. I have my Makefile recipe attached. Do you know what I should do to make it look under /usr/lib ? Sorry if it is an obvious question. Never done this before. Part of the output from the stace is below. root@OpenWrt:/usr/lib# strace SampleApp |
@thevamad It does find libatomic as here in the strace "open("/usr/lib/libatomic.so.1", O_RDONLY) = 3" then it does a couple more things and gets a bus error just after the read. I'm assuming at the end of the mess is a bus error at least. A bus error could be a miss aligned structure. Now that we know it is running could you possibly try gdb on it? I don't know if you have the room to use gdb on the target or not but if not you might need to look into gdbstub. It doesn't look like it is getting very far though. It seems it is still reading the executable into memory. Ryan |
Thanks for getting back! Okay. I will look into gdb. |
hi @thevamad Can we talk more about your use case with the AVS Device SDK? Please fill out this Contact Form and I will get in touch with you. |
@thevamad any updates on the issue? |
Sorry I was out of the office for a while during my break. I switched up my makefile a bit to copy the library dependencies instead of using the install command (was a copy paste error).. I am currently trying this patch for a missing libatomic package issue. https://lists.openwrt.org/pipermail/openwrt-devel/2014-March/024286.html to fix a different dependency issue. Will keep you guys posted. |
@sanjayrd , @ryan-esty : The bus errors are still present and they appear to happen due to a SIGKILL.. Any idea what I should do? I rebuilt this with DEBUG instead of minsizerel. It is to note that I am building this without a keyword detector and the gcc version is 4.8.3. fstat(3, {st_mode=S_IFREG|0644, st_size=78728, ...}) = 0 |
@thevamad , Ryan |
Yes - This is right at startup. I am looking to get gdb on my system.. I thought the gcc version (min required was 4.8.5 but my cross compiler is at 4.8.3) might have been an issue so I am spending some time on that as well. |
@thevamad , Ryan |
Is this what you area looking for? root@OpenWrt:~# cat /proc/version root@OpenWrt:~# cat /proc/cpuinfo |
There is a kernel bug that was around that era for private futex's in particular which is where you are dying. It might be something to look into also. I don't think the fix made it into 3.14.0 but you would have to look torvalds/linux@76835b0. If you have the kernel source you might be able to just look at the file, looks to be a 2 line change. Ryan |
@ryan-esty : thank you so much. that bug fix (default snippet ) wasnt in there! I'm recompiling now. Will keep you posted. I'm a bit new to Linux so I really appreciate you taking the time to help me out with this! :) |
Good luck. I still am not sure if it is the issue or not but it probably won't hurt. Ryan |
Thanks. I did a dirclean/ clean/ just in case and the build is taking forever.. Will let you know! |
:( Same problem .. I changed threadmonitor to get around an issue based on one of the recommendations in a different issue. Does this look okay? Could I have caused the error by making this change? |
@thevamad , The other issue is in m_moniker I don't think they were expecting an empty string but some hex number. Ryan |
@ryan-esty : Thanks! @mradulan : |
I guess that #56 is pretty accurate. Is this the only thing you changed? If you can cross compile gdbstubs and do a remote connection with gdb it might be useful. It could point to the actual file in question. Sure would be easier than trying to run gdb natively if you don't have the space for it. Ryan |
Okay! gdb stub it is.. Yeah those are the only 2 code files I changed. |
I tried all day today without success to run gdb / gdb server ... (no space) Will try gdb stubs next. Thanks! |
@ryan-esty : Will cross compiling this one work ? https://github.com/avatarone/avatar-gdbstub |
@thevamad, Ryan |
So only run gdb-server on the target and run gdb from a different host system, correct? |
Yes you start your program with gdbserver and then run gdb on the host to connect to the gdbserver on the target. You will use gdb on the host to run and step and everything a debugger does. Your issue is so early on I'm hoping it isn't too early for gdb/gdbserver to catch it. It looks like some sort of object is being created as a global and blowing up. Ryan |
@ryan-esty : I'm not able to even get the gdb-server to fit. When I build with gdb-server, there is no corresponding binary for the part I'm working on. Will the gdb stub (what you'd mentioned before) be an option ? |
This is a long and hard battle just to get to the point where you might be able to see which file is causing the sig-bus. The gdbstub won't hurt I don't think it will be hard to cross compile. It does mention it works with the serial protocol, which I'm hoping will work just like gdbserver and can run over ssh. The other thing you could do is do a sshfs mount if your kernel supports it or some other network mount. This will give you some more space. Might be enough space to just put gdb on there. Like I said previously I'm hoping that gdb, gdbserver or gdb stubs will give you some lead as to what file is causing the sigbus, because I have no other experience finding a startup issue like this. Ryan |
Turns out that the sigtrap happens at the following line in uClibc-0.9.33.2/ldso/ldso/dl_startup.c http://landley.net/mantis/mantis-5694.html had something similar going on. _dl_get_ready_to_run (tpnt=0x7fff6ca8, load_addr=, auxvt=0x7fff6dd0, envp=0x7fff6e8c, argv=0x7fff6e84) |
In that thread they said turning off UCLIBC_PREGENERATED_LOCALE_DATA worked. Does that work for you? Ryan |
I didnt have that flag set to begin with. But previously, one glib2 package (gstreamer required this) had required: with a new update to glib2, i found out I dont require either... So I'm trying that now. Mostly I think the update to uLibC might help.. I'll keep updating the thread as I make progress. Past 2 days were spent on making space for and running gdbserver (http://www.0xf8.org/2009/08/openwrt-remote-debugging/). Thank you for your assistance!! Really appreciate it! :) |
that didnt do it, but it saved me some space in the process.. |
This issue has morphed into a different problem. Closing this out as the title no longer describes it accurately. |
@ryan-esty : Thanks for all your help - The problem is that I am running out of RAM. When the sampleapp runs on the raspberry pi, it takes ~250MB RAM. We only have 64MB total RAM on our target. |
Thanks for the update that would be a good reason why it never got very far. Ryan |
What version of the AVS Device SDK are you using?
1.2.1
Briefly summarize your issue:
libMediaPlayer.so link step failed due to not being able to find lintl
[ 60%] Linking CXX shared library libMediaPlayer.so
/home/niux/Desktop/alexa/qsdk3/staging_dir/toolchain-mips_34kc_gcc-4.8-linaro_uClibc-0.9.33.2/lib/gcc/mips-openwrt-linux-uclibc/4.8.3/../../../../mips-openwrt-linux-uclibc/bin/ld: cannot find -lintl
collect2: error: ld returned 1 exit status
MediaPlayer/src/CMakeFiles/MediaPlayer.dir/build.make:279: recipe for target 'MediaPlayer/src/libMediaPlayer.so' failed
What is the expected behavior?
What behavior are you observing?
Provide the steps to reproduce the issue, if applicable:
Tell us about your environment:
Cross compiling for OpenWRT MIPS
Tell us what hardware you're using:
Tell us about your OS (Type & version):
The text was updated successfully, but these errors were encountered: