Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

configure: error: C compiler cannot create executables- React Native

I have been trying to build my react native project but getting error

React native version : .48.4

Xcode : 9.1

configure: WARNING: 'missing' script is too old or missing
checking for arm-apple-darwin-strip... no
checking for strip... strip
checking for a thread-safe mkdir -p... ./install-sh -c -d
checking for gawk... no
checking for mawk... no
checking for nawk... no
checking for awk... awk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking for arm-apple-darwin-gcc... /opt/Xilinx/SDK/2017.1/gnu/arm/lin/bin/arm-xilinx-linux-gnueabi-gcc
checking whether the C compiler works... no
configure: error: in `/node_modules/react-native/third-party/glog-0.3.4':
configure: error: C compiler cannot create executables
See `config.log' for more details
like image 454
Anju Avatar asked Feb 22 '18 13:02

Anju


3 Answers

You need to run the below command to squash the error

sudo xcode-select -s /Applications/Xcode.app/Contents/Developer/

Note: Depending on your Xcode version installed, sometimes you have to add it to the path, for example sudo xcode-select -s /Applications/Xcode 12.0.app/Contents/Developer/

like image 192
Guy Avatar answered Nov 20 '22 05:11

Guy


This solved that issue for me

rm -r ~/.rncache/
cd node_modules/react-native/third-party/glog-0.3.4/
./configure --host arm-apple-darwin
like image 37
Suyog K.C Avatar answered Nov 20 '22 05:11

Suyog K.C


I had the same issue,

below steps worked for me,

  • Restart your system
  • under repo: cd node_modules/react-native/third-party/glog-0.3.4
  • ../../scripts/ios-configure-glog.sh
like image 8
Nandam Mahesh Avatar answered Nov 20 '22 03:11

Nandam Mahesh