aflpin icon indicating copy to clipboard operation
aflpin copied to clipboard

Make fails with latest version of Pin

Open Machiry opened this issue 9 years ago • 10 comments

PIN_ROOT=/home/machiry/tools/fuzzorama/pintool make TARGET=ia32 obj-ia32/aflpin.so g++ -DBIGARRAY_MULTIPLIER=1 -Wall -Werror -Wno-unknown-pragmas -std=c++11 -fno-stack-protector -DTARGET_IA32 -DHOST_IA32 -DTARGET_LINUX -I/home/machiry/tools/fuzzorama/pintool/source/include/pin -I/home/machiry/tools/fuzzorama/pintool/source/include/pin/gen -I/home/machiry/tools/fuzzorama/pintool/extras/components/include -I/home/machiry/tools/fuzzorama/pintool/extras/xed2-ia32/include -I/home/machiry/tools/fuzzorama/pintool/source/tools/InstLib -O3 -fomit-frame-pointer -fno-strict-aliasing -m32 -c -o obj-ia32/aflpin.o aflpin.cpp In file included from /home/machiry/tools/fuzzorama/pintool/source/include/pin/pin.H:43:0, from aflpin.cpp:1: /home/machiry/tools/fuzzorama/pintool/source/include/pin/level_base.PLH:83:29: fatal error: xed-iclass-enum.h: No such file or directory #include "xed-iclass-enum.h" ^ compilation terminated. make: *** [obj-ia32/aflpin.o] Error 1

Machiry avatar Jan 26 '16 08:01 Machiry

Hello, thanks for the bug.

It has been a long time since I worked on this because QEMU mode for AFL is shockingly faster (https://github.com/mirrorer/afl/tree/master/qemu_mode). I can pull down the most recent codebase and take a peak if QEMU mode does not work for you.

mothran avatar Jan 28 '16 04:01 mothran

I have some Pin Instrumentation I need to run as part of AFL. If aflpin works that is gold for me, else I need to modify qemu to handle my instrumentation :(

Machiry avatar Jan 28 '16 08:01 Machiry

Fair, I will try and take a look soon. Check around on the release notes and try searching for that include, it might have just moved paths, or my -I flags could be wrong with the newer version of pin.

mothran avatar Jan 28 '16 08:01 mothran

i'm also facing the same situation. below is attached screenshot please resolve this & also can you mention to which version of pin is this aflpin stable i mean working? image

abhishiktvv avatar Sep 23 '16 11:09 abhishiktvv

What version of GCC are you using? Its warning that your version is less than 3.4 which is ancient. You will need some features of C++11, so at least get 4.7 to work effectively. Also, I still strongly recommend using the qemu mode for AFL instead of this tool, its faster and more supported.

mothran avatar Sep 23 '16 16:09 mothran

i'm new to this tool could you please help me out regarding building the tool . i installed gcc 4.9 on ubuntu 14.04.1 still getting the same , could you please say me whether i think i'm running it improperly. image

abhishiktvv avatar Oct 06 '16 06:10 abhishiktvv

Hi Everyone

I am also getting same error. I am trying to compile Sniper simulator and gettring exactly same error as you indicated previous post.

: fatal error: xed-iclass-enum.h: No such file or directory compilation terminated.

Do you have any idea about it ?

Thank you so much for your help in advance.

Best

ozturkosu avatar Jun 05 '17 22:06 ozturkosu

i have build it with old version of pin not the new one , rather i suggest use afl-qemu mode instead of pin which is more fast.

On Tue, Jun 6, 2017 at 3:41 AM, Muhammed Emin Öztürk < [email protected]> wrote:

Hi Everyone

I am also getting same error. I am trying to compile Sniper simulator and gettring exactly same error as you indicated previous post.

: fatal error: xed-iclass-enum.h: No such file or directory compilation terminated.

Do you have any idea about it ?

Thank you so much for your help in advance.

Best

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/mothran/aflpin/issues/1#issuecomment-306325101, or mute the thread https://github.com/notifications/unsubscribe-auth/AL2vFkwZdYSNhZpfHOa6DT6J3HOE1rvFks5sBH0PgaJpZM4HMTcl .

abhishiktvv avatar Jun 06 '17 05:06 abhishiktvv

I found that you need PIN 2.13 to make aflpin work, higher version cannot compile or run.

This is pinplay 1.2, which includes full pin files. https://software.intel.com/sites/default/files/managed/18/d9/pinplay-1.2-pin-2.13-62732-gcc.4.4.7-linux.tar.gz

And here is my Dockerfile, hopefully useful for further reproducing and researching. https://hub.docker.com/r/zjuchenyuan/aflpin/dockerfile

FROM ubuntu:16.04

RUN apt update && apt-get install -y vim nano htop autoconf automake build-essential cmake git sudo software-properties-common gperf libselinux1-dev  bison texinfo flex zlib1g-dev libexpat1-dev libmpg123-dev wget curl

RUN apt update && apt install -y  libdwarf-dev libelf-dev gcc-4.8 g++-4.8 &&\
    update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.8 10 &&\
    update-alternatives --install /usr/bin/g++ g++ /usr/bin/gcc-4.8 10 &&\
    wget https://software.intel.com/sites/default/files/managed/18/d9/pinplay-1.2-pin-2.13-62732-gcc.4.4.7-linux.tar.gz &&\
    tar xf pinplay-1.2-pin-2.13-62732-gcc.4.4.7-linux.tar.gz

ENV PIN_ROOT=/pinplay-1.2-pin-2.13-62732-gcc.4.4.7-linux \
    LD_LIBRARY_PATH=/pinplay-1.2-pin-2.13-62732-gcc.4.4.7-linux/intel64/runtime

RUN git clone https://github.com/mothran/aflpin &&\
    cd aflpin && mkdir obj-intel64 &&\
    sed -i 's#-fdiagnostics-color=auto##' Config/makefile.unix.config &&\
    make obj-intel64/aflpin.so

RUN git clone https://github.com/mirrorer/afl &&\
    cd afl && git checkout df7c3f63d7 &&\
    sed -i 's/FATAL("No instrumentation detected");/SAYF("This is as expected for AFLPIN\\n");/' afl-fuzz.c &&\
    make && make install

This includes pin-2.13, gcc-4.8, removing unsupported -fdiagnostics-color=auto, afl version 1.15b

zjuchenyuan avatar Sep 05 '19 10:09 zjuchenyuan

i have build it with old version of pin not the new one , rather i suggest use afl-qemu mode instead of pin which is more fast. On Tue, Jun 6, 2017 at 3:41 AM, Muhammed Emin Öztürk < @.***> wrote: Hi Everyone I am also getting same error. I am trying to compile Sniper simulator and gettring exactly same error as you indicated previous post. : fatal error: xed-iclass-enum.h: No such file or directory compilation terminated. Do you have any idea about it ? Thank you so much for your help in advance. Best — You are receiving this because you commented. Reply to this email directly, view it on GitHub <#1 (comment)>, or mute the thread https://github.com/notifications/unsubscribe-auth/AL2vFkwZdYSNhZpfHOa6DT6J3HOE1rvFks5sBH0PgaJpZM4HMTcl .

Can you provide the link of that version?

satanu01 avatar Feb 10 '22 09:02 satanu01