Closed AustinRobinson closed 4 years ago
Same error here
Sending build context to Docker daemon 2.048kB Step 1/3 : FROM dev-test/raspiadk-base as build ---> a607ec600c56 Step 2/3 : WORKDIR /build ---> Using cache ---> 89b8b8161649 Step 3/3 : FROM build ---> 89b8b8161649 Successfully built 89b8b8161649 /bin/sh: 1: clang: not found clang -Wall -Werror -DHAP_ENABLE_DEVELOPMENT_ONLY_CODE=1 -ffunction-sections -fdata-sections -DLED_PORT=\"/sys/class/leds/led0/brightness\" -DLED_TRIGGER=\"/sys/class/leds/led0/trigger\" -DRPI -I/opt/vc/include -IHAP -IExternal/HTTP -IExternal/JSON -IExternal/Base64 -IPAL -I/include -O0 -g -DHAP_LOG_LEVEL=1 -DHAP_TESTING -IPAL/Mock -DHAP_Test -c PAL/HAPPlatformSystemInit.c -o Output/Raspi-/Test/PAL/HAPPlatformSystemInit.o clang -Wall -Werror -DHAP_ENABLE_DEVELOPMENT_ONLY_CODE=1 -ffunction-sections -fdata-sections -DLED_PORT=\"/sys/class/leds/led0/brightness\" -DLED_TRIGGER=\"/sys/class/leds/led0/trigger\" -DRPI -I/opt/vc/include -IHAP -IExternal/HTTP -IExternal/JSON -IExternal/Base64 -IPAL -I/include -O0 -g -DHAP_LOG_LEVEL=1 -DHAP_TESTING -IPAL/Mock -DHAP_Test -c Tests/HAPCryptoTest.c -o Output/Raspi-/Test/Tests/HAPCryptoTest.o make: clang: Command not found make: [Build/Makefile:108: Output/Raspi-/Test/PAL/HAPPlatformSystemInit.o] Error 127 make: Waiting for unfinished jobs.... make: clang: Command not found make: [Build/Makefile:108: Output/Raspi-/Test/Tests/HAPCryptoTest.o] Error 127 make: [all] Error 2
Apple clang version 11.0.0 (clang-1100.0.33.16) Target: x86_64-apple-darwin19.2.0 Thread model: posix InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
@hubertwang, could you please try this?
docker run -ti dev-test/raspiadk-base /bin/bash clang --version
seems that clang is not seen in your docker container.
clang --version
Hi @hao-gao ,
Here is the result: HomeKitADK % docker run -ti dev-test/raspiadk-base /bin/bash root@33b97ea16514:/# clang --version bash: clang: command not found
You are right, seems clang is not in my docker container. Not sure if I missed some step during configuration.
Should we install clang manually and run again?
I am not sure if all dependencies are correctly installed with the raspi_setup_sdcard.sh. Dependencies are here: https://github.com/apple/HomeKitADK/blob/master/Tools/raspi_sdcard_setup.sh#L606
@hao-gao Oh.....I remember the last message I receive is "Volume failed to eject" Maybe this cause the script to interrupt. (seems block by antivirus) I'll try if diskutil unmountDisk "force" can fix the issue
Hmm..unmount has force option, but eject don't Still stuck on the same position
Before importing sd card's rootfs as a docker image, make sure you followed this instruction of you console output: [the code] Ensure SD card is inserted and power cycle Raspi. If this is the first boot after FS expansion, wait 60 seconds then power cycle Raspi a second time.
Hope this helps.
I was able to get this working. I think the dependencies didn't install correctly the first few times I tried it.
Ah, forgot to say, I was able to get it work, too. It's my environment issue, anti virus blocked some instruction. After I changed to another mac everything works.
Thank you for the detailed instruction @hao-gao
When I run
make TARGET=Raspi all
I get the following output:But I have clang installed and it is in my path. Here is the output of
clang --version