Author Topic: Building Qt5  (Read 38720 times)

David McKenna

  • Hero Member
  • *****
  • Posts: 768
  • Karma: +25/-0
    • View Profile
Re: Building Qt5
« Reply #15 on: October 29, 2022, 03:39:28 pm »
 I wonder if - on an OS/2 system used for compiling programs - eliminating DOS/Win support and running PROTECTONLY=YES would make any sense? Might free up some memory and even speed it up. Or does the compilation require DOS/Win support?

Dave Yeo

  • Hero Member
  • *****
  • Posts: 4860
  • Karma: +102/-1
    • View Profile
Re: Building Qt5
« Reply #16 on: October 29, 2022, 06:04:02 pm »
I'll try with PROTECTONLY=YES, which IIRC, will by itself stop all the mdos/winos2 stuff loading. The build died this time with,
Code: [Select]
cc1plus.exe: out of memory allocating 65536 bytes after a total of 65536 bytesThis is getting quite frustrating, must have spent over 24 hours of actual compiling, though with the hangs etc it is hard to judge, obj directory is now 2GB, and this is a rel build, a debug probably would use more memory, but maybe not if less optimized.
It is hard to imagine doing much developing on the code if it takes a day to recompile and as this is my usual use machine, it also means not using it while compiling due to the tight memory. Of course this machine is a dozen years old so a newer fast machine would help. Still would be the memory problem and the way things go, the next update to the code is likely to use more memory.
The future does not look bright

Dave Yeo

  • Hero Member
  • *****
  • Posts: 4860
  • Karma: +102/-1
    • View Profile
Re: Building Qt5
« Reply #17 on: October 30, 2022, 06:19:06 pm »
After adding the last prerequisites, removing the configure stuff to force a reconfiguration, setting PROTOCTONLY=YES, the build (release) succeeded, took 12+ hours. Haven't tested yet besides installing in my TMP, which is on my ramdisk.
Seems I only have 3.2 GB of ram accessible to the system, which might have been part of the reason for the swap file growth.

Dave Yeo

  • Hero Member
  • *****
  • Posts: 4860
  • Karma: +102/-1
    • View Profile
Re: Building Qt5
« Reply #18 on: October 30, 2022, 06:36:50 pm »
Tesing, the Simplebrowser and Dooble both work and seem faster. Posting from Dooble.

ivan

  • Hero Member
  • *****
  • Posts: 1574
  • Karma: +18/-0
    • View Profile
Re: Building Qt5
« Reply #19 on: October 30, 2022, 07:13:34 pm »
Hi Dave,

A quick question if I may.  Which of the thirty odd packages does one need to have a runtime like we have for Qt4?  Is it even possible?



Dave Yeo

  • Hero Member
  • *****
  • Posts: 4860
  • Karma: +102/-1
    • View Profile
Re: Building Qt5
« Reply #20 on: October 30, 2022, 07:37:13 pm »
Hi Dave,

A quick question if I may.  Which of the thirty odd packages does one need to have a runtime like we have for Qt4?  Is it even possible?

No idea, but between QT5 needed libraries and dependencies, I can't see it being easy. It is why I gave up the fight some time back and started using Yum and/or ANPM to simply install this stuff.

David McKenna

  • Hero Member
  • *****
  • Posts: 768
  • Karma: +25/-0
    • View Profile
Re: Building Qt5
« Reply #21 on: October 30, 2022, 09:25:18 pm »
 Wow... congratulations Dave! Will you be posting the results?

Regards,

Dave Yeo

  • Hero Member
  • *****
  • Posts: 4860
  • Karma: +102/-1
    • View Profile
Re: Building Qt5
« Reply #22 on: October 30, 2022, 11:00:20 pm »
Wow... congratulations Dave! Will you be posting the results?

Regards,

Hadn't really planned to, the uncompressed installed tree is 363MB, or 87MB 7z and the DLL's are 214 MB.
Also as it installed in h:\tmp\qt5, not sure how portable it is. Hmm grepping for h:/tmp/qt5, only qmake and the pc files (used to find stuff like libraries when developing/building) seem to have the PATH hardcoded
Guess if someone wants it, I could upload to Google drive or such, suggestions welcome.

Roderick Klein

  • Hero Member
  • *****
  • Posts: 667
  • Karma: +14/-0
    • View Profile
Re: Building Qt5
« Reply #23 on: October 30, 2022, 11:27:49 pm »
Im afraid that's because OS2 sees only 1MB of mem on this machine.
Also a exceptq log in var about CC1PLUS

The crash happens when configure  tests for precompiled header support, expected.
I take it you mean 1GB of ram. You still have the swap file. When I was building earlier versions of Firefox, around 10 IIRC, needed VIRTUALADDRESSLIMIT=3072 or linking xul.dll would gracefully die with an out of spill memory error. Then I had a simm die leaving me with 1.5 GBs of memory, I could still compile as long as not much else was running but if something like SM was running, the system would die with a swap file full error. There was lots of room for the swap file, but it is limited to 2GB.
Basically without enough ram, it should gracefully die rather then issue weird errors. A long time back I had a 486, OS/2 was trapping all the time so I moved to Linux, which at the time meant recompiling the kernel for your hardware, as no module support. Took a week as it kept dying with bus errors when trying to compile the kernel. Eventually discovered the computer had a broken 16 bit DMA thingy and things were stable if I didn't use 16 bit DMA. Just an example of broken hardware screwing up compilation.
Currently here, I'm still having problems with detecting libvpx and even after hacking qt5\qt5\webengine\src\buildtools\configure.json to detect libvpx, it died in webrtc trying to compile the intree libvpx.
I also get hard lockups, perhaps caused by my Snap system having to high of a VIRTUALADDRESSLIMIT. I think I'll wait for the next beta, do a new install and retry then.


