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

Unable to install after updating to R 4.4 #25

Open
tomasnobrega opened this issue May 12, 2024 · 3 comments
Open

Unable to install after updating to R 4.4 #25

tomasnobrega opened this issue May 12, 2024 · 3 comments
Labels
bug Something isn't working

Comments

@tomasnobrega
Copy link

Describe the bug

After updating to R 4.4 I am unable to install unigd

To Reproduce

install.packages("unigd")
remotes::install_github("nx10/unigd")

Screenshots

** testing if installed package can be loaded from temporary location
Error: package or namespace load failed for ‘unigd’ in dyn.load(file, DLLpath = DLLpath, ...):
 unable to load shared object '/opt/homebrew/lib/R/4.4/site-library/00LOCK-unigd/00new/unigd/libs/unigd.so':
  dlopen(/opt/homebrew/lib/R/4.4/site-library/00LOCK-unigd/00new/unigd/libs/unigd.so, 0x0006): symbol not found in flat namespace '__ZNSt13exception_ptr31__from_native_exception_pointerEPv'
Error: loading failed
Execution halted
ERROR: loading failed
* removing ‘/opt/homebrew/lib/R/4.4/site-library/unigd’
Warning message:
In i.p(...) :
  installation of package ‘/tmp/Rtmp2txVY6/file130f64fc83087/unigd_0.1.1.tar.gz’ had non-zero exit status

Environment

  • OS: MacOS Sonoma 14.4.1 (23E224) (Apple chip)
  • R version: 4.4
  • unigd version: 0.1.1

Additional context

I installed all necessary system requirements described (https://nx10.github.io/unigd/articles/a00_installation.html#system-requirements) including XQuartz.

@tomasnobrega tomasnobrega added the bug Something isn't working label May 12, 2024
@tomasnobrega
Copy link
Author

After some hours trying things, I was able to find a way around. Instead of installing with R, install from source:

Download the unigd_0.1.1.tgz from CRAN
Open the terminal, navigate to the folder and then type:

tar -zxvf unigd_0.1.1.tgz
R CMD INSTALL --verbose unigd

@adamaltmejd
Copy link

Having the same issue and for me installing 0.1.2 from the tarball here on Github did not help (maybe not surprising).

Error: package or namespace load failed for ‘unigd’ in dyn.load(file, DLLpath = DLLpath, ...):
 unable to load shared object '/Users/adam/.R/packages/00LOCK-unigd-0.1.2/00new/unigd/libs/unigd.so':
  dlopen(/Users/adam/.R/packages/00LOCK-unigd-0.1.2/00new/unigd/libs/unigd.so, 0x0006): symbol not found in flat namespace '__ZNSt13exception_ptr31__from_native_exception_pointerEPv'
Error: loading failed
Execution halted
ERROR: loading failed

What did work was to remove my .R\Makevars which includes the following (to get OpenMP to work with data.table and fixest). So there must be some conflict with the settings there.

XC_LOC:=$(shell xcrun --show-sdk-path)
LLVM_LOC:=$(shell brew --prefix llvm)
GCC_LOC:=$(shell brew --prefix gcc)
GETTEXT_LOC:=$(shell brew --prefix gettext)
OMP_LOC:=$(shell brew --prefix libomp)

CC=$(LLVM_LOC)/bin/clang
CXX=$(LLVM_LOC)/bin/clang++
CXX11=$(LLVM_LOC)/bin/clang++
CXX14=$(LLVM_LOC)/bin/clang++
CXX17=$(LLVM_LOC)/bin/clang++
CXX1X=$(LLVM_LOC)/bin/clang++

OBJC=$(LLVM_LOC)/bin/clang
OBJCXX=$(LLVM_LOC)/bin/clang++

CFLAGS=-g -O2 -Wall -pedantic -std=gnu99 -mtune=native -pipe
CXXFLAGS=-g -O2 -Wall -pedantic -std=c++11 -mtune=native -pipe
CXX11FLAGS=-g -O2 -Wall -pedantic -std=c++11 -mtune=native -pipe
CXX14FLAGS=-g -O2 -Wall -pedantic -std=c++14 -mtune=native -pipe
CXX17FLAGS=-g -O2 -Wall -pedantic -std=c++17 -mtune=native -pipe

LDFLAGS=-L"$(LLVM_LOC)/lib" -L"$(GETTEXT_LOC)/lib" -L/opt/homebrew/opt/libpng/lib -L/opt/homebrew/opt/libtiff/lib -L/opt/homebrew/opt/jpeg-turbo/lib -L/opt/homebrew/opt/zstd/lib -L/opt/homebrew/opt/mbedtls/lib -Wl,-rpath,$(LLVM_LOC)/lib --sysroot="$(XC_LOC)" -lomp
CPPFLAGS=-I"$(GETTEXT_LOC)/include" -I"$(LLVM_LOC)/include" -I/opt/homebrew/opt/libpng/include -I/opt/homebrew/opt/libtiff/include -I/opt/homebrew/opt/jpeg-turbo/include -I/opt/homebrew/opt/zstd/include -I/opt/homebrew/opt/mbedtls/include -isysroot "$(XC_LOC)" -I"$(OMP_LOC)/include" -Xclang -fopenmp

FC=$(GCC_LOC)/bin/gfortran
F77=$(GCC_LOC)/bin/gfortran
FLIBS=-L$(GCC_LOC)/lib/gcc/10/ -lm

@dongguaguaguagua
Copy link

Got the same issue on:

  • MacOS Sonoma 14.4 with apple silicon
  • R 4.4.1
  • installing unigd 0.1.1 or 0.1.2

Installing the unigd tarball did not work on my device either.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants