2015-03-13 6 views
7

मैं सिर्फ अपने Mac पर जंग स्थापित किया है और rustc --version --verbose प्रदर्शित करता हैजब "कार्गो निर्माण"

rustc 1.0.0-nightly (91bdf23f5 2015-03-09) (built 2015-03-08) 
binary: rustc 
commit-hash: 91bdf23f504f79ed59617cde3dfebd3d5e39a476 
commit-date: 2015-03-09 
build-date: 2015-03-08 
host: x86_64-apple-darwin 
release: 1.0.0-nightly 

चल रहा खजाने की एक जोड़ी (postgres-extension और erlang-rust-nif) क्लोन और पर cargo build भाग गया लिंकर `cc` त्रुटि exec नहीं किया जा सका वो दोनों। दोनों

error: could not exec the linker `cc`: No such file or directory (os error 2) 
error: aborting due to previous error 

इसके अतिरिक्त त्रुटि की सूचना दी, मैं एक साधारण जंग फ़ाइल मुद्रण "hello world" rustc का उपयोग कर संकलित करने के लिए सक्षम नहीं था। मैं केवल झंडे rustc -C linker=gcc hello_world.rs पास करके उन्हें संकलित करने में सक्षम था।

clang --version प्रदर्शित करता है

clang version 3.4.2 (http://llvm.org/git/llvm.git 5c6aa738fb3325ae499454877f1e2926d2368135) 
Target: x86_64-apple-darwin12.2.1 
Thread model: posix 

gcc --version प्रदर्शित करता है

gcc (Homebrew gcc49 4.9.2_1) 4.9.2 
+0

'सीसी' वापस क्या करता है? –

+0

वर्तमान में मैंने अपने '.bash_profile' में' alias cc = gcc' के रूप में 'उपनाम' बनाया है। इसलिए यह कुछ भी नहीं देता है। – abips

उत्तर

7

ऐसा लगता है कि आप Homebrew के माध्यम से जीसीसी और LLVM/बजना स्थापित किया है। shared OS X configurations की जांच कर रहा है, लिंकर cc पर डिफ़ॉल्ट है। मैं ओएस एक्स डेवलपर उपकरण स्थापित किया है:

$ clang --version 
Apple LLVM version 6.0 (clang-600.0.56) (based on LLVM 3.5svn) 
Target: x86_64-apple-darwin13.4.0 
Thread model: posix 

$ gcc --version 
Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/usr/include/c++/4.2.1 
Apple LLVM version 6.0 (clang-600.0.56) (based on LLVM 3.5svn) 
Target: x86_64-apple-darwin13.4.0 
Thread model: posix 

$ cc --version 
Apple LLVM version 6.0 (clang-600.0.56) (based on LLVM 3.5svn) 
Target: x86_64-apple-darwin13.4.0 
Thread model: posix 

यह संभवतः कुछ है कि जंग में ही ठीक कर सकता है, लेकिन आप एक बग रिपोर्ट/वृद्धि का अनुरोध दर्ज करना होगा। यह संभव है कि आप clang को cc के रूप में सिल्लिंक करके इसे लगभग अलियासिंग करने के बजाय काम कर सकें, क्योंकि उपनाम शायद उस वातावरण में मौजूद नहीं है जो जंग से बाहर निकल रहा है।

+1

मैंने ओएसएक्स कमांड लाइन टूल्स के माध्यम से 'llvm' और' gcc' को पुनर्स्थापित किया और यह ठीक काम किया। – abips

+1

जैसा कि @abips ने ओएसएक्स में किया था, मैंने लिनक्स में जीसीसी स्थापित किया और इस समस्या को हल किया। –

+0

वंशावली के लिए, समस्या को डेबियन पर 'सुडो एपीटी-जीआईसी इंस्टॉल करें' द्वारा तय किया गया था – Aaron3468

संबंधित मुद्दे