On Jun 25, 2020, at 23:15, Sandeep Thakkar wrote:
>
> I'm compiling postgres with LLVM support on macOS 10.15 Catalina. The
> binaries are supported on 10.13+. On target machine (10.13), the library
> fails to load with the following error:
>
> dlopen(/Library/PostgreSQL/13/lib/postgresql/llvmjit.so, 10): Symbol not
> found: ____chkstk_darwin
>
> I guess this is because:
> $ otool -l /opt/local/libexec/llvm-8.0/lib/*.dylib | grep -B1 -A3 minos
> sdk 10.15
> minos 10.15
>
> Before I installed LLVM-8.0 using macports on 10.15, I appended
> /opt/local/etc/macports/macports.conf file with "macosx_deployment_target
> 10.13"
That should be enough, if you build from source. You might have received a
binary from our server instead, which was built without that setting. Set
"buildfromsource always" in macports.conf, and uninstall and reinstall postgres
and all of its dependencies.
If you want to use this MacPorts prefix for other things that don't need a
nonstandard deployment target and you want to be able to receive binaries of
those, then I recommend you leave your main MacPorts prefix /opt/local set for
the default deployment target and keep binaries enabled, and install a second
copy of MacPorts somewhere else like /opt/macportsfor10.13 and set its
macports.conf for the 10.13 deployment target. MacPorts isn't able to use
binaries for nondefault MacPorts prefixes anyway.
> and also did "export MACOSX_DEPLOYMENT_TARGET=10.13" on the terminal where I
> executed port install clang-8.0
MacPorts will intentionally ignore this and most other environment variables
you set.