Author Topic: Future of Linux ports  (Read 5890 times)

Glenn

  • Newbie
  • *
  • Posts: 31
  • Karma: +0/-0
    • View Profile
Future of Linux ports
« on: October 02, 2022, 10:53:56 am »
Hi all, On tech forums everyone is talking about Rust making it to the Linux kernel, which probably will mean more and more programs that will be Rust-based.
In the Firefox discussions, I read it was impossible to port Rust to OS/2. I’d like to better understand why, because I see that as an increasing difficulty to make OS/2 apps by porting Linux ones…

Roderick Klein

  • Hero Member
  • *****
  • Posts: 655
  • Karma: +14/-0
    • View Profile
Re: Future of Linux ports
« Reply #1 on: October 02, 2022, 01:58:00 pm »
I just doubt how quickly the projects we have will all be swapped to the RUST compiler.

Roderick

Jochen Schäfer

  • Sr. Member
  • ****
  • Posts: 306
  • Karma: +27/-0
    • View Profile
Re: Future of Linux ports
« Reply #2 on: October 02, 2022, 07:10:25 pm »
I doubt, that all projects just move to Rust. People choose the languages for their projects by needs and taste. Most people just won't dump their work of years just for the hot shit of the hour.
E.g. the DOSBOX maintainers very decidely stated, they will stay with their old version of C++ (C++98).

And the linux kernel will not switch over night to Rust. BSD is more important for us anyway.

Martin Iturbide

  • OS2World NewsMaster
  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4713
  • Karma: +41/-1
  • Your Friend Wil Declares...
    • View Profile
    • Martin's Personal Blog
Re: Future of Linux ports
« Reply #3 on: October 02, 2022, 07:23:34 pm »
Hi

I share the idea that the typical developer that had spend a long time coding his software on an specific language will not change it. But if we just ignore "the shift / the wave" a different thing may happen,  new developers with new ideas came and annihilates the old software. Suddenly the software we use became "legacy" and we just blind fold ourselves saying that all the new stuff is crap and all this young people are just hipsters that nobody understand.

I insist on keeping out eyes open to whatever comes that may help us and notice that things may change in the future.

Regards
Martin Iturbide
OS2World NewsMaster
... just share the dream.

Dave Yeo

  • Hero Member
  • *****
  • Posts: 4787
  • Karma: +99/-1
    • View Profile
Re: Future of Linux ports
« Reply #4 on: October 02, 2022, 08:53:15 pm »
Hi all, On tech forums everyone is talking about Rust making it to the Linux kernel, which probably will mean more and more programs that will be Rust-based.
In the Firefox discussions, I read it was impossible to port Rust to OS/2. I’d like to better understand why, because I see that as an increasing difficulty to make OS/2 apps by porting Linux ones…

Not impossible, just really hard. We use a patched (and with helper programs) GCC (Gnu Compiler Collection) along with the system linker to port/build programs.
Rust uses the LLVM toolchain, which has no support for our system so that would have to be ported, a large project for a knowledgeable compiler expert who would also need a good understanding of OS/2 internals. Given a few million dollars and luck in finding the right developer, it could be done. Probably the patches to make the port work wouldn't be accepted upstream so like our GCC, a fork would have to be maintained.
The other big problem is memory, or rather address space.  It takes a lot of memory to build and link some of this stuff. We ran into a lot of problems building Firefox around version 4. There were source files that used 2 GB's of memory just to compile, doable one at a time and the linker had problems. Ilink5 stopped working and we switched to wlink, which we have the source for and that needed quite a bit of patching to link Firefox and today QT5 is barely linkable. Rust is way more memory intensive then C++, both for compiling and linking.
The linker problem could maybe worked around with spill files (think swap), be slow and once again would need an expert to do it.
Another option is cross-compiling, compile and link the code on 64bit Linux. Once again there needs to be a tool chain built to do the cross compiling.
In summary, given a large amount of money or a really inspired volunteer and the right developer, it could be done but is very unlikely.
Another solution might be if the GCC people ever have a compatible (Rust keeps changing, another problem) Rust compiler, it would be much more trivial to get that working.

