Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

not support Apple M1 ? #1410

Open
3 of 5 tasks
sydowma opened this issue Mar 13, 2021 · 14 comments
Open
3 of 5 tasks

not support Apple M1 ? #1410

sydowma opened this issue Mar 13, 2021 · 14 comments

Comments

@sydowma
Copy link

sydowma commented Mar 13, 2021

Please make sure your issue is not addressed in the FAQ.

Please include the following information:

  • 1.0.0.
  • macOS 11.2
  • infer -- javac Hello.java
  • The full output in a paste, for instance a gist.
  • If possible, a minimal example to reproduce your problem (for instance, some code where
    infer reports incorrectly, together with the way you run infer to reproduce the incorrect
    report).

output

MAC OS X: Failed pinning to cpu 0, trying 0/2
MAC OS X: Failed pinning to cpu 0, trying 0/2
MAC OS X: Failed pinning to cpu 0, trying 0/2
MAC OS X: Failed pinning to cpu 0, trying 0/2
MAC OS X: Failed pinning to cpu 0, trying 0/2
.....
@jvillard
Copy link
Contributor

jvillard commented Jun 7, 2021

We just upgraded to OCaml 4.12.0, which supports the M1's architecture. Does building from master resolve the issue?

Your logs seem to be this message from the parmap library, and indeed there seems to be an infinite loop if pinning fails for cpu 0 so maybe that library needs to add M1 support too.

@harmim
Copy link
Contributor

harmim commented Aug 18, 2021

@jvillard I ran into a problem that I think is related to Apple M1 as well.
When I am trying to build Infer (using build-infer.sh) I encounters with the following (and the build fails):

[2262/3757] Building C object projects/openmp/runtime/src/CMakeFiles/omp.dir/z_Linux_asm.S.o
FAILED: projects/openmp/runtime/src/CMakeFiles/omp.dir/z_Linux_asm.S.o 
/Library/Developer/CommandLineTools/usr/bin/clang -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -Domp_EXPORTS -I/var/folders/rn/sjvwnyfd72vbr786pf8c1msh0000gn/T/clang-setup.jVEkFI/build/projects/openmp/runtime/src -I/Users/harmim/Projects/infer/facebook-clang-plugins/clang/src/download/llvm-project/openmp/runtime/src -I/Library/Developer/CommandLineTools/SDKs/MacOSX11.sdk/usr/include/libxml2 -I/var/folders/rn/sjvwnyfd72vbr786pf8c1msh0000gn/T/clang-setup.jVEkFI/build/include -I/Users/harmim/Projects/infer/facebook-clang-plugins/clang/src/download/llvm-project/llvm/include -I/Users/harmim/Projects/infer/facebook-clang-plugins/clang/src/download/llvm-project/openmp/runtime/src/i18n -I/Users/harmim/Projects/infer/facebook-clang-plugins/clang/src/download/llvm-project/openmp/runtime/src/include -I/Users/harmim/Projects/infer/facebook-clang-plugins/clang/src/download/llvm-project/openmp/runtime/src/thirdparty/ittnotify -g -O2 -fPIC -Werror=date-time -Werror=unguarded-availability-new -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wmissing-field-initializers -pedantic -Wno-long-long -Wimplicit-fallthrough -Wcovered-switch-default -Wdelete-non-virtual-dtor -Wstring-conversion -fdiagnostics-color -Wall -Wcast-qual -Wformat-pedantic -Wimplicit-fallthrough -Wsign-compare -Wno-extra -Wno-pedantic -O3 -DNDEBUG -arch arm64 -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -fPIC   -D _GNU_SOURCE -D _REENTRANT -x assembler-with-cpp -MD -MT projects/openmp/runtime/src/CMakeFiles/omp.dir/z_Linux_asm.S.o -MF projects/openmp/runtime/src/CMakeFiles/omp.dir/z_Linux_asm.S.o.d -o projects/openmp/runtime/src/CMakeFiles/omp.dir/z_Linux_asm.S.o -c /Users/harmim/Projects/infer/facebook-clang-plugins/clang/src/download/llvm-project/openmp/runtime/src/z_Linux_asm.S
/Users/harmim/Projects/infer/facebook-clang-plugins/clang/src/download/llvm-project/openmp/runtime/src/z_Linux_asm.S:1752:5: error: unknown directive
    .size __kmp_unnamed_critical_addr,8
    ^

