Page 1 of 2

Compile for one platform from another

Posted: Sat Jun 20, 2020 7:49 pm
by the.weavster
I'd like to be able to compile for any supported platform from any supported platform

Re: Compile for one platform from another

Posted: Sat Jun 20, 2020 10:15 pm
by chi
I'd like Fred to switch from FASM to LLVM. All the problems that PB is currently struggling with would be gone for good :twisted:

Re: Compile for one platform from another

Posted: Sun Jun 21, 2020 4:43 am
by Mohsen
+1

Re: Compile for one platform from another

Posted: Sun Jun 21, 2020 6:38 am
by Josh
This has already been discussed several times and, as far as I can remember, is not possible for legal reasons.

Re: Compile for one platform from another

Posted: Sun Jun 21, 2020 7:29 am
by BarryG
Josh, legal for which bit: compiling on one platform for another, or switching from FASM to LLVM?

Re: Compile for one platform from another

Posted: Sun Jun 21, 2020 8:06 am
by mk-soft
It's not that simple. It doesn't matter if it is ASM, LLVM or C++ compiler.
It is still the big differences of the operating system that have to be considered. You want to test it and you have to have everything from all operating systems.

-1

Re: Compile for one platform from another

Posted: Sun Jun 21, 2020 10:05 am
by Saki
This is not possible and will never be possible.

It must always be checked if a code works properly with the desired OS.

What works with Windows is far from being safe with Linux.

You can rather say that what works with Linux will probably work with Windows and Mac OS.
But primarily every code has to be checked in detail and adapted accordingly.

Working with VM is also risky,
that goes very well, but there are some strange misbehaviours from time to time.

Best Regards Saki

Re: Compile for one platform from another

Posted: Sun Jun 21, 2020 10:10 am
by Josh
BarryG wrote:Josh, legal for which bit: compiling on one platform for another, or switching from FASM to LLVM?
For compiling you need some libraries or other stuff that belongs to the operating system. You can't just take them and use them on another os.

Re: Compile for one platform from another

Posted: Mon Jun 22, 2020 1:25 pm
by the.weavster
Saki wrote:This is not possible and will never be possible.
Why will it never be possible?

I used to be able to do it with Real Studio (now Xojo and now a broken feature).
And I can do it with Nim: https://nim-lang.github.io/Nim/nimc.htm ... or-windows

Re: Compile for one platform from another

Posted: Mon Jun 22, 2020 3:15 pm
by Tenaja
the.weavster wrote:
Saki wrote:This is not possible and will never be possible.
Why will it never be possible?

I used to be able to do it with Real Studio (now Xojo and now a broken feature).
And I can do it with Nim: https://nim-lang.github.io/Nim/nimc.htm ... or-windows
The greatest hindrance to its possibility is Fred's desire, and he has repeatedly indicated it is not there.

Technically, it's possible. It seems he finds the maintenance overwhelming, which is understandable. He'd have to port the generation libraries to every platform, do there'd be nine instead of three... And if you add the recently promised arm output, it will be sixteen instead of four. Or, cumbersome #CompilerIfPlatform=TheRightOne statements.

Re: Compile for one platform from another

Posted: Mon Jun 22, 2020 8:38 pm
by Saki
Hi,
the OS are just too different.
It might work if you started from scratch.
But then a lot of things would probably work differently than now.
This would also mean that compatibility with older codes would no longer be possible.
So, a reduction to common features.
Look how many years of work has been done on the individual OS.
Thousands of people are working on improving and updating everything.
The more complex and extensive everything becomes, the harder it becomes to define commonalities.
Internal processes, many things are different.

Otherwise, it's quite amazing what these few people have already accomplished.
But if you look at the fact that it often takes several years to fix a single bug,
you can quickly see that it's not that easy.
I also don't believe that the developers have become rich through their efforts,
who is supposed to do it, who is supposed to pay for it, who can live on it ?
Many questions !

Best Regards Saki

Re: Compile for one platform from another

Posted: Mon Jun 22, 2020 10:16 pm
by mk-soft
We should be happy with what we have with Purebasic. All functions are brought on a common denominator and that with the massive differences in the operating systems. Especially with the GUI. Windows API with the windows controls. MacOS with cocoa and objective-c. Linux with gtk2, gtk3 and QT. So the applications we create look good on the OS without having to drag huge libraries to display the user interface.

This is a great achievement of Fred, which is not appreciated enough.

Re: Compile for one platform from another

Posted: Mon Jun 22, 2020 11:50 pm
by oreopa
Very good post mk-soft. I concur 100%

Re: Compile for one platform from another

Posted: Tue Jun 23, 2020 9:30 am
by deeproot
oreopa wrote:Very good post mk-soft. I concur 100%
Yes, very well said and I couldn't agree more!

Re: Compile for one platform from another

Posted: Tue Jun 23, 2020 9:36 am
by the.weavster
Tenaja wrote:Technically, it's possible. It seems he finds the maintenance overwhelming, which is understandable. He'd have to port the generation libraries to every platform, do there'd be nine instead of three... And if you add the recently promised arm output, it will be sixteen instead of four. Or, cumbersome #CompilerIfPlatform=TheRightOne statements.
Thanks for the perspective.

mk-soft wrote:We should be happy with what we have with Purebasic.
Oh, OK then... perhaps Fred should just shut down the Feature Requests and Wishlists section of the forum <eye-roll>