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

Error when installing latest macs2 #91

Open
dbrg77 opened this issue Aug 4, 2015 · 4 comments
Open

Error when installing latest macs2 #91

dbrg77 opened this issue Aug 4, 2015 · 4 comments

Comments

@dbrg77
Copy link

dbrg77 commented Aug 4, 2015

Hi Tao,

I currently have macs2 20140616 installed, and I noticed that there is a new version 20150731.

So I downloaded the source code from pypi, and tried to install it. However, I got the following error:

$ python setup.py install
running install
running bdist_egg
running egg_info
writing requirements to MACS2.egg-info/requires.txt
writing MACS2.egg-info/PKG-INFO
writing top-level names to MACS2.egg-info/top_level.txt
writing dependency_links to MACS2.egg-info/dependency_links.txt
writing requirements to MACS2.egg-info/requires.txt
writing MACS2.egg-info/PKG-INFO
writing top-level names to MACS2.egg-info/top_level.txt
writing dependency_links to MACS2.egg-info/dependency_links.txt
reading manifest file 'MACS2.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
warning: no files found matching 'MANIFEST'
no previously-included directories found matching 'test'
writing manifest file 'MACS2.egg-info/SOURCES.txt'
installing library code to build/bdist.linux-x86_64/egg
running install_lib
running build_py
running build_ext
building 'MACS2.Prob' extension
gcc -pthread -fno-strict-aliasing -g -O2 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -I/homes/xichen/anaconda/lib/python2.7/site-packages/numpy/core/include -I/homes/xichen/anaconda/include/python2.7 -c MACS2/Prob.c -o build/temp.linux-x86_64-2.7/MACS2/Prob.o -w -Ofast
cc1: error: invalid option argument ‘-Ofast’
error: command 'gcc' failed with exit status 1

when I tried to install using pip, similar thing happens:

$ pip install -U MACS2
Collecting MACS2
Downloading MACS2-2.1.0.20150731.tar.gz (1.6MB)
100% |████████████████████████████████| 1.6MB 190kB/s
Requirement already up-to-date: numpy>=1.6 in ./anaconda/lib/python2.7/site-packages (from MACS2)
Installing collected packages: MACS2
Found existing installation: MACS2 2.0.10.20131216
DEPRECATION: Uninstalling a distutils installed project (MACS2) has been deprecated and will be removed in a future version. This is due to the fact that uninstalling a distutils project will only partially uninstall the project.
Uninstalling MACS2-2.0.10.20131216:
Successfully uninstalled MACS2-2.0.10.20131216
Running setup.py install for MACS2
Complete output from command /homes/xichen/anaconda/bin/python -c "import setuptools, tokenize;file='/tmp/pip-build-6Z52HD/MACS2/setup.py';exec(compile(getattr(tokenize, 'open', open)(file).read().replace('\r\n', '\n'), file, 'exec'))" install --record /tmp/pip-ait1FG-record/install-record.txt --single-version-externally-managed --compile:
running install
running build
running build_py
creating build
creating build/lib.linux-x86_64-2.7
creating build/lib.linux-x86_64-2.7/MACS2
copying MACS2/init.py -> build/lib.linux-x86_64-2.7/MACS2
copying MACS2/diffpeak_cmd.py -> build/lib.linux-x86_64-2.7/MACS2
copying MACS2/bdgdiff_cmd.py -> build/lib.linux-x86_64-2.7/MACS2
copying MACS2/cmbreps_cmd.py -> build/lib.linux-x86_64-2.7/MACS2
copying MACS2/refinepeak_cmd.py -> build/lib.linux-x86_64-2.7/MACS2
copying MACS2/OptValidator.py -> build/lib.linux-x86_64-2.7/MACS2
copying MACS2/predictd_cmd.py -> build/lib.linux-x86_64-2.7/MACS2
copying MACS2/filterdup_cmd.py -> build/lib.linux-x86_64-2.7/MACS2
copying MACS2/bdgopt_cmd.py -> build/lib.linux-x86_64-2.7/MACS2
copying MACS2/bdgbroadcall_cmd.py -> build/lib.linux-x86_64-2.7/MACS2
copying MACS2/OutputWriter.py -> build/lib.linux-x86_64-2.7/MACS2
copying MACS2/Constants.py -> build/lib.linux-x86_64-2.7/MACS2
copying MACS2/bdgpeakcall_cmd.py -> build/lib.linux-x86_64-2.7/MACS2
copying MACS2/bdgcmp_cmd.py -> build/lib.linux-x86_64-2.7/MACS2
copying MACS2/pileup_cmd.py -> build/lib.linux-x86_64-2.7/MACS2
copying MACS2/randsample_cmd.py -> build/lib.linux-x86_64-2.7/MACS2
copying MACS2/callpeak_cmd.py -> build/lib.linux-x86_64-2.7/MACS2
creating build/lib.linux-x86_64-2.7/MACS2/IO
copying MACS2/IO/init.py -> build/lib.linux-x86_64-2.7/MACS2/IO
copying MACS2/IO/test_threading.py -> build/lib.linux-x86_64-2.7/MACS2/IO
copying MACS2/IO/test_processing.py -> build/lib.linux-x86_64-2.7/MACS2/IO
copying MACS2/IO/BinKeeper.py -> build/lib.linux-x86_64-2.7/MACS2/IO
running build_ext
building 'MACS2.Prob' extension
creating build/temp.linux-x86_64-2.7
creating build/temp.linux-x86_64-2.7/MACS2
gcc -pthread -fno-strict-aliasing -g -O2 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -I/homes/xichen/anaconda/lib/python2.7/site-packages/numpy/core/include -I/homes/xichen/anaconda/include/python2.7 -c MACS2/Prob.c -o build/temp.linux-x86_64-2.7/MACS2/Prob.o -w -Ofast
cc1: error: invalid option argument ‘-Ofast’
error: command 'gcc' failed with exit status 1

