Fail to compile/link/upload Arduino -

Hi, Get an error when compiling in Arduino1.8.13 on the MAC.
Installed Libraries and Board as instructed.
Looks like a python error of some kind.
“ValueError: dlsym(RTLD_DEFAULT, kIOMasterPortDefault): symbol not found”


Get the following error when compiling or rather linking:
Linking everything together…
python /Users/helge/Library/Arduino15/packages/Heltec-esp32/hardware/esp32/0.0.5/tools/ -q /Users/helge/Library/Arduino15/packages/Heltec-esp32/hardware/esp32/0.0.5/tools/partitions/default_8MB.csv /var/folders/dr/h4qlx9vd6fngtzbcy4g7rv8c0000gn/T/arduino_build_346663/Holtec_Test-1.ino.partitions.bin
/Users/helge/Library/Arduino15/packages/Heltec-esp32/tools/esptool_py/2.6.1/esptool --chip esp32 elf2image --flash_mode dio --flash_freq 80m --flash_size 8MB -o /var/folders/dr/h4qlx9vd6fngtzbcy4g7rv8c0000gn/T/arduino_build_346663/Holtec_Test-1.ino.bin /var/folders/dr/h4qlx9vd6fngtzbcy4g7rv8c0000gn/T/arduino_build_346663/Holtec_Test-1.ino.elf
Traceback (most recent call last):
File “”, line 57, in
File “/Library/Python/2.7/site-packages/PyInstaller/loader/”, line 389, in load_module
File “serial/tools/”, line 29, in
File “/Library/Python/2.7/site-packages/PyInstaller/loader/”, line 389, in load_module
File “serial/tools/”, line 31, in
File “/Library/Python/2.7/site-packages/PyInstaller/loader/”, line 389, in load_module
File “serial/tools/”, line 32, in
ValueError: dlsym(RTLD_DEFAULT, kIOMasterPortDefault): symbol not found
Failed to execute script esptool
Using library Heltec_ESP32_Dev-Boards at version 1.1.0 in folder: /Users/helge/Documents/Arduino/libraries/Heltec_ESP32_Dev-Boards
Using library Wire at version 1.0.1 in folder: /Users/helge/Library/Arduino15/packages/Heltec-esp32/hardware/esp32/0.0.5/libraries/Wire
Using library SPI at version 1.0 in folder: /Users/helge/Library/Arduino15/packages/Heltec-esp32/hardware/esp32/0.0.5/libraries/SPI
exit status 255
/Applications/ returned 255
Error compiling for board Wireless Stick.

I’m also affected by this, have you managed to find a solution?

I managed to fix it, although it’s a workaround.

  1. Remove the existing Heltec libraries from your Arduino folder. I’m using MacOS, so I removed them in my ~/Documents/Arduino folder.

  2. Basically follow the instructions in, but when cloning the repository, refer to this branch instead: (this is needed to get the submodules fixed, I’ve created a pull request but it’s not yet merged)


Link to the pull request here because I can only post two links per post:

1 Like

I tried to make this fix. I have just purchased some ESP32 LoRa boards and I’m looking forward to working with them but I’m using a Mac running Big Sur so I can’t compile any programs for this board. I get the same failure as listed. I tried following the steps you suggest but I got to a point where the Arduino IDE would start to start up and then fail. I’ve fixed that but the problem still exists.

Can you give me somemore detailed version of the instructions that purge the instructions here: with you suggested changes to those instructions for this particular board? When I run the “git submodules” line, I get fatal errors but I don’t know if this is causing the problem or not.

These instructions appear to install the board driver in the ~/Documents/Arduino/hardware folder but how does the IDE know to look there for boards. I’ve been using version 1.8.13 but just now uninstalled that and installed version 1.8.12 instead in hopes that might fix the issue. Should this fix work with either of those versions of the IDE.

Thank you.

Hi, I encounter this problem today and fix it without rebuilding the esp32 driver.

According to this issue:

Since Heltec using its own driver instead of official esp32 driver, there are few steps need to mention.

  1. Change the path from ~/Library/Arduino15/packages/esp32/tools/esptool_py/2.6.1/ to ~/Library/Arduino15/packages/Heltec-esp32/tools/esptool_py/2.6.1/

  2. The official driver use file but if you open the path above there are esptool exec file, you need to convert the py file to exec file, for your reference:

  3. After converting the py file copy all the files from dist/esptool to ~/Library/Arduino15/packages/Heltec-esp32/tools/esptool_py/2.6.1/

After changing the esptool exec file you can upload your code to Heltec esp32 in macOS Big Sur!

I was able to get a successful build on BigSur by doing the following.

  1. Update pyserial

    pip3 install pyserial --pre --force

  2. Insure esptool is using python3

    cd ~/Library/Arduino15/packages/Heltec-esp32/tools/esptool_py/2.6.1
    mv esptool
    cp …/…/…/hardware/esp32/0.0.5/tools/ .
    mv esptool esptool.old
    mv esptool
    chmod +x esptool

  3. Edit esptool and change first line to be #!/usr/local/bin/python3