As others have said, it is doubtful that Rust will spread that fast. A bigger problem is lack of support for 32 bit systems. More and more projects take it for granted that there is a 64 bit address space and they stop supporting 32 bit systems with programs expecting to be able to allocate GB's of memory at a time. I think that is what will kill OS/2 eventually, at least as far as porting modern stuff goes.

jailbird

  • Newbie
  • *
  • Posts: 46
  • Karma: +5/-0
    • View Profile
Re: Future of Linux ports
« Reply #5 on: October 02, 2022, 09:15:37 pm »
Hi all, On tech forums everyone is talking about Rust making it to the Linux kernel, which probably will mean more and more programs that will be Rust-based.
In the Firefox discussions, I read it was impossible to port Rust to OS/2. I’d like to better understand why, because I see that as an increasing difficulty to make OS/2 apps by porting Linux ones…

Just because some Linux kernel modules are going to use Rust doesn't mean that userland apps are going to. The only part of the Linux kernel that is used around here I believe is ALSA, so I'd think we're pretty safe. If ALSA does convert for some crazy reason, there's also OSS4  :).

Dave Yeo

  • Hero Member
  • *****
  • Posts: 4787
  • Karma: +99/-1
    • View Profile
Re: Future of Linux ports
« Reply #6 on: October 03, 2022, 02:16:51 am »
There are projects such as https://freshman.tech/rust-coreutils/ to rewrite userland stuff in Rust. Note that this is an alternative to the GNU Coreutils and currently GNU doesn't seem to plan on moving to Rust

Dave Yeo

  • Hero Member
  • *****
  • Posts: 4787
  • Karma: +99/-1
    • View Profile
Re: Future of Linux ports
« Reply #7 on: October 03, 2022, 02:56:51 am »
Here's the Rust GCC project page, seems to be coming along and Paul likely has the skills to get it working on our platform, at least as much as possible.
https://github.com/Rust-GCC

Paul Smedley

  • Hero Member
  • *****
  • Posts: 2092
  • Karma: +159/-0
    • View Profile
Re: Future of Linux ports
« Reply #8 on: October 03, 2022, 04:28:16 am »
Hey Dave,

Here's the Rust GCC project page, seems to be coming along and Paul likely has the skills to get it working on our platform, at least as much as possible.
https://github.com/Rust-GCC

Rust support is supposed to be included in GCC 13.0 - however GCC 13.0 will drop support for STABS debugging code - it remains to be seen if this can be reinstated or if we have to switch to dwarf....

Cheers,

Paul
« Last Edit: October 03, 2022, 09:04:54 am by Paul Smedley »

Dave Yeo

  • Hero Member
  • *****
  • Posts: 4787
  • Karma: +99/-1
    • View Profile
Re: Future of Linux ports
« Reply #9 on: October 03, 2022, 08:09:18 am »
Seems the Open Watcom Debugger supports dwarf, have to learn. Guess things like exceptq would need changing.

Andi B.

  • Hero Member
  • *****
  • Posts: 811
  • Karma: +11/-2
    • View Profile
Re: Future of Linux ports
« Reply #10 on: October 03, 2022, 08:37:16 am »
Quote
Open Watcom Debugger supports dwarf,
Yes. But most probably not the current version of dwarf I fear.

Beside that if you've ever used a more modern debuger (idebug, ICAT, every other debugger out in the world from this century!) you'd never want to switch back to the ancient user interface experience of wdebug.

Paul Smedley

  • Hero Member
  • *****
  • Posts: 2092
  • Karma: +159/-0
    • View Profile
Re: Future of Linux ports
« Reply #11 on: October 03, 2022, 09:10:02 am »
Seems the Open Watcom Debugger supports dwarf, have to learn. Guess things like exceptq would need changing.

The alternative, would be to attempt to reinstate the stabs support - https://gcc.gnu.org/git/?p=gcc.git&a=search&h=HEAD&st=commit&s=stabs is a list of recent commits mentioning stabs - this looks like the main one.... https://gcc.gnu.org/git/?p=gcc.git;a=commit;h=7e0db0cdf01e9c885a29cb37415f5bc00d90c029