linux 64bit binary?

All topics about ZGameEditor goes here.

Moderator: Moderators

Handoko
Posts: 3
Joined: Mon Mar 10, 2014 12:10 pm

Post by Handoko »

Any luck of generating Linux Player?

I tried to compile it myself using Free Pascal 2.6.2, but failed with libc library. I'm a Ubuntu 64-bit user, it would be great if I can create native Linux games. I've tried Ats ZzDC but it doesn't run well on 3.1b.
User avatar
Ats
Posts: 603
Joined: Fri Sep 28, 2012 10:05 am
Contact:

Post by Ats »

Here's the compiled 3.1b player for linux (32bits), sent from my dropbox/phone. I'm not on my computer for a week so I can't help you much. Tell me if it works.

Edit: All right... I can't upload files to the forum from my phone. So here's the dropbox link: [sorry, wrong link... See my next post]
Last edited by Ats on Tue Mar 11, 2014 9:00 am, edited 1 time in total.
Handoko
Posts: 3
Joined: Mon Mar 10, 2014 12:10 pm

Post by Handoko »

Tested, unfortunately not working.

I renamed the downloaded file to "Player_linux.bin", started ZGameEditor 3.1b using WINE and opened a test project. Clicked "Android: build zzdc.dat file" and "Build Linux x86 binary". I set the result file as "Allow execute file as program", but an error message show up if I try to open it: "The file is of unkown type".

I found something strange:
- The file download from Dropbox is zzdc.pac
- The file size is only 41 KB, while the previous ZzDC is 217 KB

Note:
Sometimes the old ZzDC 3.0.0 can work when using ZGameEditor 3.1b. But in many cases, it just shows up a message asking user to choose screen resolution and it quit immediately if we choose any of the option.
User avatar
Ats
Posts: 603
Joined: Fri Sep 28, 2012 10:05 am
Contact:

Post by Ats »

Oops sorry, I didn't pay attention. I hate touchscreens...
So here's the link to the good file: https://www.dropbox.com/s/3b086kgyolncp ... _linux.bin
Handoko
Posts: 3
Joined: Mon Mar 10, 2014 12:10 pm

Post by Handoko »

Awesome, it works. Now the fun begins.

Thank you Ats and the creator of this software.
Imerion
Posts: 200
Joined: Sun Feb 09, 2014 4:42 pm

Post by Imerion »

Nice! Great to see an updated Linux binary! Will be using this for sure, thanks for your work!
Dragon
Posts: 8
Joined: Mon May 27, 2013 8:30 pm
Location: Germany

Post by Dragon »

Ok I've finished the instllation from sdl1.2 now the precompiled version from Ats a few posts ago works by me. But the compiler fails with the same mistake as before.

And thanks Ats for an actually compiled version.
Imerion
Posts: 200
Joined: Sun Feb 09, 2014 4:42 pm

Post by Imerion »

I finally came long enough to try running my game in Linux using this binary.
All I get is this message though : "OpenGL could not be loaded".
How come? OpenGL works fine in all other programs, including a bunch of modern games. I run Xubuntu 14.04 and have an Intel HD4400 graphics card with the latest drivers and mesa 10.1.
User avatar
VilleK
Site Admin
Posts: 2274
Joined: Mon Jan 15, 2007 4:50 pm
Location: Stockholm, Sweden
Contact:

Post by VilleK »

It might be a 32/64-bit problem. The ZGE Linux runtime currently only supports 32-bit.

Make sure you have a 32-bit OpenGL driver named libGL.so on your system.
Imerion
Posts: 200
Joined: Sun Feb 09, 2014 4:42 pm

Post by Imerion »

Ah, that's right. For some reason I thought this was a 64-bit binary. But if it isn't, then that is the problem. I use a 64 bit system. I'll try it on my other computer instead. Thanks!
Imerion
Posts: 200
Joined: Sun Feb 09, 2014 4:42 pm

Re: linux 64bit binnary?

Post by Imerion »

Anyone who has the ability to compile a new Linux binary for the latest beta?

Games exported with the Linux binary found here doesn't seem to work. :(
User avatar
Ats
Posts: 603
Joined: Fri Sep 28, 2012 10:05 am
Contact:

Re: linux 64bit binnary?

Post by Ats »

