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

Fix old tbb #74

Merged
merged 2 commits into from
Apr 8, 2024
Merged

Fix old tbb #74

merged 2 commits into from
Apr 8, 2024

Conversation

koheiw
Copy link
Collaborator

@koheiw koheiw commented Apr 7, 2024

#73

@kbenoit kbenoit self-requested a review April 8, 2024 04:59
@kbenoit kbenoit linked an issue Apr 8, 2024 that may be closed by this pull request
@kbenoit kbenoit merged commit 09359f3 into master Apr 8, 2024
5 of 6 checks passed
@kbenoit
Copy link
Contributor

kbenoit commented Apr 8, 2024

@koheiw On my local mac, where it's not finding TBB installed (even though it is, but not seeing it as per quanteda/quanteda#2367, with the new compiler directive to fix this, I get:

   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'/Library/Frameworks/R.framework/Versions/4.3-arm64/Resources/library/quanteda/include' -I/opt/R/arm64/include   -DARMA_64BIT_WORD=1 `/Library/Frameworks/R.framework/Resources/bin/Rscript ../inst/deftbb.R` -fPIC  -falign-functions=64 -Wall -g -O2  -UNDEBUG -Wall -pedantic -g -O0 -fdiagnostics-color=always -c collocations.cpp -o collocations.o
   collocations.cpp:20:45: error: use of undeclared identifier 'UintAtomic'
   typedef std::unordered_map<Ngram, std::pair<UintAtomic, UintAtomic>, hash_ngram, equal_ngram> MapNgramsPair;
                                               ^
   collocations.cpp:147:39: error: type 'MapNgramsPair' (aka 'int') does not provide a subscript operator
                   auto &count = map_seqs[text_sub];
                                 ~~~~~~~~^~~~~~~~~
   collocations.cpp:239:13: error: member reference base type 'MapNgramsPair' (aka 'int') is not a structure or union
       map_seqs.max_load_factor(GLOBAL_PATTERN_MAX_LOAD_FACTOR);
       ~~~~~~~~^~~~~~~~~~~~~~~~
   collocations.cpp:257:29: error: member reference base type 'MapNgramsPair' (aka 'int') is not a structure or union
       std::size_t N = map_seqs.size();
                       ~~~~~~~~^~~~~
   collocations.cpp:271:28: error: member reference base type 'MapNgramsPair' (aka 'int') is not a structure or union
       for (auto it = map_seqs.begin(); it != map_seqs.end(); ++it) {
                      ~~~~~~~~^~~~~~
   collocations.cpp:271:52: error: member reference base type 'MapNgramsPair' (aka 'int') is not a structure or union
       for (auto it = map_seqs.begin(); it != map_seqs.end(); ++it) {
                                              ~~~~~~~~^~~~
   6 errors generated.
   make: *** [collocations.o] Error 1
   ERROR: compilation failed for package ‘quanteda.textstats’

How can the compiler #if statements be nested so that this doesn't happen if not QUANTEDA_USE_TBB ?

@koheiw koheiw mentioned this pull request Apr 8, 2024
@koheiw
Copy link
Collaborator Author

koheiw commented Apr 8, 2024

Please try #75.

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.

check_win_oldrel() error
2 participants