Skip to content

Commit 530e9ff

Browse files
authored
update local-development.md (#4032)
1 parent 961169b commit 530e9ff

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed

docs/dev/local-development.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -185,3 +185,26 @@ just flamegraph --bin restate-server
185185
This command will produce a `flamegraph.svg` in the current working directory when the process is stopped.
186186

187187
See the [flamegraph documentation](https://github.com/flamegraph-rs/flamegraph#usage) for more details.
188+
189+
## Troubleshooting
190+
On many systems `cargo build` invokes `gcc` by default. Some `gcc` versions fail to compile certain dependencies, leading to errors like:
191+
```
192+
.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/krb5-src-0.3.4/krb5/src/lib/rpc/auth_none.c: In function 'authnone_wrap':
193+
/home/slinkydeveloper/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/krb5-src-0.3.4/krb5/src/lib/rpc/auth_none.c:146:18: error: too many arguments to function 'xfunc'; expected 0, have 2
194+
146 | return ((*xfunc)(xdrs, xwhere));
195+
| ~^~~~~~~ ~~~~
196+
make[1]: *** [Makefile:500: auth_none.o] Error 1
197+
make: *** [Makefile:1005: all-recurse] Error 1
198+
```
199+
If you see this type of failure, rebuild with `clang`:
200+
```
201+
CC=clang cargo build
202+
```
203+
When that resolves the issue, you can make `clang` the default compiler by adding the following to `~/.cargo/config.toml`:
204+
```
205+
# cat ~/.cargo/config.toml
206+
207+
[env]
208+
CC = "clang"
209+
CXX = "clang++"
210+
```

0 commit comments

Comments
 (0)