I'm still stuck with Android 64, so I decided to install linux x86 on an old computer in order to produce a new bin for Linux with the latest ZGE sources.
Here's my updated script with some side notes:
  • libsdl2-dev does not work so you need to install the old one
  • ppc386 doesn't seem to search for the libs inside the folders, I had to add them manually with several -Fu
  • Same as folders, you got to create them manually. Don't know why...

Code: Select all

sudo apt-get update
sudo apt-get install fp-compiler subversion libsdl1.2-dev
svn checkout http://svn.freepascal.org/svn/fpc/trunk fpc
cd fpc
sudo make all
sudo make install
cd ..
svn checkout https://github.com/VilleKrumlinde/zgameeditor.git zge-src
cd zge-src/trunk
mkdir Build Build/obj
/usr/local/lib/fpc/3.3.1/ppc386 -al -XXis -O2 -dZZDC_SDL SDL -dMINIMAL -FU./Build/obj/ -Fu/usr/local/lib/fpc/3.3.1/units/i386-linux/pthreads/ -Fu/usr/local/lib/fpc/3.3.1/units/i386-linux/fcl-base/ -Fu/usr/
local/lib/fpc/3.3.1/units/i386-linux/libc/ -Fu/usr/local/lib/fpc/3.3.1/units/i386-linux/paszlib/ -Fu/usr/local/lib/fpc/3.3.1/units/i386-linux/hash/ -Fu/usr/local/lib/fpc/3.3.1/units/i386-linux/rtl-objpas/ -B -Mdelphi -FE./Build/ ZzDC.dpr
cd Build
mv ZzDC Player_linux.bin
Attached is the new Player_linux.bin :D

But I'm still struggling to launch the produced ZGE file. Here's the problems:

Permission denied
chmod 755 your_file_name

error while loading shared libraries: libSDL-1.2.so.0: cannot open shared object file
sudo apt-get install libsdl-image1.2:i386

OpenGL could not be loaded
I tried several things listed here and elsewhere but can't get past that. I'm on a linux 64 computer right now, I'll test on the x86 one when I'll get back home.

EDIT: Ok, it's working perfectly on linux x86
Attachments
Player_linux.bin.zip
Player_linux.bin
(213.81 KiB) Downloaded 399 times
User avatar
Ats
Posts: 603
Joined: Fri Sep 28, 2012 10:05 am
Contact:

Re: linux 64bit binnary?

Post by Ats »

Hi VilleK, I'm compiling ZGE for linux32, which I was able to compile several times already last year, or maybe two years ago.
But this time around, I get this new error:

Code: Select all

