facebook / facebook/infer

how to use infer for cross compile

Offen
#946 8 Kommentare 3 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
integration pinned question
Vorherrschende Sprache
OCaml
Sterne
15.7k
Forks
2.1k
Ø Merge
19 Std. 36 Min.
Gemergte PRs (30 T.)
13

Beschreibung

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. }
```

Beitragsleitfaden

Beitragsleitfaden öffnen

Bewertung

Dieses Issue wurde noch nicht bewertet.

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.