cloudius-systems / capstan-example

Capstan example project for native Linux applications
Other
13 stars 6 forks source link

capstan run fails on MacOS X + qemu #1

Open asias opened 10 years ago

asias commented 10 years ago

asias@hj:capstan-example$ capstan run Building capstan-example... OSv v0.05-481-gc691623 terminate called after throwing an instance of 'std::runtime_error' what(): bad elf header Aborted

[backtrace] 0x3f16c5 <__gnu_cxx::__verbose_terminate_handler()+341> 0x726564616568 <???+1684104552>

penberg commented 10 years ago

@asias I hadn't noticed this issue before. OS X toolchain produces Mach-O executables that are of course not supported on OSv.

What do you think needs to be done for this issue?

asias commented 10 years ago

We can do cross-compile for this kind of simple application but it is hard for other more complex programs. Maybe we should print an error if user tries to build on non-linux platforms.

penberg commented 10 years ago

@asias How would Capstan know that you're building a native application? It's perfectly fine to build a Java application, for example, on OS X.

asias commented 10 years ago

How about checking when uploading files to osv image. If we find files like below, we print a warning.

hello.so: Mach-O 64-bit dynamically linked shared library x86_64

On Wed, Sep 10, 2014 at 10:10 PM, Pekka Enberg notifications@github.com wrote:

@asias https://github.com/asias How would Capstan know that you're building a native application? It's perfectly fine to build a Java application, for example, on OS X.

— Reply to this email directly or view it on GitHub https://github.com/cloudius-systems/capstan-example/issues/1#issuecomment-55120345 .

Asias

penberg commented 10 years ago

@asias Yeah, makes sense. It should be pretty easy to detect non-ELF shared libraries.