facebook / facebook/infer

how to use infer for cross compile

Open
#946 8 comments 3 reactions 0 assignees View on GitHub
integration pinned question
Dominant language
OCaml
Stars
15.7k
Forks
2.1k
Avg merge
19h 36m
Merged PRs (30d)
13

Description

with https://github.com/facebook/infer/releases/download/v0.15.0/infer-linux64-v0.15.0.tar.xz,it seem can not work for cross compile?

use aarch64-linux-gnu-gcc :

```console
$ infer --keep-going -- aarch64-linux-gnu-gcc -g main.c -o abc
Internal Error: Unsupported build command aarch64-linux-gnu-gcc
Error backtrace:
Raised at file "base/Die.ml" (inlined), line 25, characters 6-36
Called from file "base/Die.ml" (inlined), line 36, characters 44-66
Called from file "format.ml", line 1364, characters 4-36
Called from file "integration/Driver.ml", line 468, characters 12-68
Called from file "camlinternalLazy.ml", line 27, characters 17-27
Re-raised at file "camlinternalLazy.ml", line 34, characters 4-11
Called from file "infer.ml" (inlined), line 34, characters 24-64
Called from file "infer.ml", line 116, characters 2-10
```

use host gcc:
```
$ infer --keep-going -- gcc -g main.c -o abc
Capturing in make/cc mode...
Found 1 source file to analyze in /home/liujian/tmp/infer-out
Starting analysis...

legend:
"F" analyzing a file
"." analyzing a procedure

F.
Found 1 issue

main.c:17: error: RESOURCE_LEAK
resource acquired to `fd` by call to `open()` at line 16, column 7 is not released after line 17, column 2.
15. int fd;
16. fd = open("aa",O_RDONLY);
17. > printf("test..fd:%d.\n", fd);
18. return 0;
19. }
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.