-
Notifications
You must be signed in to change notification settings - Fork 82
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
Troubles running Capstan #143
Comments
On Wed, Apr 29, 2015 at 6:21 AM, Aleksandar Fabijanic <
Nadav Har'El |
On Wed, Apr 29, 2015 at 6:21 AM, Aleksandar Fabijanic <
It's because on OSx we expect vbox only. Even if qemu will work it will be
|
OK, so I can run bare bone OSv on OSX (only using qemu) but when I try to run the capstan-example, here's what I get:
Note that I have compiled hello.so on Linux (and commented the make line in the Capstanfile on Mac):
What am I doing wrong? |
On Thu, Apr 30, 2015 at 2:20 AM, Aleksandar Fabijanic <
I'm really no Capstan expert (@penberg, comments?) - what is |
On Thu, Apr 30, 2015 at 10:42 AM, nyh [email protected] wrote:
I'm no ELF expert but I can tell that Capstan image creation scenarios
|
The "capstan-example" project is a C application. You cannot build in on OS X because its toolchain builds Mach-O object files, not ELF object files like Linux does. |
On Wed, May 13, 2015 at 5:36 PM, Pekka Enberg [email protected]
Nadav Har'El |
Yes, as stated above, I have compiled Capstan on OSX but the hello.so is compiled on Linux and is ELF:
But when I try to run:
Capstanfile:
|
@nyh what qemu binary are you pointing at? When installed with homebrew there is no actual qemu binary, there are:
|
@gaffo, qemu-system-x86_64 But I don't understand what this issue is about... |
how am I supposed to build and run on Macos a c++ executable? My end goal is to get the capstan-examples c++ hello world running on my box. The errors I was getting were like above. Default on Macos seems to be qemu. |
So solution I found was following: -rm -rf ~/.capstan
If you build with the mac and no cross compile (default if you just run capstan examples, you'll have the wrong format for your .so file:
Which means you need to either change make file to do a cross compile or go to a linux virt and make clean && make Bad elf header basically means that it tried to run as a linux shared object (ELF) and instead got a mac so file which I don't know what that is. |
It is unfortunate that the docs here are trailing behind somewhat - particularly given that this issue was reported back in April and it is now December. This doesn't provide me with a high level of confidence that the project maintainers understand many developers to be OS X based, and curious to see the JVM support happen. After exporting the following:
...and then running:
...not a great experience. Why does it try to resolve anything re QEMU anyhow? I don't want QEMU - I want VirtualBox - which is what it is trying to do. |
I don't know anything about Capstan & Vbox - @penberg might be able to help. But for what its worth, the error message doesn't seem to have anything to do with QEMU... It seems you created two images with identical UUIDs (unique identifiers) and Virtualbox didn't like it. Because as I said I never tried using Capstan with VirtualBox, I don't know why this happened, or how to work around it, but I'm quite sure it has nothing to do with QEMU. |
Rewinding a bit, it asked for the QEMU env var before I provided it, despite targeting vbox. That at least doesn't seem right. |
@nyh I also encountered the
There's a lot of info on the net how to work around this issue, I used this one (using mac) to change hard disk UUID of the image being reported in error above: Not really sure what is causing this duplicate hard disk UUID or if it could somehow be prevented when capstan builds/runs virtualbox image. |
I'm following instructions on OS X Yosemite:
The documentation says that qemu is default but it looks for VBox nevertheless:
So, I force it to qemu:
but it still complains:
OK, here:
So, when I run it now , I get:
Where am I going wrong? I own all the files/directories and all permissions on /usr/local/bin are 755.
EDIT: I tried installing from sources with same results:
EDIT2: Tried also Fedora and Ubuntu following instructions with no luck:
The text was updated successfully, but these errors were encountered: