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

[question]how can i rebuild the libclang_rt.asan-*.so library found in the NDK? #1432

Closed
dentiscalprum opened this issue Jan 20, 2021 · 5 comments
Labels

Comments

@dentiscalprum
Copy link

dentiscalprum commented Jan 20, 2021

https://android.googlesource.com/toolchain/llvm_android/+/master/README.md
I used method in this website and find in out/install

❯ find ./ -name "*asan*"
.//darwin-x86/clang-dev/lib64/clang/12.0.1/include/sanitizer/asan_interface.h
.//darwin-x86/clang-dev/lib64/clang/12.0.1/include/sanitizer/hwasan_interface.h
.//darwin-x86/clang-dev/lib64/clang/12.0.1/lib/darwin/libclang_rt.asan_iossim_dynamic.dylib
.//darwin-x86/clang-dev/lib64/clang/12.0.1/lib/darwin/libclang_rt.asan_osx_dynamic.dylib
.//darwin-x86/clang-dev/lib64/clang/12.0.1/lib/darwin/libclang_rt.asan_ios_dynamic.dylib
.//darwin-x86/clang-dev/lib64/clang/12.0.1/share/asan_blacklist.txt

I did't find  libclang_rt.asan-*.so, did i fail to build?
(I want to modify some function in addressSanitizer)
thx!!!

If i build successfully, what should i do to use these function which i modify?
for example, move some file to ndk?
@DanAlbert
Copy link
Member

Can't be built from a Mac. Need to use Linux.

@dentiscalprum
Copy link
Author

Can't be built from a Mac. Need to use Linux.

thx

@dentiscalprum
Copy link
Author

Can't be built from a Mac. Need to use Linux.

I build toolchain in linux, and i encountered this problem, how should i do?

config.status: creating Examples/test-suite/errors/Makefile
config.status: creating Examples/test-suite/csharp/Makefile
config.status: creating Examples/test-suite/d/Makefile
config.status: creating Examples/test-suite/guile/Makefile
config.status: creating Examples/test-suite/java/Makefile
config.status: creating Examples/test-suite/javascript/Makefile
config.status: creating Examples/test-suite/mzscheme/Makefile
config.status: creating Examples/test-suite/ocaml/Makefile
config.status: creating Examples/test-suite/octave/Makefile
config.status: creating Examples/test-suite/perl5/Makefile
config.status: creating Examples/test-suite/php/Makefile
config.status: creating Examples/test-suite/python/Makefile
config.status: creating Examples/test-suite/ruby/Makefile
config.status: creating Examples/test-suite/scilab/Makefile
config.status: creating Examples/test-suite/tcl/Makefile
config.status: creating Examples/test-suite/lua/Makefile
config.status: creating Examples/test-suite/r/Makefile
config.status: creating Examples/test-suite/go/Makefile
config.status: creating Source/Makefile
config.status: creating Tools/javascript/Makefile
config.status: creating preinst-swig
config.status: creating CCache/ccache_swig_config.h
config.status: creating Source/Include/swigconfig.h
config.status: executing depfiles commands
config.status: error: in `/root/opt/llvm-toolchain/out/lib/swig-linux':
config.status: error: Something went wrong bootstrapping makefile fragments
    for automatic dependency tracking.  Try re-running configure with the
    '--disable-dependency-tracking' option to at least be able to build
    the package (albeit without support for automatic dependency tracking).
See `config.log' for more details
Traceback (most recent call last):
  File "/root/opt/llvm-toolchain/toolchain/llvm_android/do_build.py", line 710, in <module>
    main()
  File "/root/opt/llvm-toolchain/toolchain/llvm_android/do_build.py", line 633, in main
    swig_builder.build()
  File "/root/opt/llvm-toolchain/toolchain/llvm_android/builder_registry.py", line 67, in wrapper
    function(builder, *args, **kwargs)
  File "/root/opt/llvm-toolchain/toolchain/llvm_android/base_builders.py", line 89, in build
    self._build_config()
  File "/root/opt/llvm-toolchain/toolchain/llvm_android/base_builders.py", line 214, in _build_config
    utils.check_call(config_cmd, cwd=self.output_dir, env=env)
  File "/root/opt/llvm-toolchain/toolchain/llvm_android/utils.py", line 52, in check_call
    return subprocess_run(cmd, *args, **kwargs, check=True)
  File "/root/opt/llvm-toolchain/toolchain/llvm_android/utils.py", line 42, in subprocess_run
    return subprocess.run(cmd, *args, **kwargs, text=True)
  File "/root/opt/llvm-toolchain/prebuilts/python/linux-x86/lib/python3.8/subprocess.py", line 512, in run
    raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '[PosixPath('/root/opt/llvm-toolchain/external/swig/configure'), '--prefix=/root/opt/llvm-toolchain/out/lib/swig-linux-install', '--without-pcre']' returned non-zero exit status 1.
Traceback (most recent call last):
  File "toolchain/llvm_android/build.py", line 21, in <module>
    py3_utils.run_with_py3('do_build.py')
  File "/root/opt/llvm-toolchain/toolchain/llvm_android/py3_utils.py", line 36, in run_with_py3
    [python_bin, os.path.join(THIS_DIR, script_name)] + sys.argv[1:])
  File "/usr/lib/python2.7/subprocess.py", line 190, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['/root/opt/llvm-toolchain/prebuilts/python/linux-x86/bin/python3', '/root/opt/llvm-toolchain/toolchain/llvm_android/do_build.py', '--no-build', 'windows']' returned non-zero exit status 1

@DanAlbert
Copy link
Member

Not sure. Never seen that (I very rarely ever run that script). @stephenhines or @pirama-arumuga-nainar might be able to help.

@hhb
Copy link
Collaborator

hhb commented Jan 25, 2021

Something went wrong when building swig (one dependency for lldb). Since you don't really need lldb, you can add --no-build=lldb to command line to skip it.

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

No branches or pull requests

3 participants