For target x86_64-apple-darwin20.4 I got error while loading shared libraries: libtinfo.so.6
tiero opened this issue · comments
Marco Argentieri commented
I always used this osxcross target till now without any problem. Without any change to my cgo dependencies, I am failing to cross compile.
/home/runner/work/osxcross/target/bin/x86_64-apple-darwin20.4-ld: error while loading shared libraries: libtinfo.so.6: cannot open shared object file: No such file or directory
clang: error: unable to execute command: No such file or directory
clang: error: linker command failed due to signal (use -v to see invocation)
Jim Fisk commented
Your GitHub Action is locked to ubuntu-18.04
here. I just updated this project on 4/6/21 to work with Ubuntu 20.04 and upgraded the SDK from MacOSX10.15 to MacOSX11.3, which is why your shared libraries are out of sync.
You have two options:
- Keep running things on Ubuntu 18.04 and download an older version of this project. You could do this by checking out an older commit after downloading the project:
- name: OSXCross for CGO Support
run: |
mkdir ../../osxcross
git clone https://github.com/plentico/osxcross-target.git ../../osxcross/target
cd ../../osxcross/target
git checkout 73d4cf13c477d0dc6c7e684664d3342d57b946e8
- Update your
runs-on
environment here fromubuntu-18.04
toubuntu-20.04
. Just note that you'll likely have to add another step to avoid "libcrypto (OpenSSL)" errors:
-
name: Downgrade libssl
run: |
echo 'deb http://security.ubuntu.com/ubuntu bionic-security main' | sudo tee -a /etc/apt/sources.list
sudo apt update && apt-cache policy libssl1.0-dev
sudo apt-get install libssl1.0-dev
Can you let me know if one of these works for you? Thanks!
Marco Argentieri commented
WOW, option 2 works flawless (yes I locked ubuntu-18.04 in the past, I guess for the libcrypto errors)
Thank you so much!