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

issues while performing cmake #43

Closed
surajhes opened this issue Jun 28, 2017 · 20 comments
Closed

issues while performing cmake #43

surajhes opened this issue Jun 28, 2017 · 20 comments

Comments

@surajhes
Copy link

HI i was trying to perform cmake in the new build directory and following the steps to make a generic Linux Build and i am trying with KItt.ai model. While performing the cmake i am getting following error inspite of providing correct parameters for Kitt.ai Following is the error i am getting

Creating the build directory for the AlexaClientSDK with build type: DEBUG
Creating AlexaClientSDK with keyword detector type: KittAi
CMake Error at /usr/local/share/cmake-3.9/Modules/GoogleTest.cmake:127 (if):
if given arguments:

"AlexaClientSDKInitTest" "IN_LIST" "allKeywords"

Unknown arguments specified
Call Stack (most recent call first):
tools/Testing.cmake:22 (GTEST_ADD_TESTS)
AVSCommon/AVS/test/CMakeLists.txt:2 (discover_unit_tests)

-- Configuring incomplete, errors occurred!

@sanjayrd
Copy link
Contributor

Can you provide us with the cmake command you used so we can dig into the issue a bit more?

@sanjayrd sanjayrd added the build label Jun 28, 2017
@surajhes
Copy link
Author

cmake /alexa-client-sdk-master build/ -DKITTAI_KEY_WORD_DETECTOR=ON -DKITTAI_KEY_WORD_DETECTOR_LIB_PATH=/alexa/samples/wakeWordAgent/kitt_ai/snowboy/lib/ubuntu64/libsnowboy-detect.a -DKITTAI_KEY_WORD_DETECTOR_INCLUDE_DIR=/alexa/samples/wakeWordAgent/kitt_ai/snowboy/include

@sanjayrd
Copy link
Contributor

You'll need to create an out of source build directory.

So, your build folder that you create should be outside of the project you download from Github. You should run the cmake command from the build folder.

So, modify your cmake command and run from your build directory: cmake <path-to-sdk-project> -DKITTAI_KEY_WORD_DETECTOR=ON -DKITTAI_KEY_WORD_DETECTOR_LIB_PATH=/alexa/samples/wakeWordAgent/kitt_ai/snowboy/lib/ubuntu64/libsnowboy-detect.a -DKITTAI_KEY_WORD_DETECTOR_INCLUDE_DIR=/alexa/samples/wakeWordAgent/kitt_ai/snowboy/include

@surajhes
Copy link
Author

HI i have created a new folder separately called as build outside all source directories in the desktop. I am running cmake from that directory

@sanjayrd
Copy link
Contributor

sanjayrd commented Jun 28, 2017

Sorry, I may be misunderstanding but why do you have the extra build/ in your cmake command?

@surajhes
Copy link
Author

cmake /alexa-client-sdk-master . -DKITTAI_KEY_WORD_DETECTOR=ON -DKITTAI_KEY_WORD_DETECTOR_LIB_PATH=

/alexa/samples/wakeWordAgent/kitt_ai/snowboy/lib/ubuntu64/libsnowboy-detect.a -DKITTAI_KEY_WORD_DETECTOR_INCLUDE_DIR=/alexa/samples/wakeWordAgent/kitt_ai/snowboy/include

Sorry i might have edited the command wrongly when i was pasting here. Now the command is fine? I was running the cmake from the build folder which i created on desktop

@sanjayrd
Copy link
Contributor

sanjayrd commented Jun 28, 2017

I'm still confused why you have the . parameter in there? I believe that's not required if you're running the command from the build directory you created.

@surajhes
Copy link
Author

oh i thought we had to specify the output directory of the build in the cmake command. But i suspect it shouldnt be a problem if we specify the output directory of the build. correct me if i am wrong.

@sanjayrd
Copy link
Contributor

No, I don't think that is necessary. The output directory of the cmake command will be the folder from which you run it (your build directory). Could you try that and see if it works?

@surajhes
Copy link
Author

I tried without the output directory too and still getting the error. As a work around i have commented the following line
#GTEST_ADD_TESTS(${testname} "${inputs}" ${testsourcefile})
in Testing.cmake under tools folder.

@sanjayrd
Copy link
Contributor

Hmm odd. One more question, if you do cmake --version, what do you get?

@surajhes
Copy link
Author

cmake version 3.9.0-rc5

@sanjayrd
Copy link
Contributor

Looks like you have some sort of release candidate version of cmake that isn't a full production version. I've seen this issue before when someone was using a cmake version with an "rc" in it and Google Test would error out. Could you change the cmake you have if possible? By commenting out that #GTEST_ADD_TESTS(${testname} "${inputs}" ${testsourcefile}), you've essentially removed building of all tests.

