Closed daduke closed 1 year ago
checkout https://github.com/sle118/squeezelite-esp32#manual-install-of-esp-idf for extra python libraries
@philippe44 can confirm, but I think 4.4-s3
is not maintained. master-v4.3
should compile in 4.4.6 (I'm on 4.4.5), additionally, watch out for Quad v Octal SPIRAM (menuconfig parameter).
I made some (not quite working properly) cmake mods in my fork to build out Cspot. (cmakesucks.com!)
yes, just use master-4.3, it compiles for s3 and under 4.4.x (at least 4.4.5). Re cspot, you can follow the guide on cspot site, it's just about adding:
$ sudo pip3 install protobuf grpcio-tools
thanks to both of you. I had the python libs already in place. master-4.3 still no dice.
[6/193] Building CXX object esp-idf/spotify/cspot/bell/CMakeFiles/bell.dir/main/io/BinaryStream.cpp.obj
FAILED: esp-idf/spotify/cspot/bell/CMakeFiles/bell.dir/main/io/BinaryStream.cpp.obj
/home/daduke/.espressif/tools/xtensa-esp32s3-elf/esp-2021r2-patch5-8.4.0/xtensa-esp32s3-elf/bin/xtensa-esp32s3-elf-g++ -DBELL_DISABLE_CODECS -DBELL_DISABLE_FMT -DBELL_DISABLE_REGEX -DBELL_ONLY_CJSON -DFMT_HEADER_ONLY -DHIERARCHICAL_STATES=1 -DMBEDTLS_CONFIG_FILE=\"mbedtls/esp_config.h\" -DMODEL_NAME=SqueezeESP32 -DPB_ENABLE_MALLOC -DPB_FIELD_32BIT -DSTATE_MACHINE_LOGGER=1 -DUSE_DEFAULT_STDLIB="1 -DTARGET_OS_IPHONE=0" -I/opt/esp32-idf/projects/squeezelite-esp32/build/config -I/opt/esp32-idf/projects/squeezelite-esp32/components/spotify/cspot/bell/main/audio-codec/include -I/opt/esp32-idf/projects/squeezelite-esp32/components/spotify/cspot/bell/main/audio-dsp/include -I/opt/esp32-idf/projects/squeezelite-esp32/components/spotify/cspot/bell/main/audio-sinks/include -I/opt/esp32-idf/projects/squeezelite-esp32/components/spotify/cspot/bell/main/io/include -I/opt/esp32-idf/projects/squeezelite-esp32/components/spotify/cspot/bell/main/utilities/include -I/opt/esp32-idf/projects/squeezelite-esp32/components/spotify/cspot/bell/main/platform -I/opt/esp32-idf/projects/squeezelite-esp32/build/esp-idf/spotify/cspot/bell -I/opt/esp32-idf/esp-idf/components/newlib/platform_include -I/opt/esp32-idf/esp-idf/components/freertos/include -I/opt/esp32-idf/esp-idf/components/freertos/include/esp_additions/freertos -I/opt/esp32-idf/esp-idf/components/freertos/port/xtensa/include -I/opt/esp32-idf/esp-idf/components/freertos/include/esp_additions -I/opt/esp32-idf/esp-idf/components/esp_hw_support/include -I/opt/esp32-idf/esp-idf/components/esp_hw_support/include/soc -I/opt/esp32-idf/esp-idf/components/esp_hw_support/include/soc/esp32s3 -I/opt/esp32-idf/esp-idf/components/esp_hw_support/port/esp32s3/. -I/opt/esp32-idf/esp-idf/components/esp_hw_support/port/esp32s3/private_include -I/opt/esp32-idf/esp-idf/components/heap/include -I/opt/esp32-idf/esp-idf/components/log/include -I/opt/esp32-idf/esp-idf/components/lwip/include/apps -I/opt/esp32-idf/esp-idf/components/lwip/include/apps/sntp -I/opt/esp32-idf/esp-idf/components/lwip/lwip/src/include -I/opt/esp32-idf/esp-idf/components/lwip/port/esp32/include -I/opt/esp32-idf/esp-idf/components/lwip/port/esp32/include/arch -I/opt/esp32-idf/esp-idf/components/soc/include -I/opt/esp32-idf/esp-idf/components/soc/esp32s3/. -I/opt/esp32-idf/esp-idf/components/soc/esp32s3/include -I/opt/esp32-idf/esp-idf/components/hal/esp32s3/include -I/opt/esp32-idf/esp-idf/components/hal/include -I/opt/esp32-idf/esp-idf/components/hal/platform_port/include -I/opt/esp32-idf/esp-idf/components/esp_rom/include -I/opt/esp32-idf/esp-idf/components/esp_rom/include/esp32s3 -I/opt/esp32-idf/esp-idf/components/esp_rom/esp32s3 -I/opt/esp32-idf/esp-idf/components/esp_common/include -I/opt/esp32-idf/esp-idf/components/esp_system/include -I/opt/esp32-idf/esp-idf/components/esp_system/port/soc -I/opt/esp32-idf/esp-idf/components/esp_system/port/public_compat -I/opt/esp32-idf/esp-idf/components/xtensa/include -I/opt/esp32-idf/esp-idf/components/xtensa/esp32s3/include -I/opt/esp32-idf/esp-idf/components/driver/include -I/opt/esp32-idf/esp-idf/components/driver/esp32s3/include -I/opt/esp32-idf/esp-idf/components/esp_pm/include -I/opt/esp32-idf/esp-idf/components/esp_ringbuf/include -I/opt/esp32-idf/esp-idf/components/efuse/include -I/opt/esp32-idf/esp-idf/components/efuse/esp32s3/include -I/opt/esp32-idf/esp-idf/components/vfs/include -I/opt/esp32-idf/esp-idf/components/esp_wifi/include -I/opt/esp32-idf/esp-idf/components/esp_event/include -I/opt/esp32-idf/esp-idf/components/esp_netif/include -I/opt/esp32-idf/esp-idf/components/esp_eth/include -I/opt/esp32-idf/esp-idf/components/tcpip_adapter/include -I/opt/esp32-idf/esp-idf/components/esp_phy/include -I/opt/esp32-idf/esp-idf/components/esp_phy/esp32s3/include -I/opt/esp32-idf/esp-idf/components/esp_ipc/include -I/opt/esp32-idf/esp-idf/components/app_trace/include -I/opt/esp32-idf/esp-idf/components/esp_timer/include -I/opt/esp32-idf/esp-idf/components/mdns/include -I/opt/esp32-idf/esp-idf/components/console -I/opt/esp32-idf/esp-idf/components/mbedtls/port/include -I/opt/esp32-idf/esp-idf/components/mbedtls/mbedtls/include -I/opt/esp32-idf/esp-idf/components/mbedtls/esp_crt_bundle/include -I/opt/esp32-idf/esp-idf/components/pthread/include -I/opt/esp32-idf/projects/squeezelite-esp32/components/codecs -I/opt/esp32-idf/proj@@@
In file included from /opt/esp32-idf/projects/squeezelite-esp32/components/spotify/cspot/bell/main/io/BinaryStream.cpp:1:
/opt/esp32-idf/projects/squeezelite-esp32/components/spotify/cspot/bell/main/io/include/BinaryStream.h:14:8: error: 'endian' in namespace 'std' does not name a type
std::endian byteOrder;
^~~~~~
/opt/esp32-idf/projects/squeezelite-esp32/components/spotify/cspot/bell/main/io/include/BinaryStream.h:14:3: note: suggested alternative: 'ends'
std::endian byteOrder;
^~~
ends
/opt/esp32-idf/projects/squeezelite-esp32/components/spotify/cspot/bell/main/io/include/BinaryStream.h:57:26: error: 'std::endian' has not been declared
void setByteOrder(std::endian byteOrder);
^~~~~~
/opt/esp32-idf/projects/squeezelite-esp32/components/spotify/cspot/bell/main/io/include/BinaryStream.h:61:33: error: declaration of 'operator>>' as non-function
BinaryStream& operator>>(std::byte& value);
^~~~
/opt/esp32-idf/projects/squeezelite-esp32/components/spotify/cspot/bell/main/io/include/BinaryStream.h:61:25: error: expected ';' at end of member declaration
BinaryStream& operator>>(std::byte& value);
^~
;
/opt/esp32-idf/projects/squeezelite-esp32/components/spotify/cspot/bell/main/io/include/BinaryStream.h:61:37: error: expected ')' before '&' token
BinaryStream& operator>>(std::byte& value);
~ ^
)
/opt/esp32-idf/projects/squeezelite-esp32/components/spotify/cspot/bell/main/io/include/BinaryStream.h:71:33: error: declaration of 'operator<<' as non-function
BinaryStream& operator<<(std::byte value);
^~~~
/opt/esp32-idf/projects/squeezelite-esp32/components/spotify/cspot/bell/main/io/include/BinaryStream.h:71:25: error: expected ';' at end of member declaration
BinaryStream& operator<<(std::byte value);
^~
;
followed by hundreds of those.
would anyone be willing to share a binary build so I can get started with my S3?
thanks, -d
huh, it seems
target_compile_options(${COMPONENT_LIB} PRIVATE -std=c++2a)
in components/spotify/CMakeLists.txt
did the trick. Why do I need this and you dont?
-d
actually it's
add_compile_options(-std=gnu++2a)
target_compile_options(${COMPONENT_LIB} PRIVATE -std=c++2a)
@philippe44 would you accept a PR for this? Shouldn't do harm for those who already can compile and makes it work for the others.
S3 via SPDIF is working fine btw ("spdif_config": "bck=4,ws=5,do=18"
), the 'regular' ESP32 values (do=15
) won't play.
There should be a difference somewhere in your CMAKE version because if you look at the CMakefile.txt of cspot, it says
# this must be set *before* idf_component_register
set(CMAKE_CXX_STANDARD 20)
Because indeed, cspot requires c++20, but I fixed that a long while ago. So what is your cmake?
S3 via SPDIF is working fine btw (
"spdif_config": "bck=4,ws=5,do=18"
), the 'regular' ESP32 values (do=15
) won't play.It depends what board you have. The dev kit of s3 has different versions and some use that GPIO I think for the RGB leed (it written on the back of the kit). I'm not 100% sure. But yes, spdif works, this is my main test case for S3 😄
There should be a difference somewhere in your CMAKE version because if you look at the CMakefile.txt of cspot, it says
# this must be set *before* idf_component_register set(CMAKE_CXX_STANDARD 20)
Because indeed, cspot requires c++20, but I fixed that a long while ago. So what is your cmake?
cmake version 3.27.7 in Fedora 39. set(CMAKE_CXX_STANDARD 20)
alone won't work for me, I need the other two lines.
S3 via SPDIF is working fine btw (
"spdif_config": "bck=4,ws=5,do=18"
), the 'regular' ESP32 values (do=15
) won't play.It depends what board you have. The dev kit of s3 has different versions and some use that GPIO I think for the RGB leed (it written on the back of the kit). I'm not 100% sure. But yes, spdif works, this is my main test case for S3 😄
it's a ESP32-S3-WROOM-1U, no LED. Nothing obvious on GPIO15, playback simply wouldn't start.
So there is likely something conflicting, but it's not at the build level, I think. Would be good if you could try to find what is interfering.
There should be a difference somewhere in your CMAKE version because if you look at the CMakefile.txt of cspot, it says
# this must be set *before* idf_component_register set(CMAKE_CXX_STANDARD 20)
Because indeed, cspot requires c++20, but I fixed that a long while ago. So what is your cmake?
cmake version 3.27.7 in Fedora 39.
set(CMAKE_CXX_STANDARD 20)
alone won't work for me, I need the other two lines.I'll investigate then because it should set the compiler in c++20 mode (and it does for me on esp32 and native Linux)
workaround exists
hey Philippe and Sebastien,
I'd like to get started on some S3 projects, but I fail miserably:
I prepared IDF 4.4.6 via
then checked out 4.4-s3 and tried building. I'm getting literally hundreds of errors from cspot. Low level C stuff way above my pay grade like
error: 'scoped_lock' is not a member of 'std' std::scoped_lock lock(tracksMutex);
Can I disable cspot completely in order to get a successful build? Tried
CONFIG_CSPOT_SINK=n
but that doesn't work.That's on Fedora 39.
Any hints for poor old daduke?
thanks, -Christian