PDA

View Full Version : Compiling Linux Ports in Unix


razorace
09-01-2004, 04:05 PM
I've been trying to figure out how to compile a JKA Linux port on unix but my gcc compile keeps gives me a error that it doesn't recognize the "arch=i586" command. Any ideas?

stubert
09-01-2004, 07:40 PM
i'd go and look in another makefile on the system your using to see what the arch flag looks like for that particular unix

razorace
09-01-2004, 11:00 PM
I'm not aware of there being any other makefiles availible on this system. I'm using university computers.

stubert
09-03-2004, 04:46 AM
weird... well.. maybe it's a sparc or something? did you try not giving it an arch flag?

Brad Oliver
09-06-2004, 03:45 PM
Originally posted by razorace
I've been trying to figure out how to compile a JKA Linux port on unix but my gcc compile keeps gives me a error that it doesn't recognize the "arch=i586" command. Any ideas?

I'd put strong money that the unix you're using isn't x86-based. Type "arch" at the command prompt and, in most cases, it'll tell you what CPU is in there. On OSX, for example, it says "ppc" because the Mac uses a PowerPC CPU.

razorace
09-06-2004, 07:07 PM
It's "sun4". Guess I'll have to physically go into the Linux labs and see if I can do it from there.

Slider744
09-06-2004, 11:01 PM
try removing the i586 arch option in the gcc comand line
by default the gcc should compile the code with uNIX optimization...

razorace
09-07-2004, 12:50 AM
it compiles. but is it in a form that work properly?

stubert
09-07-2004, 04:37 AM
its solaris, so probably not

Slider744
09-07-2004, 04:45 AM
the arch option is only made to add optimization to the compiled code for your CPU and hardware...

it also provides to this compiled code some special binary instructions that will work better with your cpu type....

when you start compiling using gcc on a platform

i think gcc by default compile the code including optimization for the computer you are using to compile the code

if you unix is a sparc machine for example
look here for optimization with your processor
http://gcc.gnu.org/onlinedocs/gcc-3.4.1/gcc/SPARC-Options.html#SPARC%20Options



if you want optimization for other UNIX hardware
look here
http://gcc.gnu.org/onlinedocs/gcc-3.4.1/gcc/Submodel-Options.html#Submodel%20Options

Brad Oliver
09-07-2004, 05:53 AM
Originally posted by razorace
it compiles. but is it in a form that work properly?

Unfortunately no. The Sun systems have their own custom CPU (they call it a SPARC processor) - it's not an x86. If you want to build the Linux stuff yourself, your best bet may be to just partition the hard drive on your PC and put Linux on it.

Brad Oliver
09-07-2004, 06:04 AM
Originally posted by Slider744
the arch option is only made to add optimization to the compiled code for your CPU and hardware...

The key word here is "hardware" - the only platforms that are important are those for which an OpenGL Jedi Academy build has been released (Win32 and the Mac) or those for which a dedicated server app has been released (Win32, Mac, Linux/Unix x86). There's no advantage to working on any others because even if you could get the mod compiled on them, you wouldn't have any way to run it.

On the PC, that means platforms that support either the x86 PE executable format (Win32) or the x86 ELF executable format (Linux/Unix x86). On the Mac, it means either CFM or Mach-O PowerPC.

Slider744
09-07-2004, 06:24 AM
Originally posted by Brad Oliver
There's no advantage to working on any others because even if you could get the mod compiled on them, you wouldn't have any way to run it.



yeah lol
i don't knopw why i didn't think to that before :)
of course raven will have to compile a verison of the dedicated server for unix or give the source of the main dedicated server part

i don't think there is a chance to have both

unix platform are too expensive and linux is free, so raven will not provide a unix version of the dedicated server because businees server providers prefer to buy PC with linux on it...


for the source, i don't think they will give it because after people will have almost the entire code of the MP game

stubert
09-07-2004, 09:20 AM
well there is always freebsd and it's compatibility with linux

Brad Oliver
09-07-2004, 12:31 PM
Originally posted by stubert
well there is always freebsd and it's compatibility with linux

Yes, if the binary executable format is the same (as it is between FreeBSD and Linux - they both use x86 ELF), then it'll likely run the dedicated server, and thus mods.

From a pragmatic standpoint, however, it's probably not worth development time to test against all the possible x86 Unix configs because there are so many other varieties with so few gaming users relative to Linux. Just test against x86 Linux and trust in those other folks to let you know when something is broken. Odds are they'll even have a patch ready. :)

razorace
09-07-2004, 06:50 PM
ok, looks like I got it all figured out when I got direct access to the school's linuxs systems. Now I just need someone to host it to test the bloody thing.

stubert
09-13-2004, 10:04 AM
you should duel boot with linux... i have slackware 10 that i use to dink around with lookingGlass and compile my linux .so for redslushie.. i don't really use it otherwise and it only takes up about 10 gigs out of 140

stubert
09-13-2004, 10:06 AM
Originally posted by Brad Oliver
Yes, if the binary executable format is the same (as it is between FreeBSD and Linux - they both use x86 ELF), then it'll likely run the dedicated server, and thus mods.

From a pragmatic standpoint, however, it's probably not worth development time to test against all the possible x86 Unix configs because there are so many other varieties with so few gaming users relative to Linux. Just test against x86 Linux and trust in those other folks to let you know when something is broken. Odds are they'll even have a patch ready. :)


yea, i've know people that run q3 and whatnot on bsd and it works fine