Arch Linux x86_64 Compiling

Trying to build your own version of Vega Strike and having problems? Unix users, paste your config.log here (stderr output alone is not helpful).
Post Reply
Coragem
Bounty Hunter
Bounty Hunter
Posts: 169
Joined: Sun Jan 20, 2008 8:38 pm
Location: Rio de Janeiro, Brazil

Arch Linux x86_64 Compiling

Post by Coragem »

HI all, Long time no see, i will be back more ofen i promise. Not really a problem but compiling related topic.

Well, good news is, i just Bought a new machine, Instaled the base system, X.org, Fluxbox, svn, updated my svn tree and compiled vegastrike again without any issues on first try. :mrgreen: (only some Openal issue to map alsa device,but that was system stuff)

One question is there any ./configure arguments i can or should use for improvement on x86_64 :?:

Now Im running new computer on the signature. By the way first time i see VS with all the eye candy, VERY GOOD! my congratulations for the entire team. amazing work guys. :o
My System: Arch Linux x86_64 Bits CPU: AMD Phenom II X4 995 RAM: Kingston DDR2 800Mhz 8 GB GPU: Dual ATI Radeon HD 4830 512 MB Opensource ATI-Git Drivers. HD: SATA 500 Gb WindowManager: KDE4 Joystick: Thustmaster T.Flight Stick X USB
loki1950
The Shepherd
Posts: 5841
Joined: Fri May 13, 2005 8:37 pm
Location: Ottawa
Contact:

Re: Arch Linux x86_64 Compiling

Post by loki1950 »

Hi Coragem not sure if there are any specific config options for 64-bit which may not be surprising given our legacy but i imagine that a few of the dev team are running 64 bit systems and may have a few tweaks up there collective sleeves :wink:

Enjoy the Choice :)
my box::HP Envy i5-6400 @2Q70GHzx4 8 Gb ram/1 Tb(Win10 64)/3 Tb Mint 19.2/GTX745 4Gb acer S243HL K222HQL
Q8200/Asus P5QDLX/8 Gb ram/WD 2Tb 2-500 G HD/GF GT640 2Gb Mint 17.3 64 bit Win 10 32 bit acer and Lenovo ideapad 320-15ARB Win 10/Mint 19.2
ace123
Lead Network Developer
Lead Network Developer
Posts: 2560
Joined: Sun Jan 12, 2003 9:13 am
Location: Palo Alto CA
Contact:

Re: Arch Linux x86_64 Compiling

Post by ace123 »

At the moment, there aren't any specific flags for 64-bit. Fortunately, since X86-64 is such a new architecture, it already implies compatiblity with a lot of basic features such as SSE and i686 compatibility.

But I'm sure there are some options you can pass in CXXFLAGS with "-f" which allow you to to take advantage of some modern features at the expense of compatibility. This is even more true on 32-bit architectures, however, as those compilers tend to aim at Pentium 2 or 3 compatibility at default.

Cross-compiling between 64-bit and 32-bit is considerably more difficult, mostly because some distributions don't have quite all the required libraries in the 32-bit compatibility package, so you have to grab a couple of them from the 32-bit distributions, and although there is a "-m32" option, GCC has some issues with symlinks and library directories.

I would say just stick with the defaults and build a 64-bit binary. In fact it may be worth sacrificing all optimizations and running with "--enable-debug" since it's not really noticeably slower.
Coragem
Bounty Hunter
Bounty Hunter
Posts: 169
Joined: Sun Jan 20, 2008 8:38 pm
Location: Rio de Janeiro, Brazil

Re: Arch Linux x86_64 Compiling

Post by Coragem »

Hi ace123,
CXXFLAGS with "-f"
What would this do? i had some C classes but it has like 4 years ago...

With --enable-debug i would be getting a lot more info on the terminal or just be able to run a Debugger later?

As far as compatbility libs are the question... so far i have no problems in Arch Linux 64 with lib32 package installed. Running OpenTyrian / Doom3 / Quake 4 / Enemy Territory: Quake Wars. Without any issues.

I have no use compiling 32 bits binarys on this distro so... one less problem for me.

Thank you for the info.
My System: Arch Linux x86_64 Bits CPU: AMD Phenom II X4 995 RAM: Kingston DDR2 800Mhz 8 GB GPU: Dual ATI Radeon HD 4830 512 MB Opensource ATI-Git Drivers. HD: SATA 500 Gb WindowManager: KDE4 Joystick: Thustmaster T.Flight Stick X USB
ace123
Lead Network Developer
Lead Network Developer
Posts: 2560
Joined: Sun Jan 12, 2003 9:13 am
Location: Palo Alto CA
Contact:

Re: Arch Linux x86_64 Compiling

Post by ace123 »

Here's a simple FAQ from Gentoo on the different optimization flags you can use:
http://www.gentoo.org/doc/en/gcc-optimization.xml
There's a lot of info on the different optimization flags out there, but usually it's best to stick to the defaults of -O1,-O2 and maybe (if it doesn't give internal compiler errors) -O3. You can select these in ./configure by doing "--enable-release=1", "--enable-release=2" ...
There's also -Os (--enable-release=s) which optimizes for size--I once managed to build vegastrike on a severely limited quota with this flag.

The --enable-debug option allows you to debug the program later on with "gdb vegastrike". I would recommend using this instead of optimizations if you are using an unstable SVN build, since it's likely you will encounter a crash. The main disadvantage is that the compiled binary will be about 120MB instead of 10MB.

Since optimizations probably give no more than 10% speed improvement (if at all, since the graphics card is usually the bottleneck in actual gameplay), I just use debug.
Coragem
Bounty Hunter
Bounty Hunter
Posts: 169
Joined: Sun Jan 20, 2008 8:38 pm
Location: Rio de Janeiro, Brazil

Re: Arch Linux x86_64 Compiling

Post by Coragem »

Thx Ace, very nice tutorial.

I have tryed -O2 -march=athon64 i have indeed noticed speed improvement, most noticiable on the loading time.

But as you suggested i returned and compiled with -enable-debug only, so i can get back in helping out bug hunting. :mrgreen:
My System: Arch Linux x86_64 Bits CPU: AMD Phenom II X4 995 RAM: Kingston DDR2 800Mhz 8 GB GPU: Dual ATI Radeon HD 4830 512 MB Opensource ATI-Git Drivers. HD: SATA 500 Gb WindowManager: KDE4 Joystick: Thustmaster T.Flight Stick X USB
Post Reply