@surajhes
Copy link
Author

surajhes commented Jun 28, 2017

Sure i can try that. but before doing that changes, can you help me with one more issue? I am getting the following error :
make[2]: *** No rule to make target '/usr/lib/arm-linux-gnueabihf/libcurl.so', needed by 'AVSCommon/libAVSCommon.so'. Stop.
CMakeFiles/Makefile2:1315: recipe for target 'AVSCommon/CMakeFiles/AVSCommon.dir/all' failed
make[1]: *** [AVSCommon/CMakeFiles/AVSCommon.dir/all] Error 2
Makefile:140: recipe for target 'all' failed
make: *** [all] Error 2

Are both the issues inter-related?

@surajhes
Copy link
Author

hi i downgraded the cmake version to 3.8 and i am able to build successfully now. Guess it was the version with cmake

@surajhes
Copy link
Author

HI while making i am getting an exception now at following place after 82% make.

/alexa/samples/wakeWordAgent/kitt_ai/snowboy/lib/ubuntu64/libsnowboy-detect.a: error adding symbols: File format not recognized
collect2: error: ld returned 1 exit status
KWD/KittAi/src/CMakeFiles/KITTAI.dir/build.make:98: recipe for target 'KWD/KittAi/src/libKITTAI.so' failed
make[2]: *** [KWD/KittAi/src/libKITTAI.so] Error 1
CMakeFiles/Makefile2:3639: recipe for target 'KWD/KittAi/src/CMakeFiles/KITTAI.dir/all' failed
make[1]: *** [KWD/KittAi/src/CMakeFiles/KITTAI.dir/all] Error 2
Makefile:140: recipe for target 'all' failed
make: *** [all] Error 2

Any leads regarding this?

@sanjayrd
Copy link
Contributor

Hi @surajhes ,

This appears to be an incompatibility between the compiler/flags that were used to compile libsnowboy-detect.a and the compiler/flags that you are trying to use to build the SDK.

Your toolchain is arm-linux-gnueabihf (I'm assuming this from your previous message where this was briefly mentioned). That's a hard-float toolchain.

The libsnowboy-detect.a you are using appears to have been compiled with a different toolchain. Since Kitt.ai only provides pre-compiled binaries for their libraries, you're limited to the platforms they provide. For now, you can skip the build of wake word and contact Kitt.ai to see if they can provide a different binary compatible with your platform or try Sensory instead.

Hope that helps,
Sanjay

@surajhes
Copy link
Author

how to skip the building of the wake word? which make file do i need to change for it?

@sanjayrd
Copy link
Contributor

sanjayrd commented Jul 7, 2017

Hey @surajhes,

So sorry for the delay! To skip building wake word you can just modify the CMake command you originally used to remove the -DKITTAI_KEY_WORD_DETECTOR=ON -DKITTAI_KEY_WORD_DETECTOR_LIB_PATH=... -DKITTAI_KEY_WORD_DETECTOR_INCLUDE_DIR=... part

@DEWANG916
Copy link

Hi @sanjayrd ,
While performing Build the SDK task and after entering below mentioned command I am getting errors.Please help me regarding this,
cd /home/pi/sdk-folder/sdk-build
cmake /home/pi/sdk-folder/sdk-source/avs-device-sdk
-DSENSORY_KEY_WORD_DETECTOR=ON
-DSENSORY_KEY_WORD_DETECTOR_LIB_PATH=/home/pi/sdk-folder/third-party/alexa-rpi/lib/libsnsr.a
-DSENSORY_KEY_WORD_DETECTOR_INCLUDE_DIR=/home/pi/sdk-folder/third-party/alexa-rpi/include
-DGSTREAMER_MEDIA_PLAYER=ON
-DPORTAUDIO=ON
-DPORTAUDIO_LIB_PATH=/home/pi/sdk-folder/third-party/portaudio/lib/.libs/libportaudio.a
-DPORTAUDIO_INCLUDE_DIR=/home/pi/sdk-folder/third-party/portaudio/include

ERROR:

Found CURL: /usr/lib/arm-linux-gnueabihf/libcurl.so (found version "7.52.1")
CMake Error at AVSCommon/AVS/test/CMakeLists.txt:6 (discover_unit_tests):
Unknown CMake command "discover_unit_tests".

-- Configuring incomplete, errors occurred!
See also "/home/pi/sdk-folder/sdk-build/CMakeFiles/CMakeOutput.log".

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

3 participants