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. (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.
Arch Linux x86_64 Compiling
-
- Bounty Hunter
- Posts: 169
- Joined: Sun Jan 20, 2008 8:38 pm
- Location: Rio de Janeiro, Brazil
Arch Linux x86_64 Compiling
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
-
- The Shepherd
- Posts: 5841
- Joined: Fri May 13, 2005 8:37 pm
- Location: Ottawa
- Contact:
Re: Arch Linux x86_64 Compiling
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
Enjoy the Choice
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
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
-
- Lead Network Developer
- Posts: 2560
- Joined: Sun Jan 12, 2003 9:13 am
- Location: Palo Alto CA
- Contact:
Re: Arch Linux x86_64 Compiling
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.
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.
-
- Bounty Hunter
- Posts: 169
- Joined: Sun Jan 20, 2008 8:38 pm
- Location: Rio de Janeiro, Brazil
Re: Arch Linux x86_64 Compiling
Hi ace123,
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.
What would this do? i had some C classes but it has like 4 years ago...CXXFLAGS with "-f"
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
-
- Lead Network Developer
- Posts: 2560
- Joined: Sun Jan 12, 2003 9:13 am
- Location: Palo Alto CA
- Contact:
Re: Arch Linux x86_64 Compiling
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.
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.
-
- Bounty Hunter
- Posts: 169
- Joined: Sun Jan 20, 2008 8:38 pm
- Location: Rio de Janeiro, Brazil
Re: Arch Linux x86_64 Compiling
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.
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.
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