Closed dmik closed 6 years ago
And we get a tiny side problem here: init-repository
calls git config --remove-section BLAH
under some circumstances at some stage and this fails with:
error: chmod on D:/Coding/qt5/t/.git/config.lock failed: Permission denied
I recall I've seen it before. I've created http://trac.netlabs.org/ports/ticket/183 for that.
One git problem has been solved and there is another one. The following git command:
git clone --no-checkout https://github.com/bitwiseworks/qtbase-os2.git qtbase
now fails here with
fatal: mmap failed: Permission denied
git clone --no-checkout https://github.com/bitwiseworks/qtbase-os2.git qtbase exited with status 8388608 at D:/Coding/qt5/qt5/init-repository line 198.
Qt::InitRepository::exe('Qt::InitRepository=HASH(0x2003a344)', 'git', 'clone', '--no-checkout', 'https://github.com/bitwiseworks/qtbase-os2.git', 'qtbase') called at D:/Coding/qt5/qt5/init-repository line 538
Qt::InitRepository::git_clone_one_submodule('Qt::InitRepository=HASH(0x2003a344)', 'qtbase', 'qtbase-os2.git', 0) called at D:/Coding/qt5/qt5/init-repository line 411
Qt::InitRepository::git_clone_all_submodules('Qt::InitRepository=HASH(0x2003a344)', 'qt5', 0, 'qtbase') called at D:/Coding/qt5/qt5/init-repository line 648
Qt::InitRepository::run('Qt::InitRepository=HASH(0x2003a344)') called at D:/Coding/qt5/qt5/init-repository line 659
It definitely worked before. Investigating if it's my latest fixes (it should be not) or something else.
It turns out that this is a rather tricky bug in LIBC. In short, passing O_NOINHERIT and then querying the file flags with fcntl(F_GETFD)
causes the file mode to be reset to O_WRONLY regardless of what it was before. And since the git code then calls mmap
with PROT_READ, this makes it fail with EACCESS because of incompatible access mode as required by Posix. This needs to be fixed in LIBC as it might affect other code as well (since long).
The kLIBC problem is fixed within https://github.com/bitwiseworks/libc/issues/2 (yes, this also means that we finally forked kLIBC in order to bring our numerous patches in order). Git works flawlessly now.
With the above kLIBC fix and with ef4c089dbce3c593c3f8c83a28cdcf36d68053a1 the init-repository
script finally works . Note that I also committed a special script named init-repository-os2.sh
in 7357b063c8fc2319b6962cb0aa41926c5372c463 that barely starts init-repository
with the options needed on OS/2 (currently it only limits the set of modules to qtbase
). This is better than hack init-repository
itself as it reduces potential conflicts on future merges (and these hacks need to be removed anyway once we finish our port).
With https://github.com/bitwiseworks/qtbase-os2/commit/3612aac208829635fee8272e7eca07b714c759ce, configure works now (it fails to build qmake though but that's expected and will be worked on within #3). Closing this.
Bootstrapping the Qt source tree consists of two phases:
init-repository
to pull Qt submodulesconfigure
to set up the build processThis issue to track making these two steps work.