Changes between Initial Version and Version 1 of Ticket #3242, comment 41


Ignore:
Timestamp:
Oct 31, 2015 12:32:52 PM (3 years ago)
Author:
Kludgy
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #3242, comment 41

    initial v1  
    11Great insight! I'm really looking forward to this patch. I presume `findSysDll` is the new function?
    2 
    3 Replying to [comment:40 Phyx-]:
    4 > It seems the issue is caused by `findArchive` being unable to find any archives that are shipped using the in-place `GCC`.
    5 > - It works on Linux because `findArchive` would search the standard Linux include path.
    6 > - It works during compilation because `GCC` can find it's own libraries (we explicitly tell it where to look for libraries using the `gcc` wrapper around `realgcc`)
    7 >
    8 > So fixing the issue means using `searchForLibUsingGcc` in `findArchive` as well, which will then find the correct file.
    9 >
    10 > The reason for the error as it is, is because if we can't locate the library using any of the methods we have, we assume it is a system dll, or something on the system search path. e.g. if trying to load `kernel32.dll`.
    11 >
    12 > There is a slight issue in that the `GHCi` code (incorrectly) favors `static archives` over `dynamic` ones
    13 >
    14 > {{{
    15 > findDll        `orElse`
    16 > findArchive    `orElse`
    17 > tryGcc         `orElse`
    18 > tryGccPrefixed `orElse`
    19 > assumeDll
    20 > }}}
    21 >
    22 > This has the unwanted effect of when `kernel32` is specific as a lib, it will try to load `kernel32.a` instead of `kernel32.dll`.
    23 >
    24 > To solve this I have added another search function that is able to search the Windows search paths using `SearchPath` in order to find if it is a dll on the system search path.
    25 >
    26 > The new search order is:
    27 >
    28 > {{{
    29 > findDll     `orElse`
    30 > findSysDll  `orElse`
    31 > tryGcc      `orElse`
    32 > findArchive `orElse`
    33 > assumeDll
    34 > }}}
    35 >
    36 > (`tryGccPrefixed` was rolled into `tryGcc` so it is no longer needed at top level)
    37 >
    38 > This seems to be working well, it is dependent on another patch of mine so have to push that one through before this one. But patch coming soon.