dwaaan / pyrit

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

cc1: error: unrecognized command line option "-maes" #297

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1.cd pyrit_svn/pyrit
2../setup.py build

What is the expected output? What do you see instead?
I expect pyrit to build instead I get this
running build
running build_py
running build_ext
building 'cpyrit._cpyrit_cpu' extension
gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall 
-Wstrict-prototypes -fPIC -I/usr/include/python2.5 -c cpyrit/_cpyrit_cpu.c -o 
build/temp.linux-i686-2.5/cpyrit/_cpyrit_cpu.o -Wall -fno-strict-aliasing 
-DVERSION="0.4.1-dev (svn r304)" -maes -mpclmul
cc1: error: unrecognized command line option "-maes"
cpyrit/_cpyrit_cpu.c:1: error: pc0 is not valid precision setting (32, 64 or 80)
error: command 'gcc' failed with exit status 1

What version of the product are you using? On what operating system?
Running on BT4R2

Please provide any additional information below.
I have already purged previous version of pyrit and have the required packages 
(at least I think) to build. I have gotten cpyrit with ATI and Cal++ working in 
the past on the exact same system with the exact same OS without issue. I just 
did a clean reinstall of BT4R2 on a new HD. I am at wits end, the issue is most 
likely a simple fix just something I'm not seeing. Thanks in advance for any 
help.

Original issue reported on code.google.com by civilimp...@gmail.com on 9 Apr 2011 at 7:36

GoogleCodeExporter commented 8 years ago
This error is thrown because your version of gcc does not yet support compiling 
AES-NI intrinsics.

Can you post the output of "gcc -v" ?

You can fix this by editing setup.py - find the lines

"""
if sys.platform in ('darwin', 'linux2'):
    EXTRA_COMPILE_ARGS.extend(('-maes', '-mpclmul'))
"""

and comment them like this:

"""
#if sys.platform in ('darwin', 'linux2'):
#    EXTRA_COMPILE_ARGS.extend(('-maes', '-mpclmul'))
"""

Original comment by lukas.l...@gmail.com on 11 Apr 2011 at 7:45

GoogleCodeExporter commented 8 years ago
Similar problem here but on OSX 10.6.7

$ sudo python setup.py install
Password:
running install
running build
running build_py
copying pyrit_cli.py -> build/lib.macosx-10.6-universal-2.6
copying cpyrit/storage.py -> build/lib.macosx-10.6-universal-2.6/cpyrit
running build_ext
building 'cpyrit._cpyrit_cpu' extension
gcc-4.2 -fno-strict-aliasing -fno-common -dynamic -DNDEBUG -g -fwrapv -Os -Wall 
-Wstrict-prototypes -DENABLE_DTRACE -arch i386 -arch ppc -arch x86_64 -pipe 
-I/System/Library/Frameworks/Python.framework/Versions/2.6/include/python2.6 -c 
cpyrit/_cpyrit_cpu.c -o 
build/temp.macosx-10.6-universal-2.6/cpyrit/_cpyrit_cpu.o -Wall 
-fno-strict-aliasing -DVERSION="0.4.1-dev (svn r304)" -maes -mpclmul
cc1: error: unrecognized command line option "-maes"
cc1: error: unrecognized command line option "-mpclmul"
cc1: error: unrecognized command line option "-maes"
cc1: error: unrecognized command line option "-mpclmul"
cc1: error: unrecognized command line option "-maes"
cc1: error: unrecognized command line option "-mpclmul"
lipo: can't open input file: /var/tmp//ccKcX4hy.out (No such file or directory)
error: command 'gcc-4.2' failed with exit status 1

Original comment by nikf...@gmail.com on 12 Apr 2011 at 4:04

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
followed the steps for commenting out 
"""
#if sys.platform in ('darwin', 'linux2'):
#    EXTRA_COMPILE_ARGS.extend(('-maes', '-mpclmul'))
"""

And new error occurs. I rolled back to svn 298 and no more compiling issues on 
BT4

Original comment by salesgr...@gmail.com on 12 Apr 2011 at 4:20

GoogleCodeExporter commented 8 years ago
What where the new errors?

Original comment by lukas.l...@gmail.com on 12 Apr 2011 at 4:23

GoogleCodeExporter commented 8 years ago
Now I too commented them out, here are more errors:

