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

Tbb 240411 #2377

Merged
merged 7 commits into from
Apr 23, 2024
Merged

Tbb 240411 #2377

merged 7 commits into from
Apr 23, 2024

Conversation

rsbivand
Copy link
Contributor

#2372 fixed test for tbb;

checklist

1 OK,

2 agree with comment, only macOS has dSYMs, but there is detritus.

3 compile and link tested, and execution of minimal program tested if compiling and linking succeeds

4 added --enable-tbb=no or equivalently --disable-tbb, and run pkg-config and all subsequent tests conditional on the user not disabling TBB; by default enabled,

5 see comments in that commit.

@kbenoit
Copy link
Collaborator

kbenoit commented Apr 23, 2024

Thanks @rsbivand. But:

This works except when tbb is not present, in which case on macOS, it errors for me. During build:

ℹ Loading quanteda
Error in dyn.load(dll_copy_file) : 
  unable to load shared object '/var/folders/rc/y2gv0_dn0z19ygq271w7f9dr0000gp/T//RtmpGI5emZ/pkgload11f916b2ec668/quanteda.so':
  dlopen(/var/folders/rc/y2gv0_dn0z19ygq271w7f9dr0000gp/T//RtmpGI5emZ/pkgload11f916b2ec668/quanteda.so, 0x0006): symbol not found in flat namespace '__ZN3tbb6detail2r110deallocateERNS0_2d117small_object_poolEPvmRKNS2_14execution_dataE'
Calls: suppressPackageStartupMessages ... <Anonymous> -> load_dll -> library.dynam2 -> dyn.load
Execution halted

Exited with status 1.

@kbenoit
Copy link
Collaborator

kbenoit commented Apr 23, 2024

Also, in configure.ac, should this not prevent the dSYM detritus?

CXXFLAGS=`"${R_HOME}/bin/R" CMD config CXXFLAGS`
CXXFLAGS="${CXXFLAGS} -g0"  # Disable debug information

@rsbivand
Copy link
Contributor Author

Please report all of the install output, or run from the command line R CMD build --no-build-vignettes quanteda then R CMD check ... on the built tarball. This should give an 00install.out, which you can attach here (change the extension to .txt or create a zip archive if bulky). It is possible that tbb is not completely absent.

@kbenoit
Copy link
Collaborator

kbenoit commented Apr 23, 2024

00install.out below. Actually, that worked. This is after running

(base) KB-MacBook-Pro-14:quanteda kbenoit$ brew uninstall tbb
Uninstalling /opt/homebrew/Cellar/tbb/2021.12.0... (177 files, 2.7MB)
* installing *source* package ‘quanteda’ ...
** using staged installation
checking whether the C++ compiler works... yes
checking for C++ compiler default output file name... a.out
checking for suffix of executables... 
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether the compiler supports GNU C++... yes
checking whether clang++ -arch arm64 -std=gnu++17 accepts -g... yes
checking for clang++ -arch arm64 -std=gnu++17 option to enable C++11 features... none needed
checking how to run the C++ preprocessor... clang++ -arch arm64 -std=gnu++17 -E
checking for gcc... clang -arch arm64
checking whether the compiler supports GNU C... yes
checking whether clang -arch arm64 accepts -g... yes
checking for clang -arch arm64 option to enable C11 features... none needed
checking whether the compiler supports GNU C++... (cached) yes
checking whether clang++ -arch arm64 -std=gnu++17 accepts -g... (cached) yes
checking for clang++ -arch arm64 -std=gnu++17 option to enable C++11 features... (cached) none needed
checking Intel TBB existence:... no
configure: WARNING: Intel TBB not installed; install TBB devel package for parallel processing or update PKG_CONFIG_PATH environment variable
configure: Package CPP flags: 
configure: Package LIBS: 
configure: creating ./config.status
config.status: creating src/Makevars
** libs
using C++ compiler: ‘Apple clang version 15.0.0 (clang-1500.3.9.4)’
using SDK: ‘’
clang++ -arch arm64 -std=gnu++17 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG  -I'/Library/Frameworks/R.framework/Versions/4.3-arm64/Resources/library/Rcpp/include' -I'/Library/Frameworks/R.framework/Versions/4.3-arm64/Resources/library/RcppArmadillo/include' -I/opt/R/arm64/include   -I../inst/include  -fPIC  -falign-functions=64 -Wall -g -O2  -c RcppExports.cpp -o RcppExports.o
clang++ -arch arm64 -std=gnu++17 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG  -I'/Library/Frameworks/R.framework/Versions/4.3-arm64/Resources/library/Rcpp/include' -I'/Library/Frameworks/R.framework/Versions/4.3-arm64/Resources/library/RcppArmadillo/include' -I/opt/R/arm64/include   -I../inst/include  -fPIC  -falign-functions=64 -Wall -g -O2  -c fcm.cpp -o fcm.o
clang++ -arch arm64 -std=gnu++17 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG  -I'/Library/Frameworks/R.framework/Versions/4.3-arm64/Resources/library/Rcpp/include' -I'/Library/Frameworks/R.framework/Versions/4.3-arm64/Resources/library/RcppArmadillo/include' -I/opt/R/arm64/include   -I../inst/include  -fPIC  -falign-functions=64 -Wall -g -O2  -c index.cpp -o index.o
clang++ -arch arm64 -std=gnu++17 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG  -I'/Library/Frameworks/R.framework/Versions/4.3-arm64/Resources/library/Rcpp/include' -I'/Library/Frameworks/R.framework/Versions/4.3-arm64/Resources/library/RcppArmadillo/include' -I/opt/R/arm64/include   -I../inst/include  -fPIC  -falign-functions=64 -Wall -g -O2  -c kwic.cpp -o kwic.o
clang++ -arch arm64 -std=gnu++17 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG  -I'/Library/Frameworks/R.framework/Versions/4.3-arm64/Resources/library/Rcpp/include' -I'/Library/Frameworks/R.framework/Versions/4.3-arm64/Resources/library/RcppArmadillo/include' -I/opt/R/arm64/include   -I../inst/include  -fPIC  -falign-functions=64 -Wall -g -O2  -c pattern2fixed.cpp -o pattern2fixed.o
clang++ -arch arm64 -std=gnu++17 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG  -I'/Library/Frameworks/R.framework/Versions/4.3-arm64/Resources/library/Rcpp/include' -I'/Library/Frameworks/R.framework/Versions/4.3-arm64/Resources/library/RcppArmadillo/include' -I/opt/R/arm64/include   -I../inst/include  -fPIC  -falign-functions=64 -Wall -g -O2  -c serialize.cpp -o serialize.o
clang++ -arch arm64 -std=gnu++17 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG  -I'/Library/Frameworks/R.framework/Versions/4.3-arm64/Resources/library/Rcpp/include' -I'/Library/Frameworks/R.framework/Versions/4.3-arm64/Resources/library/RcppArmadillo/include' -I/opt/R/arm64/include   -I../inst/include  -fPIC  -falign-functions=64 -Wall -g -O2  -c tokens_chunk.cpp -o tokens_chunk.o
clang++ -arch arm64 -std=gnu++17 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG  -I'/Library/Frameworks/R.framework/Versions/4.3-arm64/Resources/library/Rcpp/include' -I'/Library/Frameworks/R.framework/Versions/4.3-arm64/Resources/library/RcppArmadillo/include' -I/opt/R/arm64/include   -I../inst/include  -fPIC  -falign-functions=64 -Wall -g -O2  -c tokens_combine.cpp -o tokens_combine.o
clang++ -arch arm64 -std=gnu++17 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG  -I'/Library/Frameworks/R.framework/Versions/4.3-arm64/Resources/library/Rcpp/include' -I'/Library/Frameworks/R.framework/Versions/4.3-arm64/Resources/library/RcppArmadillo/include' -I/opt/R/arm64/include   -I../inst/include  -fPIC  -falign-functions=64 -Wall -g -O2  -c tokens_compound.cpp -o tokens_compound.o
clang++ -arch arm64 -std=gnu++17 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG  -I'/Library/Frameworks/R.framework/Versions/4.3-arm64/Resources/library/Rcpp/include' -I'/Library/Frameworks/R.framework/Versions/4.3-arm64/Resources/library/RcppArmadillo/include' -I/opt/R/arm64/include   -I../inst/include  -fPIC  -falign-functions=64 -Wall -g -O2  -c tokens_group.cpp -o tokens_group.o
clang++ -arch arm64 -std=gnu++17 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG  -I'/Library/Frameworks/R.framework/Versions/4.3-arm64/Resources/library/Rcpp/include' -I'/Library/Frameworks/R.framework/Versions/4.3-arm64/Resources/library/RcppArmadillo/include' -I/opt/R/arm64/include   -I../inst/include  -fPIC  -falign-functions=64 -Wall -g -O2  -c tokens_lookup.cpp -o tokens_lookup.o
clang++ -arch arm64 -std=gnu++17 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG  -I'/Library/Frameworks/R.framework/Versions/4.3-arm64/Resources/library/Rcpp/include' -I'/Library/Frameworks/R.framework/Versions/4.3-arm64/Resources/library/RcppArmadillo/include' -I/opt/R/arm64/include   -I../inst/include  -fPIC  -falign-functions=64 -Wall -g -O2  -c tokens_ngrams.cpp -o tokens_ngrams.o
clang++ -arch arm64 -std=gnu++17 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG  -I'/Library/Frameworks/R.framework/Versions/4.3-arm64/Resources/library/Rcpp/include' -I'/Library/Frameworks/R.framework/Versions/4.3-arm64/Resources/library/RcppArmadillo/include' -I/opt/R/arm64/include   -I../inst/include  -fPIC  -falign-functions=64 -Wall -g -O2  -c tokens_replace.cpp -o tokens_replace.o
clang++ -arch arm64 -std=gnu++17 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG  -I'/Library/Frameworks/R.framework/Versions/4.3-arm64/Resources/library/Rcpp/include' -I'/Library/Frameworks/R.framework/Versions/4.3-arm64/Resources/library/RcppArmadillo/include' -I/opt/R/arm64/include   -I../inst/include  -fPIC  -falign-functions=64 -Wall -g -O2  -c tokens_restore.cpp -o tokens_restore.o
clang++ -arch arm64 -std=gnu++17 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG  -I'/Library/Frameworks/R.framework/Versions/4.3-arm64/Resources/library/Rcpp/include' -I'/Library/Frameworks/R.framework/Versions/4.3-arm64/Resources/library/RcppArmadillo/include' -I/opt/R/arm64/include   -I../inst/include  -fPIC  -falign-functions=64 -Wall -g -O2  -c tokens_segment.cpp -o tokens_segment.o
clang++ -arch arm64 -std=gnu++17 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG  -I'/Library/Frameworks/R.framework/Versions/4.3-arm64/Resources/library/Rcpp/include' -I'/Library/Frameworks/R.framework/Versions/4.3-arm64/Resources/library/RcppArmadillo/include' -I/opt/R/arm64/include   -I../inst/include  -fPIC  -falign-functions=64 -Wall -g -O2  -c tokens_select.cpp -o tokens_select.o
clang++ -arch arm64 -std=gnu++17 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG  -I'/Library/Frameworks/R.framework/Versions/4.3-arm64/Resources/library/Rcpp/include' -I'/Library/Frameworks/R.framework/Versions/4.3-arm64/Resources/library/RcppArmadillo/include' -I/opt/R/arm64/include   -I../inst/include  -fPIC  -falign-functions=64 -Wall -g -O2  -c tokens_xptr.cpp -o tokens_xptr.o
clang++ -arch arm64 -std=gnu++17 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG  -I'/Library/Frameworks/R.framework/Versions/4.3-arm64/Resources/library/Rcpp/include' -I'/Library/Frameworks/R.framework/Versions/4.3-arm64/Resources/library/RcppArmadillo/include' -I/opt/R/arm64/include   -I../inst/include  -fPIC  -falign-functions=64 -Wall -g -O2  -c utility.cpp -o utility.o
clang++ -arch arm64 -std=gnu++17 -dynamiclib -Wl,-headerpad_max_install_names -undefined dynamic_lookup -L/Library/Frameworks/R.framework/Resources/lib -L/opt/R/arm64/lib -o quanteda.so RcppExports.o fcm.o index.o kwic.o pattern2fixed.o serialize.o tokens_chunk.o tokens_combine.o tokens_compound.o tokens_group.o tokens_lookup.o tokens_ngrams.o tokens_replace.o tokens_restore.o tokens_segment.o tokens_select.o tokens_xptr.o utility.o -L/Library/Frameworks/R.framework/Resources/lib -lRlapack -L/Library/Frameworks/R.framework/Resources/lib -lRblas -L/opt/gfortran/lib/gcc/aarch64-apple-darwin20.0/12.2.0 -L/opt/gfortran/lib -lgfortran -lemutls_w -lquadmath -F/Library/Frameworks/R.framework/.. -framework R -Wl,-framework -Wl,CoreFoundation
installing to /Users/kbenoit/Dropbox (Personal)/GitHub/quanteda/quanteda.Rcheck/00LOCK-quanteda/00new/quanteda/libs
** R
** data
*** moving datasets to lazyload DB
** inst
** byte-compile and prepare package for lazy loading
** help
*** installing help indices
*** copying figures
** building package indices
** installing vignettes
** testing if installed package can be loaded from temporary location
** checking absolute paths in shared objects and dynamic libraries
** testing if installed package can be loaded from final location
** testing if installed package keeps a record of temporary installation path
* DONE (quanteda)

However, when I try to build it in RStudio, I get this:

==> Rcpp::compileAttributes()

* Updated R/RcppExports.R

==> devtools::document(roclets = c('rd', 'collate', 'namespace', 'vignette'))

ℹ Updating quanteda documentation
ℹ Loading quanteda
Error in dyn.load(dll_copy_file) : 
  unable to load shared object '/var/folders/rc/y2gv0_dn0z19ygq271w7f9dr0000gp/T//RtmpmoqMcr/pkgload1746b7efb9970/quanteda.so':
  dlopen(/var/folders/rc/y2gv0_dn0z19ygq271w7f9dr0000gp/T//RtmpmoqMcr/pkgload1746b7efb9970/quanteda.so, 0x0006): Library not loaded: /opt/homebrew/opt/tbb/lib/libtbb.12.dylib
  Referenced from: <5D963323-43F1-3C99-AB61-26E33B24E3CC> /private/var/folders/rc/y2gv0_dn0z19ygq271w7f9dr0000gp/T/RtmpmoqMcr/pkgload1746b7efb9970/quanteda.so
  Reason: tried: '/opt/homebrew/opt/tbb/lib/libtbb.12.dylib' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/opt/homebrew/opt/tbb/lib/libtbb.12.dylib' (no such file), '/opt/homebrew/opt/tbb/lib/libtbb.12.dylib' (no such file), '/Library/Frameworks/R.framework/Resources/lib/libtbb.12.dylib' (no such file), '/Library/Java/JavaVirtualMachines/jdk-11.0.18+10/Contents/Home/lib/server/libtbb.12.dylib' (no such file), '/Library/Frameworks/R.framework/Resources/lib/libtbb.12.dylib' (no such file), '/Library/Java/JavaVirtualMach
Calls: suppressPackageStartupMessages ... <Anonymous> -> load_dll -> library.dynam2 -> dyn.load
Execution halted

Exited with status 1.

@kbenoit kbenoit self-requested a review April 23, 2024 14:07
Copy link
Collaborator

@kbenoit kbenoit left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @rsbivand

@kbenoit kbenoit merged commit f132153 into quanteda:master Apr 23, 2024
6 checks passed
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.

None yet

2 participants