News:

OS2World.com Forum is back !!!

Remember to visit OS2World at:
http://www.os2world.com

Main Menu

GCC - updates

Started by Paul Smedley, March 16, 2022, 09:57:02 AM

Previous topic - Next topic

Paul Smedley

Hi Jochen,
Quote from: Jochen Schäfer on April 29, 2025, 09:12:20 AM
Thanks for the answer. So for a cross compiler setup, we would need a port of these emx tools. The OpenWatcom stuff is already there.
Am I correct? (I know, it's certainly not that easy to do)
For a cross compiler, we'd also need binutils compiled on the host platform with the changes for os2 a.out. We'd probably also need a port of ld.exe that supports EMX a.out for configure tests.

I've thought about a cross compiler a couple of times and it's made my head hurt.

I'd rather spend energy trying to get wlink to work with coff or gas object files - and trying to update the toolchain to support those.

Jochen Schäfer

Hi Paul.

Fair enough. I'm just interested, what it would take to have a cross compiler.

Paul Smedley

Quote from: Jochen Schäfer on April 29, 2025, 10:22:30 AM
Fair enough. I'm just interested, what it would take to have a cross compiler.

Don't get me wrong, there could be definite benefits - for example - building qtwebengine on OS/2 is a PITA due to g++ processes consuming ~2gb of RAM on large compilations, so having to limit the number of ninja processes - building on a modern linux system could allow multiple processes to run without memory exhaustion.

Jochen Schäfer

#108
Quote from: Paul Smedley on April 29, 2025, 10:25:51 AM
Quote from: Jochen Schäfer on April 29, 2025, 10:22:30 AM
Fair enough. I'm just interested, what it would take to have a cross compiler.

Don't get me wrong, there could be definite benefits - for example - building qtwebengine on OS/2 is a PITA due to g++ processes consuming ~2gb of RAM on large compilations, so having to limit the number of ninja processes - building on a modern linux system could allow multiple processes to run without memory exhaustion.
I'm doing the same for the DOSBOX-X cpu core files.
Another benefit would to have Github actions automatically build the code, so we would have some sort of integration test.

Dave Yeo

I tried building Qt6 on Linux, it was scarily fast. This I5 went into turbo mode, 3.6 GHz, OS/2 doesn't seem to enable the turbo and stays at 3.2 GHz, and temperatures shot up in this little computer, CPU at close to 90C (60C is about the highest it gets on OS/2) and worse, the NVMe at its max of 85C. Build failed in the webengine and I didn't want to do it again without more cooling.
As for cross-compiling, not only GCC and friends, the EMX toolchain need porting, a lot of other tools have OS/2 specific code. Think of the autotools. Plus there are test programs and such built during a complex build. Some use Rexx too. Possible but a bigger job then likely expected.

Pete

Hi Dave

Maybe you want to check out water cooling as it seems to work cooler/quieter than cpu fan type coolers.


Regards

Pete

Dave Yeo

It's a fairly small computer, https://www.os2world.com/wiki/index.php?title=Lenovo_ThinkCentre_M910s_-_10ML and likely no room in it for a water cooler. I have picked up a small (40mm?) fan to stick in the front, have to figure out the wiring as the fan has 3 wires and the header has 4 wires, also picked up a heat sink for the NVMe. Have to take it apart and add the components and clean it again. I use wood heat and the house is dusty:)
I also see that actually the CPU was faster then I mentioned, 3.4/3.8GHz.
It's a nice little computer, was C$80 used with no storage. Going to a lot of similar on the market as it is just a hair too old to run Win 11 being released in 2019.

Remy

Quote from: Dave Yeo on April 30, 2025, 01:35:50 AM
It's a fairly small computer, https://www.os2world.com/wiki/index.php?title=Lenovo_ThinkCentre_M910s_-_10ML and likely no room in it for a water cooler. I have picked up a small (40mm?) fan to stick in the front, have to figure out the wiring as the fan has 3 wires and the header has 4 wires, also picked up a heat sink for the NVMe. Have to take it apart and add the components and clean it again. I use wood heat and the house is dusty:)
I also see that actually the CPU was faster then I mentioned, 3.4/3.8GHz.
It's a nice little computer, was C$80 used with no storage. Going to a lot of similar on the market as it is just a hair too old to run Win 11 being released in 2019.

May be you can change the ventirad (heat sink)
e.g. be quiet! Pure Rock LP   (very low profile but a high tdp value (100w) - your cpu is 65w  (this should reduce a lot max temperature)
The high should be good, you may check if the scare width of 92mm is okk too and that it didn't touch ram slots.

https://www.bequiet.com/fr/cpucooler/3992

Pete

Hi Dave

I see what you mean.
Looks like a slim case and probably not quite enough room to fit a water radiator to the case rear fan mounting.
Probably have problems with some of the taller air coolers as well.


Regards

Pete





Paul Smedley

#114
just a FYI - gcc 15.1.10 has some issues with libstdc++ filesystem support which prevent syncqt.exe from Qt working, so I can're rebuilt Qt 6.8 with it (older versions don't use a compiled syncqt.exe are are OK).

Couple of different (but maybe related) errors:
  what():  filesystem error: cannot get file size: Operation not supported on socket [U:/dev/qt6-base-os2-6.8.x/build-gcc15/include/QtExampleIcons/qtexampleiconsversion.h]
Not a directory(20):filesystem error: cannot create directories: Not a directory [U:/dev/qt6-base-os2-6.8.x/build-gcc15/include/QtCore/6.8.3/QtCore/private]

The fix isn't obvious (yet)

Paul Smedley

OK I think I've found the root cause of this...

Dave Yeo

Are you also updating Qt for C++20?

:/work/dooble-dry/Source/dooble.cc
In file included from L:/QT6-6.2.X/include/QtCore/qfuture.h:45,
                 from L:/QT6-6.2.X/include/QtCore/QtCore:92,
                 from L:/QT6-6.2.X/include/QtConcurrent/QtConcurrentDepends:3,
                 from L:/QT6-6.2.X/include/QtConcurrent/QtConcurrent:3,
                 from K:/work/dooble-dry/Source/dooble.cc:41:
L:/QT6-6.2.X/include/QtCore/qfutureinterface.h:451:37: error: template-id not al
lowed for constructor in C++20 [-Werror=template-id-cdtor]
  451 |     explicit QFutureInterface<void>(State initialState = NoState)
      |                                     ^~~~~
L:/QT6-6.2.X/include/QtCore/qfutureinterface.h:451:37: note: remove the '< >'
cc1plus.exe: all warnings being treated as errors
make: *** [Makefile:12688: temp/obj/dooble.obj] Error 1

Paul Smedley

Quote from: Paul Smedley on May 04, 2025, 02:11:17 AM
OK I think I've found the root cause of this...

OK https://smedley.id.au/tmp/gcc-15.1.0-os2-20250504.zip should fix the problems with filesystem support in libstdc++

The fix turned out to be pretty simple. I had recently set GCCOPT to -static-libgcc to avoid a dependency on gcc1.dll. However - libstdc++ is built with -shared-libgcc - and the flags conflict - so a bunch of configure tests were failing - which resulted in some broken functionality.

Paul Smedley

Quote from: Dave Yeo on May 04, 2025, 03:28:58 AM
Are you also updating Qt for C++20?

:/work/dooble-dry/Source/dooble.cc
In file included from L:/QT6-6.2.X/include/QtCore/qfuture.h:45,
                 from L:/QT6-6.2.X/include/QtCore/QtCore:92,
                 from L:/QT6-6.2.X/include/QtConcurrent/QtConcurrentDepends:3,
                 from L:/QT6-6.2.X/include/QtConcurrent/QtConcurrent:3,
                 from K:/work/dooble-dry/Source/dooble.cc:41:
L:/QT6-6.2.X/include/QtCore/qfutureinterface.h:451:37: error: template-id not al
lowed for constructor in C++20 [-Werror=template-id-cdtor]
  451 |     explicit QFutureInterface<void>(State initialState = NoState)
      |                                     ^~~~~
L:/QT6-6.2.X/include/QtCore/qfutureinterface.h:451:37: note: remove the '< >'
cc1plus.exe: all warnings being treated as errors
make: *** [Makefile:12688: temp/obj/dooble.obj] Error 1

I wsan't planning on it - just remove -Werror from the makefiles..

Dave Yeo

Quote from: Paul Smedley on May 04, 2025, 07:38:00 AM
Quote from: Dave Yeo on May 04, 2025, 03:28:58 AM
Are you also updating Qt for C++20?

:/work/dooble-dry/Source/dooble.cc
In file included from L:/QT6-6.2.X/include/QtCore/qfuture.h:45,
                 from L:/QT6-6.2.X/include/QtCore/QtCore:92,
                 from L:/QT6-6.2.X/include/QtConcurrent/QtConcurrentDepends:3,
                 from L:/QT6-6.2.X/include/QtConcurrent/QtConcurrent:3,
                 from K:/work/dooble-dry/Source/dooble.cc:41:
L:/QT6-6.2.X/include/QtCore/qfutureinterface.h:451:37: error: template-id not al
lowed for constructor in C++20 [-Werror=template-id-cdtor]
  451 |     explicit QFutureInterface<void>(State initialState = NoState)
      |                                     ^~~~~
L:/QT6-6.2.X/include/QtCore/qfutureinterface.h:451:37: note: remove the '< >'
cc1plus.exe: all warnings being treated as errors
make: *** [Makefile:12688: temp/obj/dooble.obj] Error 1

I wsan't planning on it - just remove -Werror from the makefiles..

A simple good idea. Even better, any idea where the -Werror comes from?