Build for Windows, help please

I setup the build environment on my laptop with Intel i5, running Win 10 Pro.
Compiled DT 2.7 there and guess what ?
The package (link here) works on both the laptop and my desktop with Ryzen 5 and Win 10 Home.
While if I build on the Ryzen it doesn’t work on the i5.
WTF ? Something in the Cmake configuration files is not set properly, I have no clue.

Happy Easter!

1 Like

Well done! Got there in the end…

Now take a break. :smile:

That us crazy I wonder what it is about WIn Pro?? THat is really going the extra mile…many thanks

Marco when you say this …“I setup the build environment” is that linux on the laptop, or can you build a Window installer in windows. Sorry I am not versed in this area. When I look at the instruction for building they look like linux commands and directories…MYSY2 looks like it installs on windows though so I am a bit confused…I guess I have to get my head around it…

Everything is done on Windows.
MSYS2 is a Windows programs which sets up a minimal Linux environment with bash console, package manager and gcc compiler.
Try to follow the intructions. There are several parts which were unclear to me, but now I figured out and can help others.

It seems you were right in the end.
On Win 10 hone with AMD Ryzen 5, deleted the build folder and built 2.7 with ‘BINARY_PACKAGE_BUILD’ = On.
The package is still named ‘dirty’, I guess because I touched CMakeLists.txt, but it works on the laptop with Win 10 Pro and Intel i5.
Problem solved.

Great! Well done and thanks for documenting this.

Marco…I was a bit confused with the build instructions…the section I think mostly related to preparing the manual has you install java runtime…okay with that but then there was fop and saxon etc…all added to ~java/ May I ask is that added to the java directory created in Program FIles or is it a java directory created in MYSY2 directory structure…likely obvious to most but I was unsure…Thanks again

Yeah, I had the same problem.

First, you have to have jave runtime (from Oracle) installed in Windows (https://www.java.com/en/download/).

Download Saxon (latest is SaxonHE9-9-1-1J.zip at the moment). Open the zip and copy all the files and folders in ~/java/saxon/ (I guess you know that ~ in Linux means your home directory, in this case C:\msys64\home<your name>)

Saxon docbook extension: from the link indicated download the file docbook-xsl-saxon-1.00.zip, not the 24 MB full source code package docbook-xsl-1.79.1.zip. Open the zip, there is a folder, go in there and copy all the files and folders (including saxon65.jar) in ~/java/docbook-xsl-saxon

FOP: go in the link indicated, choose one mirror link and download the latest binary (not the source), in this moment fop-2.3-bin.zip. Open the zip, go in fop2.3/fop and copy all the files and folders there in ~/java/fop

Then follow the instructions, remember to change one line only in file fop, it should be in line 122.

… to be continued…

… continues…

Also, the lensfun package installed by pacman is incompatible.

downgrade LENSFUN to:

mingw-w64-x86_64-lensfun-0.3.2-4-any.pkg.tar.xz

the file can be downloaded from: http://repo.msys2.org/mingw/x86_64/

Put the file in the home, then in the MSYS2 shell:

Pacman -U mingw-w64-x86_64-lensfun-0.3.2-4-any.pkg.tar.xz

Add the following lines to the file C:\msys64\etc\pacman.conf (find the right section) to prevent pacman from updating the packages.

#Pacman won’t upgrade packages listed in IgnorePkg and members of IgnoreGroup
IgnorePkg = mingw-w64-x86_64-lensfun

Copy the lensfun folder and lensfun-0.3.2-py3.6.egg-info file from mingw64\lib\python3.6\site-packages to mingw64\lib\python3.7\site-packages

Then before building in Mingw64 shell:

$ lensfun-update-data

If everything is correct, you will get the output

Reading http://lensfun.sourceforge.net/db/versions.json
Reading http://wilson.bronger.org/lensfun-db/versions.json
Successfully updated the database in C:/msys64/mingw64/var/lib/lensfun-updates/version_1.

Mind the difference between MSYS2 and MINGW64 shells, you want to use the first to install packages, the second to update lensfun and compile

… to be continued…

… continues …

Optionally, before you build, install the following packages

pacman -S mingw-w64-x86_64-python3-jsonschema
pacman -S mingw-w64-x86_64-python2-setuptools
pacman -S mingw-w64-x86_64-python3-setuptools

Otherwise you get a warning about noise profiles, nothing essential I guess, but anyway…

The rest of the instructions should be smooth

Good luck.

Marco

1 Like

Thanks Marco…there is a java directory created in Program files so I just was sure if that is what was mean or if it was the linux environment…I assumed from the ~ but wanted to have it right…I compiled
it from git in linux last night for ubuntu KDE and it worked I notice that I did not have saxon and so it just skipped that. Seemed to run fine but likely the manual was not made or might be less functional…didn’t try that …I will take your advise and give
it a go tonight when I am home…thanks for taking the time to set in the right direction

Thanks for the extra info…I thought I was good to go but only got to 60% and from the errors…likely the lensfun issue…

build error.txt (1.5 KB)

Yes, it seems so.
You have to downgrade lensfun, as I wrote above.

To be 100% sure, remove the current lensfun package first

pacman -R mingw-w64-x86_64-lensfun

Your directions were great. Didn’t have to remove it…downgrade worked. It compiled fine …a few errors were there but basically looks like it was related to languages and it did not seem to affect the build as it compiled
and ran…many thanks…would not have made that work without your help….just have to review the modules around the manual now….seem like I am missing one…libxml2 or something like that so right at the end it fails to complete the manual ….not essential but if
some new documentation sneaks in it might be nice to have it sooner rather than later….I hope you had a nice Easter weekend and again I do really appreciate you taking time from your day to provide all the tips and advice.

Todd

I did not build the manual either, I’m fine with the online version.

Anyway, I happy that you succeded. :beers:
Marco

Ya I get something like this and I took a min to try to figure it out…likely some wrong path or something in the script…Manual Build Errors…txt (990 Bytes)

mmmhhh, it says missing module libxml2, but both libxml2 and mingw-w64-x86_64-libxml2 are installed…

could be some wrong path like in the case of lensfun…

Found, there is a missing package.

pacman -S libxml2-python

however, the build process is horribly slow and there are a lot of languages, I stopped it after a while

Marco

Do you mean the make command to compile?