I have found, e.g., here briansmith/ring#1163, denoland/deno#8346 that this kind of error may be related to Apple M1.

@wAuner
Copy link

wAuner commented Oct 26, 2021

are there any plans for releasing a binary for M1?

@martintrojer
Copy link
Contributor

@harmim Can you verify if this is still a problem?

@harmim
Copy link
Contributor

harmim commented Apr 19, 2022

@martintrojer Unfortunately, I don't build Infer on Apple M1 any more. Maybe someone else can verify it?

@tsonglew
Copy link

tsonglew commented May 11, 2022

@harmim @martintrojer I installed infer on my M1 mac from source on main branch, and it works fine.

# Hello.java
class Hello {
  int test() {
    String s = null;
    return s.length();
  }
}

Output

$ infer run -- javac Hello.java

Capturing in javac mode...
Found 1 source file to analyze in /Users/tsonglew/infer-out
1/1 [################################################################################] 100% 48.59ms

Hello.java:4: error: Null Dereference
  object `s` last assigned on line 3 could be null and is dereferenced at line 4.
  2.     int test() {
  3.       String s = null;
  4. >     return s.length();
  5.     }
  6.   }


Found 1 issue
          Issue Type(ISSUED_TYPE_ID): #
  Null Dereference(NULL_DEREFERENCE): 1

@M-Whitaker
Copy link

This is also working for me with Java, any chance of a release from master so that we don't have to compile clang?

@mhashim6
Copy link

@tsonglew Can you please share the binary?

@tsonglew
Copy link

@tsonglew Can you please share the binary?

infer.zip

here it is

@mhashim6
Copy link

mhashim6 commented Nov 7, 2022

@tsonglew, Thanks! I ended up building from source.

@mhashim6
Copy link

mhashim6 commented Nov 8, 2022

If anyone is interested, we'll be maintaining current and upcoming infer binaries for Apple Silicon on Instabug/infer.

@pastel001
Copy link

If anyone is interested, we'll be maintaining current and upcoming infer binaries for Apple Silicon on Instabug/infer.

@mhashim6
Hello,I use this release infer-osx-v1.1.0.tar.xz,bug it return an error
dyld[25730]: Library not loaded: @rpath/libgmp.10.dylibem/RenderNodes/LOTStrokeRenderer.m Referenced from: <44DF3598-DAC5-3E2D-B840-4E731D6D4FF3> /opt/infer-osx-v1.1.0/lib/wrappers/clang Reason: tried: '/opt/infer-osx-v1.1.0/lib/libso/libgmp.10.dylib' (no such file), '/opt/infer-osx-v1.1.0/lib/libso/libgmp.10.dylib' (no such file), '/usr/local/lib/libgmp.10.dylib' (no such file), '/usr/lib/libgmp.10.dylib' (no such file, not in dyld cache)bgmp.10.dylib' (no such file)
I alse build infer with this repository main branch,but alse get error
Error message: clang-15: error: unknown argument: '-ivfsstatcache' Infer needs a working compilation command to run.
Is there any idea for me? Thank you.

@felixqiao123
Copy link

@pastel001 Have you resolve the "libgmp.10" problem?

@skylinchen
Copy link

If anyone is interested, we'll be maintaining current and upcoming infer binaries for Apple Silicon on Instabug/infer.

@mhashim6 Hello,I use this release infer-osx-v1.1.0.tar.xz,bug it return an error dyld[25730]: Library not loaded: @rpath/libgmp.10.dylibem/RenderNodes/LOTStrokeRenderer.m Referenced from: <44DF3598-DAC5-3E2D-B840-4E731D6D4FF3> /opt/infer-osx-v1.1.0/lib/wrappers/clang Reason: tried: '/opt/infer-osx-v1.1.0/lib/libso/libgmp.10.dylib' (no such file), '/opt/infer-osx-v1.1.0/lib/libso/libgmp.10.dylib' (no such file), '/usr/local/lib/libgmp.10.dylib' (no such file), '/usr/lib/libgmp.10.dylib' (no such file, not in dyld cache)bgmp.10.dylib' (no such file) I alse build infer with this repository main branch,but alse get error Error message: clang-15: error: unknown argument: '-ivfsstatcache' Infer needs a working compilation command to run. Is there any idea for me? Thank you.

Is it solved?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests