daphne-project / daphne-project/daphne
Compilation with Clang
- Dominant language
- C++
- Stars
- 81
- Forks
- 83
- PR merge metrics
- No merged PRs in 30d
Description
At the moment, compiling with clang fails at least for me. Errors start with this:
``` bash
/daphne/src/parser/daphnedsl/DaphneDSLVisitor.cpp:1487:51: error: 'auto' not allowed in template argument
1487 | int64_t i, std::pair constValue) {
| ^~~~
/daphne/src/parser/daphnedsl/DaphneDSLVisitor.cpp:1508:21: error: no matching function for call to object of type '(lambda at /daphne/src/parser/daphnedsl/DaphneDSLVisitor.cpp:1486:20)'
1508 | fillRes(i,
| ^~~~~~~
/daphne/src/parser/daphnedsl/DaphneDSLVisitor.cpp:1658:47: note: in instantiation of function template specialization 'DaphneDSLVisitor::buildColMatrixFromValues' requested here
1658 | colMatrix = DaphneDSLVisitor::buildColMatrixFromValues(
| ^
/daphne/src/parser/daphnedsl/DaphneDSLVisitor.cpp:1486:20: note: candidate function not viable: no known conversion from 'std::pair' to 'int' for 2nd argument
1486 | auto fillRes = [&constValues, &nonConstValsIdx](
| ^
1487 | int64_t i, std::pair constValue) {
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
This goes on until it stops with
``` bash
fatal error: too many errors emitted, stopping now [-ferror-limit=]
```
Clang version in the daphne-dev Docker container is the default of Ubuntu 24:
```
@daphne-container:/daphne$ clang -v
Ubuntu clang version 18.1.3 (1ubuntu1)
Target: x86_64-pc-linux-gnu
Thread model: posix
InstalledDir: /bin
Found candidate GCC installation: /bin/../lib/gcc/x86_64-linux-gnu/13
Selected GCC installation: /bin/../lib/gcc/x86_64-linux-gnu/13
Candidate multilib: .;@m64
Selected multilib: .;@m64
```
Contributor guide
Research direction
Start in src/parser/daphnedsl/DaphneDSLVisitor.cpp around lines 1486-1508 and inspect the clang errors from the daphne-dev Docker container. Reproduce the failure with Ubuntu clang 18.1.3, then verify that compiling the project with clang completes without the reported errors.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- build-system, compilers
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100