[issue] Local compile fails libcrypto.a is not an archive

Tags: #<Tag:0x00007fe21e557028>


Local combile will not work with output on mac OS 10.15.1 for Argon firmware 1.4.3


  /Users/stijnwillems/.particle/toolchains/deviceOS/1.4.3/firmware-1.4.3/modules/argon/system-part1/makefile /Users/stijnwillems/.particle/toolchains/deviceOS/1.4.3/firmware-1.4.3/modules/argon/user-part/makefile
/usr/local/opt/openssl@1.1/lib/libcrypto.a: member /usr/local/opt/openssl@1.1/lib/libcrypto.a(aes_cbc.o) in archive is not an object
collect2: error: ld returned 1 exit status
make[2]: *** [../../../build/target/system-part1/platform-12-m/system-part1.elf] Error 1
make[1]: *** [/Users/stijnwillems/.particle/toolchains/deviceOS/1.4.3/firmware-1.4.3/modules/argon/system-part1/makefile] Error 2
make: *** [compile-all] Error 2
The terminal process terminated with exit code: 2

My workaround for now is cloud compile and then flash firmware with usb in dfu. But as I will need to flash more devices faster in the future I would like my local system to be able to build the project. Thanks for any help!

[ISSUE] Particle: Flash for debug fails and puts device in error state. Also related to Failed to launch OpenOCD GDB. Server: Timeout

It looks like your local compiler (homebrew) toolchain libraries directory is getting picked up by the gcc-arm cross-compiler used for Particle local builds. My guess is that you have the LIBRARY_PATH environment variable set (in .profile, .bashrc, .zshrc, etc.) to contain /usr/local/opt and it’s overriding the cross-compiled libcrypto.a.


@doozMen we’ll be better able to help troubleshoot if you provide the info we ask for here:

in particular, running Particle: Audit Environment will quickly confirm whether or not the LIBRARY_PATH environment variable is set.


ok will do this today


I ran audit environment and it spit out. Difficult to figure out where PATH was set because I use zsh. Anyway after altering and removing /opt things it started working. But still fails on another error, only locally. But I think I can fix this by reinstalling the toolchain.

Just in case to completely remove the old toolchain and start over I have to delete what? Thanks!


Very helpfull thanks. It worked and resulted in another error. Progress! :slight_smile:


Just in case to completely remove the old toolchain and start over

you have a couple of options:

  1. run the Particle: Install Local Compiler Toolchain command and select the toolchain you want to reinstall


  1. run the Particle: Reset Environment command

option 2 is handy if you have multiple toolchains installed. you can also run the Particle: Uninstall Local Compiler Toolchain if you just want to remove a toolchain (docs)

another option for troubleshooting the local compiler is to run Particle: Launch Compiler Shell and interact with it via the terminal instance that launches. specifically, try running:

echo $PATH # toolchain paths should be listed first
echo $LIBRARY_PATH # should be empty
which dfu-util
which openocd
which arm-none-eabi-gcc # all of these should report a toolchain path
make -f $PARTICLE_MAKEFILE compile-user # should start a build and report errors


super helpfull this!