Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

compilation fails with unknown option : -platform_version #238

Open
cwdjankoski opened this issue Apr 3, 2020 · 1 comment
Open

compilation fails with unknown option : -platform_version #238

cwdjankoski opened this issue Apr 3, 2020 · 1 comment
Assignees
Labels
Milestone

Comments

@cwdjankoski
Copy link

cwdjankoski commented Apr 3, 2020

Hi @MarcusKlik ,
thank you for this wonderful package and all your work - much appreciated!

I am having similar troubles like in issue #226 - searching for the error actually brought me here. At first i was getting the same error

Error: package or namespace load failed for ‘fst’ in dyn.load(file, DLLpath = DLLpath, ...):
 unable to load shared object '/usr/local/lib/R/3.6/site-library/00LOCK-fst/00new/fst/libs/fst.so':
  dlopen(/usr/local/lib/R/3.6/site-library/00LOCK-fst/00new/fst/libs/fst.so, 6): Symbol not found: _XXH32
  Referenced from: /usr/local/lib/R/3.6/site-library/00LOCK-fst/00new/fst/libs/fst.so
  Expected in: flat namespace
 in /usr/local/lib/R/3.6/site-library/00LOCK-fst/00new/fst/libs/fst.so
Error: loading failed
Execution halted
ERROR: loading failed
* removing ‘/usr/local/lib/R/3.6/site-library/fst’

But after brew install llvm + exporting the compiler flags LD/CPP - it seemed to go smooth until it hit a new problem :-\

clang++ -std=gnu++11 -dynamiclib -Wl,-headerpad_max_install_names -undefined dynamic_lookup -single_module -multiply_defined suppress -L/usr/local/opt/gettext/lib -L/usr/local/opt/readline/lib -L/usr/local/lib -L/usr/local/Cellar/r/3.6.3_1/lib/R/lib -L/usr/local/opt/gettext/lib -L/usr/local/opt/readline/lib -L/usr/local/lib -o fst.so RcppExports.o flex_store.o fst_blockrunner_char.o fst_compress.o fst_error.o fst_table.o init.o openmp.o -L. -lFRAME -lCOMPRESSION -lLZ4 -lZSTD -L/usr/local/Cellar/r/3.6.3_1/lib/R/lib -lR -lintl -Wl,-framework -Wl,CoreFoundation
ld: unknown option: -platform_version
clang-10: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [fst.so] Error 1
ERROR: compilation failed for package ‘fst’
* removing ‘/usr/local/lib/R/3.6/site-library/fst’

I am wondering if this is a clang problem as you mention in the other issue ? Searching around bring up some results
ncbi/SKESA#6
but none that i really understand enough to twiddle with the compilation flags unfortunately.

Would you perhaps have any idea how to overcome this - or have you had similar issues with fst before ?

# R
R version 3.6.3 (2020-02-29) -- "Holding the Windsock"
Copyright (C) 2020 The R Foundation for Statistical Computing
Platform: x86_64-apple-darwin18.7.0 (64-bit)

# llvm from homebrew
==> Summary
🍺  /usr/local/Cellar/llvm/10.0.0_1: 7,019 files, 1GB

# gcc
Configured with: --prefix=/Library/Developer/CommandLineTools/usr --with-gxx-include-dir=/usr/include/c++/4.2.1
Apple LLVM version 10.0.1 (clang-1001.0.46.4)
Target: x86_64-apple-darwin18.7.0
Thread model: posix
InstalledDir: /Library/Developer/CommandLineTools/usr/bin

~ » brew info gcc
gcc: stable 9.3.0 (bottled), HEAD
GNU compiler collection
https://gcc.gnu.org/
/usr/local/Cellar/gcc/9.3.0 (1,463 files, 292MB) *
  Poured from bottle on 2020-03-17 at 21:33:26

Thanks again for this wonderful pkg and keep up the great work !

@MarcusKlik
Copy link
Collaborator

Hi @cwdjankoski, thanks for your kind words!

The error is a bit puzzling, --platform_version doesn't seem to be a valid linking option for both gcc and clang, do you know were the option is coming from?

Did you try using the steps defined on the data.table wiki to install llvm? Unfortunately, I don't have OSX at hand to test the installation locally, but the Travis CI machine (usually) works using:

brew install llvm
export PATH="/usr/local/opt/llvm/bin:$PATH"
export LDFLAGS="-L/usr/local/opt/llvm/lib"
export CPPFLAGS="-I/usr/local/opt/llvm/include

Also, do you have a custom .R/Makevars defined in your home directory?

Perhaps, if the error is similar, we should take a look at the solution that fixed the conda forge build...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants