bitwiseworks / qtwebengine-os2

Port of Qt WebEngine module version 5 to OS/2
BSD 3-Clause "New" or "Revised" License
2 stars 3 forks source link

Make it build #1

Closed dmik closed 4 years ago

dmik commented 5 years ago

A generic task for building this module.

Needed for https://github.com/bitwiseworks/qt5-os2/issues/10.

dmik commented 5 years ago

The first problem: qtwebengine requires at least GCC 5 while we still have GCC 4.9. So far, I disabled this check and we will see where it gets us. Porting a fresh version of GCC is a todo since long so we might want to finally do that.

dmik commented 5 years ago

And the second separate task is porting the ninja build tool used by the Chromium source code. It definitely requires some aligning but nothing fancy. Will create a separate ticket for it.

dmik commented 4 years ago

All necessary tools are ported and now I'm fully concentrated on building Chromium itself. I have some work in progress which I will be committing in pieces as I go and report to this ticket (creating separate tickets as needed).

dmik commented 4 years ago

I'm getting fork failures when running Python from GN:

Running: D:/Coding/qt5/qt5-dev-build/qtwebengine/src/3rdparty/gn/out/Release/gn.exe gen D:/Coding/qt5/qt5-dev-build/qtwebengine/src/core/debug --script-executable=C:/USR/BIN/python.exe --args='use_qt=true closure_compile=false is_component_build=false is_shared=true enable_message_center=false enable_mus=false enable_nacl=false enable_remoting=false enable_reporting=false enable_swiftshader=false enable_web_auth=false enable_web_speech=false enable_widevine=true has_native_accessibility=false enable_debugallocation=false use_allocator_shim=false use_allocator="none" use_custom_libcxx=false v8_use_external_startup_data=false toolkit_views=false treat_warnings_as_errors=false safe_browsing_mode=0 optimize_webui=false use_jumbo_build=true jumbo_file_merge_limit=8 jumbo_build_excluded=["browser"] enable_basic_printing=true enable_print_preview=true enable_pdf=true enable_plugins=true enable_spellcheck=true enable_webrtc=true proprietary_codecs=true ffmpeg_branding="Chrome" enable_extensions=true enable_precompiled_headers=false is_official_build=false is_debug=true use_debug_fission=false remove_webcore_debug_symbols=true remove_v8base_debug_symbols=true v8_use_snapshot=true use_kerberos=false use_sysroot=false enable_session_service=false ninja_use_custom_environment_files=false is_multi_dll_chrome=false is_clang=false use_lld=false use_incremental_linking=true pkg_config="pkg-config" host_pkg_config="" qtwebengine_target="D:/Coding/qt5/qt5-dev-build/qtwebengine/src/core/debug:QtWebEngineCore"' --root=D:/Coding/qt5/qt5/qtwebengine/src/3rdparty/chromium 

LIBC PANIC!!
LIBC fork: Child aborting fork()! rc=0xfffffffc
pid=0x377b ppid=0x377a tid=0x0001 slot=0x00c1 pri=0x0200 mc=0x0001 ps=0x0010
D:\CODING\QT5\QT5-DEV-BUILD\QTWEBENGINE\SRC\3RDPARTY\GN\OUT\RELEASE\GN.EXE
LIBCN0 0:00002520
cs:eip=005b:1def2520      ss:esp=0053:0031ff14      ebp=0031ff5c
 ds=0053      es=0053      fs=150b      gs=0000     efl=00010206
eax=025cfff0 ebx=5e7a0000 ecx=00000000 edx=025cd000 edi=025ce964 esi=00000001
Process dumping was disabled, use DUMPPROC / PROCDUMP to enable it.

LIBC PANIC!!
LIBC fork: Child aborting fork()! rc=0xfffffffc
pid=0x377c ppid=0x377a tid=0x0001 slot=0x00c1 pri=0x0200 mc=0x0001 ps=0x0010
D:\CODING\QT5\QT5-DEV-BUILD\QTWEBENGINE\SRC\3RDPARTY\GN\OUT\RELEASE\GN.EXE
LIBCN0 0:00002520
cs:eip=005b:1def2520      ss:esp=0053:0031ff14      ebp=0031ff5c
 ds=0053      es=0053      fs=150b      gs=0000     efl=00010206
eax=029cfff0 ebx=5e7a0000 ecx=00000000 edx=029cd000 edi=029ce964 esi=00000001
Process dumping was disabled, use DUMPPROC / PROCDUMP to enable it.

LIBC PANIC!!
LIBC fork: Child aborting fork()! rc=0xfffffffc
pid=0x377d ppid=0x377a tid=0x0001 slot=0x00c1 pri=0x0200 mc=0x0001 ps=0x0010
D:\CODING\QT5\QT5-DEV-BUILD\QTWEBENGINE\SRC\3RDPARTY\GN\OUT\RELEASE\GN.EXE
LIBCN0 0:00002520
cs:eip=005b:1def2520      ss:esp=0053:0031ff14      ebp=0031ff5c
 ds=0053      es=0053      fs=150b      gs=0000     efl=00010206
