This repository has been archived by the owner. It is now read-only.

mpfr fails installation tests due to illegal instruction #18944

Closed
staticfloat opened this Issue Apr 3, 2013 · 24 comments

Comments

Projects
None yet
6 participants
Contributor

staticfloat commented Apr 3, 2013

Here is the documenting gist, it looks like the compile goes fine, but then during the testing phase, there are a bunch of Illegal Instruction outputs.

This is on an iMac, Early 2009.

Contributor

jacknagel commented Apr 3, 2013

Any luck with --env=std or --use-llvm?

Contributor

staticfloat commented Apr 3, 2013

Both fail in the same way. --use-clang also fails in the same way. Makes me wonder if these flags are even working. ;)

Contributor

jacknagel commented Apr 3, 2013

Looks there is a 3.1.2 release, perhaps that has bug fixes.

Contributor

adamv commented Apr 17, 2013

Please provide updated troubleshooting if this still happens after brew update.

@adamv adamv closed this Apr 17, 2013

Contributor

staticfloat commented Apr 18, 2013

I can confirm this still happens, but is only a problem with the gmp bottle is installed. If gmp is compiled from source, the issue disappears. Note that the bottle installs even though I have my homebrew outside of /usr/local/.

Owner

MikeMcQuaid commented Apr 18, 2013

Ok so it looks like the bottle cflags are not generic enough and/or are broken for your hardware. I'll try and have a look, thanks.

Owner

MikeMcQuaid commented Apr 22, 2013

I've removed the gmp bottle for now. I want to try and work out why our generic CFLAGS for bottles aren't working properly though and I'll rebottle when I've worked this out.

Owner

MikeMcQuaid commented May 11, 2013

I've fixed the bottling cflags for Clang, rebuilt the gmp bottle and pushed the new bottle in bd1cdb4. @staticfloat and others: can you see if it works properly for you now? Thanks!

Contributor

staticfloat commented May 11, 2013

I will do this, but it may take me a few days to get back on the computer that was having the trouble.

Owner

MikeMcQuaid commented May 11, 2013

No worries, thanks.

Contributor

staticfloat commented May 15, 2013

Works great for me, thanks!

Owner

MikeMcQuaid commented May 15, 2013

@staticfloat Sorry, the bottle worked? I removed it again but wondering if you got to it in the mean time. You could manually check out that revision to test it.

Contributor

staticfloat commented May 15, 2013

Sorry, the gmp bottle worked great. You're saying that you haven't gotten the mpfr bottle uploaded yet? Basically, I installed Homebrew fresh on a new OSX machine in /usr/local/, watched it download a bottle for gmp, and tested Julia with it, and all tests passed. I don't remember if a mpfr bottle was downloaded or not.

Owner

MikeMcQuaid commented May 15, 2013

Hmm. Well glad the GMP bottle fixed it for you. My only concern is that people were using the old bottle which kept the problems. Sorry to be explicit but previously you had issues with mpfr that were no longer there when you reinstalled (which used a gmp bottle)? If you run brew info gmp it'll tell you if it came from a bottle.

Contributor

staticfloat commented May 15, 2013

I had problems with both the gmp bottle and the mpfr bottle. Since the gmp bottle was fixed, and since this was a new computer so mpfr was built from source, I had no problem.

Unfortunately I don't have regular access to a mac right now, so I can only test when I go into the library at school and install homebrew from scratch on the computers. Therefore, if you create an mpfr bottle as well, I will test the mpfr bottle and the gmp bottle simultaneously if you wish.

Contributor

staticfloat commented May 15, 2013

I checked out bd1cdb4, and open-mpi fails installation with the two bottles installed, so I'll wait until you think you've figured everything out and re-enabled the bottles before continuing testing.

Owner

MikeMcQuaid commented May 16, 2013

Thanks.

handyman5 pushed a commit to handyman5/homebrew that referenced this issue Oct 7, 2013

handyman5 pushed a commit to handyman5/homebrew that referenced this issue Oct 7, 2013

Fix --build-bottle CFLAGS.
The CFLAGS were previously not generic enough.

References #18944.
References #19179.

tavert commented Oct 26, 2013

I'm running into what looks to be the same problem in 10.9, see https://gist.github.com/7173253

This is in a VM, which may have something to do with the "mdfind[46645:1f03] Metadata.framework [Error]: client check-in failed: (268435460) (ipc/send) timed out" and "mdfind[46645:d07] Metadata.framework [Error]: couldn't get the client port" in config and doctor, I have no idea what that means or if it's making a difference here.

Tried a few different flags, to no avail. Did brew update immediately before running.

Contributor

staticfloat commented Oct 26, 2013

If you're in a VM, these illegal instructions are likely because your VM software doesn't support AVX instructions. Try forcing Homebrew to compile instructions for the core2 gcc target instead of whatever your native instruction set is.

Contributor

mistydemeo commented Oct 26, 2013

You can force Homebrew to build for core2 by passing --build-bottle.

tavert commented Oct 26, 2013

Ah, makes sense that the vector instruction sets could be trouble with libraries like MPFR and GMP (which was also giving me trouble)... @mistydemeo answered what was going to be my next question of how to go about changing target architecture without having to go in and edit the formulas, thanks. You folks are impressively responsive!

Interestingly --build-bottle did the trick, but I had to build one thing at a time. I'm going for gfortran here, but brew install --build-bottle gfortran failed during gmp. for dep in gmp mpfr pkg-config isl cloog libmpc gfortran; do brew install --build-bottle $dep; done is working so far, it's gotten all the way to downloading the gfortran source. Is this intended behavior, where --build-bottle compiles dependencies slightly differently than the desired end-product formula?

Owner

MikeMcQuaid commented Oct 26, 2013

Uninstall and reinstall the dependency tree. Yeh, build-bottle sometimes behaves differently.

Contributor

staticfloat commented Oct 26, 2013

I've noticed that build-bottle just doesn't propagate to dependencies. Is
this something that should perhaps be fixed?
On Oct 26, 2013 2:45 PM, "Mike McQuaid" notifications@github.com wrote:

Uninstall and reinstall the dependency tree. Yeh, build-bottle sometimes
behaves differently.


Reply to this email directly or view it on GitHubhttps://github.com/mxcl/homebrew/issues/18944#issuecomment-27156516
.

Owner

MikeMcQuaid commented Oct 26, 2013

It's intentional, like various other options.

@xu-cheng xu-cheng locked and limited conversation to collaborators Feb 16, 2016

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.