----------------------------------------

Rolling back uninstall of MACS2

Any idea how to solve this problem? I vaguely remember there was somebody has similar issue with -Ofast, but I could not locate the solution.

Thanks.

Xi

@taoliu
Copy link
Contributor

taoliu commented Aug 4, 2015

It seems your GCC doesn't have '-Ofast' option. Check the issue #75. #75

@lparsons
Copy link

I've run into this as well, and was wondering about the idea of adjust the compiler options on the fly? Or maybe just use the more compatible -O3 flag? Otherwise, a number of users will end up having to patch during installs (e.g. on CentOS6 systems).

Perhaps something like this? http://stackoverflow.com/questions/724664/python-distutils-how-to-get-a-compiler-that-is-going-to-be-used

taoliu added a commit that referenced this issue Jan 30, 2016
@taoliu
Copy link
Contributor

taoliu commented Jan 30, 2016

@lparsons Thanks for the comments! Could you check if the recent commit cf84fb8 works on older GCC? I simply replaced '-Ofast' with equivalent '-O3' and '-ffast-math'.

@GildasLepennetier
Copy link

GildasLepennetier commented Jun 4, 2018

Hi there.
For some reasons, I had some error during installation. No idea why, and cannot solve it. I decided to install it using docker. In case some people are facing the same problem, I will share here the steps (Using Linux Mint, based on Ubuntu):

  1. install docker
    sudo apt install docker
    -> create "Dockerfile" text file
    -> paste in the file:

FROM python:2.7.15-jessie
RUN pip install numpy scipy # Install any needed packages
RUN pip install MACS2 # Install macs2
CMD /bin/bash # enty point`

  1. build the image
    docker build -t lepennetier/macs2:2.1.1.20160309 .

  2. start the docker container, with a mounted volume pointing where your data is stored (here: $HOME will be available in mnt/ directory)
    docker run -it --rm -v $HOME:/mnt lepennetier/macs2:2.1.1.20160309
    From here, you will have access to macs2 program, try it using macs2 -h

Following are the errors I obtain while trying to install on my broken? system:
I run the command
sudo python setup_w_cython.py install

The error was:

x86_64-linux-gnu-gcc: error: MACS2/IO/Parser.c: No such file or directory
x86_64-linux-gnu-gcc: fatal error: no input files
compilation terminated.
error: command 'x86_64-linux-gnu-gcc' failed with exit status 1

Can not get it from pip neither:

sudo -H pip install MACS2
Collecting MACS2
Using cached https://files.pythonhosted.org/packages/9f/<...>.tar.gz
Complete output from command python setup.py egg_info:
CRITICAL: Python version must be 2.7!
----------------------------------------
Command python setup.py egg_info failed with error code 1 in /tmp/pip-install-tdpab4p1/MACS2/

python --version
Python 2.7.12

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

4 participants