尝试在macOS Mojave(10.14.2)上从源代码构建 mongodb 4.1.6 (最新)。一些libatomic丢失了。我尝试在网络上搜索解决方案,但到目前为止没有一个解决方案。
最有前途的解决方案是从这里:Can't compile C program on a Mac after upgrade to Mojave
但是它也不能解决我的问题。
以下是配置信息:
<?php
namespace App\Console\Commands;
use Illuminate\Console\Command;
use Illuminate\Support\Facades\Artisan;
class TestSetupCommand extends Command
{
protected $signature = 'test:data';
protected $description = 'Basic Setup for Test Data';
public function __construct()
{
parent::__construct();
}
/**
* Execute the console command.
*
* @return mixed
*/
public function handle()
{
Artisan::call('migrate:refresh', ['--seed' => '']);
Artisan::call('basis:cc');
Artisan::call('tick:exchange');
$this->info("DB freshly setup: DONE");
$this->info("Coin: DONE");
$this->info("Exchange Scrapped: DONE");
}
}
这是scons: Reading SConscript files ...
scons version: 3.0.1
python version: 2 7 10 'final' 0
Checking whether the C compiler works... yes
Checking whether the C++ compiler works... yes
Checking that the C++ compiler can link a C++ program... yes
Checking if C++ compiler "g++" is GCC... no
Checking if C++ compiler "g++" is clang... yes
Checking if C compiler "gcc" is clang... yes
Detected a x86_64 processor
Checking if target OS macOS is supported by the toolchain... yes
Checking if C compiler is clang 3.8 (or Apple XCode 8.3.2) or newer...yes
Checking if C++ compiler is clang 3.8 (or Apple XCode 8.3.2) or newer...yes
Checking for sufficient macOS target version minimum... yes
Checking if C compiler supports -Wno-unused-local-typedefs... yes
Checking if C compiler supports -Wno-unused-function... yes
Checking if C compiler supports -Wno-unused-private-field... yes
Checking if C compiler supports -Wno-deprecated-declarations... yes
Checking if C compiler supports -Wno-tautological-constant-out-of-range-compare... yes
Checking if C compiler supports -Wno-tautological-constant-compare... yes
Checking if C compiler supports -Wno-tautological-unsigned-zero-compare... yes
Checking if C compiler supports -Wno-tautological-unsigned-enum-zero-compare... yes
Checking if C compiler supports -Wno-unused-const-variable... yes
Checking if C compiler supports -Wno-unused-but-set-variable... no
Checking if C compiler supports -Wno-missing-braces... yes
Checking if C compiler supports -Wno-inconsistent-missing-override... yes
Checking if C compiler supports -Wno-potentially-evaluated-expression... yes
Checking if C++ compiler supports -Wpessimizing-move... yes
Checking if C++ compiler supports -Wredundant-move... yes
Checking if C++ compiler supports -Wno-maybe-uninitialized... no
Checking if C++ compiler supports -Wno-undefined-var-template... yes
Checking if C++ compiler supports -Wno-instantiation-after-specialization... yes
Checking if C compiler supports -Wno-unused-lambda-capture... yes
Checking if C compiler supports -Wno-exceptions... yes
Checking if C compiler supports -Wno-format-truncation... no
Checking if C++ compiler supports -Wno-class-memaccess... no
Checking -Wnon-virtual-dtor for false positives... no
Checking if C compiler supports -Wunguarded-availability... yes
Checking if C compiler supports -fstack-protector-strong... yes
Checking if we are using libstdc++... no
Checking if C++ compiler supports -std=c++14... yes
Checking if C compiler supports -std=c11... yes
Checking for C++14... yes
Checking for memset_s... yes
Checking for C function strnlen()... yes
Checking if we are on a POSIX system... yes
Checking if the POSIX monotonic clock is supported... no
Checking off_t is 8 bytes... yes
Checking if linker supports -fuse-ld=gold... no
Checking if linker supports -Wl,--build-id... no
Checking if linker supports -Wl,--hash-style=gnu... no
Checking if linker supports -Wl,-z,noexecstack... no
Checking if linker supports -Wl,--warn-execstack... no
Checking if linker supports -Wl,-z,relro... no
Checking if C compiler supports -fno-builtin-memcmp... yes
Checking for storage class thread_local yes
Checking for C++14 std::enable_if_t support...yes
Checking for C++14 std::make_unique support... yes
Checking if pthread_setname_np is supported... no
Using SSL Provider: apple
Checking for C library rt... no
Checking for C library dl... no
Checking for C++ header file execinfo.h... yes
Checking whether backtrace is declared... yes
Checking whether backtrace_symbols is declared... yes
Checking whether backtrace_symbols_fd is declared... yes
Checking for C library pcap... no
Checking for C library wpcap... no
Checking if std::atomic<int64_t> works... no
Checking for C library atomic... no
Some atomic ops are not intrinsically supported, but no libatomic found
See /Users/dibyendu/Downloads/build/mongo-virtual-env/mongo/build/scons/config.log for details
的详细信息:
config.log
任何建议都会有所帮助。
答案 0 :(得分:0)
问题根本与 libatomic 无关。由于此问题ld: warning: text-based stub file are out of sync. Falling back to library file for linking
,该错误即将到来修复:
$ rm -rf /Library/Developer/CommandLineTools
$ xcode-select --install
然后执行以下脚本:https://gist.github.com/karololszacki/dec8fd80b20e081b0e91a6bbd639c8fe