$ sudo python setup.py build
Password:
running build
running build_py
running build_ext
building 'cpyrit._cpyrit_cpu' extension
gcc-4.2 -fno-strict-aliasing -fno-common -dynamic -DNDEBUG -g -fwrapv -Os -Wall 
-Wstrict-prototypes -DENABLE_DTRACE -arch i386 -arch ppc -arch x86_64 -pipe 
-I/System/Library/Frameworks/Python.framework/Versions/2.6/include/python2.6 -c 
cpyrit/_cpyrit_cpu.c -o 
build/temp.macosx-10.6-universal-2.6/cpyrit/_cpyrit_cpu.o -Wall 
-fno-strict-aliasing -DVERSION="0.4.1-dev (svn r304)"
cpyrit/_cpyrit_cpu.c:2369: warning: function declaration isn’t a prototype
cpyrit/_cpyrit_cpu.c: In function ‘detect_cpu’:
cpyrit/_cpyrit_cpu.c:2372: error: can't find a register in class ‘BREG’ 
while reloading ‘asm’
cpyrit/_cpyrit_cpu.c:2372: error: ‘asm’ operand has impossible constraints
{standard input}:137:non-relocatable subtraction expression, "_PlatformString" 
minus "L00000000002$pb"
{standard input}:137:symbol: "_PlatformString" can't be undefined in a 
subtraction expression
cpyrit/_cpyrit_cpu.c:2369: warning: function declaration isn’t a prototype
cpyrit/_cpyrit_cpu.c: In function ‘detect_cpu’:
cpyrit/_cpyrit_cpu.c:2372: error: impossible constraint in ‘asm’
{standard input}:136:non-relocatable subtraction expression, "_PlatformString" 
minus "L00000000002$pb"
{standard input}:136:symbol: "_PlatformString" can't be undefined in a 
subtraction expression
{standard input}:135:non-relocatable subtraction expression, "_PlatformString" 
minus "L00000000002$pb"
{standard input}:135:symbol: "_PlatformString" can't be undefined in a 
subtraction expression
cpyrit/_cpyrit_cpu.c:2369: warning: function declaration isn’t a prototype
lipo: can't open input file: /var/tmp//ccluf3TM.out (No such file or directory)
error: command 'gcc-4.2' failed with exit status 1

Original comment by nikf...@gmail.com on 12 Apr 2011 at 4:31

GoogleCodeExporter commented 8 years ago
These two issues will be solved in next svn

Original comment by lukas.l...@gmail.com on 12 Apr 2011 at 4:33

GoogleCodeExporter commented 8 years ago
Should be fixed in r305

Original comment by lukas.l...@gmail.com on 13 Apr 2011 at 6:48

GoogleCodeExporter commented 8 years ago
Commenting out the maes stuff, still leaves me with a version that won't 
compile:

python setup.py build
running build
running build_py
running build_ext
building 'cpyrit._cpyrit_cpu' extension
gcc-4.2 -fno-strict-aliasing -fno-common -dynamic -DNDEBUG -g -fwrapv -Os -Wall 
-Wstrict-prototypes -DENABLE_DTRACE -arch i386 -arch ppc -arch x86_64 -pipe 
-I/System/Library/Frameworks/Python.framework/Versions/2.6/include/python2.6 -c 
cpyrit/_cpyrit_cpu.c -o 
build/temp.macosx-10.6-universal-2.6/cpyrit/_cpyrit_cpu.o -Wall 
-fno-strict-aliasing -DVERSION="0.4.1-dev (svn r308)"
/usr/libexec/gcc/powerpc-apple-darwin10/4.2.1/as: assembler 
(/usr/bin/../libexec/gcc/darwin/ppc/as or 
/usr/bin/../local/libexec/gcc/darwin/ppc/as) for architecture ppc not installed
Installed assemblers are:
/usr/bin/../libexec/gcc/darwin/x86_64/as for architecture x86_64
/usr/bin/../libexec/gcc/darwin/i386/as for architecture i386
cpyrit/_cpyrit_cpu.c:2558: fatal error: error writing to -: Broken pipe
compilation terminated.
lipo: can't open input file: 
/var/folders/p8/p8oCV3JJEMucrDvyEGQuFU+++TI/-Tmp-//cctoePMv.out (No such file 
or directory)
error: command 'gcc-4.2' failed with exit status 1

gcc -v output:

gcc -v
Using built-in specs.
Target: i686-apple-darwin10
Configured with: /var/tmp/gcc/gcc-5666.3~123/src/configure --disable-checking 
--enable-werror --prefix=/usr --mandir=/share/man 
--enable-languages=c,objc,c++,obj-c++ 
--program-transform-name=/^[cg][^.-]*$/s/$/-4.2/ --with-slibdir=/usr/lib 
--build=i686-apple-darwin10 --program-prefix=i686-apple-darwin10- 
--host=x86_64-apple-darwin10 --target=i686-apple-darwin10 
--with-gxx-include-dir=/include/c++/4.2.1
Thread model: posix
gcc version 4.2.1 (Apple Inc. build 5666) (dot 3)

Original comment by cmg.0...@gmail.com on 16 Jun 2011 at 2:38

GoogleCodeExporter commented 8 years ago
Try

env ARCHFLAGS="-arch i386 -arch x86_64" python setup.py build

Original comment by lukas.l...@gmail.com on 16 Jun 2011 at 2:56

GoogleCodeExporter commented 8 years ago
Perfect, that did the trick.

Original comment by cmg.0...@gmail.com on 16 Jun 2011 at 3:13