Windows build Environment cannot be installed anymore - need a hand

freshman
Posts: 39
Joined: Mon Oct 05, 2020 9:56 pm

Windows build Environment cannot be installed anymore - need a hand

Post by freshman »

Hi list,

I wanna revisit/update an older patch of mine and need to reinstall the windows build system (cf. https://wiki.mudlet.org/w/Compiling_Mudlet) with current versions (but this is still windows 10).

Alas, several of the packages in setup-windows-sdk.ps1 are no longer available and thus the whole setup breaks down. I realize the preferred Qt 5.14.2 is no longer available, the closest one is 5.15.2. This one, however, comes bundled with mingw8.10 only, you can select and install mingw7.30 in addition, but it will still include mingw8.10.

Also, I didn't manage to make Qt install QtCreator in qt-silent-install.qs . You can install QtCreator b4 or after running setup-windows-sdk.ps1 but it might break the build process. Building mudlet manuall with QtCreator complains about missing lua.

I could get this down to the point where it seems it cannot dowload yajl. Might be this is an issue at yajl site, the URL https://github.com/lloyd/yajl/tarball/2.1.0 goes nowhere/has a bug, is there an alternative? Also, repeat, it would be great if I could make qt-silent-install.qs install QtCreator but I don't know Qt, so I did not manage to find out what the component name is.

I need some help from s.o. understanding he logic of the setup script and build system to fix it. (Note: I had some direct conversation with Vadim and Stephen about it, but I think this issue might be better suited for the forum.)

Thanks people, Michael (aka Freshman).

--- End of src/verbose_output.log
ingw32-make[1]: Leaving directory 'C:/src/hunspell/hunspell-1.6.2'
/usr/bin/install: cannot stat `./de.gmo': No such file or directory
/usr/bin/install: cannot stat `./es.gmo': No such file or directory
/usr/bin/install: cannot stat `./hu.gmo': No such file or directory
/usr/bin/install: cannot stat `./it.gmo': No such file or directory
/usr/bin/install: cannot stat `./tg.gmo': No such file or directory
==== hunspell compiled and installed ====
==== compiling and installing yajl ====
---- Downloading ----
Using C:\Qt\5.15.2\mingw81_32 as QT base directory.
Using C:\Qt\Tools\mingw810_32 as MinGW base directory.
Using C:\Qt\Tools\mingw810_32\lib\lua\5.1\?.dll; as LuaRocks path.

-----------------------
What I already changed (sorry for the somewhat malformed diff, Cut&Paste did not work well):

CI\appveyor.functions.ps1:

@ -22,7 +22,7 @@ function SetQtBaseDir([string] $logFile) {
}
catch
{
- $Env:QT_BASE_DIR = "C:\Qt\5.13.2\mingw73_32"
+ $Env:QT_BASE_DIR = "C:\Qt\5.15.2\mingw81_32"
}
}
Write-Output "Using $Env:QT_BASE_DIR as QT base directory." | Tee-Object -File "$logFile" -Append
@ -215,7 +215,7 @@ function InstallBoost() {
}

function InstallQt() {
- DownloadFile "http://download.qt.io/official_releases ... online.exe" "qt-installer.exe"
+ DownloadFile "http://download.qt.io/official_releases ... online.exe" "qt-installer.exe"
Step "Installing"
exec ".\qt-installer.exe" @("--script=`"$(split-path -parent $script:MyInvocation.MyCommand.Path)\qt-silent-install.qs`"")
}
@ -229,7 +229,7 @@ function InstallPython() {
}

