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

Exec format error #322

Open
Ploppz opened this issue Mar 28, 2019 · 4 comments
Open

Exec format error #322

Ploppz opened this issue Mar 28, 2019 · 4 comments

Comments

@Ploppz
Copy link

Ploppz commented Mar 28, 2019

$ ozc -v
Mozart Compiler 2.0.1+build.8.db41d83e-dirty (Mon, 22 Oct 2018 15:20:43 +0200) playing Oz 3

(mozart2 installed from here https://aur.archlinux.org/packages/mozart2-git/)

OS: Arch Linux with kernel version 5.0.2
CPU: 64-bit (AMD Ryzen 5 1600)

My problem is that when I run ozc -x Game.oz, I get an executable file Game that I cannot execute - when I try to execute it I get the error bash: ./Game: cannot execute binary file: Exec format error. file Game says it's just "data".

Minimal Game.oz:

functor
import
   System
   Application
define
   {System.showInfo 'hi'}
   {Application.exit 0}
end

@layus
Copy link
Member

layus commented Mar 28, 2019

Yes, the -x flag is indeed not implemented correctly and has currently the same effect as -c except that it produces a file named Game instead of Game.ozf produced by -c. But as for now, both files contain exactly the same content. You can check that with ozengine Game.

@layus
Copy link
Member

layus commented Mar 28, 2019

See

proc {SaveWithHeader Value FileName Header Level}
% TODO Actually write the header
%{Sink write(Header)}
%{Sink write(HeaderMagic)}
{Save Value FileName}
end

@Ploppz
Copy link
Author

Ploppz commented Mar 28, 2019

Thanks! So I need to use ozengine to run the file.

@Ploppz Ploppz closed this as completed Mar 28, 2019
@layus
Copy link
Member

layus commented Mar 28, 2019

Yes, that's the way it is for now.
You can leave this bug open until we fix it ;-)

@Ploppz Ploppz reopened this Mar 28, 2019
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

2 participants