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

clang++-19 errors on segment_manager.hpp #243

Open
eddelbuettel opened this issue Dec 20, 2024 · 0 comments
Open

clang++-19 errors on segment_manager.hpp #243

eddelbuettel opened this issue Dec 20, 2024 · 0 comments

Comments

@eddelbuettel
Copy link

eddelbuettel commented Dec 20, 2024

The CRAN repository (of packages for the R language) found that after the Boost 1.87.0 update, previously working now errors. (I maintain BH, a package of a large-ish subset of Boost as a header-only library, this is used fairly widely by about 335 CRAN package and a further 40 BioConductor packages. One of those, BiocParallel failed.)

We can reproduce the error on a standard Ubuntu 24.04 LTS installation with clang++-19 using one of the example programs:

$ wget -q https://raw.githubusercontent.com/boostorg/interprocess/refs/heads/develop/example/doc_managed_heap_memory.cpp 
$ clang++-19 -I'/usr/local/lib/R/site-library/BH/include'  -fpic  -Wall -O3 -pedantic -o doc_managed_heap_memory doc_managed_heap_memory.cpp 
In file included from doc_managed_heap_memory.cpp:14:
In file included from /usr/local/lib/R/site-library/BH/include/boost/interprocess/managed_heap_memory.hpp:27:
In file included from /usr/local/lib/R/site-library/BH/include/boost/interprocess/detail/managed_memory_impl.hpp:30:
/usr/local/lib/R/site-library/BH/include/boost/interprocess/segment_manager.hpp:1055:41: error: a template argument list is expected after a name prefixed by the template keyword [-Wmissing-template-arg-list-after-template-kw]
 1055 |          hdr = block_header_t::template from_first_header(reinterpret_cast<index_data_t*>((void*)((char*)buffer_ptr + front_space)));
      |                                         ^
1 error generated.
$ clang++-19 --version
Ubuntu clang version 19.1.1 (1ubuntu1~24.04.2)
Target: x86_64-pc-linux-gnu
Thread model: posix
InstalledDir: /usr/lib/llvm-19/bin
$ 

Note that I point into the Boost 1.87.0 subset packaged as R package BH here which BiocParallel built against all prior versions.

Adding the compiler argument permits a compilation but it would be preferable if this was not required:

$ clang++-19 -I'/usr/local/lib/R/site-library/BH/include' -Wno-missing-template-arg-list-after-template-kw -fpic  -Wall -O3 -pedantic -o doc_managed_heap_memory doc_managed_heap_memory.cpp 
$ ./doc_managed_heap_memory 
$ 
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

1 participant