crystal-lang / crystal

The Crystal Programming Language
https://crystal-lang.org
Apache License 2.0
19.43k stars 1.62k forks source link

Regression on Windows - error with "cannot delay-load" message #13644

Closed oprypin closed 5 months ago

oprypin commented 1 year ago

There is a regression on Windows (or I was doing something disallowed, please advise)

The code: https://github.com/oprypin/crsfml/tree/02a5fa0e6592149219544966379d0d0dc708b45c

Extract SFML 2.5.1 Visual C++ 15 (2017) - 64-bit Download the code, (shards install or make.cmd) and run crystal spec.

cc @HertzDevil

HertzDevil commented 1 year ago

It seems delay-loading doesn't work on DLLs that have imports. Now if the built executable actually skips this logic for the subset of DLLs that import data, which is beyond Crystal code's control, then that defeats the whole point of using delay-loading as a means to link DLLs from more "convenient" locations. It also doesn't address distribution issues: people will expect their programs to work on their machines without "installing" any DLLs, but forget to distribute them alongside the program.

So I think we should revert all the delay-loading support and find a different strategy.

straight-shoota commented 6 months ago

I suppose this can be considered resolved after #13858 (?)?

HertzDevil commented 6 months ago

We should actually revert the delay-load helper and all the compiler RPATH stuff (as breaking changes)

straight-shoota commented 5 months ago

Closing. The removal of these obsolete features is tracked in #14556.