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

warning #3924: attribute namespace "cpp11" is unrecognized #98

Closed
cb4github opened this issue Aug 15, 2022 · 7 comments
Closed

warning #3924: attribute namespace "cpp11" is unrecognized #98

cb4github opened this issue Aug 15, 2022 · 7 comments

Comments

@cb4github
Copy link

Getting the following during build.

icpc -std=gnu++14  -I"/share/apps/R/4.1.1-intel/lib64/R/include" -DNDEBUG -I/usr/include/freetype2   -I'/lustre/project/<redacted>/R/Library/cpp11/include' -I/usr/local/include   -fpic  -fPIC -qopenmp -O3 -ipo -xHost -multiple-processes -flto -c caches.cpp -o caches.o
In file included from caches.cpp(1):
caches.h(22): warning #3924: attribute namespace "cpp11" is unrecognized
  [[cpp11::init]]

My gcc version (with intel-mkl):

$ gcc --version
gcc (GCC) 6.3.0

I suspect I'll need to upgrade to gnu++17, true?
Please advise, and please let me know if I can provide more information, thanks.
Best,
CB

@thomasp85
Copy link
Member

This seems related to the cpp11 R package, not your compiler... Do you have the latest cpp11 version installed?

@cb4github
Copy link
Author

Thanks so much for your response.
Here are my R, icpc, and cpp11 versions.

$ Rscript -e 'cat("R.version.string=", R.version.string, "\n")''
R.version.string= R version 4.1.1 (2021-08-10)
$ icpc --version
icpc (ICC) 19.0.1.144 20181018
$ Rscript -e "packageVersion('cpp11')"
[1] ‘0.4.2’

I've also tried cloning systemfonts and adding a using statement to all my local copies of headers that contain [[cpp11::init]] as in the following but the result is the same "...unrecognized".

diff systemfonts/src/caches.h systemfonts/src/caches.h.bak
8d7
< using namespace cpp11;

Again, please advise, and please let me know if I can provide more information, thanks.

@DavisVaughan
Copy link
Member

What OS are you on?

@cb4github
Copy link
Author

CentOS 6.5 for now - admittedly EOL - and in Science DMZ. Also, some nodes have been migrated to CentOS 7.4 and have gcc v4.8.5, which supports gnu++11 and not any >= gnu++14 - so no support on the cluster for gnu++17.

Advice welcome, thanks.

@DavisVaughan
Copy link
Member

@cb4github could you try installing this cpp11 pull request, and then reinstalling systemfonts?

remotes::install_github("r-lib/cpp11#278")

# Restart R

remotes::install_github("r-lib/systemfonts")

@cb4github
Copy link
Author

Please see details below, and thanks @DavisVaughan that those changes certainly did succeed in eliminating the subject icpc compiler warnings #3924, though the need for said changes now arguably seems questionable in light of the ever deepening obsolescence of my current platform.

That said, I'll close the issue and thanks @DavisVaughan and @thomasp85 for all your time and efforts.

Best,
CB

Details:
I had hoped - incorrectly in hindsight - that the subject warnings were the source of the icpc (v19X) compiler (segmentation) error as in the following.

...
icpc -std=gnu++11  -I"/share/apps/R/4.1.1-intel/lib64/R/include" -DNDEBUG -I/usr/include/freetype2   -I'/lustre/project/hpcstaff/cbaribault/R/Library/cpp11/include' -I/usr/local/include   -fpic  -fPIC -qopenmp -O3 -ipo -xHost -multiple-processes -flto -c unix/FontManagerLinux.cpp -o unix/FontManagerLinux.o
": internal error: ** The compiler has encountered an unexpected problem.
** Segmentation violation signal raised. **
Access violation or stack overflow. Please contact Intel Support for assistance.

compilation aborted for font_registry.cpp (code 4)
make: *** [font_registry.o] Error 4
make: *** Waiting for unfinished jobs....
ERROR: compilation failed for package ‘systemfonts’

For reasons that 1) icpc v19XX is no longer maintained and 2) other R packages prerequisite for devtools, etc., are now presenting errors with ld v2.20XX in centos6.5, I've now seen sufficient reason to move to centos 7X and no longer attempt to use R on centos 6 for all reasonable intents and purposes.

If it helps anyone, I was able to install systemfonts using g++ v6.3.0 vice ipcp v19XX using the following local Makevars, including local LDFLAGS with -fopenmp vice my local R-system option -qopenmp.

$ cat ~/.R/Makevars # for installing systemfonts only
CXX=g++
CXX11=g++
CXX14=g++
CXXFLAGS = -fPIC -fopenmp -O3 -flto
CXXPICFLAGS = -fpic
CXX11FLAGS = -fPIC -fopenmp -O3 -flto
CXX11PICFLAGS = -fpic
CXX14FLAGS = -fPIC -fopenmp -O3 -flto
CPPFLAGS+=-I/usr/include/freetype2
LDFLAGS = -fopenmp -L/share/apps/intel_parallel_studio_xe/2019_update1/compilers_and_libraries_2019.1.144/linux/compiler/lib/intel64_lin -L/share/apps/intel_parallel_studio_xe/2019_update1/compilers_and_libraries_2019.1.144/linux/mpi/intel64/lib/release -L/share/apps/pcre2/10.38/lib -L/share/apps/bzip2/1.0.6/lib -L/share/apps/xz/5.2.2/lib

@DavisVaughan
Copy link
Member

those changes certainly did succeed in eliminating the subject icpc compiler warnings #3924

Thanks, I'll probably try and get cpp11 updated to avoid this warning in the future then

DavisVaughan added a commit to DavisVaughan/cpp11 that referenced this issue Aug 7, 2023
CRAN advised that we revert this since the "Classic" intel compiler this was intended to support is deprecated and will be removed in 2023.

It also did not even really help the original issue (r-lib/systemfonts#98) since there were other compilation errors there.

Since this is such an old system and we have only ever had 1 report about this, I feel fine reverting it back.
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

No branches or pull requests

3 participants