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

libAVSCommon.so: undefined reference to `__atomic_load_8' #380

Closed
5 tasks
thevamad opened this issue Dec 7, 2017 · 3 comments
Closed
5 tasks

libAVSCommon.so: undefined reference to `__atomic_load_8' #380

thevamad opened this issue Dec 7, 2017 · 3 comments

Comments

@thevamad
Copy link

thevamad commented Dec 7, 2017

I am trying to crosscompile avs-device-sdk for openwrt-mips.
I see the following error about undefined reference to __atomic_load_8 (etc) functions.

What version of the AVS Device SDK are you using?

1.2.1

Briefly summarize your issue:

Please see compilation error log below:
[ 21%] Linking CXX executable AttachmentManagerV2Test
Attachment/Common/libAttachmentCommonTestLib.a(Common.cpp.o): In function alexaClientSDK::avsCommon::utils::sds::SharedDataStream<alexaClientSDK::avsCommon::utils::sds::InProcessSDSTraits>::BufferLayout::init(unsigned int, unsigned int)': Common.cpp:(.text._ZN14alexaClientSDK9avsCommon5utils3sds16SharedDataStreamINS2_18InProcessSDSTraitsEE12BufferLayout4initEjj[_ZN14alexaClientSDK9avsCommon5utils3sds16SharedDataStreamINS2_18InProcessSDSTraitsEE12BufferLayout4initEjj]+0x320): undefined reference to __atomic_store_8'
Common.cpp:(.text._ZN14alexaClientSDK9avsCommon5utils3sds16SharedDataStreamINS2_18InProcessSDSTraitsEE12BufferLayout4initEjj[_ZN14alexaClientSDK9avsCommon5utils3sds16SharedDataStreamINS2_18InProcessSDSTraitsEE12BufferLayout4initEjj]+0x334): undefined reference to __atomic_store_8' Common.cpp:(.text._ZN14alexaClientSDK9avsCommon5utils3sds16SharedDataStreamINS2_18InProcessSDSTraitsEE12BufferLayout4initEjj[_ZN14alexaClientSDK9avsCommon5utils3sds16SharedDataStreamINS2_18InProcessSDSTraitsEE12BufferLayout4initEjj]+0x348): undefined reference to __atomic_store_8'
Common.cpp:(.text._ZN14alexaClientSDK9avsCommon5utils3sds16SharedDataStreamINS2_18InProcessSDSTraitsEE12BufferLayout4initEjj[_ZN14alexaClientSDK9avsCommon5utils3sds16SharedDataStreamINS2_18InProcessSDSTraitsEE12BufferLayout4initEjj]+0x38c): undefined reference to __atomic_store_8' Common.cpp:(.text._ZN14alexaClientSDK9avsCommon5utils3sds16SharedDataStreamINS2_18InProcessSDSTraitsEE12BufferLayout4initEjj[_ZN14alexaClientSDK9avsCommon5utils3sds16SharedDataStreamINS2_18InProcessSDSTraitsEE12BufferLayout4initEjj]+0x3a8): undefined reference to __atomic_store_8'
../../libAVSCommon.so: undefined reference to __atomic_load_8' ../../libAVSCommon.so: undefined reference to __atomic_fetch_add_8'
../../libAVSCommon.so: undefined reference to `_ZTHN14alexaClientSDK9avsCommon5utils6logger13ThreadMoniker15m_threadMonikerE'
collect2: error: ld returned 1 exit status

Tell us about your environment:

Crosscompiling on Ubuntu 16.04 for OpenWRT (mips)

Tell us what hardware you're using:

Qualcomm processor

Tell us about your OS (Type & version):

  • Linux
  • MacOS
  • Raspbian Stretch
  • Raspbian Jessie
  • Other - tell us more: OpenWRT
@scotthea-amazon
Copy link
Contributor

Hello thevamad,

What compiler are you using? Clang? I googled the error message you are getting and found the following stackoverflow article how come stdatomicdouble isnt implemented when compiling with clang. The article offers up a few suggestions, duplicating all the suggestion I found at other links.

I hope this helps,
-SWH

@thevamad
Copy link
Author

thevamad commented Dec 8, 2017

Im using the following compiler : mips-openwrt-linux-uclibc-g++. I ended up changing CMakeLists.txt to include libatomic like so.. set(CMAKE_CXX_LINK_FLAGS "${CMAKE_CXX_LINK_FLAGS} -latomic")
Thanks for looking into it.

@scotthea-amazon
Copy link
Contributor

Hello thevamad,

Thank you for sharing your solution! It looks like this problem has been resolved. I am closing this issue. If I have closed this issue in error, please feel free to re-open it.

Best regards,
-SWH

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

2 participants