alexstaj / cutadapt

Automatically exported from code.google.com/p/cutadapt
0 stars 0 forks source link

unrecognized gcc option '-fstack-protector-strong' #96

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Hi,

when trying to install cutadapt on my laptop (running Debian 7.0), I get the 
following error message:

x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes 
-fno-strict-aliasing -D_FORTIFY_SOURCE=2 -g -fstack-protector-strong -Wformat 
-Werror=format-security -fPIC -I/usr/include/python2.7 -c cutadapt/_align.c -o 
build/temp.linux-x86_64-2.7/cutadapt/_align.o
x86_64-linux-gnu-gcc: error: unrecognized command line option 
‘-fstack-protector-strong’

Whether I use pip or "python setup.py install --user", I've got the same 
message.

Debian provides gcc 4.8.4. The option "-fstack-protector-strong" is available 
in gcc 4.9. Is there a way to compile without that option?

Thanks,

Original issue reported on code.google.com by mahefred...@gmail.com on 27 Jan 2015 at 10:48

GoogleCodeExporter commented 9 years ago
That’s unusual. The compiler options used to compile Python extension modules 
are the same ones as those that were used to compile Python itself. 
Cutadapt’s setup.py script does not change the compiler options. Is it the 
system-installed python binary that you are using to run the setup.py script? 
(What does 'which python' output?) Perhaps there's a custom package installed 
or there’s a manual installation?

Maybe one of the suggestions given at 
http://stackoverflow.com/questions/27182042/ can help?

Original comment by marcel.m...@tu-dortmund.de on 27 Jan 2015 at 1:44

GoogleCodeExporter commented 9 years ago
It seems that the python package was compiled with gcc 4.9.2, whereas my system 
only has gcc 4.8.4.

$ which python
/usr/bin/python
$ python
Python 2.7.9 (default, Dec 11 2014, 08:58:12) 
[GCC 4.9.2] on linux2
$ gcc --version
gcc (Debian 4.8.4-1) 4.8.4

So the problem seems to come from an inconsistency in Debian 7. I've installed 
cutadapt on a cluster and did not encounter that problem. I am going to use 
that instance for now.

Thanks for your answer.

Original comment by mahefred...@gmail.com on 27 Jan 2015 at 1:56

GoogleCodeExporter commented 9 years ago
Ok, since it seems I cannot do anything within cutadapt to prevent this error 
in the future, I'll close this issue.

To summarize for future reference, the issue can be solved (see the 
stackoverflow post) by
- updating GCC to 4.9,
- modifying some configuration files that are part of the Python installation.

That requires root rights. If you don't have those, there's also pyenv, see 
https://github.com/yyuu/pyenv , which is an easy way to create a local 
(user-specific) Python installation.

Original comment by marcel.m...@tu-dortmund.de on 27 Jan 2015 at 2:15