eax=028cfff0 ebx=5e7a0000 ecx=00000000 edx=028cd000 edi=028ce964 esi=00000001
Process dumping was disabled, use DUMPPROC / PROCDUMP to enable it.
ERROR at //build/util/version.gni:27:11: Could not execute interpreter.
_result = exec_script("version.py",
          ^----------
I was trying to execute "C:/USR/BIN/python.exe".
See //components/cronet/BUILD.gn:9:1: whence it was imported.
import("//build/util/version.gni")
^--------------------------------
See //BUILD.gn:182:7: which caused the file to be included.
      "//components/cronet:cronet_tests",
      ^---------------------------------

This is kind of weird. 0xfffffffc is -4 which might mean be EINTR. Why — not clear so far.

dmik commented 4 years ago

Tests show that GN indeed calls fork on multilpe threads and the child process crashes somewhere LIBC code with EXCEPTION_ACCESS_VIOLATION before returning from fork — hence the parent returns -EINTR (0xfffffffc).

I think that the best way to overcome it right now is use LIBCx spawn2 instead of fork. As fixing fork in LIBC might be challenging and fork is a bad choice on OS/2 anyway so should be avoided in general.

dmik commented 4 years ago

All build toolchain (GN/Qmake) issues are solved. It's time to fix various build breaks here and there now.

dmik commented 4 years ago

I'm getting problems with linking libraries because GN apparently creates response files with all contents on a single line. I guess I have to hack GN to make it do it per-line (it should be libiberty compatible and work on all platforms).

dmik commented 4 years ago

The above commit fixes link issues, going further.

dmik commented 4 years ago

I discovered one more LIBC flaw, isblank is BSD only while it's part of POSIX since long:

FAILED: obj/third_party/boringssl/boringssl/ssl_versions.o 
g++ -MMD -MF obj/third_party/boringssl/boringssl/ssl_versions.o.d -DNO_TCMALLOC -DCHROMIUM_BUILD -DTOOLKIT_QT -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_DEBUG -DDYNAMIC_ANNOTATIONS_ENABLED=1 -DWTF_USE_DYNAMIC_ANNOTATIONS=1 -DBORINGSSL_ALLOW_CXX_RUNTIME -DBORINGSSL_IMPLEMENTATION -DBORINGSSL_NO_STATIC_INITIALIZER -DOPENSSL_SMALL -D_XOPEN_SOURCE=700 -DOPENSSL_NO_ASM -Igen -I../../../../../qt5/qtwebengine/src/3rdparty/chromium -I../../../../../qt5/qtwebengine/src/3rdparty/chromium/third_party/boringssl/src/include -fno-strict-aliasing --param=ssp-buffer-size=4 -fstack-protector -Wno-builtin-macro-redefined -D__DATE__= -D__TIME__= -D__TIMESTAMP__= -funwind-tables -Zomf -m32 -msse2 -mfpmath=sse -mmmx -O0 -fno-omit-frame-pointer -g2 -Wno-unused-local-typedefs -Wno-maybe-uninitialized -Wno-deprecated-declarations -Wno-comments -Wno-dangling-else -Wno-packed-not-aligned -Wno-missing-field-initializers -Wno-unused-parameter -std=c++14 -fno-exceptions -fno-rtti -Wno-narrowing -Wno-attributes -Wno-class-memaccess -Wno-subobject-linkage -Wno-invalid-offsetof -c ../../../../../qt5/qtwebengine/src/3rdparty/chromium/third_party/boringssl/src/ssl/ssl_versions.cc -o obj/third_party/boringssl/boringssl/ssl_versions.o
In file included from C:/usr/include/c++/9/bits/localefwd.h:42,
                 from C:/usr/include/c++/9/string:43,
                 from C:/usr/include/c++/9/stdexcept:39,
                 from C:/usr/include/c++/9/array:39,
                 from C:/usr/include/c++/9/tuple:39,
                 from C:/usr/include/c++/9/bits/unique_ptr.h:37,
                 from C:/usr/include/c++/9/memory:80,
                 from D:/Coding/qt5/qt5/qtwebengine/src/3rdparty/chromium/third_party/boringssl/src/include/openssl/base.h:446,
                 from D:/Coding/qt5/qt5/qtwebengine/src/3rdparty/chromium/third_party/boringssl/src/include/openssl/ssl.h:145,
                 from ../../../../../qt5/qtwebengine/src/3rdparty/chromium/third_party/boringssl/src/ssl/ssl_versions.cc:15:
C:/usr/include/c++/9/cctype:87:11: error: '::isblank' has not been declared
   87 |   using ::isblank;
      |           ^~~~~~~
dmik commented 4 years ago

A new build break in boringssl due to missing socklen_t in LIBC. Created https://github.com/bitwiseworks/libc/issues/62 for that.

dmik commented 4 years ago

Several more helper libraries built. Now I'm facing a preconfigure problem in a third party library again. libevent this time. The chromium guys drag its source in but instead of configuring the library at build time they preconfigure it somewhere else and just commit the configure products (like config.h) to the tree along with the sources. And the OS/2 part is missing, of course.

One could think that running autoreconf + configure would solve the problem, but it's not the case. The Chromium folks remove parts of the original source tree they don't need so either autoreconf or configure (or both) fails to complete. This is really NOT a wise decision, given the circumstances.

The only way to go here is to take the original source tree (of exactly the same version) and add missing files. It's a boring monkey work. Thanks, Chromium guys.

dmik commented 4 years ago

We decided to roll out libevent as a separate repository (https://github.com/bitwiseworks/libevent-os2) and we will always use a system libevent library on OS/2 when building Chromium to avoid code duplication and monkey work.

I will also create a dedicated ticket for building Chromium (in the respective repository) and this one will cover porting the rest of the Qt wrapper part.

dmik commented 4 years ago

With the above (and respected Chromium work) we compiled everything and came to the link stage. And here is a regular problem when linking the main WebEngine DLL (Qt5WebCd.dll):

make[5]: spawnvpe: environment space might be exhausted
make[5]: execvp: C:/usr/bin/sh.exe: Invalid argument
make[5]: spawn: Invalid argument
make[5]: *** Deleting file `D:/Coding/qt5/qt5-dev-build/qtbase/lib/Qt5WebCd.dll'

I'm not pasting the g++ link command as it's enormously big — almost 60 K characters. No surprise spawn chokes on that. The DosExecPgm limit is way less (around 32 K chars). Note that these are not object files, these are library (.a) files! There are hundreds of static libraries to be linked.

I will have to come up with some workaround. Will try to remove absolute paths from static libraries — after that they should fit 32 K. If not, I will have to teach qmake response files (as it used to do in Qt 4 times).

dmik commented 4 years ago

Actually, qtwebengine's .pro files already contain response file creation for all platforms (Linux and Windows suffer from the same issue). I will just reuse them. However, it's not enough to make the link step work. As with response files being used at this stage, I face the response file processing bug in emxomfld: https://github.com/bitwiseworks/libc/issues/72. No way to go but fix it now.

dmik commented 4 years ago

Actually, the solution of the above problem was moved to https://github.com/bitwiseworks/gcc-os2/issues/14#issuecomment-645979192 and I already fixed it in my test env. The link command starts fine now but it's taking enormous amounts of time. It's been running for more than an hour now. Only the EMXOMFLD command is running, nothing more. I have no idea what it's doing so it seems that I have to debug it...

dmik commented 4 years ago

I've started emxomfld with -t -t options and I see that it's running object files via weakld. Given that there are around 15k compilation units (object files), it may take a while... This WEAKLD code is slow like hell IIRC.

dmik commented 4 years ago

Weakld is reading object files in static libraries now.

StevenLevine commented 4 years ago

Knut makes some comments about optimizing grow.c to scale better. It might help to enlarge the hash tables to reduce the number of hash conflicts.

Offhand, I would suspect the strpool logic could use some optimizing.

dmik commented 4 years ago

Hard to say exactly. Some debugging needed. Weakld is still reading objects from liibraries here, I'm not interrupting it. I will leave it overnight. What I can say now is that this procedure is very slow. It's taking many seconds for some object files. No surprise it's taking that long. It has to be optimized. Impossible to go on like that.

Even a second per one object file is way too much. It gives us 15k seconds which is 4 hours...

dmik commented 4 years ago

It didn't end with anything good. Overall it took 9 (!!!) hours to get to the point where I found it dead (hard system hang with cold reboot). The log file is 432 MB and here are its last lines:

LIBRARY 'D:\Temp\ldconv_ssp_dll_a_cabe5eeba7ea177240.lib'
LIBRARY 'D:\Coding\gcc\master-install\lib\gcc\i686-pc-os2-emx\9\libgcc_so_d.lib'
LIBRARY 'C:\usr\lib\libc_alias.lib'
LIBRARY 'C:\usr\lib\libc_dll.lib'
LIBRARY 'C:\usr\lib\libos2.lib'
LIBRARY 'C:\usr\lib\libend.lib'
OPTION MODNAME='Qt5WebCd'

--- End of Response File

This looks like some debug messages from WL.EXE (due to -t in EMXOMFLD invocation) so I expect it was WL.EXE which brought it all down. No POPUPLOG or such so I expect it faced the infamous OOM condition.

I could try ILINK isntead of WL but chances are low that it will succeed. And first I have to optimize EMXOMFLD — no way to wait for many hours upon each try.

dmik commented 4 years ago

This is the list of undefined symbols I get from a semi-successive run of WL (see https://github.com/bitwiseworks/libc/issues/84#issuecomment-647760818):

Error! E2028: __ZNSt7__cxx1112basic_stringIwSt11char_traitsIwESaIwEEC1Ev is an undefined reference
Error! E2028: __ZNSt7__cxx1112basic_stringIwSt11char_traitsIwESaIwEEC1EOS4_ is an undefined reference
Error! E2028: __ZNSt7__cxx1112basic_stringIwSt11char_traitsIwESaIwEED1Ev is an undefined reference
Error! E2028: __ZNSt7__cxx1112basic_stringIwSt11char_traitsIwESaIwEE6insertEjRKS4_ is an undefined reference
Error! E2028: __ZNKSt7__cxx1112basic_stringIwSt11char_traitsIwESaIwEE4sizeEv is an undefined reference
Error! E2028: __ZNKSt7__cxx1112basic_stringIwSt11char_traitsIwESaIwEE4dataEv is an undefined reference
Error! E2028: __ZNSt7__cxx1112basic_stringIwSt11char_traitsIwESaIwEEC1EPKwRKS3_ is an undefined reference
Error! E2028: __ZNSt7__cxx1112basic_stringIwSt11char_traitsIwESaIwEE6resizeEj is an undefined reference
Error! E2028: __ZNSt7__cxx1112basic_stringIwSt11char_traitsIwESaIwEE5beginEv is an undefined reference
Error! E2028: __ZNSt7__cxx1112basic_stringIwSt11char_traitsIwESaIwEEaSEOS4_ is an undefined reference
Error! E2028: __ZNSt7__cxx1112basic_stringIwSt11char_traitsIwESaIwEE5clearEv is an undefined reference
Error! E2028: __ZNKSt7__cxx1112basic_stringIwSt11char_traitsIwESaIwEE6lengthEv is an undefined reference
Error! E2028: __ZNSt7__cxx1112basic_stringIwSt11char_traitsIwESaIwEEC1ERKS4_ is an undefined reference
Error! E2028: __ZNKSt7__cxx1112basic_stringIwSt11char_traitsIwESaIwEE5emptyEv is an undefined reference
Error! E2028: __ZNSt7__cxx1112basic_stringIwSt11char_traitsIwESaIwEEaSERKS4_ is an undefined reference
Error! E2028: __ZN3gfx19GetFontRenderParamsERKNS_21FontRenderParamsQueryEPNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE is an undefined reference
Error! E2028: __ZNKSt7__cxx1112basic_stringIwSt11char_traitsIwESaIwEE7compareERKS4_ is an undefined reference
Error! E2028: __ZNKSt7__cxx1112basic_stringIwSt11char_traitsIwESaIwEEixEj is an undefined reference
Error! E2028: __ZNKSt7__cxx1112basic_stringIwSt11char_traitsIwESaIwEE6substrEjj is an undefined reference
Error! E2028: __ZN8printing15PrintingContext6CreateEPNS0_8DelegateE is an undefined reference
Error! E2028: __ZN8printing15PrintedDocument21RenderPrintedDocumentEPNS_15PrintingContextE is an undefined reference
Error! E2028: __ZN4base15FilePathWatcherC1Ev is an undefined reference
Error! E2028: __ZN9SkFontMgr7FactoryEv is an undefined reference
Error! E2028: __ZN5media18CreateAudioManagerESt10unique_ptrINS_11AudioThreadESt14default_deleteIS1_EEPNS_15AudioLogFactoryE is an undefined reference
Error! E2028: __ZN2gl4init15CreateGLContextEPNS_12GLShareGroupEPNS_9GLSurfaceERKNS_16GLContextAttribsE is an undefined reference
Error! E2028: __ZN3gpu24CollectBasicGraphicsInfoEPNS_7GPUInfoE is an undefined reference
Error! E2028: __ZN2gl4init28GetGLWindowSystemBindingInfoEPNS_25GLWindowSystemBindingInfoE is an undefined reference
Error! E2028: __ZNKSt7__cxx1112basic_stringIwSt11char_traitsIwESaIwEE5beginEv is an undefined reference
Error! E2028: __ZNKSt7__cxx1112basic_stringIwSt11char_traitsIwESaIwEE3endEv is an undefined reference
Error! E2028: __ZNSt7__cxx1112basic_stringIwSt11char_traitsIwESaIwEE6assignEPKwj is an undefined reference
Error! E2028: __ZNSt7__cxx1112basic_stringIwSt11char_traitsIwESaIwEE3endEv is an undefined reference
Error! E2028: __ZNKSt7__cxx1112basic_stringIwSt11char_traitsIwESaIwEE7_M_dataEv is an undefined reference
Error! E2028: __ZNSt7__cxx1112basic_stringIwSt11char_traitsIwESaIwEE10_M_replaceEjjPKwj is an undefined reference
Error! E2028: __ZNSt7__cxx1112basic_stringIwSt11char_traitsIwESaIwEE13_M_local_dataEv is an undefined reference
Error! E2028: __ZNSt7__cxx1112basic_stringIwSt11char_traitsIwESaIwEE12_Alloc_hiderC1EPwRKS3_ is an undefined reference
Error! E2028: __ZNSt7__cxx1112basic_stringIwSt11char_traitsIwESaIwEE9_M_createERjj is an undefined reference
Error! E2028: __ZNSt7__cxx1112basic_stringIwSt11char_traitsIwESaIwEE7_M_dataEPw is an undefined reference
Error! E2028: __ZNSt7__cxx1112basic_stringIwSt11char_traitsIwESaIwEE11_M_capacityEj is an undefined reference
Error! E2028: __ZNSt7__cxx1112basic_stringIwSt11char_traitsIwESaIwEE13_M_set_lengthEj is an undefined reference
Error! E2028: __ZN7content9WebCursor16InitPlatformDataEv is an undefined reference
Error! E2028: __ZNK7content9WebCursor19IsPlatformDataEqualERKS0_ is an undefined reference
Error! E2028: __ZN7content9WebCursor19CleanupPlatformDataEv is an undefined reference
Error! E2028: __ZN7content9WebCursor16CopyPlatformDataERKS0_ is an undefined reference
Error! E2028: __ZN7content9WebCursor17GetPlatformCursorERKN2ui6CursorE is an undefined reference
Error! E2028: __ZNSt7__cxx1112basic_stringIwSt11char_traitsIwESaIwEEC1EPKwjRKS3_ is an undefined reference
Error! E2028: __ZN3gpu21ImageTransportSurface19CreateNativeSurfaceEN4base7WeakPtrINS_29ImageTransportSurfaceDelegateEEEmN2gl15GLSurfaceFormatE is an undefined reference
Error! E2028: __ZN5angle17GetEnvironmentVarB5cxx11EPKc is an undefined reference
Error! E2028: __ZN5angle16GetPathSeparatorEv is an undefined reference
Error! E2028: __ZN5angle17SetEnvironmentVarEPKcS1_ is an undefined reference
Error! E2028: _v8_Default_embedded_blob_ is an undefined reference
Error! E2028: _v8_Default_embedded_blob_size_ is an undefined reference
Error! E2028: __ZNSt7__cxx1112basic_stringIwSt11char_traitsIwESaIwEE10_M_disposeEv is an undefined reference
Error! E2028: __ZNSt7__cxx1112basic_stringIwSt11char_traitsIwESaIwEEC1EjwRKS3_ is an undefined reference
Error! E2028: __ZNKSt7__cxx1112basic_stringIwSt11char_traitsIwESaIwEE4findERKS4_j is an undefined reference
Error! E2028: __ZNSt7__cxx1112basic_stringIwSt11char_traitsIwESaIwEEpLERKS4_ is an undefined reference
Error! E2028: __ZNKSt7__cxx1112basic_stringIwSt11char_traitsIwESaIwEE5c_strEv is an undefined reference
Error! E2028: __ZN7content17SwapMetricsDriver6CreateESt10unique_ptrINS0_8DelegateESt14default_deleteIS2_EEN4base9TimeDeltaE is an undefined reference
Error! E2028: __ZN7content8internal26ChildProcessLauncherHelper34SetProcessPriorityOnLauncherThreadEN4base7ProcessERKNS_28ChildProcessLauncherPriorityE is an undefined reference
Error! E2028: __ZN7content8internal26ChildProcessLauncherHelper18GetTerminationInfoERKNS1_7ProcessEb is an undefined reference
Error! E2028: __ZN7content8internal26ChildProcessLauncherHelper16TerminateProcessERKN4base7ProcessEi is an undefined reference
Error! E2028: __ZN7content8internal26ChildProcessLauncherHelper28SetRegisteredFilesForServiceERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt3mapIS7_N4base8FilePathESt4lessIS7_ESaISt4pairIS8_SC_EEE is an undefined reference
Error! E2028: __ZN7content8internal26ChildProcessLauncherHelper30ResetRegisteredFilesForTestingEv is an undefined reference
Error! E2028: __ZN7content8internal26ChildProcessLauncherHelper26BeforeLaunchOnClientThreadEv is an undefined reference
Error! E2028: __ZN7content8internal26ChildProcessLauncherHelper40CreateNamedPlatformChannelOnClientThreadEv is an undefined reference
Error! E2028: __ZN7content8internal26ChildProcessLauncherHelper13GetFilesToMapEv is an undefined reference
Error! E2028: __ZN7content8internal26ChildProcessLauncherHelper28BeforeLaunchOnLauncherThreadERKNS_23PosixFileDescriptorInfoEPN4base13LaunchOptionsE is an undefined reference
Error! E2028: __ZN7content8internal26ChildProcessLauncherHelper29LaunchProcessOnLauncherThreadERKN4base13LaunchOptionsESt10unique_ptrINS_23PosixFileDescriptorInfoESt14default_deleteIS7_EEPbPi is an undefined reference
Error! E2028: __ZN7content8internal26ChildProcessLauncherHelper27AfterLaunchOnLauncherThreadERKNS1_7ProcessERKN4base13LaunchOptionsE is an undefined reference
Error! E2028: __ZN7content8internal26ChildProcessLauncherHelper33ForceNormalProcessTerminationSyncENS1_7ProcessE is an undefined reference
Error! E2028: __ZNSt7__cxx1112basic_stringIwSt11char_traitsIwESaIwEEixEj is an undefined reference
Error! E2028: __ZNKSt7__cxx1112basic_stringIwSt11char_traitsIwESaIwEE4findEwj is an undefined reference
Error! E2028: __ZNKSt7__cxx1112basic_stringIwSt11char_traitsIwESaIwEE5rfindEwj is an undefined reference
Error! E2028: __ZN2ui17CalculateIdleTimeEv is an undefined reference
Error! E2028: __ZN2ui22CheckIdleStateIsLockedEv is an undefined reference
Error! E2028: __ZNKSt7__cxx1112basic_stringIwSt11char_traitsIwESaIwEE8capacityEv is an undefined reference
Error! E2028: __ZNSt7__cxx1112basic_stringIwSt11char_traitsIwESaIwEE6appendERKS4_ is an undefined reference
Error! E2028: __ZNSt7__cxx1112basic_stringIwSt11char_traitsIwESaIwEE7reserveEj is an undefined reference
Error! E2028: __ZNSt7__cxx1112basic_stringIwSt11char_traitsIwESaIwEE9push_backEw is an undefined reference
Error! E2028: __ZN7content14responsiveness19NativeEventObserver16RegisterObserverEv is an undefined reference
Error! E2028: __ZN7content14responsiveness19NativeEventObserver18DeregisterObserverEv is an undefined reference
Error! E2028: __ZN7content8internal15OpenFileToShareERKN4base8FilePathEPNS1_16MemoryMappedFile6RegionE is an undefined reference
Error! E2028: __ZN7content18PepperTrueTypeFont6CreateEv is an undefined reference
Error! E2028: __ZNK4base7Process12CreationTimeEv is an undefined reference
Error! E2028: __ZN6device15TimeZoneMonitor6CreateE13scoped_refptrIN4base19SequencedTaskRunnerEE is an undefined reference
Error! E2028: __ZN6device25NewSystemLocationProviderEv is an undefined reference
Error! E2028: __ZN6device16PowerSaveBlockerC1ENS_5mojom12WakeLockTypeENS1_14WakeLockReasonERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE13scoped_refptrIN4base19SequencedTaskRunnerEESC_INSD_22SingleThreadTaskRunnerEE is an undefined reference
Error! E2028: __ZNKSt7__cxx1112basic_stringIwSt11char_traitsIwESaIwEE7compareEjjRKS4_ is an undefined reference
Error! E2028: __ZNSt13basic_ostreamIwSt11char_traitsIwEE5writeEPKwi is an undefined reference
Error! E2028: __ZN12CFX_GEModule15DestroyPlatformEv is an undefined reference
Error! E2028: __ZN12CFX_GEModule12InitPlatformEv is an undefined reference
Error! E2028: __ZNKSt7__cxx1112basic_stringIwSt11char_traitsIwESaIwEE12find_last_ofEwj is an undefined reference
Error! E2028: __ZNKSt7__cxx1112basic_stringIwSt11char_traitsIwESaIwEE12find_last_ofEPKwj is an undefined reference
Error! E2028: __ZNSt7__cxx1112basic_stringIwSt11char_traitsIwESaIwEE5eraseEjj is an undefined reference
Error! E2028: __ZNKSt7__cxx1112basic_stringIwSt11char_traitsIwESaIwEE7compareEPKw is an undefined reference
Error! E2028: __ZNSt7__cxx1112basic_stringIwSt11char_traitsIwESaIwEE6insertEN9__gnu_cxx17__normal_iteratorIPKwS4_EEw is an undefined reference
Error! E2028: __ZNKSt7__cxx1112basic_stringIwSt11char_traitsIwESaIwEE4findEPKwj is an undefined reference
Error! E2028: __ZNSt7__cxx1112basic_stringIwSt11char_traitsIwESaIwEEpLEPKw is an undefined reference
Error! E2028: __ZNSt7__cxx1112basic_stringIwSt11char_traitsIwESaIwEE5eraseEN9__gnu_cxx17__normal_iteratorIPKwS4_EE is an undefined reference
Error! E2028: __ZNSt7__cxx1112basic_stringIwSt11char_traitsIwESaIwEE5eraseEN9__gnu_cxx17__normal_iteratorIPKwS4_EES9_ is an undefined reference
Error! E2028: __ZNSt7__cxx1112basic_stringIwSt11char_traitsIwESaIwEE7replaceEjjPKw is an undefined reference
Error! E2028: __ZNSt7__cxx1112basic_stringIwSt11char_traitsIwESaIwEEaSEPKw is an undefined reference
Error! E2028: __ZNSt7__cxx1112basic_stringIwSt11char_traitsIwESaIwEE7replaceEjjPKwj is an undefined reference
Error! E2028: __ZNKSt7__cxx1112basic_stringIwSt11char_traitsIwESaIwEE13get_allocatorEv is an undefined reference
Error! E2028: __ZNSt7__cxx1112basic_stringIwSt11char_traitsIwESaIwEEC1ERKS3_ is an undefined reference
Error! E2028: __ZNSt7__cxx1112basic_stringIwSt11char_traitsIwESaIwEE4swapERS4_ is an undefined reference
Error! E2028: __ZNSt7__cxx1112basic_stringIwSt11char_traitsIwESaIwEE6appendERKS4_jj is an undefined reference
Error! E2028: __ZNSt7__cxx1112basic_stringIwSt11char_traitsIwESaIwEE6appendEPKwj is an undefined reference
Error! E2028: __ZNSt7__cxx1112basic_stringIwSt11char_traitsIwESaIwEE7replaceEjjRKS4_jj is an undefined reference
Error! E2028: __ZNSt7__cxx1112basic_stringIwSt11char_traitsIwESaIwEE13shrink_to_fitEv is an undefined reference
Error! E2028: __ZNSt7__cxx1112basic_stringIwSt11char_traitsIwESaIwEE7replaceEN9__gnu_cxx17__normal_iteratorIPKwS4_EES9_S8_S8_ is an undefined reference
Error! E2028: __ZNKSt7__cxx1112basic_stringIwSt11char_traitsIwESaIwEE4findEPKwjj is an undefined reference
Error! E2028: __ZNKSt7__cxx1112basic_stringIwSt11char_traitsIwESaIwEE13find_first_ofEPKwjj is an undefined reference
Error! E2028: __ZNSt7__cxx1112basic_stringIwSt11char_traitsIwESaIwEE13_S_copy_charsEPwPKwS7_ is an undefined reference
Error! E2028: __ZNSt7__cxx1112basic_stringIwSt11char_traitsIwESaIwEE6insertEjjw is an undefined reference
Error! E2028: __ZNSt7__cxx1112basic_stringIwSt11char_traitsIwESaIwEEpLEw is an undefined reference
Error! E2028: __ZNSt7__cxx1112basic_stringIwSt11char_traitsIwESaIwEE2atEj is an undefined reference
Error! E2028: __ZNSt7__cxx1112basic_stringIwSt11char_traitsIwESaIwEE6assignERKS4_ is an undefined reference
Error! E2028: __ZNSt7__cxx1112basic_stringIwSt11char_traitsIwESaIwEE13_S_copy_charsEPwS5_S5_ is an undefined reference
Error! E2028: __ZN2ui12CursorLoader6CreateEv is an undefined reference
Error! E2028: __ZNSt7__cxx1112basic_stringIwSt11char_traitsIwESaIwEE6assignEOS4_ is an undefined reference
Error! E2028: __ZNSt7__cxx1112basic_stringIwSt11char_traitsIwESaIwEE4backEv is an undefined reference
Error! E2028: __ZNSt7__cxx1112basic_stringIwSt11char_traitsIwESaIwEE6appendEPKw is an undefined reference
Error! E2028: __ZN8printing22PrintRenderFrameHelper16PrintPagesNativeEPN5blink13WebLocalFrameEib is an undefined reference
Error! E2028: __ZN2gl4init34CreateOffscreenGLSurfaceWithFormatERKN3gfx4SizeENS_15GLSurfaceFormatE is an undefined reference
Error! E2028: __ZN3gpu26CollectContextGraphicsInfoEPNS_7GPUInfoERKNS_14GpuPreferencesE is an undefined reference
Error! E2028: __ZN2gl4init29SetDisabledExtensionsPlatformERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE is an undefined reference
Error! E2028: __ZN2gl4init41InitializeExtensionSettingsOneOffPlatformEv is an undefined reference
Error! E2028: __ZN19SystemFontInfoIface13CreateDefaultEPPKc is an undefined reference
Error! E2028: __ZNK3net16PlatformMimeUtil40GetPlatformPreferredExtensionForMimeTypeERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEPS6_ is an undefined reference
Error! E2028: __ZNK3net16PlatformMimeUtil32GetPlatformMimeTypeFromExtensionERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEPS6_ is an undefined reference
Error! E2028: __ZNK3net16PlatformMimeUtil32GetPlatformExtensionsForMimeTypeERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEPSt13unordered_setIS6_St4hashIS6_ESt8equal_toIS6_ESaIS6_EE is an undefined reference
Error! E2028: __ZNSt7__cxx1112basic_stringIwSt11char_traitsIwESaIwEE7replaceEN9__gnu_cxx17__normal_iteratorIPKwS4_EES9_jw is an undefined reference
Error! E2028: __ZN2gl14NoContextGLApi24glDebugMessageCallbackFnEPFvjjjjiPKcPKvES4_ is an undefined reference
Error! E2028: __ZN2gl10DebugGLApi24glDebugMessageCallbackFnEPFvjjjjiPKcPKvES4_ is an undefined reference
Error! E2028: __ZN2gl10TraceGLApi24glDebugMessageCallbackFnEPFvjjjjiPKcPKvES4_ is an undefined reference
Error! E2028: __ZN2gl9GLApiBase24glDebugMessageCallbackFnEPFvjjjjiPKcPKvES4_ is an undefined reference
Error! E2028: __ZN2gl4init27GetAllowedGLImplementationsEv is an undefined reference
Error! E2028: __ZN2gl4init26InitializeStaticGLBindingsENS_16GLImplementationE is an undefined reference
Error! E2028: __ZN2gl4init26InitializeGLOneOffPlatformEv is an undefined reference
Error! E2028: __ZN2gl4init25InitializeDebugGLBindingsEv is an undefined reference
Error! E2028: __ZN2gl4init18ShutdownGLPlatformEv is an undefined reference
Error! E2028: __ZN3gfx12PlatformFont13CreateDefaultEv is an undefined reference
Error! E2028: __ZN3gfx12PlatformFont21CreateFromNameAndSizeERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEi is an undefined reference
Error! E2028: __ZN2ui6Cursor15RefCustomCursorEv is an undefined reference
Error! E2028: __ZN2ui6Cursor17UnrefCustomCursorEv is an undefined reference
Error! E2028: __ZN2gl10GLFenceEGL17SetIgnoreFailuresEv is an undefined reference
Error! E2028: __ZN2gl10GLFenceEGL6CreateEv is an undefined reference
Error! E2028: __ZN5blink9FontCache32PlatformFallbackFontForCharacterERKNS_15FontDescriptionEiPKNS_14SimpleFontDataENS_20FontFallbackPriorityE is an undefined reference
Error! E2028: __ZN5blink9FontCache16SystemFontFamilyEv is an undefined reference
Error! E2028: __ZN2ui12KeyboardHook26CreateModifierKeyboardHookEN4base8OptionalINS1_8internal9flat_treeINS_7DomCodeES5_NS3_23GetKeyFromValueIdentityIS5_EESt4lessIvEEEEEmNS1_17RepeatingCallbackIFvPNS_8KeyEventEEEE is an undefined reference
Error! E2028: __ZN22memory_instrumentation9OSMetrics16FillOSMemoryDumpEiPNS_5mojom12RawOSMemDumpE is an undefined reference
Error! E2028: __ZN2ui22CreateSelectFileDialogEPNS_16SelectFileDialog8ListenerESt10unique_ptrINS_16SelectFilePolicyESt14default_deleteIS4_EE is an undefined reference
Error! E2028: __ZNSt7__cxx1112basic_stringIwSt11char_traitsIwESaIwEE6appendEjw is an undefined reference
Error! E2028: __ZN7content28RendererMainPlatformDelegateC1ERKNS_18MainFunctionParamsE is an undefined reference
Error! E2028: __ZN7content28RendererMainPlatformDelegate18PlatformInitializeEv is an undefined reference
Error! E2028: __ZN7content28RendererMainPlatformDelegate13EnableSandboxEv is an undefined reference
Error! E2028: __ZN7content28RendererMainPlatformDelegate20PlatformUninitializeEv is an undefined reference
Error! E2028: __ZN7content28RendererMainPlatformDelegateD1Ev is an undefined reference
Error! E2028: __ZN7content14RenderViewImpl36UpdateFontRenderingFromRendererPrefsEv is an undefined reference
Error! E2028: __ZNKSt7__cxx1112basic_stringIwSt11char_traitsIwESaIwEE17find_first_not_ofERKS4_j is an undefined reference
Error! E2028: __ZNSt7__cxx1112basic_stringIwSt11char_traitsIwESaIwEE6assignEjw is an undefined reference
Error! E2028: __ZNSt7__cxx1112basic_stringIwSt11char_traitsIwESaIwEE7replaceEjjRKS4_ is an undefined reference
Error! E2028: __ZNSt7__cxx1112basic_stringIwSt11char_traitsIwESaIwEE4nposE is an undefined reference
Error! E2028: __ZN3gfx16GetFallbackFontsERKNS_4FontE is an undefined reference
Error! E2028: __ZNSt7__cxx1112basic_stringIwSt11char_traitsIwESaIwEE6insertEjPKw is an undefined reference
Error! E2028: __ZN7metrics20DriveMetricsProvider14HasSeekPenaltyERKN4base8FilePathEPb is an undefined reference
Error! E2028: __ZN3net24WebSocketErrorToNetErrorENS_14WebSocketErrorE is an undefined reference
Error! E2028: __ZNKSt7__cxx1112basic_stringIwSt11char_traitsIwESaIwEE5rfindERKS4_j is an undefined reference
Error! E2028: __ZN5blink11LayoutTheme11NativeThemeEv is an undefined reference
Error! E2028: __ZN5blink11Hyphenation22PlatformGetHyphenationERKN3WTF12AtomicStringE is an undefined reference
Error! E2028: __ZN5blink9FontCache20device_scale_factor_E is an undefined reference
Error! E2028: __ZNKSt7__cxx1112basic_stringIwSt11char_traitsIwESaIwEE4copyEPwjj is an undefined reference
Error! E2028: __ZN21SkFontConfigInterface9RefGlobalEv is an undefined reference
Error! E2028: __ZN5blink9FontCache19SetSystemFontFamilyERKN3WTF12AtomicStringE is an undefined reference
Error! E2028: __ZN22memory_instrumentation9OSMetrics20GetProcessMemoryMapsEi is an undefined reference
Error! E2028: __ZNKSt7__cxx1112basic_stringIwSt11char_traitsIwESaIwEE6rbeginEv is an undefined reference
Error! E2028: __ZNKSt7__cxx1112basic_stringIwSt11char_traitsIwESaIwEE5frontEv is an undefined reference
Error! E2028: __ZNKSt7__cxx1112basic_stringIwSt11char_traitsIwESaIwEE4backEv is an undefined reference
Error! E2028: _setproctitle is an undefined reference

It's 180 symbols, not that much. Not only Chromium itself, but our C++ library seems to miss something.

dmik commented 4 years ago

Missing libstdc exports is quite strange as I see them in the original stdc++_dll.a library as well as in its .lib counterpart, both located in /usr/lib. However, WL uses a .lib library converted by emxomfld for it from the .a library and this one doesn't have some exports... Really strange. Both why emxomfld decides to do a conversion instead of using an existing .lib file and why this conversion is different from what we do at GCC RPM build stage.

dmik commented 4 years ago

It turned to be the old C++ library from some test build of GCC which got on the way. Removing a path to it from EMXOMFLD options made the problem go away: this means, that EMXOMFLD does not convert the library now and simply uses the .lib version as it should.

dmik commented 4 years ago

Ok, with the right library, all missing cxx entries are gone the list of missing symbols is down to 91. Not bad. Switching to working on them.

dmik commented 4 years ago

Status update: I've fixed more than a half of missing symbols (mostly by adapting Fuchsia stubs to OS/2 to speed it up). However, I have to recompile hundreds and hundreds of source files (as headers change in many cases) and I'm constantly experiencing OOM issues from both EMXOMF and WL so it's going really slow.

dmik commented 4 years ago

I'm trying the release build now and it's going much faster. Approximately, 2500 compilation units in 30 min. Which gives a total duration of 3 hours per 15k of them. Not bad, 2-3 times faster than the debug build (may be even more).

dmik commented 4 years ago

I was way too optimistic it seems. The first 10k units were built in roughly 2.5 hours but then I had a build break and performance significantly degraded down to just 500 units in the next 3 hours. I have no idea if it's just the complexity of C++ or something else. Judging by the CPU load, it still loads it almost completely. I will try to break the build and reboot to see if it helps.

dmik commented 4 years ago

Note that the original release build failed with OOM too. And looking at options shows that it uses -g1 (debug info w/o local vars). Our EMXOMF ignores debug level and also does everything hence an OOM on big files (https://github.com/bitwiseworks/libc/issues/82 -- I guess we should add such support, it meets the task mentioned in that ticket and could be a partial solution). I had to hack the release config to explicitly use -s.

After that I got a single build run of the whole QtWebEngine module in 14 hours 30 min w/o any OOMs. It failed on linking but that's expected as not all symbols are there yet. But I must say that the fixed WL from https://github.com/bitwiseworks/libc/issues/84 runs much, much faster. Just several minutes. Yes, it's w/o the debug info but still.

Good results, I will finish the missing symbols now.

dmik commented 4 years ago

All missing symbols are finished within https://github.com/bitwiseworks/qtwebengine-chromium-os2/issues/3. There are also a few bits on the Qt side to compile (the Qt Web Engine Widgets DLL) but they should be pretty straight forward since we have everything now.

dmik commented 4 years ago

With the above commits, EVERYTHING is successfully built now. Including examples and tests.

Starting examples/webenginewidgets/simplebrowser (a very simple web browser example) fails like this:

D:>qt5d sh -c ./simplebrowser.exe
[489-1:01:17:03.230] unknown:0: Could not find QtWebEngineProcess

Killed by SIGABRT
pid=0x01e9 ppid=0x01e8 tid=0x0001 slot=0x008d pri=0x0200 mc=0x0001 ps=0x0010
D:\CODING\QT5\QT5-DEV-BUILD\QTWEBENGINE\EXAMPLES\WEBENGINEWIDGETS\SIMPLEBROWSER\RELEASE\SIMPLEBROWSER.EXE
Process dumping was disabled, use DUMPPROC / PROCDUMP to enable it.

Somewhat expected.

I need to see where this error comes from but the fact is that OS/2 successfully loads all Qt DLLs for this executable including Qt5WebC.dll which contains Chromium and is of 250 MB in size! And I'm not using the high memory bit so far.

I will debug that on Monday, doesn't look serious.

dmik commented 4 years ago

Above was a usual lack of the .exe extension. With that fixed, I can run further but getting some problems with IPC communication between the Qt app and the web process (also expected):

[18461:10236064:0713/175825.815000:ERROR:network_change_notifier.cc(224)] Not implemented reached in static net::NetworkChangeNotifier* net::NetworkChangeNotifier::Create()
[warn] poll: Invalid argument
[warn] poll: Invalid argument
[warn] poll: Invalid argument

We need to align it to use socketpair instead of poll (or a proper poll impl) etc. I"m also getting one missing export in Qt5WebC.dll for some reason (MOC-related):

07-13-2020  17:58:26  SYS2070  PID 481d  TID 0001  Slot 0094
D:\CODING\QT5\QT5-DEV-BUILD\QTWEBENGINE\EXAMPLES\WEBENGINEWIDGETS\SIMPLEBROWSER\RELEASE\SIMPLEBROWSER.EXE
QT5WEBC->QT5WEBC.__ZNK28QWebChannelAbstractTransport10metaObjectEv
127
dmik commented 4 years ago

Also, seems that EMXEXP doesn't like Qt5WebC.dll:

D:>emxexp Qt5WebC.dll
emxexp: OMF record too long in `Qt5WebC.dll'
dmik commented 4 years ago

Also, both EXEHDR from OS/2 Toolkit and WDUMP from OpenWatcom 1.9 fail to show all the exports from Qt5WebC.dll. EXEHDR also fails (crashes) even on Qt5Wdgt.dll (which is fine per se and works well). So, we're definitely hitting some limit there...

StevenLevine commented 4 years ago

If you provide a copy of the failing Qt5WebC.dll and tell me which exports wdump appears to be missing, I can take a look.

FWIW, this may or may not be related to a recent message from Elbert Pol on ecs-technical with the subject:

[eCS-Technical] Error

The gist of Elbert's message was that his QT app build blew up with:

Error! E2082: file D:\Test\rssguard\os2\src\librssguard\rcc\qrc_sql.obj(D:\Test\rssguard\os2\src\librssguard\rcc\qrc_sql.cpp), record 24: invalid record type 0x0049

A bit of poking about revealed that emxomf generated a broken obj file because emxomf did not split a too large LE record properly when writing qrc_sql.obj.

What I told him in my reply to his message was:

Using dmpobj, we see that record 24 ends correctly with: 000003e0 69|64 29|0a 57|48 45|52 45|20 46|65 65|64 73|2e 000003f0 63|75 73|74 6f|6d 5f|69 64 However record 25: starts 0x49 and is clearly missing the requied record header. **??**386(49) recnum:25, offset:000006cfh, len:2053h, chksum:5fh(a1) 00000000 4e|55 4c|4c 20|4f 52|20 46|65 65|64 73|2e 63|75 00000010 73|74 6f|6d 5f|69 64|20 3d|20 27|27 3b|0a 2d|2d

The command line indicated he was building with -Zomf, so I am assuming emxomf is at fault here. Emxomf appears to have detected the need to split, but neglected to insert the LE header before outputting the tail of the split recoard.

I asked Elbert to submit a ticket, but I've not seen one yet, so I figured it's time to tell you now.

dmik commented 4 years ago

Turns out that the DLL is loaded (and resolved by OS/2) fine. The cause for error 127 in POPUPLOG is different: there was a DLL name clash with QtWebChannel (the one that actually exports __ZNK28QWebChannelAbstractTransport10metaObjectEv). Resolving the clash by renaming it to QtWebH (see the commit above) fixes this problem. So, now I only have to fix broken IPC.

Steven, thanks for the help! I've uploaded the Qt5WebC.DLL for you for checking as http://rpm.netlabs.org/test/Qt5WebC.zip. Note that WDUMP seems to work fine now (it's just 648 exports in that DLL and this is normal -- all Chromium code is "private" there, Qt only exports its own APIs). EXEHDR and EMXEXP still fail. But they don't prevent me from going further at least: EMXEXP is not used in Qt. We use EMXIMP to generate import libraries and EMXIMP works fine with this huge DLL. I'm pretty sure EMXEXP is easily fixable though. But anyway, it's interesting what your checking of this DLL will tell us in terms of possible future problems.

StevenLevine commented 4 years ago

I see the same 648 exports with both wdump -x and lxlite -c:exemap -f-. Oddly exehdr does not die here and shows 684 exports. This exehdr reports itself as:

Operating System/2 Executable File Header Utility Version 4.01.003 Dec 11 2003 Copyright (C) IBM Corporation 1988-2003 Copyright (C) Microsoft Corp. 1988-1992. All rights reserved.

1-05-04 2:54 82,461 0 exehdr.exe

44f5904ef91a9e1597920054cf9accd9 *exehdr.exe

I don't expect any problems with wdump.exe based on file size since it does not need to keep much of the binary file in memory.

That said, wdump -a dies with

page # 520  map page = 44C60C46H size = 0C24H flgs = 00H Unknown

segment # 2520 offset: 4628EE36

Error! Couldn't read from executable: reached EOF.

I should have time to look at this tomorrow and figure out where the blame lies.

You might notice the discrepancy between page # and segment # in the above. It turns out the developers decided to limit page # to 3 digits. I probably seemed like a reasonable limit in the '80s. This has been fixed.

BTW, do you have any uncommited changes to emxomf or emxomfld? I am thinking of your debug data hack that breaks some object files. Perhaps, I can find time to fix this properly.

Regarding wlink speed, I am still designing the symbol table rework. The current plan is count the number of objects and library files and use this to size the hash table at startup. In addition, I am going rework the hash collison handling to use a resizable array of symbol table entries rather than a linked list. Since we have well over 1 million symbols, this will save more than 4MB of RAM.

I'm also considering optionally Huffman coding the symbols or something similar using a predefined coding table. This will significantly reduce the size of the symbol table at the cost of some processing time

dmik commented 4 years ago

Re EXEHDR, I wonder where you got this. I have:

Version 4.01.001 Oct  4 2001

(from the OS/2 4.5 TK coming with eCS 2.0).

Re uncommitted changes. In EMXOMF there is an uncommitted hack which breaks linking of some OBJ and I'm not going to commit it. In EMXOMFLD - yes, I have fixes for hash tables but they need some brushup. Will do it today.

I was also thinking about counting the symbols in EMXOMFLD/WEAKLD and making the hash table size dependent on it but then I decided it's not worth it. If there is a large number of symbols, we will need the largest hash table anyway. And if there is not, then allocating even 4MB will not hurt at all (as there will be plenty of free memory and no need for it elsewhere). So I'm going to make it constant (with a 49999 prime, see https://github.com/bitwiseworks/libc/issues/83). What I am going to do though is make this allocation dynamic. EMXOMFLD starts WL after it's done weak symbol processing and that guy will need as much as possible for huge things like Chromium so every MB counts. My plan is to free those tables before launching the actual linker executable.

dmik commented 4 years ago

As everything builds now, it's time to close this issue. Runtime issues are to be reported via separate tickets.

StevenLevine commented 4 years ago

I had no recollection of where this version of exehdr came from, so I had to do some hunting. It appears to be a build provided by Scott Garfinkle when he add /highmem support. I uploaded a copy to

http://www.warpcave.com/exehdr_exe-20040105.zip

if you find it useful.

I start to worry when I don't recall exactly what happened 16 years ago.

dmik commented 4 years ago

Thanks for the link, Steve!