alexa / avs-device-sdk

An SDK for commercial device makers to integrate Alexa directly into connected products.
https://developer.amazon.com/alexa/alexa-voice-service
Apache License 2.0
1.26k stars 604 forks source link

Problem during SDK build for Windows: clang++: error: invalid linker name in argument '-fuse-ld=lld' #2033

Closed koronusTraveler closed 2 years ago

koronusTraveler commented 2 years ago

IMPORTANT: Before you create an issue, please take a look at our Issue Reporting Guide.

Briefly summarize your issue:

While I am building the SDK as per instructions on the how to setup AVS on windows this error has popped up twice during step 5. Step 5 is the download and building step for the SDK. When it tries the linking process for libraries it throws a couple errors then stops the build. It seems to refer to -fuse-ld = lld. I have been looking for similar issues though this appears to be a rather new one.

What is the expected behavior?

The build completes and the SDK is properly built and sample app is ready.

What behavior are you observing?

This is the full errors that I am concerned about.

clang++: error: invalid linker name in argument '-fuse-ld=lld' make[3]: [core/Crypto/acsdkCryptoInterfaces/src/CMakeFiles/acsdkCryptoInterfaces.dir/build.make:114: bin/libacsdkCryptoInterfaces.dll] Error 1 make[2]: [CMakeFiles/Makefile2:11689: core/Crypto/acsdkCryptoInterfaces/src/CMakeFiles/acsdkCryptoInterfaces.dir/all] Error 2 make[2]: *** Waiting for unfinished jobs....

clang++: error: invalid linker name in argument '-fuse-ld=lld' make[3]: [AVSCommon/CMakeFiles/AVSCommon.dir/build.make:1828: bin/libAVSCommon.dll] Error 1 make[2]: [CMakeFiles/Makefile2:8360: AVSCommon/CMakeFiles/AVSCommon.dir/all] Error 2 make[1]: [CMakeFiles/Makefile2:15421: SampleApp/src/CMakeFiles/SampleApp.dir/rule] Error 2 make: [Makefile:4209: SampleApp] Error 2

Provide the steps to reproduce the issue, if applicable:

I simply went through the process to setup AVS on windows. I utilized step 5 and entered the command bash setup.sh config.json -s 998987 . The error is displayed and the build breaks in the build section.

Tell us about your environment:

I am using windows 10.

What version of the AVS Device SDK are you using?

  The most up to date version is what I am trying to setup.

Tell us what hardware you're using:

Tell us about your OS (Type & version):

wryley-amzn commented 2 years ago

Hi there, I think that this error is unrelated to the SDK but rather your clang++ compiler cannot recognize the '-fuse-ld=lld'. I believe you need to add this as a dependency to the project https://lld.llvm.org/. Perhaps this is included in one of the dependencies listed in https://developer.amazon.com/en-US/docs/alexa/avs-device-sdk/dependencies.html, please ensure that all required dependencies are installed as well.

koronusTraveler commented 2 years ago

How would you go about adding this as a dependency? I'm rather new to working with AVS.

khaled-elnaggar commented 2 years ago

Hi there, I think that this error is unrelated to the SDK but rather your clang++ compiler cannot recognize the '-fuse-ld=lld'. I believe you need to add this as a dependency to the project https://lld.llvm.org/. Perhaps this is included in one of the dependencies listed in https://developer.amazon.com/en-US/docs/alexa/avs-device-sdk/dependencies.html, please ensure that all required dependencies are installed as well.

I am having the same exact issue, could you provide more details on the solution?

jaynabonne commented 2 years ago

I solved this on Windows by simply installing one more package:

pacman -S mingw-w64-x86_64-lld

kjkh commented 2 years ago

Closing ticket as instructions for the lld dependency are provided. If there are any further questions, please feel free to open another ticket.