PlatformIO Community

Build error: sh: 1: Syntax error: "(" unexpected

When I try to build a project on a Linux machine I got the following error:
sh: 1: Syntax error: "(" unexpected

The same project builds successfully on Windows.

Which is which exactly?

Custom ESP32 project

platform = https://github.com/platformio/platform-espressif32.git#feature/arduino-upstream
board = esp32dev
framework = arduino

I would not use that branch. Is it better with

platform = https://github.com/Jason2866/platform-espressif32.git

?

@maxgerhardt Same error with that platform. The problem must be with Linux because the same project is building successfully on Windows 11.

When 2.0.0. will be the official version of the Esp32 platform?

I don’t think that will happen before the war ends.

Can you upload the failing project or reproduce it in a more minimal project?

I hope it will be over very very soon.

I will try

I’ve the same issue with my linux ubuntu 20.04
Did try mention above and this variant:
platform = https://github.com/platformio/platform-espressif32.git#feature/arduino-upstream
platform_packages =
framework-arduinoespressif32@https://github.com/espressif/arduino-esp32.git#2.0.4

This platform and the 2.0.4 version don’t go together at all – please don’t use this 1 year old feature/arduino-upstream branch. The current dev version (Commits · platformio/platform-espressif32 · GitHub) has 2.0.4 support if you want that, so just write

platform = https://github.com/platformio/platform-espressif32.git

Thanks a lot.
But my issue for linux build still the same:

sh: 1: Syntax error: "(" unexpected

And that happens with the arduino-blink example too? What’s the full build output?

error disappeared for simple project, when I remove 3rd party lib

error has left - platformio.ini has line
-D XXXXX=(1000)
Look like brackets passed for windows but failed for linux, now works:
-D XXXXX=1000
Thank you very much again!

You should still be able to escape this properly if you write -D XXXX=\(1000\).

1 Like