Author Topic: Qt6 Development  (Read 210876 times)

Dave Yeo

  • Hero Member
  • *****
  • Posts: 4787
  • Karma: +99/-1
    • View Profile
Re: Qt6
« Reply #255 on: December 18, 2022, 03:53:26 am »
OK, we were lucky that Mozilla did the work of adapting the build system to have a couple of choices including list files that work as response files.

Dave Yeo

  • Hero Member
  • *****
  • Posts: 4787
  • Karma: +99/-1
    • View Profile
Re: Qt6
« Reply #256 on: December 18, 2022, 04:01:10 am »
Also don't forget that your later GCC builds seem to be broken with using list (response) files, at least they never succeeded at compiling xul.dll whereas GCC 9.2.0 does succeed. Might be passing the arguments or emxomfld or to GCC, I'm not knowledgeably enough to say.

Paul Smedley

  • Hero Member
  • *****
  • Posts: 2092
  • Karma: +159/-0
    • View Profile
Re: Qt6
« Reply #257 on: December 18, 2022, 07:23:47 am »
Also don't forget that your later GCC builds seem to be broken with using list (response) files, at least they never succeeded at compiling xul.dll whereas GCC 9.2.0 does succeed. Might be passing the arguments or emxomfld or to GCC, I'm not knowledgeably enough to say.
They seem to work well enough for Qt6, which also uses response files <shrug>

Martin Iturbide

  • OS2World NewsMaster
  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4713
  • Karma: +41/-1
  • Your Friend Wil Declares...
    • View Profile
    • Martin's Personal Blog
Re: Qt6
« Reply #258 on: December 18, 2022, 02:17:27 pm »
Hi Guys

Just a reminder to thank you a lot for your efforts. Thanks Paul for all the time you took and for this way of developing openly to let people know and learn from your work.

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

Paul Smedley

  • Hero Member
  • *****
  • Posts: 2092
  • Karma: +159/-0
    • View Profile
Re: Qt6
« Reply #259 on: December 18, 2022, 08:21:46 pm »
OK, I got a bunch of missing symbols, but I hacked enough to (almost) get a node.exe....
Code: [Select]
creating an OS/2 EMX executable
Error! E2028: _uv_exepath is an undefined reference
Error! E2028: _uv_ip6_addr is an undefined reference
Error! E2028: _uv_ip6_name is an undefined reference
Error! E2028: _uv_resident_set_memory is an undefined reference
Error! E2028: _uv__set_process_title is an undefined reference
Error! E2028: _uv__hrtime is an undefined reference
Error! E2028: _uv__fs_event_close is an undefined reference
Error! E2028: _uv__io_poll is an undefined reference
Error! E2028: _uv__platform_invalidate_fd is an undefined reference
Error! E2028: _uv_fs_event_init is an undefined reference
Error! E2028: _uv_fs_event_start is an undefined reference
Error! E2028: _uv_get_free_memory is an undefined reference
Error! E2028: _uv_get_total_memory is an undefined reference
Error! E2028: _uv_uptime is an undefined reference
Error! E2028: _uv_loadavg is an undefined reference
Error! E2028: _uv_interface_addresses is an undefined reference
Error! E2028: _uv_free_interface_addresses is an undefined reference
Error! E2028: _uv_cpu_info is an undefined reference
Error! E2028: _uv_free_cpu_info is an undefined reference
Error! E2028: _uv__io_check_fd is an undefined reference
Error! E2028: _uv__platform_loop_init is an undefined reference
Error! E2028: _uv__platform_loop_delete is an undefined reference
Error! E2028: _uv__io_fork is an undefined reference
Error! E2028: _getservbyport_r is an undefined reference
Will try fix tonight...
« Last Edit: December 18, 2022, 08:26:44 pm by Paul Smedley »

Paul Smedley

  • Hero Member
  • *****
  • Posts: 2092
  • Karma: +159/-0
    • View Profile
Re: Qt6
« Reply #260 on: December 19, 2022, 08:38:16 am »
I'm now down to the following...
Code: [Select]
Error! E2028: _uv_exepath is an undefined reference
Error! E2028: _uv_resident_set_memory is an undefined reference
Error! E2028: _uv_get_free_memory is an undefined reference
Error! E2028: _uv_get_total_memory is an undefined reference
Error! E2028: _uv_uptime is an undefined reference
Error! E2028: _uv_loadavg is an undefined reference
Error! E2028: _uv_cpu_info is an undefined reference
Error! E2028: _uv_free_cpu_info is an undefined reference

Paul Smedley

  • Hero Member
  • *****
  • Posts: 2092
  • Karma: +159/-0
    • View Profile
Re: Qt6
« Reply #261 on: December 19, 2022, 09:04:38 am »
stubbed some of these - but uv_exepath() remains... from http://docs.libuv.org/en/v1.x/misc.html

int uv_exepath(char *buffer, size_t *size)
Gets the executable path. You must call uv_setup_args before calling this function.

I vague recall a way to get the current executable path of a running executable - but can't find it right now. Any tips?

I got a node.exe this evening by hacking around the above... of course, it's giving a SIGILL on trying to run a simple example... https://smedley.id.au/tmp/63a0afef-bc39_01-NODE-exceptq.txt has the trap. Tired this evening so will look at it tomorrow
« Last Edit: December 19, 2022, 09:18:25 am by Paul Smedley »

Lars

  • Hero Member
  • *****
  • Posts: 1271
  • Karma: +65/-0
    • View Profile
Re: Qt6
« Reply #262 on: December 19, 2022, 10:11:03 am »
stubbed some of these - but uv_exepath() remains... from http://docs.libuv.org/en/v1.x/misc.html

