-
Notifications
You must be signed in to change notification settings - Fork 70
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
cp: cannot stat './firmware/src/libs/firmata/arduino/*.{h,cpp}': No such file or directory #246
Comments
Apologies for tardiness on this. Possibly a permissions issue here to do
with something in make. Might be worth making a simple make recipe in the
Makefile and just see if it can correctly create the folder and copy an
individual file across. Can't think *why* this would be a problem but may
help identifying it.
…On Wed, 2 Jun 2021 at 05:34, Peter Uithoven ***@***.***> wrote:
I'm running into an issue when running make build-firmata:
rm -rf ./firmware/build/node_pixel_firmata
Creating firmata build files
mkdir ./firmware/build/node_pixel_firmata
cp ./firmware/src/libs/firmata/arduino/*.{h,cpp} ./firmware/build/node_pixel_firmata/
cp: cannot stat './firmware/src/libs/firmata/arduino/*.{h,cpp}': No such file or directory
Makefile:102: recipe for target 'build-firmata' failed
make: *** [build-firmata] Error 1
I made sure to install the arduino submodule using git submodule update
--init --recursive.
Running ll on the files it's trying to copy they are found just fine:
$ ll ./firmware/src/libs/firmata/arduino/*.{h,cpp}
-rw-rw-r-- 1 peteruithoven peteruithoven 49K jun 1 21:06 ./firmware/src/libs/firmata/arduino/Boards.h
-rw-rw-r-- 1 peteruithoven peteruithoven 5,6K jun 1 21:06 ./firmware/src/libs/firmata/arduino/FirmataConstants.h
-rw-rw-r-- 1 peteruithoven peteruithoven 19K jun 1 21:06 ./firmware/src/libs/firmata/arduino/Firmata.cpp
-rw-rw-r-- 1 peteruithoven peteruithoven 8,5K jun 1 21:06 ./firmware/src/libs/firmata/arduino/FirmataDefines.h
-rw-rw-r-- 1 peteruithoven peteruithoven 8,0K jun 1 21:06 ./firmware/src/libs/firmata/arduino/Firmata.h
-rw-rw-r-- 1 peteruithoven peteruithoven 16K jun 1 21:06 ./firmware/src/libs/firmata/arduino/FirmataMarshaller.cpp
-rw-rw-r-- 1 peteruithoven peteruithoven 2,4K jun 1 21:06 ./firmware/src/libs/firmata/arduino/FirmataMarshaller.h
-rw-rw-r-- 1 peteruithoven peteruithoven 17K jun 1 21:06 ./firmware/src/libs/firmata/arduino/FirmataParser.cpp
-rw-rw-r-- 1 peteruithoven peteruithoven 4,2K jun 1 21:06 ./firmware/src/libs/firmata/arduino/FirmataParser.h
I'm using zsh on elementary OS 5.1.7 Hera which is built on Ubuntu 18.04.4
LTS.
I feel like I'm missing something stupid.
I noticed I can actually run the line manually:
cp ./firmware/src/libs/firmata/arduino/*.{h,cpp} ./firmware/build/node_pixel_firmata/
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#246>, or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAA5DI32WXUERKA6ROQJXT3TQUY5NANCNFSM455ITZ3A>
.
|
Good idea. I now have a very simple example. Note the comments for when it doesn't work. FIRMWARE_DIR = ./firmware
BUILD_DIR = $(FIRMWARE_DIR)/build
SRC_DIR = $(FIRMWARE_DIR)/src
LIBS_DIR = $(SRC_DIR)/libs
# make the Firmata build process to copy the files to the right place
FIRMATA_DEST_DIR = $(BUILD_DIR)/node_pixel_firmata
# FIRMATA_FILES = $(LIBS_DIR)/firmata/arduino/*.{h,cpp} # < Doesn't work
# FIRMATA_FILES = $(LIBS_DIR)/firmata/arduino/Boards.h # Works
FIRMATA_FILES = $(LIBS_DIR)/firmata/arduino/Firmata.cpp # Works
# FIRMATA_FILES = $(LIBS_DIR)/firmata/arduino/* # works (with cp -r)
build-firmata:
cp $(FIRMATA_FILES) $(FIRMATA_DEST_DIR)/ |
Even simpler: build-firmata:
cp ./firmware/src/libs/firmata/arduino/*.{h,cpp} ./firmware/build/node_pixel_firmata/ Works: build-firmata:
cp ./firmware/src/libs/firmata/arduino/Firmata.cpp ./firmware/build/node_pixel_firmata/ |
I was afraid it was maybe the shell that was executing the Makefile. After reading: This actually seems to help: SHELL = /usr/bin/zsh
build-firmata:
cp ./firmware/src/libs/firmata/arduino/*.{h,cpp} ./firmware/build/node_pixel_firmata/ This also works: SHELL = /bin/bash
build-firmata:
cp ./firmware/src/libs/firmata/arduino/*.{h,cpp} ./firmware/build/node_pixel_firmata/ |
I think the Crude alternative that also works: build-firmata:
cp ./firmware/src/libs/firmata/arduino/*.h ./firmware/build/node_pixel_firmata/
cp ./firmware/src/libs/firmata/arduino/*.cpp ./firmware/build/node_pixel_firmata/ |
Thanks for that update. Interesting it's not supported. Happy to just
switch it to the multiple line version of the same thing - probably makes
it a little more readable as well as more portable.
If you want to update the makefile and raise a PR that would be wonderful!
…On Wed, 9 Jun 2021 at 05:48, Peter Uithoven ***@***.***> wrote:
Relevant: https://stackoverflow.com/a/589300/1544200
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#246 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAA5DIZDK3OBA4STFOBWU3DTRZX2PANCNFSM455ITZ3A>
.
|
I'm running into an issue when running
make build-firmata
:I made sure to install the arduino submodule using
git submodule update --init --recursive
.Running
ll
on the files it's trying to copy they are found just fine:I'm using zsh on elementary OS 5.1.7 Hera which is built on Ubuntu 18.04.4 LTS.
I feel like I'm missing something stupid.
I noticed I can actually run the line manually:
The text was updated successfully, but these errors were encountered: