Comments (4)
I tried building the binary but for some reason i can't get past building for Regex
from mariana-trench.
CRITICAL Unexpected error:
Traceback (most recent call last):
File "/Users/ba1yu2/.venvs/mariana-trench/lib/python3.9/site-packages/mariana_trench/shim/shim.py", line 583, in main
output = subprocess.run(command)
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/subprocess.py", line 505, in run
with Popen(*popenargs, **kwargs) as process:
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/subprocess.py", line 951, in init
self._execute_child(args, executable, preexec_fn, close_fds,
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/subprocess.py", line 1821, in _execute_child
raise child_exception_type(errno_num, err_msg, err_filename)
OSError: [Errno 8] Exec format error: '/Users/ba1yu2/.venvs/mariana-trench/bin/mariana-trench-binary'
from mariana-trench.
Hi @wyu0hop, thanks for reaching out!
Mac m1 is not currently supported with the pip install (assuming that is what you have set up).
A workaround for now would be to build from source: https://mariana-tren.ch/docs/contribution#building-from-source
from mariana-trench.
Hey Mariana Trench team, hope you all are doing well :)
It looks like some workaround are needed for building from source on M1 Mac. Sharing here in case others ran into similar issues:
- For building Redex from source (https://mariana-tren.ch/docs/contribution/#building-redex), one of its required dependency, zlib, is keg-only for Homebrew on Mac, and therefore the path to the static/shared library needed to be passed in explicitly for
cmake
to work:
cmake -DCMAKE_INSTALL_PREFIX="$MT_INSTALL_DIRECTORY" -DZLIB_STATIC_LIB=/opt/homebrew/opt/zlib/lib/libz.a -DZLIB_SHARED_LIB=/opt/homebrew/opt/zlib/lib/libz.1.2.12.dylib ..
- Mariana Trench requires the fmt library 7.1.2. However it looks like the latest version on Homebrew is 9.1.0 and version 9 introduced additional requirements on formatting user defined types (https://fmt.dev/latest/api.html#udt), which will cause a build error for Mariana Trench's fmt usage in
Log.h
. I had to build fmt version 7.1.2 from source (https://github.com/fmtlib/fmt/tree/7.1.2), then passing in the library path for cmake to work. - Small nit: in Mariana Trench's
CMakeLists.txt
, it searches for$ANDROID_SDK
but only$ANDROID_DX
is used by cmake and should be set. https://github.com/facebook/mariana-trench/blob/main/CMakeLists.txt#L177
Based on 2 and 3, the cmake
command for Mariana Trench that worked for me:
cmake -DREDEX_ROOT="$MT_INSTALL_DIRECTORY" -DCMAKE_INSTALL_PREFIX="$MT_INSTALL_DIRECTORY" -DANDROID_DX=/path/to/sdk/build-tools/33.0.0/d8 -Dfmt_DIR=/path/to/fmt/build ..
from mariana-trench.
Related Issues (20)
- [Question] Difference between attach_to_sources and features keys. HOT 4
- Does not compile with latest fmt 9.1 due to lack of formatter for types HOT 1
- How to check argument value with regex? HOT 1
- The latest version compiles, cannot be used, and various parameters are missing. MarianaTrench mariana_trench_error: the option '--output-directory' is required but missing???
- Example code does not work HOT 3
- Taint not flowing into a sink in Runnable
- Build from source fails. HOT 1
- Stuck creating generators: Found 0 issues
- Old macOS 10.15.7 failed to execute analysis HOT 4
- Tainted data not flowing through custom propagations HOT 14
- "No such file " log in sapp HOT 3
- Request for Features Description HOT 3
- Evaluate Profile-Guided Optimization (PGO) and LLVM BOLT HOT 4
- Release app with proguard HOT 1
- Error building mariana-trench HOT 1
- verifying propagations applied to the functions. HOT 2
- ImportError when using sapp HOT 3
- Default model generators missing from PyPI release HOT 2
- Flow analysis in a method.
- Sanitizer does not work, or something wrong
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mariana-trench.