int uv_exepath(char *buffer, size_t *size)
Gets the executable path. You must call uv_setup_args before calling this function.

I vague recall a way to get the current executable path of a running executable - but can't find it right now. Any tips?

1) Use "DosQueryModFromEIP" from the running executable, passing in as "Address" the address of any arbitrary routine that is statically linked into the executable (could be function "uv_exepath" itself if that is statically linked to the exe, ha ha ...)
2) use the returned module handle as entry to "DosQueryModuleName".

Alternative (maybe the easier and better solution):
1) use "DosGetInfoBlocks" to get to a pointer to the PPIB of the running executable
2) use "ppib->pib_hmte" as the module handle for "DosQueryModuleName".

I seem to remember that, for an executable at least, "DosQueryModuleName" returns the full path and name of the executable binary.
« Last Edit: December 19, 2022, 10:24:47 am by Lars »

Paul Smedley

  • Hero Member
  • *****
  • Posts: 2092
  • Karma: +159/-0
    • View Profile
Re: Qt6
« Reply #263 on: December 19, 2022, 10:22:00 am »
Thanks Lars, your option 1 is what I vaguely recall from some other port!

Lars

  • Hero Member
  • *****
  • Posts: 1271
  • Karma: +65/-0
    • View Profile
Re: Qt6
« Reply #264 on: December 19, 2022, 10:26:10 am »
Thanks Lars, your option 1 is what I vaguely recall from some other port!

Yeah and maybe 2) is the better option. At least it has no quirky preconditions on use ...

Paul Smedley

  • Hero Member
  • *****
  • Posts: 2092
  • Karma: +159/-0
    • View Profile
Re: Qt6
« Reply #265 on: December 20, 2022, 09:50:59 pm »
Thanks Lars, your option 1 is what I vaguely recall from some other port!

Yeah and maybe 2) is the better option. At least it has no quirky preconditions on use ...

Thanks I'll look into this - I hacked around the requirement for that function for now.

My current focus is to get nodejs compiling 'out of the box' without requiring makefiles to be hacked. Folks can track progress at https://github.com/psmedley/node-os2

Paul Smedley

  • Hero Member
  • *****
  • Posts: 2092
  • Karma: +159/-0
    • View Profile
Re: Qt6
« Reply #266 on: December 23, 2022, 02:30:11 am »
With a LOT of help from Steven Levine, https://github.com/psmedley/node-os2/commit/1c5b8544c2b5fea0a0df67c03ef1aee6b7d3f600 implements the use of response files to create libs with command lines which would otherwise exceed 32k

Paul Smedley

  • Hero Member
  • *****
  • Posts: 2092
  • Karma: +159/-0
    • View Profile
Re: Qt6
« Reply #267 on: December 23, 2022, 09:54:56 am »
ok https://github.com/psmedley/node-os2 can now be used to generate a node.exe

See conf.cmd for some hacks that are still required to out/makefile and some directories that need to be manually created

Still generates a SIGILL on running :(

Paul Smedley

  • Hero Member
  • *****
  • Posts: 2092
  • Karma: +159/-0
    • View Profile
Re: Qt6
« Reply #268 on: December 24, 2022, 02:11:32 am »
I implemented a kludge for the SIGILL - see https://github.com/psmedley/node-os2/issues/7

now, node.exe --help works without a SIGILL :)

But... trying to run something like myfirst.js from https://www.w3schools.com/nodejs/nodejs_get_started.asp gives:
node.exe myfirst.js:
Code: [Select]
internal/modules/cjs/loader.js:638
    throw err;
    ^

Error: Cannot find module 'U:/DEV/node-os2/myfirst.js'
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:636:15)
    at Function.Module._load (internal/modules/cjs/loader.js:562:25)
    at Function.Module.runMain (internal/modules/cjs/loader.js:831:12)
    at startup (internal/bootstrap/node.js:283:19)
    at bootstrapNodeJSCore (internal/bootstrap/node.js:623:3)
This is likely path related..

Or node.exe /myfirst.js
Code: [Select]
net.js:1219
      err = handle.bind6(address, port);
                   ^

TypeError: handle.bind6 is not a function
    at createServerHandle (net.js:1219:20)
    at Server.setupListenHandle [as _listen2] (net.js:1247:14)
    at listenInCluster (net.js:1328:12)
    at Server.listen (net.js:1415:7)
    at Object.<anonymous> (/myfirst.js:6:4)
    at Module._compile (internal/modules/cjs/loader.js:778:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10)
    at Module.load (internal/modules/cjs/loader.js:653:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:593:12)
    at Function.Module._load (internal/modules/cjs/loader.js:585:3)

But getting there :)

Paul Smedley

  • Hero Member
  • *****
  • Posts: 2092
  • Karma: +159/-0
    • View Profile
Re: Qt6
« Reply #269 on: December 24, 2022, 08:15:16 am »
Slowly going crazy... have added some stuff to try make it work more like win32, but still won't load something like 'node myfirst.js'
Error: Cannot find module 'U:\DEV\node-os2\myfirst.js', paths = C:\Home\.node_modules,C:\Home\.node_libraries,U:\DEV\NODE-OS2\OUT\RELEASE\lib\node, isMain = true, parent = null
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:637:15)
    at Function.Module._load (internal/modules/cjs/loader.js:562:25)
    at Function.Module.runMain (internal/modules/cjs/loader.js:833:12)
    at startup (internal/bootstrap/node.js:283:19)
    at bootstrapNodeJSCore (internal/bootstrap/node.js:623:3)