Build Error: cannot initialize a variable of type 'int8_t *' with an rvalue of type 'const int8_t
Open
Beginner friendly
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 40.3k
- Forks
- 3.7k
- PR merge metrics
- No merged PRs in 30d
Description
On Windows and Debian, I had compilation problems along this line:
Error:
error: cannot initialize a variable of type 'int8_t *' with an rvalue of type 'const int8_t *'
int8_t * y_col = y + col * by;
So after adding a const to that variable, the build works perfectly.
Relevant informations:
===== SYSTEM =====
Linux debian 6.1.0-43-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.162-1 (2026-02-08) x86_64 GNU/Linux
===== OS =====
PRETTY_NAME="Debian GNU/Linux 12 (bookworm)"
NAME="Debian GNU/Linux"
===== CLANG =====
/usr/bin/clang
Debian clang version 20.1.8 (++20250708063551+0c9f909b7976-1~exp1~20250708183702.136)
Target: x86_64-pc-linux-gnu
Thread model: posix
InstalledDir: /usr/lib/llvm-20/bin
===== LLVM =====
/usr/bin/llvm-config-20
20.1.8
===== CMAKE =====
/usr/bin/cmake
cmake version 3.25.1
CMake suite maintained and supported by Kitware (kitware.com/cmake).
===== PYTHON =====
/home/user/Documentos/Codigos/bitnet/venv/bin/python3
Python 3.11.2
===== GCC (compat libs) =====
gcc (Debian 12.2.0-14+deb12u1) 12.2.0
Copyright (C) 2022 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
g++ (Debian 12.2.0-14+deb12u1) 12.2.0
Copyright (C) 2022 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
===== CLANG VERBOSE =====
Debian clang version 20.1.8 (++20250708063551+0c9f909b7976-1~exp1~20250708183702.136)
Target: x86_64-pc-linux-gnu
Thread model: posix
InstalledDir: /usr/lib/llvm-20/bin
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/12
Selected GCC installation: /usr/lib/gcc/x86_64-linux-gnu/12
Candidate multilib: .;@m64
Selected multilib: .;@m64
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at src/ggml-bitnet-mad.cpp around line 811 and reproduce the reported build with the project’s Windows or Debian configuration. Check the const-qualified pointer initialization and verify that the build completes with the relevant compiler; done means the reported compilation error is resolved without introducing new diagnostics.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- build-system
- Issue type
- Bug
- Difficulty
- 1/5
- Estimated time
- Under an hour
- Activity status
- Quiet
- Clarity
- Clearly specified
- Newbie friendliness
- 75/100