Skip to content
This repository has been archived by the owner on Jan 16, 2024. It is now read-only.

Linking error while linking libAVSCommon.so on OpenWRT platform #56

Closed
barrel35618 opened this issue Jul 13, 2017 · 11 comments
Closed

Linking error while linking libAVSCommon.so on OpenWRT platform #56

barrel35618 opened this issue Jul 13, 2017 · 11 comments
Assignees

Comments

@barrel35618
Copy link

Hi, I tried to port this SDK on OpenWRT platform, and got the linking error when it's linking libAVSCommon.so, it shows below message:
../../libAVSCommon.so: undefined reference to `_ZTHN14alexaClientSDK9avsCommon5utils6logger13ThreadMoniker15m_threadMonikerE'

And I found that this method should be provided by "ThreadMoniker.cpp.o" which comes from "ThreadMoniker.cpp". After using objdump and nm tools to verify this object file, it didn't contain required information in its symbol table. I also built this SDK on local side(x86 platform), it works fine without meet this issue.

I've compared these two object files which built by "x86 g++" and "arm-g++".
There is something missing in arm version.
ss1
.

Have you met this issue before? Or do you have any idea about how to deal with that?
Thanks.

My x86 g++ version is 4.8.4, the OpenWRT arm is 4.8.3.
I also check CFLAGS and related argument, it's all the same.

@scotthea-amazon scotthea-amazon self-assigned this Aug 7, 2017
@scotthea-amazon
Copy link
Contributor

Hello barrel35618,

We have not run in to this problem in our own testing and prototyping. The symbol in question is qualified as thread_local, which is a fairly new C++ feature, so it may be that there is some platform specific issue with support.

The functionality of the ThreadMonikor class is not essential to the functionality of the SDK. It just used to provide short thread identifiers in logs. So, as a work-around you could replace the implementation of ThreadMoniker::getThisThreadMoniker() with code to serialize the thread_id of std::this_thread in to string. Here is a stackoverflow article that discusses how to do that conversion:

https://stackoverflow.com/questions/19255137/how-to-convert-stdthreadid-to-string-in-c.

However, that may incur more overhead that you want. If you do not generally care about thread IDs in your log messages you could also change the code to return an empty string.

Please let us know if you find a solution or have further questions,
-SWH

@yugoren yugoren added the build label Aug 11, 2017
@jimmy2yang
Copy link

Thanks scotthea, we can pass this error and build the ibAVSCommon.so.

@thevamad
Copy link

@jimmy2yang : Can you please share the makefile recipe for building AVS on OpenWRT?

@jimmy2yang
Copy link

@thevamad : attachment is the Makefile for OpenWrt feed. I also add cmake file in the alexa sdk to setup some environment variables (It is dirty and should move to openwrt makefile)
Makefile.txt

openwrt.cmake.txt

@thevamad
Copy link

@jimmy2yang : thanks a ton for sharing.

@thevamad
Copy link

thevamad commented Dec 5, 2017

@jimmy2yang : Did you run the sample app on Openwrt? If so, how did you build gstreamer and the plugins (base, good, ugly)

@jimmy2yang
Copy link

Yes, I ran SampleApp on Openwrt. You can port the related packages from Openwrt packages repo.

@thevamad
Copy link

thevamad commented Dec 8, 2017

@jimmy2yang : thanks for the response. I have the packages from github. Which of the gstreamer good / base / ugly modules did you select ? Did you have to select some or all out of the submenus ?
Thanks again for your help!

@jimmy2yang
Copy link

I just enable all of good/base/ugly gstreamer modules. You can try to turn off somethings.

@yyccz123
Copy link

@jimmy2yang Can you please share the nghttp2 makefile recipe for building AVS on OpenWRT?

@lapchow
Copy link

lapchow commented Jun 8, 2018

Hi Developer,
My company is looking for a developer for helping us porting AVS on OpenWRT as a project-based job.

Please contact me if you are interested.
lap.chow@tinklabs.com

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants