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 building the ghc ios simulator on Mavericks #4

Open
adinapoli opened this issue Feb 8, 2014 · 14 comments
Open

Error building the ghc ios simulator on Mavericks #4

adinapoli opened this issue Feb 8, 2014 · 14 comments

Comments

@adinapoli
Copy link

Hi!
First of all thanks for your heroic effort :)
I've been following the README instructions, using the very same files and paths described. the ghc-ios for the device installed correctly, whereas the ghc ios simulator hanged with the following error:

"inplace/bin/ghc-cabal" copy libraries/ghc-prim dist-install ":" '' '/usr/local' '/usr/local/lib/i386-apple-darwin11-ghc-7.8.20140130' '/usr/local/share/doc/ghc/html/libraries' 'v p'
make[1]: *** [install_packages] Illegal instruction: 4
make: *** [install] Error 2

the full "make install" output is available here: https://gist.github.com/adinapoli/8881775
and my settings are: https://gist.github.com/adinapoli/8881785

where obviously all the bins are available in my $PATH.
Thanks!

Alfredo

@lukexi
Copy link
Contributor

lukexi commented Feb 12, 2014

Hi Alfred,

Thanks so much for testing : )

Hmm, we've gotten it going on other machines so I'm not sure what's up yet.

Can you tell me exactly the Xcode and OS X versions you have?

Thanks!
Luke

On Feb 8, 2014, at 2:47 AM, Alfredo Di Napoli [email protected] wrote:

Hi!
First of all thanks for your heroic effort :)
I've been following the README instructions, using the very same files and paths described. the ghc-ios for the device installed correctly, whereas the ghc ios simulator hanged with the following error:

"inplace/bin/ghc-cabal" copy libraries/ghc-prim dist-install ":" '' '/usr/local' '/usr/local/lib/i386-apple-darwin11-ghc-7.8.20140130' '/usr/local/share/doc/ghc/html/libraries' 'v p'
make[1]: *** [install_packages] Illegal instruction: 4
make: *** [install] Error 2
the full "make install" output is available here: https://gist.github.com/adinapoli/8881775
and my settings are: https://gist.github.com/adinapoli/8881785

where obviously all the bins are available in my $PATH.
Thanks!

Alfredo


Reply to this email directly or view it on GitHub.

@adinapoli
Copy link
Author

Hi!
I won't have access to my machine for a while, but I might need to be able to give you more info tomorrow. I will also have another mac with Maverick and the latest XCode with me for the next 2 weeks, so I will attempt the installation there as well :)

Thanks!
Alfredo

@adinapoli
Copy link
Author

Just FYI: I have tried the install process on my work Mac, and the installation succeeded (yay!), so I can I can try to diff the two configurations as soon as I have a chance to get hold of my home machine.
Incidentally, I have succeeded in installing ghc-ios on this machine, without having XCode installed, so I guess we can exclude the latter from the equation :)

A.

@lukexi
Copy link
Contributor

lukexi commented Feb 17, 2014

Hi Alfredo,
That's awesome news : )  —I haven't been able to reproduce it on any of my machines yet so that would be super helpful! I did get one other report from a user on Mavericks with the same issue.

@amurrayc
Copy link

I have the same issue. My 'make install' output is almost identical (except it references /usr/bin/install instead of /usr/local/bin/ginstall). The device install completes successfully but the simulator fails as above.

The machine is a MacBook Air with OS X 10.9.1 and XCode 5.0.2 (5A3005).

I have the 64bit Haskell Platform 2013.2.0.0 installed.

Thanks for all the great work making this happen. Please let me know if there is something I can do to help track this down.

@zhangjiji
Copy link

Failed:

  • MacBook Air (2010);
  • OS X 10.9.1;
  • XCode 5.0.2;
  • 64bit Haskell Platform 2013.2.0.0 (installed via dmg not by brew);

Succeed:

  • Mac Mini;
  • OS X 10.9.1;
  • XCode 5.0.2;
  • 64bit Haskell Platform 2013.2.0.0(installed via dmg not by brew);

@zhangjiji
Copy link

Hi,

When I was installing the RC2(20140226) version both arm and i386 versions got the same error:

"inplace/bin/ghc-cabal" copy libraries/ghc-prim dist-install ":" '' '/usr/local' '/usr/local/lib/arm-apple-darwin10-ghc-7.8.0.20140226' '/usr/local/share/doc/ghc/html/libraries' 'v p'
make[1]: *** [install_packages] Illegal instruction: 4
make: *** [install] Error 2

One step closer to the problem.

@lukexi
Copy link
Contributor

lukexi commented Mar 3, 2014

Thanks Zhangjiji, fixed! I knew I'd do that sometime : ) Luckily Austin caught it in the official release.

I take it you're still having the same issue with the 20140228 version? I'm going to try diffing with RC1 to see if that sheds any light...

Cheers

@acertain
Copy link

I'm having the same issue on 10.8.5

@lukexi
Copy link
Contributor

lukexi commented May 16, 2014

Wow, alright! I figured something out : )

I had a chance to try things out on a new machine that had the Haskell Platform installed, and ran into this same exact issue. All of my own machines have a manually installed GHC 7.8.2 + fresh Cabal setup, so I thought there might be something to that.

So I tried it:
I blew away the Haskell Platform, and deleted the ~/.cabal directory (including, significantly, the older ~/.cabal/config file). I then installed GHC 7.8.2 from haskell.org and redownloaded Cabal 1.20, allowing it to generate a fresh ~/.cabal/config. (do note that you must comment out the jobs: $ncpus entry it generates, as mentioned in the ghc-ios README)

After doing all that, I was able to install both the Simulator and Device editions of GHC iOS flawlessly on the machine.

Since I did a lot at once, I'm not exactly sure which piece fixes it. But now we have a working recipe and it would be awesome if you guys could try some pieces of that!

(I did a lot of "which cabal" and "which ghc" and PATH editing to make sure I was getting the newest of each — it can get pretty confusing since the Platform uses very different directories than a hand-installed GHC/Cabal)

@lukexi
Copy link
Contributor

lukexi commented May 16, 2014

If I had to guess, it was probably the cabal version/config file rather than needing to install a new GHC — so try making sure the latest cabal is in your path (e.g. cabal -V, make sure it's 1.20) and then try backing up your .cabal/config file and running cabal update to let it generate a new one (and removing $ncpus from that : ))

@caizongchao
Copy link

Today I tried to install the ghc cross compiler for ios and got the same issue.

The install package I've used is http://www.haskell.org/ghc/dist/7.8.2/ghc-7.8.2-i386-apple-ios.tar.xz.
I'm on a Mac Pro early 2008 with fresh installed OS X 10.9, xcode 5.1.1, cabal 1.20.0.2 and ghc 7.8.2 x86_64.

After some investation I found that it might be caused by static linking of exectuables, for example, ghc-cabal. I replaced ghc-cabal with the one in installation package for os x, which is dynamic linked, and then the error is gone.

After that, I replaced ghc-pkg due to the same issue. But finally it seems that the exectuable ghc itself has the same problem, it cannot run properly. The installer cannot get the proper version number of ghc and then stopped.

Thanks.
Cai

@caizongchao
Copy link

I have installed the compiler by compiling the source code, it's easier than what I had expected.

Thanks,
Cai

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

6 participants