perlmakefileclangmacos-mojavedbd-pg

ld unknown option -platform_version while installing perl package


I am trying to install perl package DBD::Pg in my macOS Mojave Version 10.14.6. But I get error for unknown option -platform_version and does not allow make command to continue. How would I be able to solve this? Thank you!

The following is the error I observe

ld: unknown option: -platform_version
clang-10: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [blib/arch/auto/DBD/Pg/Pg.bundle] Error 1

ld version

ld -v
@(#)PROGRAM:ld  PROJECT:ld64-450.3
BUILD 18:16:53 Apr  5 2019
configured to support archs: armv6 armv7 armv7s arm64 arm64e arm64_32 i386 x86_64 x86_64h armv6m armv7k armv7m armv7em
LTO support using: LLVM version 10.0.1, (clang-1001.0.46.4) (static support for 22, runtime is 22)
TAPI support using: Apple TAPI version 10.0.1 (tapi-1001.0.4.1)

clang version

clang -v
clang version 10.0.0 
Target: x86_64-apple-darwin18.7.0
Thread model: posix
InstalledDir: /Users/macuser/miniconda3/bin

Solution

  • I tried this on macOS 10.15.5, perlbrew perl 5.30.1.

    My compiler version is:

    $ cc --version
    Apple clang version 11.0.0 (clang-1100.0.33.17)
    Target: x86_64-apple-darwin19.5.0
    Thread model: posix
    InstalledDir: /Library/Developer/CommandLineTools/usr/bin