I have seen this occur with SNAP loaded on some systems where setting the virtualaddresslimit to high can cause the system to lockup.
I have however NEVER seen this happen with Panorama loaded.



Roderick

Dave Yeo

  • Hero Member
  • *****
  • Posts: 4860
  • Karma: +102/-1
    • View Profile
Re: Building Qt5
« Reply #24 on: October 30, 2022, 11:47:26 pm »
Yes, I was having the hard lockups on a Snap install. I rearranged things to have enough room on a Panorama install, lots of out of memory errors leaving the system stable, though often the VIO window locked up, so needing a reboot. Once the system locked up on the Panorama install.

Roderick Klein

  • Hero Member
  • *****
  • Posts: 667
  • Karma: +14/-0
    • View Profile
Re: Building Qt5
« Reply #25 on: October 30, 2022, 11:58:29 pm »
I'll try with PROTECTONLY=YES, which IIRC, will by itself stop all the mdos/winos2 stuff loading. The build died this time with,
Code: [Select]
cc1plus.exe: out of memory allocating 65536 bytes after a total of 65536 bytesThis is getting quite frustrating, must have spent over 24 hours of actual compiling, though with the hangs etc it is hard to judge, obj directory is now 2GB, and this is a rel build, a debug probably would use more memory, but maybe not if less optimized.
It is hard to imagine doing much developing on the code if it takes a day to recompile and as this is my usual use machine, it also means not using it while compiling due to the tight memory. Of course this machine is a dozen years old so a newer fast machine would help. Still would be the memory problem and the way things go, the next update to the code is likely to use more memory.
The future does not look bright

While your conclusion about the future not looking because of the issue you encountered  compiling the webkit DLL,  based on the results, is logical. I would hwoever like to suggest to be more reserved drawing that conclusion the "future not looking bright". Its again a lack of time we are having as community. The issue you encrountered is known but we have not looked into how to resolve this further.

So idea's exists how the we *migh*t be able to work around this issue. But this requires research. Nobody best I can tell ever did research why the system is running out of memory. I discussed the issue with Steve Levine months ago. I forgot what he had mentioned as options to look into.  Its month ago.
But I would not say we have hit the end of the track. No research has been done why the lockup occurs/what is the memory consumed by.

It might also be possible to drastically reduce the compile time on OS/2. But will require some changes in the compiler. Again I discussed this months ago. So I might have not worded this all properly.
On a MacOS box I think compiling the webkit DLL takes about 4 hours. So we can still improve this all.
But it needs to hit the top of the list.

I BTW wonder how much RAM protectonly=yes setting will give you back. Since you do not load any DOS or WINOS2 sessions I think the implact will be minimal....

Roderick

Dave Yeo

  • Hero Member
  • *****
  • Posts: 4860
  • Karma: +102/-1
    • View Profile
Re: Building Qt5
« Reply #26 on: October 31, 2022, 12:20:23 am »
Well, I must say my last run, which was successful, gave me much more hope.
One trick that would help a lot would be to port ccache, https://ccache.dev/. It is a compiler cache so a second run of the same build would be way faster and memory efficient. Likewise if only one file is changed, make might rebuild most everything, with ccache, only the changed file and dependent files would be rebuilt, once again resulting in a huge speedup.
As for memory used, interestingly OS/2 seemed to be better then other 32 bit systems at compiling Mozilla, at least memory wise. The *nixes are much faster at forking etc new processes, which happens a lot when compiling, while we're faster then Windows.

Paul Smedley

  • Hero Member
  • *****
  • Posts: 2121
  • Karma: +165/-0
    • View Profile
Re: Building Qt5
« Reply #27 on: October 31, 2022, 09:30:47 am »
After adding the last prerequisites, removing the configure stuff to force a reconfiguration, setting PROTOCTONLY=YES, the build (release) succeeded, took 12+ hours. Haven't tested yet besides installing in my TMP, which is on my ramdisk.
Seems I only have 3.2 GB of ram accessible to the system, which might have been part of the reason for the swap file growth.

Well done!! I need to work out why my build is dying in qtbase..... I might try installing those extra packages you mention..... can't hurt!!

Paul Smedley

  • Hero Member
  • *****
  • Posts: 2121
  • Karma: +165/-0
    • View Profile
Re: Building Qt5
« Reply #28 on: November 01, 2022, 09:12:29 am »
@Dave,

Are you able to share your config.summary? Mine is attached. Might help me work out what's different for you.

Cheers,

Paul

Dave Yeo

  • Hero Member
  • *****
  • Posts: 4860
  • Karma: +102/-1
    • View Profile
Re: Building Qt5
« Reply #29 on: November 01, 2022, 03:20:05 pm »
Sure, see I used the system pcre and also I only built a release build as previously I had problems building both. Also I have -no-dbus on my configure line.