[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
Prospector - A roguelike in space www.prospector.at • View topic - Compiling on Linux

Compiling on Linux

General discussion about Prospector

Compiling on Linux

Postby HunterZ » Sat 12. Oct 2013, 19:13

I'm trying to see if I can get anywhere with compiling Prospector on Linux, using a Xubuntu x86-64 box.

So far, I've pulled the SVN source from the repo, and have installed FreeBASIC and verified that I can compile and run some example programs.

I'm now looking at FreeBASIC-ext/fb-extended-lib. It doesn't appear to have an updated official Linux version, so I'm probably going to have to compile that from source too (ugh).

I'm a bit concerned that even if I can get it working, it will still be impossible to run on other Linux machines unless the user installs a bunch of extra packages. Maybe I'll at least be able to document a method for other people to build their own binaries, though.
HunterZ
Conqueror of the penguin planet
Conqueror of the penguin planet
 
Posts: 63
Joined: Sun 22. Sep 2013, 22:13
Location: Seattle

Re: Compiling on Linux

Postby HunterZ » Sat 12. Oct 2013, 19:34

Update: Is there any way to get away from the freebasic-ext dependency? freebasic-ext just doesn't compile on Linux, and there seems to be almost no support/community for it. There also seems to be no non-deprecated official Linux release.

It also seems that the freebasic-ext source is full of bugs. Someone in the #freebasic IRC helped me squash one bug, only to run into another: http://code.google.com/p/fb-extended-li ... tail?id=29

I tried commenting out the sqlite3 driver with the assumption that Prospector doesn't use it, but then hit yet another bug. What a piece of junk; I think I'm going to throw in the towel!
HunterZ
Conqueror of the penguin planet
Conqueror of the penguin planet
 
Posts: 63
Joined: Sun 22. Sep 2013, 22:13
Location: Seattle

Re: Compiling on Linux

Postby magellan » Sun 13. Oct 2013, 15:36

Actually the only thing it uses from ext is the freetype bindings.
You are right. Maybe finding an alternative for that is a good idea.
magellan
Pilot
 
Posts: 249
Joined: Tue 17. Sep 2013, 21:22

Re: Compiling on Linux

Postby HunterZ » Sun 13. Oct 2013, 16:35

The latest version of FreeBASIC appears to have built-in FreeType2 support. There is an examples/graphics/FreeType directory with two example programs.

Also: http://www.freebasic.net/wiki/wikka.php ... bfreetype2

Edit: Looks like you're also using ext/hash/crc32.bi.
HunterZ
Conqueror of the penguin planet
Conqueror of the penguin planet
 
Posts: 63
Joined: Sun 22. Sep 2013, 22:13
Location: Seattle

Re: Compiling on Linux

Postby magellan » Sun 13. Oct 2013, 18:30

Fascinating.
I just realized I hardly ever use the ext freetype binding (Actually only to draw the titles for things like highscore and the main screen)
crc32 is used for zipped savegames. There are 2 things about that:
1) It's nice to have because they zip really well
2) In a world of TB drives it really doesn't matter that much.

I am calling it a night for today, but chances are that I will be able to finish replacing those 2 by tomorrow.
magellan
Pilot
 
Posts: 249
Joined: Tue 17. Sep 2013, 21:22

Re: Compiling on Linux

Postby HunterZ » Sun 13. Oct 2013, 22:22

The latest version of FreeBASIC also comes with built-in zlib bindings. Is that not sufficient for implementing compressed save support? It looks like it also has a built-in crc32 thing.

Here's a patch with an example program: http://sourceforge.net/p/fbc/patches/30/


Failing that, I'm sure you can get a crc32 algorithm from somewhere else, like one of these:

http://www.freebasic.net/forum/viewtopic.php?p=6399
http://forum.qbasicnews.com/index.php?t ... 352.0;wap2

The FreeBASIC Extended Library also allows you to redistribute their source (as long as you follow the license requirements: http://code.google.com/p/fb-extended-lib/wiki/License), so you could rip their crc32 algorithm too if it doesn't depend too much on other parts of the lib.
HunterZ
Conqueror of the penguin planet
Conqueror of the penguin planet
 
Posts: 63
Joined: Sun 22. Sep 2013, 22:13
Location: Seattle

Re: Compiling on Linux

Postby magellan » Wed 16. Oct 2013, 18:43

Down to 1 error message when compiling on linux. But it's a headscratcher
cannot find -lsupc++
Sometimes it also says that it is skipping an incompatible 64 bit supc++ version

Anyway I uploaded the current source stripped of the ext library to the googlecode repository. If anybody wants to give it a shot, be my guest.
magellan
Pilot
 
Posts: 249
Joined: Tue 17. Sep 2013, 21:22

Re: Compiling on Linux

Postby HunterZ » Wed 16. Oct 2013, 20:19

I'll give it another go when I'm at home and have time. Hopefully that will be sometime this evening.

In the meantime, do you have g++ installed on your Linux box? libsupc++ is supposed to be part of that. If you're using Debian/Ubuntu or a derivative, you'll want to run "sudo apt-get install build-essential" to get those.

Edit: You may also want to try doing "sudo apt-get install g++-multilib" to get 32-bit g++ stuff installed.
HunterZ
Conqueror of the penguin planet
Conqueror of the penguin planet
 
Posts: 63
Joined: Sun 22. Sep 2013, 22:13
Location: Seattle

Re: Compiling on Linux

Postby HunterZ » Thu 17. Oct 2013, 00:20

HunterZ
Conqueror of the penguin planet
Conqueror of the penguin planet
 
Posts: 63
Joined: Sun 22. Sep 2013, 22:13
Location: Seattle

Re: Compiling on Linux

Postby HunterZ » Thu 17. Oct 2013, 02:11

HunterZ
Conqueror of the penguin planet
Conqueror of the penguin planet
 
Posts: 63
Joined: Sun 22. Sep 2013, 22:13
Location: Seattle

Next

Return to General discussion

Who is online

Users browsing this forum: No registered users and 11 guests

cron