platformio / platform-espressif8266

Espressif 8266: development platform for PlatformIO
https://registry.platformio.org/platforms/platformio/espressif8266
Apache License 2.0
330 stars 219 forks source link

MacOS Big Sur esptoolpy ValueError: dlsym(RTLD_DEFAULT, kIOMasterPortDefault): symbol not found #232

Closed maxgerhardt closed 3 years ago

maxgerhardt commented 3 years ago

Tracking bug report per https://community.platformio.org/t/esp8266-big-sur-11-0-1/17129?u=maxgerhardt. It seems like the Big Sur 11.0.1 update makes the pyserial module in esptool.py misbehave.

Traceback (most recent call last): 
File "/Users/pc/.platformio/packages/tool-esptoolpy/esptool.py", line 57, in <module> 
import serial.tools.list_ports as list_ports 
File "/Users/pc/.platformio/penv/lib/python3.8/site-packages/serial/tools/list_ports.py", line 29, in <module> from serial.tools.list_ports_posix 
import comports 
File "/Users/pc/.platformio/penv/lib/python3.8/site-packages/serial/tools/list_ports_posix.py", line 31, in <module> from serial.tools.list_ports_osx 
import comports 
File "/Users/pc/.platformio/penv/lib/python3.8/site-packages/serial/tools/list_ports_osx.py", line 32, in <module> 
kIOMasterPortDefault = ctypes.c_void_p.in_dll(iokit, "kIOMasterPortDefault") 
ValueError: dlsym(RTLD_DEFAULT, kIOMasterPortDefault): symbol not found

This error is supposedly solved by copying the latest esptoolpy version from the current Arduino IDE distribution to ~/.platformio/packages/tool-esptoolpy;

valeros commented 3 years ago

Thanks!

esptoolpy v3.0 will be used by default in the next platform release. As for now users on Big Sur can override the package directly in their configuration:

platform_packages =
    platformio/tool-esptoolpy @ ~1.30000.0
wiscot commented 3 years ago

Thanks!

esptoolpy v3.0 will be used by default in the next platform release. As for now users on Big Sur can override the package directly in their configuration:

platform_packages =
    platformio/tool-esptoolpy @ ~1.30000.0

Dear valeros, I have the same issue than maxgerhardt and with this trick he works fine.

Thank you very much!