Closed
Description
This bug report is a follow-up on this StackOverflow question.
The user had a project that mysteriously stopped working after taking a copy.
Crucially, the copy ended up as serial_pico (copy)
, which fails with errors: (see SO question)
Scanning dependencies of target bs2_default
[ 1%] Building ASM object pico-sdk/src/rp2_common/boot_stage2/CMakeFiles/bs2_default.dir/compile_time_choice.S.obj
[ 2%] Linking ASM executable bs2_default.elf
/bin/sh: 1: Syntax error: "(" unexpected
make[2]: *** [pico-sdk/src/rp2_common/boot_stage2/CMakeFiles/bs2_default.dir/build.make:98: pico-sdk/src/rp2_common/boot_stage2/bs2_default.elf] Error 2
Steps to reproduce:
- Create a directory with spaces and parentheses in the name (in the report below,
/tmp/test checkout (copy)
) - Create a minimal project based on the README of this project, including the hello_world.c and pico_sdk_import.cmake.
- Run CMake and try to build in verbose mode
On my system, the failing command is:
/tmp/arm-gnu-toolchain-11.3.rel1-darwin-x86_64-arm-none-eabi/bin/arm-none-eabi-gcc -mcpu=cortex-m0plus -mthumb -O3 -DNDEBUG -Wl,--build-id=none --specs=nosys.specs -nostartfiles "-Wl,--script=/tmp/test checkout (copy)/build/_deps/pico_sdk-src/src/rp2_common/boot_stage2/boot_stage2.ld" -Wl,-Map=bs2_default.elf.map CMakeFiles/bs2_default.dir/compile_time_choice.S.obj -o bs2_default.elf
cd "/tmp/test checkout (copy)/build/pico-sdk/src/rp2_common/boot_stage2" && /tmp/arm-gnu-toolchain-11.3.rel1-darwin-x86_64-arm-none-eabi/bin/arm-none-eabi-objdump -h /tmp/test\ checkout\ (copy)/build/pico-sdk/src/rp2_common/boot_stage2/bs2_default.elf >bs2_default.dis
/bin/sh: -c: line 0: syntax error near unexpected token `('
/bin/sh: -c: line 0: `cd "/tmp/test checkout (copy)/build/pico-sdk/src/rp2_common/boot_stage2" && /tmp/arm-gnu-toolchain-11.3.rel1-darwin-x86_64-arm-none-eabi/bin/arm-none-eabi-objdump -h /tmp/test\ checkout\ (copy)/build/pico-sdk/src/rp2_common/boot_stage2/bs2_default.elf >bs2_default.dis'
The cause of this error seems to be src/rp2_common.cmake on lines 15 and 16. Adding the VERBATIM
option after the COMMAND
stanzas and adding a space after the >
and >>
respectively allows the build to proceed a bit further, after which it complains about a similar objcopy
call.
Metadata
Metadata
Assignees
Labels
No labels