function InstallOpenssl() {
- DownloadFile "http://wiki.overbyte.eu/arch/openssl-1.1.1d-win32.zip" "openssl-win32.zip"
+ DownloadFile "http://wiki.overbyte.eu/arch/openssl-1.1.1n-win32.zip" "openssl-win32.zip"
ExtractZip "openssl-win32.zip" "openssl"
Step "installing"
exec "XCOPY" @("/S", "/I", "/Q", "openssl", "$Env:MINGW_BASE_DIR\bin")



CI\qt-silent-install.qs:
@ -27,8 +27,8 @@ Controller.prototype.ComponentSelectionPageCallback = function() {
var widget = gui.currentPageWidget();

widget.deselectAll();
- widget.selectComponent("qt.qt5.5132.win32_mingw73");
- widget.selectComponent("qt.tools.win32_mingw730");
+ widget.selectComponent("qt.qt5.5152.win32_mingw81");
+ widget.selectComponent("qt.tools.win32_mingw810");

gui.clickButton(buttons.NextButton);
}

User avatar
Vadi
Posts: 5045
Joined: Sat Mar 14, 2009 3:13 pm

Re: Windows build Environment cannot be installed anymore - need a hand

Post by Vadi »

Hey, one thing to check - how old is the code that you're working with? The latest version does not use the visual installer from Qt anymore, in part because that one requires you to supply a Qt account.

See latest code at https://github.com/Mudlet/Mudlet/blob/d ... s.ps1#L225

freshman
Posts: 39
Joined: Mon Oct 05, 2020 9:56 pm

Re: Windows build Environment cannot be installed anymore - need a hand

Post by freshman »

@vadi: Ok, I just downloaded a current clone of the development tree. Yes, it does use the graphical installer, but yes, I still have a Qt account.

I managed to get a bit further by changing a bunch of other source libs. It starts compiling now, but finally fails with

..\src\TLuaInterpreter.h:49:10: fatal error: lauxlib.h: No such file or directory
#include <lauxlib.h>

Actually lauxlib.h is there in C:\src\lua-5.1.5\lua-5.1.5\src , but apparently the search/installation paths are not matching, also, from the installation logs I get:

warning: lua-yajl not available - translation statistics in settings won't be shown.
(but I got some yajl 2.1.0 version installed)

and:

Error: 'git' program not found. Make sure Git is installed and is available in your PATH (or you may want to edit the 'variables.GIT' value in file 'C:/Program Files (x86)/luarocks/config-5.1.lua')

but I do have gitdesktop working.

I could attach some patches containing which download sources I changed, but according to your comment, Vadi, it seems I'm going in a completely wrong direction.

What would I have to clone from github, maybe which setup files to download, to use the appveyor functions you refer to below?

Again, I made a fresh clone of the development branch, github desktop sees no changes.

User avatar
Vadi
Posts: 5045
Joined: Sat Mar 14, 2009 3:13 pm

Re: Windows build Environment cannot be installed anymore - need a hand

Post by Vadi »

> Error: 'git' program not found.

Install https://git-scm.com/download/win, that should get you the 'git' binary in the PATH. Perhaps that will fix things?

freshman
Posts: 39
Joined: Mon Oct 05, 2020 9:56 pm

Re: Windows build Environment cannot be installed anymore - need a hand

Post by freshman »

Apparently I got a git binary, I installed it mostly with default settings, it brings me here:

==== compiling and installing luasql.sqlite3 ====
Installing https://luarocks.org/luasql-sqlite3-2.6.0-1.rockspec

Cloning into 'luasql'...
fatal: unable to connect to github.com:
github.com[0: 140.82.121.3]: errno=Unknown error


Error: Failed cloning git repository.

---
Well, I've no idea what the issue about github.com is. I can ping and browse to it, no problems. I even get an ssh connect. Hmm, maybe the git executable needs some prerequisites?

Still wondering why my development clone does not have the version of appveyor.functions.ps1 you referenced above.

User avatar
Vadi
Posts: 5045
Joined: Sat Mar 14, 2009 3:13 pm

Re: Windows build Environment cannot be installed anymore - need a hand

Post by Vadi »

> Still wondering why my development clone does not have the version of appveyor.functions.ps1 you referenced above.

I don't think you are on the latest `development` branch.

> Error: Failed cloning git repository.

I think I know - the luarocks version that got installed is too old. Need to use the latest one to be able to connect to github successfully.

freshman
Posts: 39
Joined: Mon Oct 05, 2020 9:56 pm

Re: Windows build Environment cannot be installed anymore - need a hand

Post by freshman »

I think I resolved the issue with my clone of development (Was a configuration/usage issue. I have to admin I have my issues with the way git does things, but that's another story).

But now again / it still does not install Qt. At first I thought, oh yes, they don't provide 5.14.2 anymore, but no, I could trace the issue down to:

appveyor.functions.ps1:
function InstallQt() {
Step "Installing aqtinstall"
exec "pip" @("install", "aqtinstall")

Well, there is no pip. I somehow relate pip to python, so I thought... hmmm.. maybe install Python2.7 first, it might come with pip. No, it did not change. All the pip 4 windows setup info I found yet refers to the python 3 app for windows, but I think that won't help.

I now see, Python2.7 comes with pip, but it is not in the path, I changed the installation to put it in the path, but it tries to:

Running setup.py bdist_wheel for unknown: finished with status 'done'
Stored in directory: C:\Users\<myusername>\AppData\Local\pip\Cache\wheels\7f\f6\f2\72c21823aa8ba2d692f5d56701546b324f3fab74ef5f4fa8d7

then fails multiple times with IOError: [Errno 2] No such file or directory: 'c:\\users\\<myusername>\\appdata\\local\\temp\\pip-build-4y4_jm\\unknown\\setup.py'

Also, the install script obviously somehow seems to expect a different pip, as it normally won't install python b4 trying to use aqtinstall.

Any ideas what pip I might want to use?

User avatar
Vadi
Posts: 5045
Joined: Sat Mar 14, 2009 3:13 pm

Re: Windows build Environment cannot be installed anymore - need a hand

Post by Vadi »

What if you try to use https://github.com/miurahr/aqtinstall/r ... .4/aqt.exe directly? I think we can replace the whole pip thing with just that executable, which looks like is a new thing offered by the project.

User avatar
Vadi
Posts: 5045
Joined: Sat Mar 14, 2009 3:13 pm

Re: Windows build Environment cannot be installed anymore - need a hand

Post by Vadi »

I don't have a working Windows installation at the moment to test this with, but here is a replacement function which might be able to work:

Code: Select all

function InstallQt() {
  Step "Installing aqtinstall"
  New-Item -Path $Env:QT_BASE_DIR -ItemType Directory
  cd $Env:QT_BASE_DIR
  # go up to the root of Qt folder to start installation
  cd ..
  cd ..
  DownloadFile "https://github.com/miurahr/aqtinstall/releases/download/v3.1.4/aqt.exe" "aqt.exe" $true
  Step "Installing Qt"
  exec "aqt" @("install-qt", "windows", "desktop", "5.14.2", "win32_mingw73")
  Step "Installing Mingw 7.3.0 Win32 tools"
  exec "aqt" @("install-tool", "windows", "desktop", "tools_mingw", "qt.tools.win32_mingw730")
}

freshman
Posts: 39
Joined: Mon Oct 05, 2020 9:56 pm

Re: Windows build Environment cannot be installed anymore - need a hand

Post by freshman »

sorry for the delay, was quite busy.

tried the function, did not work. Weirdly enough it seems to crash in "New-Item -Path $Env:QT_BASE_DIR -ItemType Directory"
No idea why, it seems powershell really aborts execution there, InstallQT is not left.

If I do:
Step "Installing aqtinstall"
Step "test1"
Step "XXX -Path $Env:QT_BASE_DIR -ItemType Directory"
New-Item -Path $Env:QT_BASE_DIR -ItemType Directory
Step "test2"
cd $Env:QT_BASE_DIR
# go up to the root of Qt folder to start installation
Step "test3"

verbose_output_log gives:
---- Installing aqtinstall ----
---- test1 ----
---- XXX -Path C:\Qt\5.14.2\mingw73_32 -ItemType Directory ----
Using C:\Qt\5.14.2\mingw73_32 as QT base directory.
Using as MinGW base directory.
Using \lib\lua\5.1\?.dll;\lib\lua\5.1\?.dll;\lib\lua\5.1\?.dll;\lib\lua\5.1\?.dll;\lib\lua\5.1\?.dll; as LuaRocks path.


From Powershell I get an error:

Resolve-Path : Der Pfad "C:\Qt\Tools" kann nicht gefunden werden, da er nicht vorhanden ist.
In C:\users\<myname>\Documents\GitHub\Mudlet\CI\appveyor.functions.ps1:44 Zeichen:29
+ $tmp = $tmp -join "\" | Resolve-Path
+ ~~~~~~~~~~~~
+ CategoryInfo : ObjectNotFound: (C:\Qt\Tools:String) [Resolve-Path], ItemNotFoundException
+ FullyQualifiedErrorId : PathNotFound,Microsoft.PowerShell.Commands.ResolvePathCommand

Using as MinGW base directory.
Using \lib\lua\5.1\?.dll;\lib\lua\5.1\?.dll;\lib\lua\5.1\?.dll;\lib\lua\5.1\?.dll;\lib\lua\5.1\?.dll; as LuaRocks path.
Running qmake
qmake : Die Benennung "qmake" wurde nicht als Name eines Cmdlet, einer Funktion, einer Skriptdatei oder eines
ausführbaren Programms erkannt. Überprüfen Sie die Schreibweise des Namens, oder ob der Pfad korrekt ist (sofern
enthalten), und wiederholen Sie den Vorgang.
In C:\users\<myname>\Documents\GitHub\Mudlet\setup-windows-sdk.ps1:28 Zeichen:1
+ qmake CONFIG+=debug ../src/mudlet.pro
+ ~~~~~
+ CategoryInfo : ObjectNotFound: (qmake:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException

Not sure if this is from New-Item or unrelated. C:\Qt\Tools does indeed not yet exist.

Created such an empty dir, it made that error go away, but other than that, nothing changed.
I've no idea what goes on in New-Item. Tried a few things by comparing to other New-Item calls: write Directory in all lowercase, put it in " quotes.
Does not change anything.

I commented out the New-Item, and yes it does then download aqt.exe to C:\src but then it crashes with

---- Installing Qt ----
Traceback (most recent call last):
File "c:\python27\lib\runpy.py", line 174, in _run_module_as_main
"__main__", fname, loader, pkg_name)
File "c:\python27\lib\runpy.py", line 72, in _run_code
exec code in run_globals
File "C:\Python27\Scripts\aqt.exe\__main__.py", line 5, in <module>
File "c:\python27\lib\site-packages\aqt\__init__.py", line 25, in <module>
from aqt.cli import Cli
File "c:\python27\lib\site-packages\aqt\cli.py", line 83
raise Exception('Specified 7zip command executable does not exist: {!r}'.format(sevenzip)) from e
^
SyntaxError: invalid syntax
Using C:\Qt\5.14.2\mingw73_32 as QT base directory.
Using as MinGW base directory.
Using \lib\lua\5.1\?.dll; as LuaRocks path.

Hmm.. 7zip did install well.. I even deinstalled the 7zip setup I used to make the script autoinstall its own idead of how 7zip should be setup.

Post Reply