/usr/local/lib/fpc/3.3.1/ppc386 -al -XXis -O2 -dZZDC_SDL SDL -dMINIMAL -FU./Build/obj/ -Fu/usr/local/lib/fpc/3.3.1/units/i386-linux/pthreads/ -Fu/usr/local/lib/fpc/3.3.1/units/i386-linux/fcl-base/ -Fu/usr/local/lib/fpc/3.3.1/units/i386-linux/libc/ -Fu/usr/local/lib/fpc/3.3.1/units/i386-linux/paszlib/ -Fu/usr/local/lib/fpc/3.3.1/units/i386-linux/hash/ -Fu/usr/local/lib/fpc/3.3.1/units/i386-linux/rtl-objpas/ -B -Mdelphi -FE./Build/ ZzDC.dpr
Warning: Only one source file supported, changing source file to compile from "SDL" into "ZzDC.dpr"
Free Pascal Compiler version 3.3.1 [2021/04/06] for i386
Copyright (c) 1993-2021 by Florian Klaempfl and others
Note: Switching assembler to default source writing assembler
Target OS: Linux for i386
Compiling ZzDC.dpr
Compiling ZClasses.pas
ZClasses.pas(585,5) Warning: Constructor should be public
Compiling ZMath.pas
ZMath.pas(586,9) Warning: "fdivp" without operand translated into "fdivp %st,%st(1)"
ZMath.pas(880,3) Warning: "fsubrp" without operand translated into "fsubrp %st,%st(1)"
ZMath.pas(898,3) Warning: "fsubrp" without operand translated into "fsubrp %st,%st(1)"
Assembling zmath
Compiling ZLog.pas
Compiling ZPlatform.pas
Compiling SDL.pas
Assembling sdl
Compiling AudioPlayer.pas
Compiling AudioComponents.pas
Compiling ZApplication.pas
Compiling Meshes.pas
Compiling ZBitmap.pas
Compiling ZOpenGL.pas
Assembling zopengl
Assembling zbitmap
Compiling ZExpressions.pas
Compiling ZApplication.pas
Compiling Meshes.pas
Compiling ZApplication.pas
Compiling Collision.pas
Compiling ZApplication.pas
Compiling Commands.pas
Compiling ZApplication.pas
Compiling GLDrivers.pas
Compiling Renderer.pas
Compiling ZApplication.pas
Compiling GLDrivers.pas
GLDrivers.pas(286,7) Warning: Case statement does not handle all possible cases
Assembling gldrivers
ZApplication.pas(613,5) Warning: Case statement does not handle all possible cases
Assembling zapplication
Renderer.pas(804,17) Warning: Converting pointers to signed integers may result in wrong comparison results and range errors, use an unsigned type instead.
Renderer.pas(1288,18) Warning: Local variable "Lists" does not seem to be initialized
Renderer.pas(1465,20) Warning: Converting pointers to signed integers may result in wrong comparison results and range errors, use an unsigned type instead.
Renderer.pas(1466,20) Warning: Converting pointers to signed integers may result in wrong comparison results and range errors, use an unsigned type instead.
Renderer.pas(1916,5) Warning: Case statement does not handle all possible cases
Assembling renderer
Assembling commands
Collision.pas(471,3) Warning: Case statement does not handle all possible cases
Assembling collision
Assembling meshes
ZExpressions.pas(672,3) Note: Local variable "NilP" is assigned but never used
ZExpressions.pas(731,3) Warning: Case statement does not handle all possible cases
ZExpressions.pas(832,9) Note: Local variable "V" is assigned but never used
ZExpressions.pas(850,9) Note: Local variable "V" is assigned but never used
ZExpressions.pas(902,13) Warning: Case statement does not handle all possible cases
ZExpressions.pas(916,13) Warning: Case statement does not handle all possible cases
ZExpressions.pas(1443,3) Note: Local variable "P" is assigned but never used
ZExpressions.pas(1555,3) Note: Local variable "RetVal" is assigned but never used
ZExpressions.pas(1819,3) Note: Local variable "V" is assigned but never used
ZExpressions.pas(1960,3) Warning: Case statement does not handle all possible cases
ZExpressions.pas(2834,3) Note: Local variable "C" is assigned but never used
ZExpressions.pas(2899,5) Warning: Case statement does not handle all possible cases
ZExpressions.pas(2964,3) Warning: Case statement does not handle all possible cases
Assembling zexpressions
Compiling BeRoAudioOGGVorbisTremor.pas
Assembling beroaudiooggvorbistremor
Assembling audiocomponents
AudioPlayer.pas(250,5) Warning: Case statement does not handle all possible cases
AudioPlayer.pas(397,22) Warning: Unreachable code
AudioPlayer.pas(431,19) Warning: Unreachable code
AudioPlayer.pas(1036,17) Warning: Unreachable code
Assembling audioplayer
ZPlatform_SDL.inc(13,18) Warning: Unit "libc" is deprecated: "Unportable Kylix legacy unit that only exists on Linux/x86. see http://wiki.freepascal.org/libc_unit "
ZPlatform_SDL.inc(342,17) Error: Identifier not found "SampleCount"
ZPlatform.pas(141) Fatal: There were 1 errors compiling module, stopping
Fatal: Compilation aborted
User avatar
Ats
Posts: 603
Joined: Fri Sep 28, 2012 10:05 am
Contact:

Re: linux 64bit binnary?

Post by Ats »

So I replaced line 337 of ZPlatform_SDL.inc

Code: Select all

procedure ClipAndCopy(Source : PSoundMixUnit; Dest : PSmallInt; FrameCount : integer);
per

Code: Select all

procedure ClipAndCopy(Source : PSoundMixUnit; Dest : PSmallInt; SampleCount : integer);
as it was in 2016.

And it's compiling perfectly :D
I was planning on making a GitHub PR, but I got that message when starting editing the file, so I'll let you change it:
We’ve detected the file encoding as ISO-8859-1. When you commit changes we will transcode it to UTF-8.
User avatar
VilleK
Site Admin
Posts: 2274
Joined: Mon Jan 15, 2007 4:50 pm
Location: Stockholm, Sweden
Contact:

Re: linux 64bit binnary?

Post by VilleK »

Thanks, the error is actually that I forgot to also update the variable name in the loop inside the function. Fixed now!
Post Reply