Skip to content

Conversation

@cirode
Copy link

@cirode cirode commented Jul 26, 2017

I've been having errors with compilation on my new MBP

ld: warning: directory not found for option '-L/Users/XXX/personal_code/R-build/3.4.0/lib'
Undefined symbols for architecture x86_64:
  "_pcre_assign_jit_stack", referenced from:
      _setup_jit in grep.o
  "_pcre_free_study", referenced from:
      _do_strsplit in grep.o
      _do_grep in grep.o
      _do_gsub in grep.o
      _do_regexpr in grep.o
  "_pcre_jit_stack_alloc", referenced from:
      _setup_jit in grep.o
ld: symbol(s) not found for architecture x86_64
collect2: error: ld returned 1 exit status
make[3]: *** [R.bin] Error 1
make[2]: *** [R] Error 2
make[1]: *** [R] Error 1
make: *** [R] Error 1

BUILD FAILED

Inspect or clean up the working tree at /var/folders/fm/wcc7_6t151q6x0tf1xwjxk7h0000gn/T/R-build.20170726211443.17830
Results logged to /var/folders/fm/wcc7_6t151q6x0tf1xwjxk7h0000gn/T/R-build.20170726211443.17830.log

Last 10 log lines:
      _do_gsub in grep.o
      _do_regexpr in grep.o
  "_pcre_jit_stack_alloc", referenced from:
      _setup_jit in grep.o
ld: symbol(s) not found for architecture x86_64
collect2: error: ld returned 1 exit status
make[3]: *** [R.bin] Error 1
make[2]: *** [R] Error 2
make[1]: *** [R] Error 1
make: *** [R] Error 1

Info about my system

  • OSX 10.12.5
  • gcc
    Apple LLVM version 8.1.0 (clang-802.0.42)
    Target: x86_64-apple-darwin16.6.0
    
  • gcc from brew
    gcc-7 (Homebrew GCC 7.1.0 --with-jit --with-nls) 7.1.0
    

I found that I was able to download and compile R 3.4.0 using the following procedure ( using LLVM )

wget  https://cran.r-project.org/src/base/R-3/R-3.4.0.tar.gz
tar -zxvf R-3.4.0.tar.gz
cd R-3.4.0
./configure --prefix=/PATH/TO/INSTALL --enable-R-shlib
make
make install

Reading through the code here I could see a couple of differences; the majour two being the gcc being used, and these flags

hardcoding the gcc to use LLVM gcc did not help, but removing these flags did. I am unsure if these flags were needed for a previous version of R. If so, i'll be happy to modify the pull request

These flags were unecessary on my system and caused the error
ld: warning: directory not found for option '-L/Users/XXX/personal_code/R-build/3.4.0/lib'
Undefined symbols for architecture x86_64

More info in Pull Request
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant