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

can't compile: afl-llvm-pass.so: No such file or directory #2

Open
radegand opened this issue Sep 16, 2016 · 4 comments
Open

can't compile: afl-llvm-pass.so: No such file or directory #2

radegand opened this issue Sep 16, 2016 · 4 comments

Comments

@radegand
Copy link

radegand commented Sep 16, 2016

Hi,
I'm having issues trying to compile it with Android 7.0 source. The AOSP itself compiles fine. I have llvm-3.8 and clang-3.8 installed. It also doesn't seem to matter which target I choose using the 'lunch' command.
I'm getting the following error:

PLATFORM_VERSION_CODENAME=REL
PLATFORM_VERSION=7.0
TARGET_PRODUCT=aosp_arm64
TARGET_BUILD_VARIANT=eng
TARGET_BUILD_TYPE=release
TARGET_BUILD_APPS=
TARGET_ARCH=arm64
TARGET_ARCH_VARIANT=armv8-a
TARGET_CPU_VARIANT=generic
TARGET_2ND_ARCH=arm
TARGET_2ND_ARCH_VARIANT=armv7-a-neon
TARGET_2ND_CPU_VARIANT=cortex-a15
HOST_ARCH=x86_64
HOST_2ND_ARCH=x86
HOST_OS=linux
HOST_OS_EXTRA=Linux-4.7.2-hardened-x86_64-Intel-R-_Core-TM-i7-5600U_CPU@_2.60GHz-with-gentoo-2.2
HOST_CROSS_OS=windows
HOST_CROSS_ARCH=x86
HOST_CROSS_2ND_ARCH=x86_64
HOST_BUILD_TYPE=release
BUILD_ID=NRD90S

OUT_DIR=out

Generating afl-llvm-pass.so
/usr/bin/x86_64-pc-linux-gnu-ld: cannot open output file out/host/linux-x86/afl/afl-llvm-pass.so: No such file or directory
x86_64-pc-linux-gnu-clang-3.8: error: linker command failed with exit code 1 (use -v to see invocation)
Starting build with ninja
ninja: Entering directory `.'
ninja: error: 'out/host/linux-x86/obj/SHARED_LIBRARIES/libc++_intermediates/export_includes', needed by 'out/host/linux-x86/obj/EXECUTABLES/afl-gcc_intermediates/import_includes', missing and no known rule to make it
build/core/ninja.mk:148: recipe for target 'ninja_wrapper' failed
make: *** [ninja_wrapper] Error 1

make failed to build some targets (21 seconds)

This is what it's trying to execute:
clang++-3.8 llvm-config --cxxflags -fno-rtti -fpic -O3 -funroll-loops -Wall -g -Wno-variadic-macros -Wno-unknown-warning-option -shared android-afl/llvm_mode/afl-llvm-pass.so.cc -o out/host/linux-x86/afl/afl-llvm-pass.so llvm-config --ldflags

I could get the afl-llvm-pass.so to build by amending the paths and running the following manually from inside the android-afl folder:
clang++-3.8 llvm-config --cxxflags -fno-rtti -fpic -O3 -funroll-loops -Wall -g -Wno-variadic-macros -Wno-unknown-warning-option -shared llvm_mode/afl-llvm-pass.so.cc -o ../out/host/linux-x86/afl/afl-llvm-pass.so llvm-config --ldflags

Nevertheless, it fails next with this:
Starting build with ninja
ninja: Entering directory `.'
ninja: error: 'out/host/linux-x86/obj/SHARED_LIBRARIES/libc++_intermediates/export_includes', needed by 'out/host/linux-x86/obj/EXECUTABLES/afl-gcc_intermediates/import_includes', missing and no known rule to make it
build/core/ninja.mk:148: recipe for target 'ninja_wrapper' failed
make: *** [ninja_wrapper] Error 1

As a side note, on gentoo there's no 'llvm-config-3.8' so I've amended the Android.mk accordingly:
LLVM_CONFIG := llvm-config

Any help will be appreciated.
Thanks,
radegand

@ele7enxxh
Copy link
Owner

Thanks for your issue, I will look into this.

@ele7enxxh
Copy link
Owner

I compiled it with Android 7.0 source successful on Ubuntu 14.04 64bit OS.

@radegand
Copy link
Author

Thanks for checking. I'll try again using a Ubuntu VM.

@llllIIIllll
Copy link

beautiful

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

3 participants