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
Invalid mnemonic 'fnstcw' #51701
Comments
When trying to build 2.7a1 I ran into the following problem on MacOSX $ ./configure --enable-framework --enable-universalsdk
[...]
$ make
[...]
gcc -c -arch ppc -arch i386 -isysroot /Developer/SDKs/MacOSX10.4u.sdk -
fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -
I. -IInclude -I./Include -DPy_BUILD_CORE -o Python/pymath.o
Python/pymath.c
/var/tmp//ccGDYNCp.s:36:Invalid mnemonic 'fnstcw'
/var/tmp//ccGDYNCp.s:56:Invalid mnemonic 'fldcw'
lipo: can't open input file: /var/tmp//cc4UBrqs.out (No such file or
directory)
make: *** [Python/pymath.o] Error 1 |
This error only occurs when I specify --enable-framework and --enable- |
Works for me on 10.4.11 PPC (G3) machine rather than Intel (which |
Do you get the same problem with py3k? |
Could you also post the generated pyconfig.h? |
This is due to a block starting at '#ifdef HAVE_GCC_ASM_FOR_X87' in A simple patch to pymacconfig.h fixes the issue, I'll commit it once I've |
Fixed in r76712 (trunk), r76713 (3.2), r76714 (3.1). The python3 branches contained about half of the fix, I merged the trunk The issue does not affect the 2.6 branch. |
Not in 3.1.1 at least.
That fixes the issue. Thanks! Let me know if you still need pyconfig.h. |
"PPC (G3) machine rather than Intel (which shouldn't make a difference)" |
Ned: maybe your pyconfig.h isn't defining HAVE_GCC_ASM_FOR_X87 in the first place, for some reason? I *do* get that error for trunk / 10.6 (with the 10.5 SDK; I don't have the 10.4 SDK installed): Mark-Dickinsons-MacBook-Pro:trunk dickinsm$ /usr/bin/gcc-4.0 -c -arch ppc -arch i386 -isysroot /Developer/SDKs/MacOSX10.5.sdk/ -I. |
Ned: which version of Python do you build? The issue was only in the The trunk should be fine now as well, as of r76712. Sridhar: I don't need pyconfig.h. I was thinking of a configure issue Mark: what's the output of svnversion? I committed a fix in r76712, that |
Ronald, it's a more complicated configure issue. I'm in the middle of |
Ronald: sorry, I wasn't clear. I only get that failure before your fix; |
I agree that adding the definitions of HAVE_GCC_ASM_FOR_X87 to [mini-rant on] After digging around a lot, I see now why I hadn't noticed it before. Always specifying --enable-universalsdk=/Path/To/sdk and default arch If configure is called with just --enable-universalsdk (no path) but on CFLAGS='-arch ppc -arch i386 -isysroot /Developer/SDKs/MacOSX10.4u.sdk - But if you make that same configure call on 10.4, the multiple archs are CFLAGS='-g -O2' On a 10.4 PPC system (my case) the test *still* returns NO so the That also means that, for multi-arch builds on OS X, the X87 control I hope that is a reasonably close to correct analysis but I could have a Looking elsewhere in configure.in, there are other architecture-specific There seem to be at least two issues brought out here:
At a minimum, I would like to see a message added to configure.in that |
A reply to Ned from the person who introduced this bug in the first [Ned]
I guess I was already aware of this, at least after Ned (IIRC), some Something that I would have found helpful at one stage would be
Do you mean Include/pymacconfig.h? If so, I agree such a warning would As an aside, I *think* it's actually safe just to undefine |
Mark, I wasn't ranting at you or Ronald or anyone in particular. It's no |
Ned: the best way to ensure universal builds don't get broken is through Mark: Mac/README explains how to build universal binaries and To build a universal binary framework: ../configure \ The build can be tweaked using a number of options:
MACOSX_DEPLOYMENT_TARGET=X.Y (Default is 10.3 for 32-bit builds and 10.5 for builds that include BTW. I agree that the current configure script sucks, it is very hard One way to improve on the script is to create a number of clearly The architecture tests could then be prepended with a comment block |
BTW. Am I correct when I state that this issue has been fixed and can be |
Yes, this can be closed as far as I'm concerned. |
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: