[MacPorts] #66380: R @4.2.2_1: error when installing package "later: ld: library not found for -latomic
MacPorts
noreply at macports.org
Sat Dec 3 12:49:30 UTC 2022
#66380: R @4.2.2_1: error when installing package "later: ld: library not found for
-latomic
---------------------------+--------------------
Reporter: MarcKaufmann | Owner: (none)
Type: defect | Status: new
Priority: Normal | Milestone:
Component: ports | Version:
Resolution: | Keywords:
Port: R |
---------------------------+--------------------
Comment (by kencu):
this is the issue that is leading to the non-zero output that is leading
the script to think you need -latomic:
{{{
ld: library not found for -lc++
}}}
Where the heck did your -lc++ go? I think I might have a clue...
make a little file like this:
{{{
% cat test.cpp
#include <stdint.h>
uint64_t v;
int main() {
return (int)__atomic_load_n(&v, __ATOMIC_ACQUIRE);
}
}}}
and then try to compile it with some verbosity flags added, and see what
happens... I will guess you have no SDK, but let's see.
Here's what I get:
{{{
% clang++-mp-14 -v -Wl,-v test.cpp
clang version 14.0.6
Target: x86_64-apple-darwin22.1.0
Thread model: posix
InstalledDir: /opt/local/libexec/llvm-14/bin
"/opt/local/libexec/llvm-14/bin/clang" -cc1 -triple x86_64-apple-
macosx13.0.0 -Wundef-prefix=TARGET_OS_ -Werror=undef-prefix -Wdeprecated-
objc-isa-usage -Werror=deprecated-objc-isa-usage -emit-obj -mrelax-all
--mrelax-relocations -disable-free -clear-ast-before-backend -disable-
llvm-verifier -discard-value-names -main-file-name test.cpp -mrelocation-
model pic -pic-level 2 -mframe-pointer=all -ffp-contract=on -fno-rounding-
math -funwind-tables=2 -target-sdk-version=13.0 -fcompatibility-qualified-
id-block-type-checking -fvisibility-inlines-hidden-static-local-var
-target-cpu penryn -tune-cpu generic -mllvm -treat-scalable-fixed-error-
as-warning -debugger-tuning=lldb -target-linker-version 820.1 -v
-fcoverage-compilation-dir=/Users/cunningh -resource-dir
/opt/local/libexec/llvm-14/lib/clang/14.0.6 -isysroot
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk
-I/usr/local/include -stdlib=libc++ -internal-isystem
/opt/local/libexec/llvm-14/bin/../include/c++/v1 -internal-isystem
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/local/include
-internal-isystem /opt/local/libexec/llvm-14/lib/clang/14.0.6/include
-internal-externc-isystem
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include
-fdeprecated-macro -fdebug-compilation-dir=/Users/cunningh -ferror-limit
19 -stack-protector 1 -fblocks -fencode-extended-block-signature
-fregister-global-dtors-with-atexit -fgnuc-version=4.2.1 -fcxx-exceptions
-fexceptions -fmax-type-align=16 -fcolor-diagnostics
-D__GCC_HAVE_DWARF2_CFI_ASM=1 -o
/var/folders/b4/rjyd2skj48b3hc6t2xmpdyfh0000gn/T/test-e3047f.o -x c++
test.cpp
clang -cc1 version 14.0.6 based upon LLVM 14.0.6 default target x86_64
-apple-darwin22.1.0
ignoring nonexistent directory "/usr/local/include"
ignoring nonexistent directory
"/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/local/include"
ignoring nonexistent directory
"/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/Library/Frameworks"
#include "..." search starts here:
#include <...> search starts here:
/opt/local/libexec/llvm-14/bin/../include/c++/v1
/opt/local/libexec/llvm-14/lib/clang/14.0.6/include
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks
(framework directory)
End of search list.
"/opt/local/libexec/llvm-14/bin/ld" -demangle -lto_library
/opt/local/libexec/llvm-14/lib/libLTO.dylib -no_deduplicate -dynamic -arch
x86_64 -platform_version macos 13.0.0 13.0 -syslibroot
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk
-o a.out -L/usr/local/lib -v
/var/folders/b4/rjyd2skj48b3hc6t2xmpdyfh0000gn/T/test-e3047f.o -lc++
-lSystem
/opt/local/libexec/llvm-14/lib/clang/14.0.6/lib/darwin/libclang_rt.osx.a
@(#)PROGRAM:ld PROJECT:ld64-820.1
BUILD 18:42:34 Sep 11 2022
configured to support archs: armv6 armv7 armv7s arm64 arm64e arm64_32 i386
x86_64 x86_64h armv6m armv7k armv7m armv7em
Library search paths:
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/lib
Framework search paths:
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/
}}}
--
Ticket URL: <https://trac.macports.org/ticket/66380#comment:7>
MacPorts <https://www.macports.org/>
Ports system for macOS
More information about the macports-tickets
mailing list