AngoraFuzzer / Angora

Angora is a mutation-based fuzzer. The main goal of Angora is to increase branch coverage by solving path constraints without symbolic execution.
Apache License 2.0
917 stars 166 forks source link

build docker image problems #11

Closed hexcoder- closed 5 years ago

hexcoder- commented 5 years ago

Hi, I had some quirks with building the docker image under Ubuntu 16.04 and 18.10. In build/docker_build.sh

  1. sh build/build.sh resulted in an abort with unknown option pipefail. I changed sh to bash to explicitly request bash -> bash build/build.sh.
  2. for sudo pip install wllvm sudo was missing. I added it at the end of line 7 -> apt-get install -y git build-essential wget zlib1g-dev golang-go python-pip python-dev build-essential sudo
  3. installing wllvm failed:
    
    Collecting wllvm
    Downloading https://files.pythonhosted.org/packages/86/93/a7d9771e7f363ae930fa2d77d91b3a2536d93ed39275b95f876823bc3c10/wllvm-1.2.2.tar.gz
    Building wheels for collected packages: wllvm
    Running setup.py bdist_wheel for wllvm: started
    Running setup.py bdist_wheel for wllvm: finished with status 'done'
    Stored in directory: /root/.cache/pip/wheels/e0/1b/e1/32cc3b339de92a006960c1b5aeb25c641c117d71790d220e7d
    Successfully built wllvm
    Installing collected packages: wllvm
    Exception:
    Traceback (most recent call last):
    File "/usr/lib/python2.7/dist-packages/pip/basecommand.py", line 209, in main
    status = self.run(options, args)
    File "/usr/lib/python2.7/dist-packages/pip/commands/install.py", line 335, in run
    prefix=options.prefix_path,
    File "/usr/lib/python2.7/dist-packages/pip/req/req_set.py", line 732, in install
    **kwargs
    File "/usr/lib/python2.7/dist-packages/pip/req/req_install.py", line 837, in install
    self.move_wheel_files(self.source_dir, root=root, prefix=prefix)
    File "/usr/lib/python2.7/dist-packages/pip/req/req_install.py", line 1039, in move_wheel_files
    isolated=self.isolated,
    File "/usr/lib/python2.7/dist-packages/pip/wheel.py", line 491, in move_wheel_files
    maker.make_multiple(['%s = %s' % kv for kv in console.items()])
    File "/usr/share/python-wheels/distlib-0.2.2-py2.py3-none-any.whl/distlib/scripts.py", line 383, in make_multiple
    filenames.extend(self.make(specification, options))
    File "/usr/share/python-wheels/distlib-0.2.2-py2.py3-none-any.whl/distlib/scripts.py", line 370, in make
    self._copy_script(specification, filenames)
    File "/usr/share/python-wheels/distlib-0.2.2-py2.py3-none-any.whl/distlib/scripts.py", line 280, in _copy_script
    script = os.path.join(self.source_dir, convert_path(script))
    File "/usr/lib/python2.7/posixpath.py", line 70, in join
    elif path == '' or path.endswith('/'):
    AttributeError: 'NoneType' object has no attribute 'endswith'
    You are using pip version 8.1.1, however version 18.1 is available.
    You should consider upgrading via the 'pip install --upgrade pip' command.
    The command '/bin/sh -c ./build/docker_build.sh' returned a non-zero code: 2```

I could not solve the last problem. Any hints? Thanks.

spinpx commented 5 years ago

try pip install --upgrade pip==9.0.3. I committed a new version now.

hexcoder- commented 5 years ago

Hi, inserting sudo pip install --upgrade pip before sudo pip install wllvm did the trick with the third problem, leading to

  1. a problem with gllvm:
    
    Successfully installed wllvm-1.2.2
    + go get github.com/SRI-CSL/gllvm/cmd/...
    package github.com/SRI-CSL/gllvm/cmd/...: cannot download, $GOPATH not set. For more details see: go help gopath```
spinpx commented 5 years ago

I fix this issue in the newest version, too. see https://github.com/AngoraFuzzer/Angora/commit/6160d1b0835500ee9c2ef3c42e17ff7e31541486

hexcoder- commented 5 years ago

Thanks! BTW I used docker build --force-rm -t angora . in order to avoid collecting temporary garbage from docker for failed image builds (It filled my disk real fast).

After updating the only problem left now was the first item (eg change sh to bash). Then building succeeded. Thanks for quick fixing this!

spinpx commented 5 years ago

Thanks. I fix it. https://github.com/AngoraFuzzer/Angora/commit/420bbaee66e4a67537037b3cec6fc51be3a46db0

hexcoder- commented 5 years ago

Thanks, docker build tested successfully. I close this issue.