HolyBlackCat / quasi-msys2

Cross-compile C/C++ from Linux to Windows using MSYS2 packages
zlib License
94 stars 4 forks source link

Stuck if the initial database fails to download #9

Closed HolyBlackCat closed 1 year ago

rswinkle commented 1 year ago

This might be the issue I'm having, possibly combined with some others. With some tweaks I got sdl_img building with the default environment but when I'm packaging for windows I copy all the linked dlls to build the installer. However I get this:

$ ldd sdl_img.exe
    not a dynamic executable

It still ran fine with wine but running it on another system it complained about missing dlls (though not nearly as many as I usually copied so maybe I was overcautious copying every dll output by ldd in the past).

I decided to try setting up a MINGW64 environment since that's what I had been using before, see if that makes any difference and I get this:

robert@pop-os:~/msys2_mingw64$ make install _gcc
Updating keyring...
keyring.original_un 100%[=================>]  53.59K  --.-KB/s    in 0.03s   
Found keys:
* Alexpux (AD351C50AE085775EB59333B5F92EFC1A47D45A1)
* Elieux (87771331B3F1FF5263856A6D974C8BE49078F532)
* lazka (5F944B027F7FE2091985AA2EFA11531AA0AA7F57)
database.db.sig     100%[=================>]     566  --.-KB/s    in 0s      
Makefile:351: *** Signature check failed!
File: database.db
Signature: database.db.sig
Try again with `--trace` to see GPG output.  Stop.
Makefile:911: *** Unable to execute `make  -r __database_nodeps __database_allow_aliases PKG@@mingw-w64-x86_64-gcc`, exit code 2.  Stop.

Is there some conflict when having 2 parallel installs?

Thanks for such an awesome project. If I never have to use a windows VM again it'll be too soon.

HolyBlackCat commented 1 year ago

@rswinkle

Regarding ldd - it only works for Linux binaries. I have a script called win-ldd which handles Windows binaries. It runs ntldd -R under the hood (so you need make install _ntldd), and converts the printed paths from wine style to linux style.

Is there some conflict when having 2 parallel installs?

Nope, installations are self-contained. This is probably caused by interrupting a database update mid-download, which causes it to attempt to use the incomplete database next time you run it. I pushed an update that should hopefully fix it.

Thanks for such an awesome project. If I never have to use a windows VM again it'll be too soon.

You're welcome. :slightly_smiling_face:

rswinkle commented 1 year ago

Regarding ldd - it only works for Linux binaries. I have a script called win-ldd which handles Windows binaries. It runs ntldd -R under the hood (so you need make install _ntldd), and converts the printed paths from wine style to linux style.

My bad, didn't see that, should have done a little more digging first.

Nope, installations are self-contained. This is probably caused by interrupting a database update mid-download, which causes it to attempt to use the incomplete database next time you run it. I pushed an update that should hopefully fix it.

It did! Thanks. Now I'll be curious to see if there's any noticeable difference between release builds using the different environments.

You're welcome. slightly_smiling_face

Is there any way I can donate to you? Have a good weekend.

HolyBlackCat commented 1 year ago

@rswinkle

difference between release builds using the different environments

I think UCRT64 and CLANG64 support UTF-8 file paths in addition to UTF-16 (but this needs testing, I don't remember if you need to manually opt-in somehow). Also CLANG64 has sanitizers if you need them, but forces you to use clang+libc++. Honestly, I didn't notice any other differences.

Is there any way I can donate to you? Have a good weekend.

Much appreciated. :) I've looked around, and there are barely any convenient ways of sending money to Russia those days. I've mailed you details for a bank transfer, that's one option. If this doesn't work for you, you can buy one of my games at https://holyblackcat.itch.io/, and while I can't get any payouts from those at the moment, the money can sit there until better times.