https://github.com/Rdatatable/data.table/wiki/Installation์ ๋ชจ๋ ์ง์นจ์ ๋ฐ๋ฅด๊ณ StackOverflow๋ฅผ ๊ฒ์ํ์ง๋ง Mac 10.14.6์ ์์ค(OpenMP ์ง์์ฉ)์์ ์ค์นํ data.table์ ๊ฐ์ ธ์ฌ ์ ์์ต๋๋ค. R4.0์ผ๋ก. ์์ค์์ ์ค์นํ๋ ค๊ณ ํ ๋ ์ด ์ค๋ฅ๊ฐ ๊ณ์ ๋ฐ์ํฉ๋๋ค.
> install.packages("data.table", type="source", Ncpus = 7)
trying URL 'https://cran.us.r-project.org/src/contrib/data.table_1.12.8.tar.gz'
Content type 'application/octet-stream' length 4948391 bytes (4.7 MB)
==================================================
downloaded 4.7 MB
* installing *source* package โdata.tableโ ...
** package โdata.tableโ successfully unpacked and MD5 sums checked
** using staged installation
zlib 1.2.11 is available ok
** libs
/usr/local/opt/llvm/bin/clang -fopenmp -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/usr/local/opt/gettext/include -I/usr/local/opt/llvm/include -fPIC -g -O3 -Wall -pedantic -std=gnu99 -mtune=native -pipe -c assign.c -o assign.o
/usr/local/opt/llvm/bin/clang -fopenmp -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/usr/local/opt/gettext/include -I/usr/local/opt/llvm/include -fPIC -g -O3 -Wall -pedantic -std=gnu99 -mtune=native -pipe -c between.c -o between.o
/usr/local/opt/llvm/bin/clang -fopenmp -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/usr/local/opt/gettext/include -I/usr/local/opt/llvm/include -fPIC -g -O3 -Wall -pedantic -std=gnu99 -mtune=native -pipe -c bmerge.c -o bmerge.o
/usr/local/opt/llvm/bin/clang -fopenmp -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/usr/local/opt/gettext/include -I/usr/local/opt/llvm/include -fPIC -g -O3 -Wall -pedantic -std=gnu99 -mtune=native -pipe -c chmatch.c -o chmatch.o
/usr/local/opt/llvm/bin/clang -fopenmp -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/usr/local/opt/gettext/include -I/usr/local/opt/llvm/include -fPIC -g -O3 -Wall -pedantic -std=gnu99 -mtune=native -pipe -c cj.c -o cj.o
/usr/local/opt/llvm/bin/clang -fopenmp -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/usr/local/opt/gettext/include -I/usr/local/opt/llvm/include -fPIC -g -O3 -Wall -pedantic -std=gnu99 -mtune=native -pipe -c coalesce.c -o coalesce.o
/usr/local/opt/llvm/bin/clang -fopenmp -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/usr/local/opt/gettext/include -I/usr/local/opt/llvm/include -fPIC -g -O3 -Wall -pedantic -std=gnu99 -mtune=native -pipe -c dogroups.c -o dogroups.o
/usr/local/opt/llvm/bin/clang -fopenmp -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/usr/local/opt/gettext/include -I/usr/local/opt/llvm/include -fPIC -g -O3 -Wall -pedantic -std=gnu99 -mtune=native -pipe -c fastmean.c -o fastmean.o
/usr/local/opt/llvm/bin/clang -fopenmp -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/usr/local/opt/gettext/include -I/usr/local/opt/llvm/include -fPIC -g -O3 -Wall -pedantic -std=gnu99 -mtune=native -pipe -c fcast.c -o fcast.o
/usr/local/opt/llvm/bin/clang -fopenmp -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/usr/local/opt/gettext/include -I/usr/local/opt/llvm/include -fPIC -g -O3 -Wall -pedantic -std=gnu99 -mtune=native -pipe -c fifelse.c -o fifelse.o
/usr/local/opt/llvm/bin/clang -fopenmp -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/usr/local/opt/gettext/include -I/usr/local/opt/llvm/include -fPIC -g -O3 -Wall -pedantic -std=gnu99 -mtune=native -pipe -c fmelt.c -o fmelt.o
/usr/local/opt/llvm/bin/clang -fopenmp -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/usr/local/opt/gettext/include -I/usr/local/opt/llvm/include -fPIC -g -O3 -Wall -pedantic -std=gnu99 -mtune=native -pipe -c forder.c -o forder.o
/usr/local/opt/llvm/bin/clang -fopenmp -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/usr/local/opt/gettext/include -I/usr/local/opt/llvm/include -fPIC -g -O3 -Wall -pedantic -std=gnu99 -mtune=native -pipe -c frank.c -o frank.o
/usr/local/opt/llvm/bin/clang -fopenmp -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/usr/local/opt/gettext/include -I/usr/local/opt/llvm/include -fPIC -g -O3 -Wall -pedantic -std=gnu99 -mtune=native -pipe -c fread.c -o fread.o
/usr/local/opt/llvm/bin/clang -fopenmp -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/usr/local/opt/gettext/include -I/usr/local/opt/llvm/include -fPIC -g -O3 -Wall -pedantic -std=gnu99 -mtune=native -pipe -c freadR.c -o freadR.o
/usr/local/opt/llvm/bin/clang -fopenmp -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/usr/local/opt/gettext/include -I/usr/local/opt/llvm/include -fPIC -g -O3 -Wall -pedantic -std=gnu99 -mtune=native -pipe -c froll.c -o froll.o
/usr/local/opt/llvm/bin/clang -fopenmp -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/usr/local/opt/gettext/include -I/usr/local/opt/llvm/include -fPIC -g -O3 -Wall -pedantic -std=gnu99 -mtune=native -pipe -c frollR.c -o frollR.o
/usr/local/opt/llvm/bin/clang -fopenmp -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/usr/local/opt/gettext/include -I/usr/local/opt/llvm/include -fPIC -g -O3 -Wall -pedantic -std=gnu99 -mtune=native -pipe -c frolladaptive.c -o frolladaptive.o
/usr/local/opt/llvm/bin/clang -fopenmp -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/usr/local/opt/gettext/include -I/usr/local/opt/llvm/include -fPIC -g -O3 -Wall -pedantic -std=gnu99 -mtune=native -pipe -c fsort.c -o fsort.o
/usr/local/opt/llvm/bin/clang -fopenmp -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/usr/local/opt/gettext/include -I/usr/local/opt/llvm/include -fPIC -g -O3 -Wall -pedantic -std=gnu99 -mtune=native -pipe -c fwrite.c -o fwrite.o
/usr/local/opt/llvm/bin/clang -fopenmp -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/usr/local/opt/gettext/include -I/usr/local/opt/llvm/include -fPIC -g -O3 -Wall -pedantic -std=gnu99 -mtune=native -pipe -c fwriteR.c -o fwriteR.o
/usr/local/opt/llvm/bin/clang -fopenmp -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/usr/local/opt/gettext/include -I/usr/local/opt/llvm/include -fPIC -g -O3 -Wall -pedantic -std=gnu99 -mtune=native -pipe -c gsumm.c -o gsumm.o
/usr/local/opt/llvm/bin/clang -fopenmp -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/usr/local/opt/gettext/include -I/usr/local/opt/llvm/include -fPIC -g -O3 -Wall -pedantic -std=gnu99 -mtune=native -pipe -c ijoin.c -o ijoin.o
/usr/local/opt/llvm/bin/clang -fopenmp -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/usr/local/opt/gettext/include -I/usr/local/opt/llvm/include -fPIC -g -O3 -Wall -pedantic -std=gnu99 -mtune=native -pipe -c init.c -o init.o
/usr/local/opt/llvm/bin/clang -fopenmp -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/usr/local/opt/gettext/include -I/usr/local/opt/llvm/include -fPIC -g -O3 -Wall -pedantic -std=gnu99 -mtune=native -pipe -c inrange.c -o inrange.o
/usr/local/opt/llvm/bin/clang -fopenmp -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/usr/local/opt/gettext/include -I/usr/local/opt/llvm/include -fPIC -g -O3 -Wall -pedantic -std=gnu99 -mtune=native -pipe -c nafill.c -o nafill.o
/usr/local/opt/llvm/bin/clang -fopenmp -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/usr/local/opt/gettext/include -I/usr/local/opt/llvm/include -fPIC -g -O3 -Wall -pedantic -std=gnu99 -mtune=native -pipe -c nqrecreateindices.c -o nqrecreateindices.o
/usr/local/opt/llvm/bin/clang -fopenmp -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/usr/local/opt/gettext/include -I/usr/local/opt/llvm/include -fPIC -g -O3 -Wall -pedantic -std=gnu99 -mtune=native -pipe -c openmp-utils.c -o openmp-utils.o
/usr/local/opt/llvm/bin/clang -fopenmp -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/usr/local/opt/gettext/include -I/usr/local/opt/llvm/include -fPIC -g -O3 -Wall -pedantic -std=gnu99 -mtune=native -pipe -c quickselect.c -o quickselect.o
/usr/local/opt/llvm/bin/clang -fopenmp -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/usr/local/opt/gettext/include -I/usr/local/opt/llvm/include -fPIC -g -O3 -Wall -pedantic -std=gnu99 -mtune=native -pipe -c rbindlist.c -o rbindlist.o
/usr/local/opt/llvm/bin/clang -fopenmp -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/usr/local/opt/gettext/include -I/usr/local/opt/llvm/include -fPIC -g -O3 -Wall -pedantic -std=gnu99 -mtune=native -pipe -c reorder.c -o reorder.o
/usr/local/opt/llvm/bin/clang -fopenmp -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/usr/local/opt/gettext/include -I/usr/local/opt/llvm/include -fPIC -g -O3 -Wall -pedantic -std=gnu99 -mtune=native -pipe -c shift.c -o shift.o
/usr/local/opt/llvm/bin/clang -fopenmp -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/usr/local/opt/gettext/include -I/usr/local/opt/llvm/include -fPIC -g -O3 -Wall -pedantic -std=gnu99 -mtune=native -pipe -c subset.c -o subset.o
/usr/local/opt/llvm/bin/clang -fopenmp -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/usr/local/opt/gettext/include -I/usr/local/opt/llvm/include -fPIC -g -O3 -Wall -pedantic -std=gnu99 -mtune=native -pipe -c transpose.c -o transpose.o
/usr/local/opt/llvm/bin/clang -fopenmp -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/usr/local/opt/gettext/include -I/usr/local/opt/llvm/include -fPIC -g -O3 -Wall -pedantic -std=gnu99 -mtune=native -pipe -c types.c -o types.o
/usr/local/opt/llvm/bin/clang -fopenmp -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/usr/local/opt/gettext/include -I/usr/local/opt/llvm/include -fPIC -g -O3 -Wall -pedantic -std=gnu99 -mtune=native -pipe -c uniqlist.c -o uniqlist.o
/usr/local/opt/llvm/bin/clang -fopenmp -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/usr/local/opt/gettext/include -I/usr/local/opt/llvm/include -fPIC -g -O3 -Wall -pedantic -std=gnu99 -mtune=native -pipe -c utils.c -o utils.o
/usr/local/opt/llvm/bin/clang -fopenmp -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/usr/local/opt/gettext/include -I/usr/local/opt/llvm/include -fPIC -g -O3 -Wall -pedantic -std=gnu99 -mtune=native -pipe -c vecseq.c -o vecseq.o
/usr/local/opt/llvm/bin/clang -fopenmp -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/usr/local/opt/gettext/include -I/usr/local/opt/llvm/include -fPIC -g -O3 -Wall -pedantic -std=gnu99 -mtune=native -pipe -c wrappers.c -o wrappers.o
/usr/local/opt/llvm/bin/clang -fopenmp -dynamiclib -Wl,-headerpad_max_install_names -undefined dynamic_lookup -single_module -multiply_defined suppress -L/Library/Frameworks/R.framework/Resources/lib -L/usr/local/opt/gettext/lib -L/usr/local/opt/llvm/lib -Wl,-rpath,/usr/local/opt/llvm/lib -o data.table.so assign.o between.o bmerge.o chmatch.o cj.o coalesce.o dogroups.o fastmean.o fcast.o fifelse.o fmelt.o forder.o frank.o fread.o freadR.o froll.o frollR.o frolladaptive.o fsort.o fwrite.o fwriteR.o gsumm.o ijoin.o init.o inrange.o nafill.o nqrecreateindices.o openmp-utils.o quickselect.o rbindlist.o reorder.o shift.o subset.o transpose.o types.o uniqlist.o utils.o vecseq.o wrappers.o -lz -F/Library/Frameworks/R.framework/.. -framework R -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: *** [data.table.so] Error 1
ERROR: compilation failed for package โdata.tableโ
* removing โ/Library/Frameworks/R.framework/Versions/4.0/Resources/library/data.tableโ
Warning in install.packages :
installation of package โdata.tableโ had non-zero exit status
The downloaded source packages are in
โ/private/var/folders/fs/7z2xwjxx0vn3kj7x7khc06980000gp/T/RtmpyDidEl/downloaded_packagesโ
> sessionInfo()
R version 4.0.0 (2020-04-24)
Platform: x86_64-apple-darwin17.0 (64-bit)
Running under: macOS Mojave 10.14.6
Matrix products: default
BLAS: /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libBLAS.dylib
LAPACK: /Library/Frameworks/R.framework/Versions/4.0/Resources/lib/libRlapack.dylib
locale:
[1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8
attached base packages:
[1] stats graphics grDevices utils datasets methods base
loaded via a namespace (and not attached):
[1] compiler_4.0.0 tools_4.0.0 packrat_0.5.0
clang ๋์ gcc๋ฅผ ์ฌ์ฉํด ๋ณผ ์ ์์ต๋๊น?
์ต๊ทผ์ ์ด๊ฒ์ ๋ฐ๊ฒฌํ์ต๋๋ค.
https://github.com/su/R-mac-dev
๋งฅ์ด ์์ด์ ๋ชป๋ดค๋๋ฐ ๋์์ด ๋ ๋ฏ
์ฃ์กํฉ๋๋ค. ์ ๋ ์ด๊ฒ์ ๋ํด ์ด๋ณด์์ ๋๋ค. ๋์ gcc๋ฅผ ์ฌ์ฉํ๋ ๋ฐฉ๋ฒ์ ๋ฌด์์ ๋๊น?
๊ด์ฐฎ์์. ๋๋ ๊ทธ๊ฒ์ ์์ ๋๊ณ ๋ค์ค ์ค๋ ๋ ์ง์์ผ๋ก ์ค์นํ ์ ์์ต๋๋ค. .R/Makevars
ํ์ผ์ ๋ณ๊ฒฝํด์ผ ํ์ต๋๋ค. ์๋ก์ด ๋ด์ฉ์ ๋ค์๊ณผ ๊ฐ์ต๋๋ค.
LDFLAGS= -L/usr/local/clang4/lib
FLIBS=-L/usr/local/gfortran/lib/gcc/x86_64-apple-darwin16/6.3.0 -L/usr/local/gfortran/lib -lgfortran -lquadmath -lm
CC=/usr/local/clang4/bin/clang
CXX=/usr/local/gfortran/bin/g++
CXX1X=/usr/local/gfortran/bin/g++
CXX98=/usr/local/gfortran/bin/g++
CXX11=/usr/local/gfortran/bin/g++
CXX14=/usr/local/gfortran/bin/g++
CXX17=/usr/local/gfortran/bin/g++
LLVM_LOC = /usr/local/opt/llvm
CC=/usr/local/gfortran/bin/gcc -fopenmp
CXX=/usr/local/gfortran/bin/g++ -fopenmp
# -O3 should be faster than -O2 (default) level optimisation ..
CFLAGS=-g -O3 -Wall -pedantic -std=gnu99 -mtune=native -pipe
CXXFLAGS=-g -O3 -Wall -pedantic -std=c++11 -mtune=native -pipe
LDFLAGS=-L/usr/local/opt/gettext/lib -L$(LLVM_LOC)/lib -Wl,-rpath,$(LLVM_LOC)/lib
CPPFLAGS=-I/usr/local/opt/gettext/include -I$(LLVM_LOC)/include -I/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include
@jrf1111 ์๋ฃจ์ ์ ์ ๊ณต
๊ท์ฐฎ๊ฒํด์ ์ฃ์กํ์ง๋ง ๊ฐ์ ๋ฌธ์ ๊ฐ์์ด ์๋ฃจ์ ์ ํด๋ ํ๋ ค๊ณ ํฉ๋๋ค (์, ์ด๋ณด์)
์ด๋ค ๋ฐฉ์์ผ๋ก llvm์ ์ฌ์ฉํ๊ณ ๋ค๋ฅธ C ์ปดํ์ผ๋ฌ(llvm์ ์ปดํ์ผ๋ฌ๊ฐ ์๋๋ผ ์ฒซ ๋ฒ์งธ ๊ฒ์๋ฌผ์์๋ ์ด์ํ ์ค๋ฅ๊ฐ ๋ฐ์ํจ)๋ฅผ ์ฌ์ฉํ๋ฉด ๋ฌธ์ ๊ฐ ํด๊ฒฐ๋ฉ๋๊น? ํด๋น gfortran์ด ์์ง๋ง ์ค์ ๋ก ๋ชจ๋ ์ง์นจ https://github.com/Rdatatable/data.table/wiki/Installation#openmp -enabled-compiler-for-mac์ ๋ฐ๋์ง๋ง ์๋ ์ค์น๋ฅผ ์ฌ์ฉํ๋ ๊ฒฝ์ฐ ๋ค์ค ์ค๋ ๋๋ฅผ ์คํํ๋ data.table์ ๊ฐ๋๋ก Makevars์ ์์ฑํด์ผ ํฉ๋๊น?
https://mac.r-project.org/tools/ , https://cran.r-project.org/bin/macosx/tools/ ์ ๋ฐ๋ผ gfortran์ผ๋ก ์ ํํ์ผ๋ฉฐ .R/Makevars
์ค์ ํ์ต๋๋ค.
FLIBS=-L/usr/local/gfortran/lib/gcc/x86_64-apple-darwin18/8.2.0 -L/usr/local/gfortran/lib -lgfortran -lquadmath -lm
CC=/usr/local/gfortran/bin/gcc
CXX=/usr/local/gfortran/bin/g++
CXX1X=/usr/local/gfortran/bin/g++
CXX98=/usr/local/gfortran/bin/g++
CXX11=/usr/local/gfortran/bin/g++
CXX14=/usr/local/gfortran/bin/g++
CXX17=/usr/local/gfortran/bin/g++
LLVM_LOC = /usr/local/gfortran
CC=$(LLVM_LOC)/bin/gcc -fopenmp
CXX=$(LLVM_LOC)/bin/g++ -fopenmp
# -O3 should be faster than -O2 (default) level optimisation ..
CFLAGS=-g -O3 -Wall -pedantic -std=gnu99 -mtune=native -pipe
CXXFLAGS=-g -O3 -Wall -pedantic -std=c++11 -mtune=native -pipe
LDFLAGS=-L/usr/local/opt/gettext/lib -L$(LLVM_LOC)/lib -Wl,-rpath,$(LLVM_LOC)/lib
CPPFLAGS=-I/usr/local/opt/gettext/include -I$(LLVM_LOC)/include -I/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include
์ด์ ์ ์ฅ์์์ ๊ฐ๋ฐ์ ๋ฒ์ ์ ์ค์นํ๋ ค๊ณ ํ๋ ๋์
data.table::update.dev.pkg()
Warning: unable to access index for repository https://Rdatatable.gitlab.io/data.table/bin/macosx/contrib/4.0:
cannot open URL 'https://Rdatatable.gitlab.io/data.table/bin/macosx/contrib/4.0/PACKAGES'
Package which is only available in source form, and may need compilation of C/C++/Fortran:
โdata.tableโ
Do you want to attempt to install these from sources? (Yes/no/cancel) Yes
installing the source package โdata.tableโ
trying URL 'https://Rdatatable.gitlab.io/data.table/src/contrib/data.table_1.12.9.tar.gz'
Content type 'application/gzip' length 5195275 bytes (5.0 MB)
downloaded 5.0 MB
installing source package โdata.tableโ ...
** using staged installation
*** pkg-config is not installed.
*** Compilation will now be attempted and if it works you can ignore this message. However,
*** if compilation fails, try 'locate zlib.h zconf.h' and ensure the zlib development library
*** is installed :
*** deb: zlib1g-dev (Debian, Ubuntu, ...)
*** rpm: zlib-devel (Fedora, EPEL, ...)
*** brew: zlib (OSX)
*** Note that zlib is required to compile R itself so you may find the advice in the R-admin
*** guide helpful regarding zlib. On Debian/Ubuntu, zlib1g-dev is a dependency of r-base as
*** shown by 'apt-cache showsrc r-base | grep ^Build-Depends | grep zlib', and therefore
*** 'sudo apt-get build-dep r-base' should be sufficient too.
*** To silence this message, please ensure that :
*** 1) 'pkg-config --exists zlib' succeeds (i.e. $? -eq 0)
*** 2) 'pkg-config --libs zlib' contains -lz
*** Compilation will now be attempted ...
** libs
/usr/local/gfortran/bin/gcc -fopenmp -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/usr/local/opt/gettext/include -I/usr/local/gfortran/include -I/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include -fPIC -g -O3 -Wall -pedantic -std=gnu99 -mtune=native -pipe -c assign.c -o assign.o
/usr/local/gfortran/bin/gcc -fopenmp -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/usr/local/opt/gettext/include -I/usr/local/gfortran/include -I/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include -fPIC -g -O3 -Wall -pedantic -std=gnu99 -mtune=native -pipe -c between.c -o between.o
/usr/local/gfortran/bin/gcc -fopenmp -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/usr/local/opt/gettext/include -I/usr/local/gfortran/include -I/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include -fPIC -g -O3 -Wall -pedantic -std=gnu99 -mtune=native -pipe -c bmerge.c -o bmerge.o
/usr/local/gfortran/bin/gcc -fopenmp -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/usr/local/opt/gettext/include -I/usr/local/gfortran/include -I/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include -fPIC -g -O3 -Wall -pedantic -std=gnu99 -mtune=native -pipe -c chmatch.c -o chmatch.o
/usr/local/gfortran/bin/gcc -fopenmp -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/usr/local/opt/gettext/include -I/usr/local/gfortran/include -I/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include -fPIC -g -O3 -Wall -pedantic -std=gnu99 -mtune=native -pipe -c cj.c -o cj.o
/usr/local/gfortran/bin/gcc -fopenmp -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/usr/local/opt/gettext/include -I/usr/local/gfortran/include -I/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include -fPIC -g -O3 -Wall -pedantic -std=gnu99 -mtune=native -pipe -c coalesce.c -o coalesce.o
/usr/local/gfortran/bin/gcc -fopenmp -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/usr/local/opt/gettext/include -I/usr/local/gfortran/include -I/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include -fPIC -g -O3 -Wall -pedantic -std=gnu99 -mtune=native -pipe -c dogroups.c -o dogroups.o
/usr/local/gfortran/bin/gcc -fopenmp -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/usr/local/opt/gettext/include -I/usr/local/gfortran/include -I/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include -fPIC -g -O3 -Wall -pedantic -std=gnu99 -mtune=native -pipe -c fastmean.c -o fastmean.o
/usr/local/gfortran/bin/gcc -fopenmp -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/usr/local/opt/gettext/include -I/usr/local/gfortran/include -I/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include -fPIC -g -O3 -Wall -pedantic -std=gnu99 -mtune=native -pipe -c fcast.c -o fcast.o
/usr/local/gfortran/bin/gcc -fopenmp -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/usr/local/opt/gettext/include -I/usr/local/gfortran/include -I/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include -fPIC -g -O3 -Wall -pedantic -std=gnu99 -mtune=native -pipe -c fifelse.c -o fifelse.o
/usr/local/gfortran/bin/gcc -fopenmp -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/usr/local/opt/gettext/include -I/usr/local/gfortran/include -I/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include -fPIC -g -O3 -Wall -pedantic -std=gnu99 -mtune=native -pipe -c fmelt.c -o fmelt.o
/usr/local/gfortran/bin/gcc -fopenmp -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/usr/local/opt/gettext/include -I/usr/local/gfortran/include -I/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include -fPIC -g -O3 -Wall -pedantic -std=gnu99 -mtune=native -pipe -c forder.c -o forder.o
/usr/local/gfortran/bin/gcc -fopenmp -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/usr/local/opt/gettext/include -I/usr/local/gfortran/include -I/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include -fPIC -g -O3 -Wall -pedantic -std=gnu99 -mtune=native -pipe -c frank.c -o frank.o
/usr/local/gfortran/bin/gcc -fopenmp -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/usr/local/opt/gettext/include -I/usr/local/gfortran/include -I/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include -fPIC -g -O3 -Wall -pedantic -std=gnu99 -mtune=native -pipe -c fread.c -o fread.o
/usr/local/gfortran/bin/gcc -fopenmp -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/usr/local/opt/gettext/include -I/usr/local/gfortran/include -I/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include -fPIC -g -O3 -Wall -pedantic -std=gnu99 -mtune=native -pipe -c freadR.c -o freadR.o
/usr/local/gfortran/bin/gcc -fopenmp -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/usr/local/opt/gettext/include -I/usr/local/gfortran/include -I/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include -fPIC -g -O3 -Wall -pedantic -std=gnu99 -mtune=native -pipe -c froll.c -o froll.o
/usr/local/gfortran/bin/gcc -fopenmp -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/usr/local/opt/gettext/include -I/usr/local/gfortran/include -I/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include -fPIC -g -O3 -Wall -pedantic -std=gnu99 -mtune=native -pipe -c frollR.c -o frollR.o
/usr/local/gfortran/bin/gcc -fopenmp -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/usr/local/opt/gettext/include -I/usr/local/gfortran/include -I/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include -fPIC -g -O3 -Wall -pedantic -std=gnu99 -mtune=native -pipe -c frolladaptive.c -o frolladaptive.o
/usr/local/gfortran/bin/gcc -fopenmp -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/usr/local/opt/gettext/include -I/usr/local/gfortran/include -I/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include -fPIC -g -O3 -Wall -pedantic -std=gnu99 -mtune=native -pipe -c fsort.c -o fsort.o
/usr/local/gfortran/bin/gcc -fopenmp -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/usr/local/opt/gettext/include -I/usr/local/gfortran/include -I/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include -fPIC -g -O3 -Wall -pedantic -std=gnu99 -mtune=native -pipe -c fwrite.c -o fwrite.o
/usr/local/gfortran/bin/gcc -fopenmp -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/usr/local/opt/gettext/include -I/usr/local/gfortran/include -I/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include -fPIC -g -O3 -Wall -pedantic -std=gnu99 -mtune=native -pipe -c fwriteR.c -o fwriteR.o
/usr/local/gfortran/bin/gcc -fopenmp -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/usr/local/opt/gettext/include -I/usr/local/gfortran/include -I/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include -fPIC -g -O3 -Wall -pedantic -std=gnu99 -mtune=native -pipe -c gsumm.c -o gsumm.o
/usr/local/gfortran/bin/gcc -fopenmp -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/usr/local/opt/gettext/include -I/usr/local/gfortran/include -I/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include -fPIC -g -O3 -Wall -pedantic -std=gnu99 -mtune=native -pipe -c ijoin.c -o ijoin.o
/usr/local/gfortran/bin/gcc -fopenmp -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/usr/local/opt/gettext/include -I/usr/local/gfortran/include -I/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include -fPIC -g -O3 -Wall -pedantic -std=gnu99 -mtune=native -pipe -c init.c -o init.o
/usr/local/gfortran/bin/gcc -fopenmp -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/usr/local/opt/gettext/include -I/usr/local/gfortran/include -I/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include -fPIC -g -O3 -Wall -pedantic -std=gnu99 -mtune=native -pipe -c inrange.c -o inrange.o
/usr/local/gfortran/bin/gcc -fopenmp -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/usr/local/opt/gettext/include -I/usr/local/gfortran/include -I/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include -fPIC -g -O3 -Wall -pedantic -std=gnu99 -mtune=native -pipe -c nafill.c -o nafill.o
/usr/local/gfortran/bin/gcc -fopenmp -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/usr/local/opt/gettext/include -I/usr/local/gfortran/include -I/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include -fPIC -g -O3 -Wall -pedantic -std=gnu99 -mtune=native -pipe -c nqrecreateindices.c -o nqrecreateindices.o
/usr/local/gfortran/bin/gcc -fopenmp -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/usr/local/opt/gettext/include -I/usr/local/gfortran/include -I/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include -fPIC -g -O3 -Wall -pedantic -std=gnu99 -mtune=native -pipe -c openmp-utils.c -o openmp-utils.o
/usr/local/gfortran/bin/gcc -fopenmp -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/usr/local/opt/gettext/include -I/usr/local/gfortran/include -I/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include -fPIC -g -O3 -Wall -pedantic -std=gnu99 -mtune=native -pipe -c quickselect.c -o quickselect.o
/usr/local/gfortran/bin/gcc -fopenmp -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/usr/local/opt/gettext/include -I/usr/local/gfortran/include -I/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include -fPIC -g -O3 -Wall -pedantic -std=gnu99 -mtune=native -pipe -c rbindlist.c -o rbindlist.o
/usr/local/gfortran/bin/gcc -fopenmp -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/usr/local/opt/gettext/include -I/usr/local/gfortran/include -I/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include -fPIC -g -O3 -Wall -pedantic -std=gnu99 -mtune=native -pipe -c reorder.c -o reorder.o
/usr/local/gfortran/bin/gcc -fopenmp -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/usr/local/opt/gettext/include -I/usr/local/gfortran/include -I/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include -fPIC -g -O3 -Wall -pedantic -std=gnu99 -mtune=native -pipe -c shift.c -o shift.o
/usr/local/gfortran/bin/gcc -fopenmp -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/usr/local/opt/gettext/include -I/usr/local/gfortran/include -I/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include -fPIC -g -O3 -Wall -pedantic -std=gnu99 -mtune=native -pipe -c subset.c -o subset.o
/usr/local/gfortran/bin/gcc -fopenmp -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/usr/local/opt/gettext/include -I/usr/local/gfortran/include -I/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include -fPIC -g -O3 -Wall -pedantic -std=gnu99 -mtune=native -pipe -c transpose.c -o transpose.o
/usr/local/gfortran/bin/gcc -fopenmp -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/usr/local/opt/gettext/include -I/usr/local/gfortran/include -I/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include -fPIC -g -O3 -Wall -pedantic -std=gnu99 -mtune=native -pipe -c types.c -o types.o
/usr/local/gfortran/bin/gcc -fopenmp -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/usr/local/opt/gettext/include -I/usr/local/gfortran/include -I/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include -fPIC -g -O3 -Wall -pedantic -std=gnu99 -mtune=native -pipe -c uniqlist.c -o uniqlist.o
/usr/local/gfortran/bin/gcc -fopenmp -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/usr/local/opt/gettext/include -I/usr/local/gfortran/include -I/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include -fPIC -g -O3 -Wall -pedantic -std=gnu99 -mtune=native -pipe -c utils.c -o utils.o
/usr/local/gfortran/bin/gcc -fopenmp -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/usr/local/opt/gettext/include -I/usr/local/gfortran/include -I/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include -fPIC -g -O3 -Wall -pedantic -std=gnu99 -mtune=native -pipe -c vecseq.c -o vecseq.o
/usr/local/gfortran/bin/gcc -fopenmp -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/usr/local/opt/gettext/include -I/usr/local/gfortran/include -I/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include -fPIC -g -O3 -Wall -pedantic -std=gnu99 -mtune=native -pipe -c wrappers.c -o wrappers.o
/usr/local/gfortran/bin/gcc -fopenmp -dynamiclib -Wl,-headerpad_max_install_names -undefined dynamic_lookup -single_module -multiply_defined suppress -L/Library/Frameworks/R.framework/Resources/lib -L/usr/local/opt/gettext/lib -L/usr/local/gfortran/lib -Wl,-rpath,/usr/local/gfortran/lib -o data.table.so assign.o between.o bmerge.o chmatch.o cj.o coalesce.o dogroups.o fastmean.o fcast.o fifelse.o fmelt.o forder.o frank.o fread.o freadR.o froll.o frollR.o frolladaptive.o fsort.o fwrite.o fwriteR.o gsumm.o ijoin.o init.o inrange.o nafill.o nqrecreateindices.o openmp-utils.o quickselect.o rbindlist.o reorder.o shift.o subset.o transpose.o types.o uniqlist.o utils.o vecseq.o wrappers.o -F/Library/Frameworks/R.framework/.. -framework R -Wl,-framework -Wl,CoreFoundation
installing to /Library/Frameworks/R.framework/Versions/4.0/Resources/library/00LOCK-data.table/00new/data.table/libs
** R
** inst
** byte-compile and prepare package for lazy loading
** help
*** installing help indices
** building package indices
** installing vignettes
** testing if installed package can be loaded from temporary location
Error: package or namespace load failed for โdata.tableโ in library.dynam(lib, package, package.lib):
shared object โdatatable.soโ not found
Error: loading failed
Execution halted
ERROR: loading failed
removing โ/Library/Frameworks/R.framework/Versions/4.0/Resources/library/data.tableโ
restoring previous โ/Library/Frameworks/R.framework/Versions/4.0/Resources/library/data.tableโ
The downloaded source packages are in
โ/private/var/folders/z7/r94g4j6j4z33r99np7kwns2nwz14jw/T/RtmppDABFK/downloaded_packagesโ
R data.table package has been updated to NA (1.12.8)
Warning message:
In utils::install.packages(pkg, repos = repo, type = type, lib = lib, :
installation of package โdata.tableโ had non-zero exit status
CRAN ๋ฒ์ ์ ์๋ํ์ง๋ง ๋จ์ผ ์ค๋ ๋๋ก ์๋ํฉ๋๋ค. ์ ์ฉํ ๋ต๋ณ์ ์ ๊ณตํ์ง ์๋ ์ด https://stackoverflow.com/questions/59658131/error-package-or-namespace-load-failed-for-data-table-in-library-dynamlib-p ์ ๋ํ stackoverflow ์ค๋ ๋๊ฐ ์์ต๋๋ค.
https://github.com/fxcoudert/gfortran-for-macOS/releases/tag/6.3์์ ์ฌ์ฉ ๊ฐ๋ฅํ gfortran ๋ฒ์ 6.3.0์ ์ฌ์ฉํด์ผ ํ ์๋ ์์ต๋๋ค.
Makevars ํ์ผ๋ ์
๋ฐ์ดํธํด์ผ ํฉ๋๋ค.
FLIBS=-L/usr/local/gfortran/lib/gcc/x86_64-apple-darwin16/6.3.0 -L/usr/local/gfortran/lib -lgfortran -lquadmath -lm
์ฌํ๊ฒ๋, ์๋๋๋ค. ๋ฌธ์ ๋ gfortran 6.3.0 ๋ฐ 8.2.0 ๋ชจ๋์์ ์ง์๋ฉ๋๋ค.
data.table์ ์ด์ ์ค์น๋ฅผ ์ ๊ฑฐํ์ต๋๊น? ๊ทธ๋ฆฌ๊ณ ๊ฐ๋ฐ์ ๋ฒ์ ์ด ์๋ CRAN ๋ฒ์ ์ ์ค์นํ์ จ๋์?
์, ํ์คํ ํ์ต๋๋ค. ๋๋ ๊ทธ๋ค ๋ชจ๋๋ก ์๋ํ๊ณ ๋์ผํ ๊ฒฐ๊ณผ: ๊ฐ๋ฐ์ ๋ฒ์ ์ ์ค๋ฅ, ์ฑ๊ณต์ ์ธ ์ค์น, CRAN์ ๋จ์ผ ์ค๋ ๋(๋์์ ์ฃผ์ ์ ๊ฐ์ฌํฉ๋๋ค!)
Makevars ํ์ผ๊ณผ ๋ด ํ์ผ ์ฌ์ด์๋ ์ฌ์ ํ ๋ช ๊ฐ์ง ์ฐจ์ด์ ์ด ์๋ ๊ฒ ๊ฐ์ต๋๋ค. ์ ์ฒด Makevars ํ์ผ์ ๋ด๊ฐ ์ฌ์ฉํ ๊ฒ์ผ๋ก ๊ต์ฒดํด ๋ณด์ญ์์ค.
LDFLAGS= -L/usr/local/clang4/lib
FLIBS=-L/usr/local/gfortran/lib/gcc/x86_64-apple-darwin16/6.3.0 -L/usr/local/gfortran/lib -lgfortran -lquadmath -lm
CC=/usr/local/clang4/bin/clang
CXX=/usr/local/gfortran/bin/g++
CXX1X=/usr/local/gfortran/bin/g++
CXX98=/usr/local/gfortran/bin/g++
CXX11=/usr/local/gfortran/bin/g++
CXX14=/usr/local/gfortran/bin/g++
CXX17=/usr/local/gfortran/bin/g++
LLVM_LOC = /usr/local/opt/llvm
CC=/usr/local/gfortran/bin/gcc -fopenmp
CXX=/usr/local/gfortran/bin/g++ -fopenmp
# -O3 should be faster than -O2 (default) level optimisation ..
CFLAGS=-g -O3 -Wall -pedantic -std=gnu99 -mtune=native -pipe
CXXFLAGS=-g -O3 -Wall -pedantic -std=c++11 -mtune=native -pipe
LDFLAGS=-L/usr/local/opt/gettext/lib -L$(LLVM_LOC)/lib -Wl,-rpath,$(LLVM_LOC)/lib
CPPFLAGS=-I/usr/local/opt/gettext/include -I$(LLVM_LOC)/include -I/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include
๋ค์ ์์ํ๊ณ ์กฐ์ธ์ ๋ฐ๋ผ ์ง๊ธ ์๋ํฉ๋๋ค. ๊ฐ์ฌ ํด์!!!
๋์์ด ๋ ์ ์์ด์ ๊ธฐ์ฉ๋๋ค!
์์ ์ ์์ ๋ฐ๋ผ ๋ค์ ์ค๋ฅ๊ฐ ๋ฐ์ํ์ต๋๋ค.
[1] "en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8"
์ค๋ฅ: library.dynam(lib, package, package.lib)์ 'data.table'์ ๋ํ ํจํค์ง ๋๋ ๋ค์์คํ์ด์ค ๋ก๋ ์คํจ:
๊ณต์ ๊ฐ์ฒด 'datatable.so'๋ฅผ ์ฐพ์ ์ ์์ต๋๋ค.
์ค๋ฅ: ๋ก๋ ์คํจ
์คํ ์ค์ง
์ค๋ฅ: ๋ก๋ ์คํจ
์ด๋ค ์ ์?
@likanzhan ์ ๋ค๋ฅธ ๋ฌธ์ ์ธ ๊ฒ ๊ฐ์ต๋๋ค. ๊ทธ๋ฌ๋ฉด ์ ๋ฌธ์ ๋ฅผ ๋ง๋ค๊ณ ์๋ก ์์๋ R ์ธ์ ์ ์ค์น๋ฅผ ์๋ํ๋ ๋ชจ๋ ์ ๋ ฅ๊ณผ ์ถ๋ ฅ์ ๋ฃ์ด์ฃผ์ธ์.
@jangorecki
install.packages("data.table", type = "source", repos = "https://Rdatatable.gitlab.io/data.table")
Installing package into โ/Users/lzhan/Rโ
(as โlibโ is unspecified)
trying URL 'https://Rdatatable.gitlab.io/data.table/src/contrib/data.table_1.12.9.tar.gz'
Content type 'application/gzip' length 5195275 bytes (5.0 MB)
downloaded 5.0 MB
[1] "en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8"
* installing *source* package โdata.tableโ ...
** using staged installation
*** pkg-config is not installed.
*** Compilation will now be attempted and if it works you can ignore this message. However,
*** if compilation fails, try 'locate zlib.h zconf.h' and ensure the zlib development library
*** is installed :
*** deb: zlib1g-dev (Debian, Ubuntu, ...)
*** rpm: zlib-devel (Fedora, EPEL, ...)
*** brew: zlib (OSX)
*** Note that zlib is required to compile R itself so you may find the advice in the R-admin
*** guide helpful regarding zlib. On Debian/Ubuntu, zlib1g-dev is a dependency of r-base as
*** shown by 'apt-cache showsrc r-base | grep ^Build-Depends | grep zlib', and therefore
*** 'sudo apt-get build-dep r-base' should be sufficient too.
*** To silence this message, please ensure that :
*** 1) 'pkg-config --exists zlib' succeeds (i.e. $? -eq 0)
*** 2) 'pkg-config --libs zlib' contains -lz
*** Compilation will now be attempted ...
** libs
/usr/local/gfortran/bin/gcc -fopenmp -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/usr/local/opt/gettext/include -I/usr/local/opt/llvm/include -I/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include -fPIC -g -O3 -Wall -pedantic -std=gnu99 -mtune=native -pipe -c assign.c -o assign.o
/usr/local/gfortran/bin/gcc -fopenmp -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/usr/local/opt/gettext/include -I/usr/local/opt/llvm/include -I/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include -fPIC -g -O3 -Wall -pedantic -std=gnu99 -mtune=native -pipe -c between.c -o between.o
/usr/local/gfortran/bin/gcc -fopenmp -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/usr/local/opt/gettext/include -I/usr/local/opt/llvm/include -I/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include -fPIC -g -O3 -Wall -pedantic -std=gnu99 -mtune=native -pipe -c bmerge.c -o bmerge.o
/usr/local/gfortran/bin/gcc -fopenmp -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/usr/local/opt/gettext/include -I/usr/local/opt/llvm/include -I/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include -fPIC -g -O3 -Wall -pedantic -std=gnu99 -mtune=native -pipe -c chmatch.c -o chmatch.o
/usr/local/gfortran/bin/gcc -fopenmp -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/usr/local/opt/gettext/include -I/usr/local/opt/llvm/include -I/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include -fPIC -g -O3 -Wall -pedantic -std=gnu99 -mtune=native -pipe -c cj.c -o cj.o
/usr/local/gfortran/bin/gcc -fopenmp -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/usr/local/opt/gettext/include -I/usr/local/opt/llvm/include -I/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include -fPIC -g -O3 -Wall -pedantic -std=gnu99 -mtune=native -pipe -c coalesce.c -o coalesce.o
/usr/local/gfortran/bin/gcc -fopenmp -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/usr/local/opt/gettext/include -I/usr/local/opt/llvm/include -I/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include -fPIC -g -O3 -Wall -pedantic -std=gnu99 -mtune=native -pipe -c dogroups.c -o dogroups.o
/usr/local/gfortran/bin/gcc -fopenmp -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/usr/local/opt/gettext/include -I/usr/local/opt/llvm/include -I/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include -fPIC -g -O3 -Wall -pedantic -std=gnu99 -mtune=native -pipe -c fastmean.c -o fastmean.o
/usr/local/gfortran/bin/gcc -fopenmp -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/usr/local/opt/gettext/include -I/usr/local/opt/llvm/include -I/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include -fPIC -g -O3 -Wall -pedantic -std=gnu99 -mtune=native -pipe -c fcast.c -o fcast.o
/usr/local/gfortran/bin/gcc -fopenmp -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/usr/local/opt/gettext/include -I/usr/local/opt/llvm/include -I/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include -fPIC -g -O3 -Wall -pedantic -std=gnu99 -mtune=native -pipe -c fifelse.c -o fifelse.o
/usr/local/gfortran/bin/gcc -fopenmp -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/usr/local/opt/gettext/include -I/usr/local/opt/llvm/include -I/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include -fPIC -g -O3 -Wall -pedantic -std=gnu99 -mtune=native -pipe -c fmelt.c -o fmelt.o
/usr/local/gfortran/bin/gcc -fopenmp -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/usr/local/opt/gettext/include -I/usr/local/opt/llvm/include -I/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include -fPIC -g -O3 -Wall -pedantic -std=gnu99 -mtune=native -pipe -c forder.c -o forder.o
/usr/local/gfortran/bin/gcc -fopenmp -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/usr/local/opt/gettext/include -I/usr/local/opt/llvm/include -I/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include -fPIC -g -O3 -Wall -pedantic -std=gnu99 -mtune=native -pipe -c frank.c -o frank.o
/usr/local/gfortran/bin/gcc -fopenmp -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/usr/local/opt/gettext/include -I/usr/local/opt/llvm/include -I/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include -fPIC -g -O3 -Wall -pedantic -std=gnu99 -mtune=native -pipe -c fread.c -o fread.o
/usr/local/gfortran/bin/gcc -fopenmp -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/usr/local/opt/gettext/include -I/usr/local/opt/llvm/include -I/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include -fPIC -g -O3 -Wall -pedantic -std=gnu99 -mtune=native -pipe -c freadR.c -o freadR.o
/usr/local/gfortran/bin/gcc -fopenmp -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/usr/local/opt/gettext/include -I/usr/local/opt/llvm/include -I/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include -fPIC -g -O3 -Wall -pedantic -std=gnu99 -mtune=native -pipe -c froll.c -o froll.o
/usr/local/gfortran/bin/gcc -fopenmp -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/usr/local/opt/gettext/include -I/usr/local/opt/llvm/include -I/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include -fPIC -g -O3 -Wall -pedantic -std=gnu99 -mtune=native -pipe -c frollR.c -o frollR.o
/usr/local/gfortran/bin/gcc -fopenmp -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/usr/local/opt/gettext/include -I/usr/local/opt/llvm/include -I/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include -fPIC -g -O3 -Wall -pedantic -std=gnu99 -mtune=native -pipe -c frolladaptive.c -o frolladaptive.o
/usr/local/gfortran/bin/gcc -fopenmp -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/usr/local/opt/gettext/include -I/usr/local/opt/llvm/include -I/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include -fPIC -g -O3 -Wall -pedantic -std=gnu99 -mtune=native -pipe -c fsort.c -o fsort.o
/usr/local/gfortran/bin/gcc -fopenmp -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/usr/local/opt/gettext/include -I/usr/local/opt/llvm/include -I/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include -fPIC -g -O3 -Wall -pedantic -std=gnu99 -mtune=native -pipe -c fwrite.c -o fwrite.o
/usr/local/gfortran/bin/gcc -fopenmp -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/usr/local/opt/gettext/include -I/usr/local/opt/llvm/include -I/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include -fPIC -g -O3 -Wall -pedantic -std=gnu99 -mtune=native -pipe -c fwriteR.c -o fwriteR.o
/usr/local/gfortran/bin/gcc -fopenmp -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/usr/local/opt/gettext/include -I/usr/local/opt/llvm/include -I/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include -fPIC -g -O3 -Wall -pedantic -std=gnu99 -mtune=native -pipe -c gsumm.c -o gsumm.o
/usr/local/gfortran/bin/gcc -fopenmp -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/usr/local/opt/gettext/include -I/usr/local/opt/llvm/include -I/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include -fPIC -g -O3 -Wall -pedantic -std=gnu99 -mtune=native -pipe -c ijoin.c -o ijoin.o
/usr/local/gfortran/bin/gcc -fopenmp -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/usr/local/opt/gettext/include -I/usr/local/opt/llvm/include -I/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include -fPIC -g -O3 -Wall -pedantic -std=gnu99 -mtune=native -pipe -c init.c -o init.o
/usr/local/gfortran/bin/gcc -fopenmp -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/usr/local/opt/gettext/include -I/usr/local/opt/llvm/include -I/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include -fPIC -g -O3 -Wall -pedantic -std=gnu99 -mtune=native -pipe -c inrange.c -o inrange.o
/usr/local/gfortran/bin/gcc -fopenmp -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/usr/local/opt/gettext/include -I/usr/local/opt/llvm/include -I/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include -fPIC -g -O3 -Wall -pedantic -std=gnu99 -mtune=native -pipe -c nafill.c -o nafill.o
/usr/local/gfortran/bin/gcc -fopenmp -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/usr/local/opt/gettext/include -I/usr/local/opt/llvm/include -I/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include -fPIC -g -O3 -Wall -pedantic -std=gnu99 -mtune=native -pipe -c nqrecreateindices.c -o nqrecreateindices.o
/usr/local/gfortran/bin/gcc -fopenmp -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/usr/local/opt/gettext/include -I/usr/local/opt/llvm/include -I/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include -fPIC -g -O3 -Wall -pedantic -std=gnu99 -mtune=native -pipe -c openmp-utils.c -o openmp-utils.o
/usr/local/gfortran/bin/gcc -fopenmp -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/usr/local/opt/gettext/include -I/usr/local/opt/llvm/include -I/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include -fPIC -g -O3 -Wall -pedantic -std=gnu99 -mtune=native -pipe -c quickselect.c -o quickselect.o
/usr/local/gfortran/bin/gcc -fopenmp -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/usr/local/opt/gettext/include -I/usr/local/opt/llvm/include -I/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include -fPIC -g -O3 -Wall -pedantic -std=gnu99 -mtune=native -pipe -c rbindlist.c -o rbindlist.o
/usr/local/gfortran/bin/gcc -fopenmp -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/usr/local/opt/gettext/include -I/usr/local/opt/llvm/include -I/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include -fPIC -g -O3 -Wall -pedantic -std=gnu99 -mtune=native -pipe -c reorder.c -o reorder.o
/usr/local/gfortran/bin/gcc -fopenmp -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/usr/local/opt/gettext/include -I/usr/local/opt/llvm/include -I/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include -fPIC -g -O3 -Wall -pedantic -std=gnu99 -mtune=native -pipe -c shift.c -o shift.o
/usr/local/gfortran/bin/gcc -fopenmp -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/usr/local/opt/gettext/include -I/usr/local/opt/llvm/include -I/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include -fPIC -g -O3 -Wall -pedantic -std=gnu99 -mtune=native -pipe -c subset.c -o subset.o
/usr/local/gfortran/bin/gcc -fopenmp -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/usr/local/opt/gettext/include -I/usr/local/opt/llvm/include -I/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include -fPIC -g -O3 -Wall -pedantic -std=gnu99 -mtune=native -pipe -c transpose.c -o transpose.o
/usr/local/gfortran/bin/gcc -fopenmp -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/usr/local/opt/gettext/include -I/usr/local/opt/llvm/include -I/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include -fPIC -g -O3 -Wall -pedantic -std=gnu99 -mtune=native -pipe -c types.c -o types.o
/usr/local/gfortran/bin/gcc -fopenmp -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/usr/local/opt/gettext/include -I/usr/local/opt/llvm/include -I/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include -fPIC -g -O3 -Wall -pedantic -std=gnu99 -mtune=native -pipe -c uniqlist.c -o uniqlist.o
/usr/local/gfortran/bin/gcc -fopenmp -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/usr/local/opt/gettext/include -I/usr/local/opt/llvm/include -I/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include -fPIC -g -O3 -Wall -pedantic -std=gnu99 -mtune=native -pipe -c utils.c -o utils.o
/usr/local/gfortran/bin/gcc -fopenmp -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/usr/local/opt/gettext/include -I/usr/local/opt/llvm/include -I/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include -fPIC -g -O3 -Wall -pedantic -std=gnu99 -mtune=native -pipe -c vecseq.c -o vecseq.o
/usr/local/gfortran/bin/gcc -fopenmp -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/usr/local/opt/gettext/include -I/usr/local/opt/llvm/include -I/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include -fPIC -g -O3 -Wall -pedantic -std=gnu99 -mtune=native -pipe -c wrappers.c -o wrappers.o
/usr/local/gfortran/bin/gcc -fopenmp -dynamiclib -Wl,-headerpad_max_install_names -undefined dynamic_lookup -single_module -multiply_defined suppress -L/Library/Frameworks/R.framework/Resources/lib -L/usr/local/opt/gettext/lib -L/usr/local/opt/llvm/lib -Wl,-rpath,/usr/local/opt/llvm/lib -o data.table.so assign.o between.o bmerge.o chmatch.o cj.o coalesce.o dogroups.o fastmean.o fcast.o fifelse.o fmelt.o forder.o frank.o fread.o freadR.o froll.o frollR.o frolladaptive.o fsort.o fwrite.o fwriteR.o gsumm.o ijoin.o init.o inrange.o nafill.o nqrecreateindices.o openmp-utils.o quickselect.o rbindlist.o reorder.o shift.o subset.o transpose.o types.o uniqlist.o utils.o vecseq.o wrappers.o -F/Library/Frameworks/R.framework/.. -framework R -Wl,-framework -Wl,CoreFoundation
installing to /Users/lzhan/R/00LOCK-data.table/00new/data.table/libs
** R
** inst
** byte-compile and prepare package for lazy loading
[1] "en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8"
** help
*** installing help indices
** building package indices
[1] "en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8"
** installing vignettes
** testing if installed package can be loaded from temporary location
[1] "en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8"
Error: package or namespace load failed for โdata.tableโ in library.dynam(lib, package, package.lib):
shared object โdatatable.soโ not found
Error: loading failed
Execution halted
ERROR: loading failed
* removing โ/Users/lzhan/R/data.tableโ
The downloaded source packages are in
โ/private/var/folders/qz/0srg88cd2459h1cbn623wrt00000gq/T/Rtmpgzby8h/downloaded_packagesโ
Warning message:
In install.packages("data.table", type = "source", repos = "https://Rdatatable.gitlab.io/data.table") :
installation of package โdata.tableโ had non-zero exit status
๊ฐ์ฌ ํด์ !
์๋ ์๋ฃจ์ ์ด ์ ์๊ฒ ํจ๊ณผ์ ์ด์์ต๋๋ค.
๊ด์ฐฎ์์. ๋๋ ๊ทธ๊ฒ์ ์์ ๋๊ณ ๋ค์ค ์ค๋ ๋ ์ง์์ผ๋ก ์ค์นํ ์ ์์ต๋๋ค.
.R/Makevars
ํ์ผ์ ๋ณ๊ฒฝํด์ผ ํ์ต๋๋ค. ์๋ก์ด ๋ด์ฉ์ ๋ค์๊ณผ ๊ฐ์ต๋๋ค.LDFLAGS= -L/usr/local/clang4/lib FLIBS=-L/usr/local/gfortran/lib/gcc/x86_64-apple-darwin16/6.3.0 -L/usr/local/gfortran/lib -lgfortran -lquadmath -lm CC=/usr/local/clang4/bin/clang CXX=/usr/local/gfortran/bin/g++ CXX1X=/usr/local/gfortran/bin/g++ CXX98=/usr/local/gfortran/bin/g++ CXX11=/usr/local/gfortran/bin/g++ CXX14=/usr/local/gfortran/bin/g++ CXX17=/usr/local/gfortran/bin/g++ LLVM_LOC = /usr/local/opt/llvm CC=/usr/local/gfortran/bin/gcc -fopenmp CXX=/usr/local/gfortran/bin/g++ -fopenmp # -O3 should be faster than -O2 (default) level optimisation .. CFLAGS=-g -O3 -Wall -pedantic -std=gnu99 -mtune=native -pipe CXXFLAGS=-g -O3 -Wall -pedantic -std=c++11 -mtune=native -pipe LDFLAGS=-L/usr/local/opt/gettext/lib -L$(LLVM_LOC)/lib -Wl,-rpath,$(LLVM_LOC)/lib CPPFLAGS=-I/usr/local/opt/gettext/include -I$(LLVM_LOC)/include -I/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include
@jangorecki ์ค์น ์ํค์์ Makevars ํ์ผ์ ์ ๋ฐ์ดํธํ๋ฉด ๋์์ด ๋ ๊ฒ์ ๋๋ค. ์ฌ๋ฌ๋ถ๊ณผ Rdatatable ํ์ ๊ฐ์ฌ๋๋ฆฝ๋๋ค!
์ค์ํ ๊ฒ์ Catalina๋ฅผ ์ฒ์๋ถํฐ ๋ค์ ์ค์นํด์ผ ํ์ต๋๋ค. llvm์ ์ฌ์ ํ โโ์๋ํ์ง ์๋ ๋ฐ๋ฉด gfortran ์ปดํ์ผ๋ฌ๋ก .Makevars๋ฅผ ์ค์ ํ๋ฉด(์์ ๊ฐ์ด ๋ฒ์ 8.2.0์์๋) ํธ๋ฆญ์ ์ํํ ์ ์์ต๋๋ค.
Mojave์ Catalina ๋ชจ๋์์ llvm์ผ๋ก ์ปดํ์ผ์ ์๋ฃํ ์ ์ด ์์ต๋๋ค.
๋ํ readme ํ์ด์ง์์ ์ ์ํ .R/Makevars ํ์ผ(ํด๋น ํ์ด์ง ํ๋จ์ ํ์ค ์ค๋ฅ๋ฅผ ๋ณด๊ณ ํ๊ณ ์ฌ๊ธฐ๋ก ์๋ดํจ)๊ณผ ์์ @daynefiler ์ฝ๋๋ฅผ ์ฌ์ฉํ์ฌ ์ด ๋ฌธ์ ๋ฅผ
> install.packages("data.table", type = "source",
+ repos = "https://Rdatatable.gitlab.io/data.table")
trying URL 'https://Rdatatable.gitlab.io/data.table/src/contrib/data.table_1.12.9.tar.gz'
Content type 'application/gzip' length 5208337 bytes (5.0 MB)
==================================================
downloaded 5.0 MB
* installing *source* package โdata.tableโ ...
** using staged installation
*** pkg-config is not installed.
*** Compilation will now be attempted and if it works you can ignore this message. However,
*** if compilation fails, try 'locate zlib.h zconf.h' and ensure the zlib development library
*** is installed :
*** deb: zlib1g-dev (Debian, Ubuntu, ...)
*** rpm: zlib-devel (Fedora, EPEL, ...)
*** brew: zlib (OSX)
*** Note that zlib is required to compile R itself so you may find the advice in the R-admin
*** guide helpful regarding zlib. On Debian/Ubuntu, zlib1g-dev is a dependency of r-base as
*** shown by 'apt-cache showsrc r-base | grep ^Build-Depends | grep zlib', and therefore
*** 'sudo apt-get build-dep r-base' should be sufficient too.
*** To silence this message, please ensure that :
*** 1) 'pkg-config --exists zlib' succeeds (i.e. $? -eq 0)
*** 2) 'pkg-config --libs zlib' contains -lz
*** Compilation will now be attempted ...
** libs
/usr/local/gfortran/bin/gcc -fopenmp -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/usr/local/opt/gettext/include -I/usr/local/opt/llvm/include -I/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include -fPIC -g -O3 -Wall -pedantic -std=gnu99 -mtune=native -pipe -c assign.c -o assign.o
/bin/sh: /usr/local/gfortran/bin/gcc: No such file or directory
make: *** [assign.o] Error 127
ERROR: compilation failed for package โdata.tableโ
* removing โ/Library/Frameworks/R.framework/Versions/4.0/Resources/library/data.tableโ
Warning in install.packages :
installation of package โdata.tableโ had non-zero exit status
The downloaded source packages are in
โ/private/var/folders/8n/wm3qzjnn2dx4l_lznyk0fthr00_bd1/T/Rtmp1SObio/downloaded_packagesโ
์ผ๋ฐ์ ์ธ install.packages("data.table")๋ฅผ ์ฌ์ฉํ์ฌ ์ค์นํ๋ฉด ์๋ํ์ง๋ง ์ด ์์ ํ๋ก๊ทธ๋จ์์ ํด๊ฒฐํ๋ ค๋ ๋ฉํฐ์ฝ์ด ๋ฌธ์ ๊ฐ ๋ฐ์ํฉ๋๋ค.
@FarMar install.packages("data.table", type="source")
ํจ๊ณผ๊ฐ ์๋์ง ํ์ธํ ์ ์์ต๋๊น? Makevars์์ ์ปดํ์ผ๋ฌ๊ฐ ์๋ชป ์ ์๋ ๊ฒ ๊ฐ์ต๋๋ค.
@jangorecki ์ ๊ฑฐ๋ Makevar ํ์ผ๊ณผ ํจ๊ป ์๋ํ์ง๋ง CRAN ์ ์ฅ์์ ๋์ผํ "OpenMP ์ค๋ฅ ์์"์ด ๋ฐ์ํฉ๋๋ค. @jrf1111 ๋ฐ ์์ @daynefiler ์๋ต์์ ์์ธํ ์ค๋ช ํ Makevars ํ์ผ๋ก ์คํจํฉ๋๋ค.
@FarMar ์ฌ์ฉ์ ์ ์ Makevars๋ก data.table์ ์ปดํ์ผํ๊ธฐ ์ ์ ์ปดํ์ผ์ด ๋๋์ง ํ์ธํ์ญ์์ค. ๋ฌด์์ด๋ ์ปดํ์ผ๋ ์ฝ๋๊ฐ ํฌํจ๋ ํจํค์ง๋ฅผ ์๋ฏธํฉ๋๋ค. ๊ทธ๋ ์ง ์์ผ๋ฉด ๋ฌธ์ ๋ ์ค์ ๋ก data.table ์ฝ๋์ ๊ด๋ จ์ด ์์ต๋๋ค. ์ปดํ์ผ๋ฌ๊ฐ ๋ฌด์์ด๋ ์ปดํ์ผํ ์ ์์ผ๋ฉด ์ปดํ์ผ์ด ์คํจํ ๋ data.table ๋ฌธ์ ๊ฐ ๋ฐ์ํ ์ ์์ต๋๋ค.
์ด ์ค๋ ๋์ ๊ฒฝ๋ก๋ฅผ ๋ฐ๋ฅด๋ ค๋ฉด ๋๋ฝ๋ ์ํํธ์จ์ด๋ฅผ ์ค์นํ๊ฑฐ๋ ๊ฒฝ๋ก๋ฅผ ๊ตฌ์ฑํด์ผ ํ ์ ์์ผ๋ฏ๋ก ์ฌ๊ธฐ์์ Makevars๊ฐ ์ปดํ์ผ๋ฌ๋ฅผ ์ฌ๋ฐ๋ฅด๊ฒ ์ง์ ํฉ๋๋ค.
๊ทธ๋ ์ง ์์ผ๋ฉด ์ปดํ์ผ๋ฌ๊ฐ ์๋ํ๋ ์ง์ ์ผ๋ก ๋กค๋ฐฑํ ๋ค์ https://github.com/Rdatatable/data.table/wiki/Installation wiki๋ฅผ ๋ฐ๋ฅด๊ณ ์คํจํ๋ฉด Makevars ๋ฐ ์ถ๋ ฅ์ ๋ํ ์ ๋ฌธ์ ๋ฅผ ์ด โโ์ ์์ต๋๋ค. .
๋ ๊ฒฝ์ฐ ๋ชจ๋ ์ปดํ์ผ์ด ๋ชจ๋ ์์
์์ ์๋ํ๋์ง ํ์ธํด์ผ ํฉ๋๋ค.
์ปดํ์ผ๋ ์ฝ๋๋ก ๋ชจ๋ ํจํค์ง๋ฅผ ์ค์นํ ์ ์๋์ง ํ์ธํฉ๋๋ค. ๋๋ ์ถฉ๋ถํด์ผ ํ๋ "hello world from C" ์ฅ๋๊ฐ ํจํค์ง๋ฅผ ๊ฐ์ง๊ณ ์์ต๋๋ค.
install.packages("r.gitlab.ci", repos="https://jangorecki.gitlab.io/r.gitlab.ci")
CRAN์์ ํจํค์ง๋ฅผ ์ค์นํ ๋ type="source"
๋ฅผ ์ถ๊ฐํด์ผ ํฉ๋๋ค. CRAN์๋ ํจํค์ง ์์ค๊ฐ ์๋ ๊ธฐ๋ณธ์ ์ผ๋ก ์ฌ์ฉ๋๋ mac ๋ฐ์ด๋๋ฆฌ๊ฐ ์๊ธฐ ๋๋ฌธ์
๋๋ค.
@FarMar ์ค์น ์ถ๋ ฅ์ ์ด ์ค์ ์ฃผ๋ชฉํ์ญ์์ค.
/usr/local/gfortran/bin/gcc: ํด๋น ํ์ผ์ด๋ ๋๋ ํ ๋ฆฌ๊ฐ ์์ต๋๋ค.
์ด๋ ์ปดํจํฐ๊ฐ /usr/local/gfortran/bin/gcc
๊ฒฝ๋ก์์ gcc
๋ฅผ ์ฐพ๋๋ก ๊ตฌ์ฑ๋์์์ ์๋ฏธํฉ๋๋ค.
ํด๋น ํ์ผ์ด ์ปดํจํฐ์ ์๋์ง ํ์ธํ ์ ์์ต๋๋ค. Mac์ gcc
๊ฐ ์์ต๋๋ค(ํ์ง๋ง ๋ถํํ๋ ์ด๋ป๊ฒ ์ค์น๋์๋์ง ํ์คํ์ง ์์ต๋๋ค. ์ค์น wiki).
ํ์๋ ๊ฐ์ธ์ ์ผ๋ก ์ฌ์ฉํ๊ณ llvm
์์ ๋งฅ์ /usr/local/opt/llvm
I๊ฐ ์ค์น ์ํค์์ ์ค์ ํ๋ค.
๋ ๊ฒฝ์ฐ ๋ชจ๋, ๊ทธ๊ฒ์ ๋ค์๊ณผ ๊ฐ์ด ์ ์ํ๋ค CC
๋น์ ์ ~/.R/Makevars
.
๋์์ด ๋๊ธฐ๋ฅผ ๋ฐ๋๋๋ค.
๊ทธ๋ ์ง ์์ผ๋ฉด ์ปดํ์ผ๋ฌ๊ฐ ์๋ํ๋ ์ง์ ์ผ๋ก ๋กค๋ฐฑํ ๋ค์ https://github.com/Rdatatable/data.table/wiki/Installation wiki๋ฅผ ๋ฐ๋ฅด๊ณ ์คํจํ๋ฉด Makevars ๋ฐ ์ถ๋ ฅ์ ๋ํ ์ ๋ฌธ์ ๋ฅผ ์ด โโ์ ์์ต๋๋ค. .
@jangorecki ๊ทธ Markevars
ํธ์ง์์ ์ปดํ์ผ์ ์ค๋จํ๋ ๊ฒ ๊ฐ์ต๋๋ค. ์ฌ์ฉ์ ์ ์ Makevars
์๋ ์ํ์์ ํ
์คํธ๋ฅผ ์ปดํ์ผํ ์ ์์ต๋๋ค. ์์ด๋ ์ ์๋ํฉ๋๋ค.
์๋
ํ์ธ์ ์ฌ๋ฌ๋ถ -- ์ด ์ค๋ ๋์ ๊ฐ์ฌ๋๋ฆฝ๋๋ค! brew์์ llvm
์ค์น๋ฅผ ์ฌ์ฉํ์ฌ macOS ์ค์น ์ง์นจ์ ๋ฐ๋์ง๋ง ์ด ํจํค์ง๋ฅผ ๋ค์๊ณผ ํจ๊ป ์ค์นํ ์ ์์ต๋๋ค.
install.packages("data.table", type = "source", repos = "https://Rdatatable.gitlab.io/data.table")
์ปดํ์ผ์ ํญ์ ์ด ์ค๋ฅ์ ํจ๊ป ์คํจํ์ต๋๋ค.
Error: package or namespace load failed for โdata.tableโ in library.dynam(lib, package, package.lib):
shared object โdatatable.soโ not found
๋ด ํค๋ณด๋๋ฅผ ํค๋๋ฑ ์ํ ํ ์ด ๊ฒฝ๊ณ ๊ฐ ๋งค์ฐ ์ ์ฉํ๋ค๋ ๊ฒ์ ์์์ต๋๋ค.
** using staged installation
*** pkg-config is not installed.
*** Compilation will now be attempted and if it works you can ignore this message. However,
*** if compilation fails, try 'locate zlib.h zconf.h' and ensure the zlib development library
*** is installed :
*** deb: zlib1g-dev (Debian, Ubuntu, ...)
*** rpm: zlib-devel (Fedora, EPEL, ...)
*** brew: zlib (OSX)
*** Note that zlib is required to compile R itself so you may find the advice in the R-admin
*** guide helpful regarding zlib. On Debian/Ubuntu, zlib1g-dev is a dependency of r-base as
*** shown by 'apt-cache showsrc r-base | grep ^Build-Depends | grep zlib', and therefore
*** 'sudo apt-get build-dep r-base' should be sufficient too.
*** To silence this message, please ensure that :
*** 1) 'pkg-config --exists zlib' succeeds (i.e. $? -eq 0)
*** 2) 'pkg-config --libs zlib' contains -lz
*** Compilation will now be attempted ...
์ ๊ฒฝ์ฐ์๋ locate
๊ฐ ์๋ํ์ง ์์์ต๋๋ค. locate zlib.h zconf.h
์๋ํ๋๋ฐ
WARNING: The locate database (/var/db/locate.database) does not exist.
To create the database, run the following command:
sudo launchctl load -w /System/Library/LaunchDaemons/com.apple.locate.plist
๋ด ๊ธฐ๊ณ๋ ๊ฑฐ์ ์ ๊ฒ์ด๋ฏ๋ก ์๋ง๋ ์ด๊ฒ์ด ๋ด๊ฐ ์ด ๋ฉ์์ง๋ฅผ ๋ฐ์ ์ด์ ์ผ ๊ฒ์
๋๋ค. ์ด์จ๋ launchctl load
๋ช
๋ น์ ์คํํ๊ณ ๋ช ๋ถ์ ๊ธฐ๋ค๋ ธ์ต๋๋ค. ๊ทธ ํ locate
๋ ๋ด ์ปดํจํฐ์์ zlib.h
๋ฐ zconf.h
๊ฐ ์๋ ์ฌ๋ฌ ์์น๋ฅผ ์ฐพ์ ์ ์์์ต๋๋ค. ์ฒด๊ณ. ๊ทธ ์๋ฆฌ์ ์์ค ์ค์น๊ฐ ๋งค๋ ฅ์ฒ๋ผ ์๋ํ์ต๋๋ค.
์์ฝ: ๊ณผ์์ผ ์ ์์ง๋ง ์์ค์์ data.table
๋ฅผ ์ค์นํ๊ธฐ ์ ์ ์ด๋ฌํ brew
์ค์น๋ฅผ ์ํํ๋ ๊ฒ์ด ์ ์๊ฒ ํจ๊ณผ์ ์ด์์ต๋๋ค.
brew update
brew install llvm pkg-config zlib gettext
๊ทธ๋ฐ ๋ค์ locate
๋ํ ๋ฐ์ดํฐ๋ฒ ์ด์ค๋ฅผ ๋น๋ํฉ๋๋ค.
sudo launchctl load -w /System/Library/LaunchDaemons/com.apple.locate.plist
zlib
๋ํ ์ถ๊ฐ C++ ์ปดํ์ผ๋ฌ ํ๋๊ทธ์ ํจ๊ป ์ค์น ํ์ด์ง ์ ~/.R/Makevars
ํ์ผ์ ์ฌ์ฉํฉ๋๋ค.
LLVM_LOC = /usr/local/opt/llvm
CC=$(LLVM_LOC)/bin/clang -fopenmp
CXX=$(LLVM_LOC)/bin/clang++ -fopenmp
# -O3 should be faster than -O2 (default) level optimisation ..
CFLAGS=-g -O3 -Wall -pedantic -std=gnu99 -mtune=native -pipe
CXXFLAGS=-g -O3 -Wall -pedantic -std=c++11 -mtune=native -pipe
LDFLAGS=-L/usr/local/opt/gettext/lib -L$(LLVM_LOC)/lib -Wl,-rpath,$(LLVM_LOC)/libi -L/usr/local/opt/zlib/lib
CPPFLAGS=-I/usr/local/opt/gettext/include -I$(LLVM_LOC)/include -I/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include -I/usr/local/opt/zlib/include
๋ฐ๋ผ๊ฑด๋ ์ด๊ฒ์ ๋๊ตฐ๊ฐ ๋ฏธ๋์ ๋ํต์ ๊ตฌํ ์ ์์ต๋๋ค!
๊ฐ์ฅ ์ ์ฉํ ๋๊ธ
๊ด์ฐฎ์์. ๋๋ ๊ทธ๊ฒ์ ์์ ๋๊ณ ๋ค์ค ์ค๋ ๋ ์ง์์ผ๋ก ์ค์นํ ์ ์์ต๋๋ค.
.R/Makevars
ํ์ผ์ ๋ณ๊ฒฝํด์ผ ํ์ต๋๋ค. ์๋ก์ด ๋ด์ฉ์ ๋ค์๊ณผ ๊ฐ์ต๋๋ค.