github / github/codeql-cli-binaries

compile AOSP with CodeQL

Open
#47 16 comments 0 reactions 0 assignees View on GitHub
CLI
Dominant language
No language data
Stars
1k
Forks
184
PR merge metrics
No merged PRs in 30d

Description

Hi
I'm trying to run CodeQL on AOSP with this command:
`codeql database create new-database --language=java --command='make services'`
but i'm getting this error while building:
`[build] /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: out/soong/.intermediates/external/libcxx/libc++_static/darwin_x86_64_static/libc++_static.a(cxa_unexpected.o) has no symbols
[build] /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: out/soong/.intermediates/external/libcxx/libc++_static/darwin_x86_64_static/libc++_static.a(typeinfo.o) has no symbols
[build] 17:09:55 Disallowed PATH tool "otool" used: []string{"otool", "-l", "/Volumes/v0/AOSP/new-database/working/copy-root/000001F7/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld.semmle.00013D12"}
[build] 17:09:55 See https://android.googlesource.com/platform/build/+/master/Changes.md#PATH_Tools for more information.
[build] 17:09:55 Process tree:
[build] 17:09:55 → working/copy-root/000001F7/Volumes/v0/AOSP/out/soong_ui /Volumes/v0/AOSP/out/soong_ui -j1 --make-mode
[build] 17:09:55 → prebuilts/build-tools/darwin-x86/bin/ninja -d keepdepfile --frontend_file out/.ninja_fifo services -j 1 -f out/combined-aosp_sargo.ninja -w dupbuild=err -w missingdepfile=err
[build] 17:09:55 → prebuilts/clang/host/darwin-x86/clang-r353983c/bin/clang++.real @out/soong/.intermediates/external/libcxx/libc++/darwin_x86_64_shared/libc++.dylib.rsp -force_load out/soong/.intermediates/external/libcxx/libc++_static/darwin_x86_64_static/libc++_static.a -o out/soong/.intermediates/external/libcxx/libc++/darwin_x86_64_shared/libc++.dylib -dynamiclib -single_module -install_name @rpath/libc++.dylib -target x86_64-apple-darwin -B/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk -Wl,-syslibroot,/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk -mmacosx-version-min=10.8 -m64 -ldl -lpthread -lm -nodefaultlibs -Wl,-undefined,dynamic_lookup -Wl,-rpath,@loader_path/../lib64 -Wl,-rpath,@loader_path/lib64 -nodefaultlibs -lc -lSystem -Wl,-unexported_symbols_list,external/libcxx/lib/libc++unexp.exp -Wl,-force_symbols_not_weak_list,external/libcxx/lib/notweak.exp -Wl,-force_symbols_weak_list,external/libcxx/lib/weak.exp
[build] 17:09:55 → /usr/bin/python /Users/user/codeql-home/codeql/tools/osx64/relocator.py /Users/user/codeql-home/codeql/tools/osx64/unsign /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld /Volumes/v0/AOSP/new-database/working/copy-root/000001F7/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld.semmle.00013D12 /Volumes/v0/AOSP/new-database/working/copy-root/000001F7/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld
[build] 17:09:55 → otool -l /Volumes/v0/AOSP/new-database/working/copy-root/000001F7/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld.semmle.00013D12
[build] [ 27% 878/3224] //external/libcxx:libc++ link libc++.dylib [darwin]
[build] FAILED: out/soong/.intermediates/external/libcxx/libc++/darwin_x86_64_shared/libc++.dylib
[build] prebuilts/clang/host/darwin-x86/clang-r353983c/bin/clang++ @out/soong/.intermediates/external/libcxx/libc++/darwin_x86_64_shared/libc++.dylib.rsp -force_load out/soong/.intermediates/external/libcxx/libc++_static/darwin_x86_64_static/libc++_static.a -o out/soong/.intermediates/external/libcxx/libc++/darwin_x86_64_shared/libc++.dylib -dynamiclib -single_module -install_name @rpath/libc++.dylib -target x86_64-apple-darwin -B/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk -Wl,-syslibroot,/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk -mmacosx-version-min=10.8 -m64 -ldl -lpthread -lm -nodefaultlibs -Wl,-undefined,dynamic_lookup -Wl,-rpath,@loader_path/../lib64 -Wl,-rpath,@loader_path/lib64 -nodefaultlibs -lc -lSystem -Wl,-unexported_symbols_list,external/libcxx/lib/libc++unexp.exp -Wl,-force_symbols_not_weak_list,external/libcxx/lib/notweak.exp -Wl,-force_symbols_weak_list,external/libcxx/lib/weak.exp
[build] dyld: Library not loaded: @rpath/libtapi.dylib
[build] Referenced from: /Volumes/v0/AOSP/new-database/working/copy-root/000001F7/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld
[build] Reason: image not found
[build] clang-9: error: unable to execute command: Abort trap: 6
[build] clang-9: error: linker command failed due to signal (use -v to see invocation)
[build] ninja: build stopped: subcommand failed.
[build] 17:09:55 ninja failed with: exit status 1
[build-err] make: *** [run_soong_ui] Error 1
[ERROR] Spawned process exited abnormally (code 2; tried to run: [/Users/user/codeql-home/codeql/tools/osx64/preload_tracer, make, services])
A fatal error occurred: Exit status 2 from command: [make, services]`

Thanks for your help in advance

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the reported `codeql database create new-database --language=java --command='make services'` command on the AOSP build described in the issue. Inspect the `otool` PATH restriction and the missing `libtapi.dylib` failure; done means `make services` completes and the CodeQL database is created successfully.

Written by the indexing model from the issue text.

Assessment

Tech stack
android, java, macos
Domain
build-system, devtools
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.