Vice City: Multiplayer

Off-Topic => Off-Topic General => Topic started by: KAKAN on Aug 16, 2016, 07:56 AM

Title: Compiling VCMP server for ARM architecture?
Post by: KAKAN on Aug 16, 2016, 07:56 AM
I could have done that, but, unfortunately I don't have the source code.
Any ideas on that? I want VCMP's server on ARM so that I can use it with Raspberry PI or something similar to that.
@Stormeus @maxorator do you have time to compile it for ARM architecture? If so, please, do it. Thanks.
Title: Re: Compiling VCMP server for ARM architecture?
Post by: . on Aug 16, 2016, 09:10 AM
Seriously? Again? You clearly don't understand how ARM works. In your mind, everything must be like "you just select ARM and press compile, right?". But it's not..
Title: Re: Compiling VCMP server for ARM architecture?
Post by: Stormeus on Aug 16, 2016, 02:55 PM
Quote from: . on Aug 16, 2016, 09:10 AMSeriously? Again? You clearly don't understand how ARM works. In your mind, everything must be like "you just select ARM and press compile, right?". But it's not..

With the right packages installed, yes, pretty much.

(https://forum.vc-mp.org/proxy.php?request=http%3A%2F%2Fi.imgur.com%2Fg9R6YYw.png&hash=5e13fd9e1c3321774a1b602afb04050958debeff)

I already had a small changeset for ARM cross-compiling done since I was playing around with it on my own Raspi, but there are a few issues that led me not to make this a mainstream change:

We could probably fix point #1 by using Clang over GCC due to the ridiculous packaging for GCC that causes that conflict.
Title: Re: Compiling VCMP server for ARM architecture?
Post by: . on Aug 16, 2016, 03:31 PM
Quote from: Stormeus on Aug 16, 2016, 02:55 PMWith the right packages installed, yes, pretty much.

Yes, with the right packages and dependencies. Dependencies that probably not everyone will understand or know to deal with.

It's one thing if you guys do it as a fun experiment and another to actually maintain a successful ARM distribution.
Title: Re: Compiling VCMP server for ARM architecture?
Post by: EK.IceFlake on Aug 16, 2016, 04:09 PM
apt-get can install any dependencies, unfortunately VCMP needs to be open source for apt-get
Title: Re: Compiling VCMP server for ARM architecture?
Post by: Thijn on Aug 16, 2016, 04:19 PM
Quote from: EK.CrystalBlue on Aug 16, 2016, 04:09 PMapt-get can install any dependencies, unfortunately VCMP needs to be open source for apt-get
Why would it? If you just give the dependencies in a list you need to install, there's nothing stopping you from doing this.

Anyways. It's a fun experiment, but probably not worth the time.
Title: Re: Compiling VCMP server for ARM architecture?
Post by: Stormeus on Aug 16, 2016, 05:36 PM
Quote from: EK.CrystalBlue on Aug 16, 2016, 04:09 PMapt-get can install any dependencies, unfortunately VCMP needs to be open source for apt-get

1. No it doesn't.
2. We're talking about dependencies needed to compile the server, not run it.
Title: Re: Compiling VCMP server for ARM architecture?
Post by: EK.IceFlake on Aug 17, 2016, 08:39 AM
Doesn't apt-get take the source and compile it on the target machine, installing + compiling dependencies as well?
Title: Re: Compiling VCMP server for ARM architecture?
Post by: KAKAN on Aug 17, 2016, 08:59 AM
@Stormeus can you please PM me the dependencies as well as the server executable for ARM( I only need for ARMv8 )?
Title: Re: Compiling VCMP server for ARM architecture?
Post by: Stormeus on Aug 17, 2016, 02:52 PM
Quote from: EK.CrystalBlue on Aug 17, 2016, 08:39 AMDoesn't apt-get take the source and compile it on the target machine, installing + compiling dependencies as well?

No. It installs binaries that have already been compiled. I don't think any package manager does that except Gentoo's emerge.

Quote from: KAKAN on Aug 17, 2016, 08:59 AM@Stormeus can you please PM me the dependencies as well as the server executable for ARM( I only need for ARMv8 )?

You wouldn't need any dependencies, just a server that has been compiled for ARM. I don't plan on doing that regularly at the moment.
Title: Re: Compiling VCMP server for ARM architecture?
Post by: ysc3839 on Aug 17, 2016, 02:54 PM
Quote from: KAKAN on Aug 17, 2016, 08:59 AM@Stormeus can you please PM me the dependencies as well as the server executable for ARM( I only need for ARMv8 )?
I think the only thing you need is glibc.
Title: Re: Compiling VCMP server for ARM architecture?
Post by: . on Aug 17, 2016, 03:38 PM
The thing which everyone is ignoring and it's quite important. Which was also mentioned by @Stormeus in his initial post. Are the plugins. Those are going to be tricky. And you can't say you don't need them.

Some of them even contain assembly instructions that are specific to X86 architecture. Like the Crypto++ library used by the hash plugin. Then there's the MySQL library used by the mysql plugin. And as you probably guessed. Some of them would require substantial modifications to be able to work on ARM.

EDIT: Crypto++ seems to have ARM alternatives as well. So that could work just fine.
Title: Re: Compiling VCMP server for ARM architecture?
Post by: ysc3839 on Aug 18, 2016, 01:39 AM
Quote from: . on Aug 17, 2016, 03:38 PMThe thing which everyone is ignoring and it's quite important. Which was also mentioned by @Stormeus in his initial post. Are the plugins. Those are going to be tricky. And you can't say you don't need them.

Some of them even contain assembly instructions that are specific to X86 architecture. Like the Crypto++ library used by the hash plugin. Then there's the MySQL library used by the mysql plugin. And as you probably guessed. Some of them would require substantial modifications to be able to work on ARM.

EDIT: Crypto++ seems to have ARM alternatives as well. So that could work just fine.
IIRC, the MySQL plugin contains a pre-built lib. But there's the source code on Internet.
Title: Re: Compiling VCMP server for ARM architecture?
Post by: Stormeus on Aug 18, 2016, 01:31 PM
Quote from: ysc3839 on Aug 18, 2016, 01:39 AMIIRC, the MySQL plugin contains a pre-built lib. But there's the source code on Internet.

Yeah, but it's also bundled with the entirety of the MySQL source code.
Title: Re: Compiling VCMP server for ARM architecture?
Post by: ysc3839 on Aug 19, 2016, 01:33 AM
Quote from: Stormeus on Aug 18, 2016, 01:31 PM
Quote from: ysc3839 on Aug 18, 2016, 01:39 AMIIRC, the MySQL plugin contains a pre-built lib. But there's the source code on Internet.

Yeah, but it's also bundled with the entirety of the MySQL source code.
Sorry for my bad English, what's the meaning of "bundled"?