Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Dynamic versions of 64 bit base libraries for GHC on Windows

Current binary GHC distribution (7.8.2) doesn't have dynamic base libraries (base proper, ghc-prim etc). So it's not possible to use dynamic linking. (It's possible to produce a statically linked dll of course). So an older solution is outdated.

What is the easiest way to get 64-bit dynamic linking on Windows with 7.8.x?

like image 221
nponeccop Avatar asked Jun 20 '14 09:06

nponeccop


People also ask

How to compile 64-bit dynamic link libraries in Visual Studio?

Implementation Visual Studio provides us with their own Developer Command Prompt that allows us to compile executable files. Find the Native Tools Command Prompt for VS in the Visual Studio directory. I am using x64 for this tutorial to compile 64-bit dynamic-link libraries since the Python version that I have is based on 64-bit architecture.

Is vcpkg 32-bit or 64-bit default now?

The default is still 32-bit. Any plans on re-opening this issue or making another issue to request the change in defaults? We almost always need 64-bit these days so it should be the default. Sorry, something went wrong. I am new to vcpkg; so, I just spent an hour waiting for boost and opencv to build...

Should I switch from 32-bit to 64-bit mode?

My impression is that in the Windows world the saying goes: "Use 32-bit mode unless you have a good reason to switch to 64-bit", hence everything defaults to 32-bit. When you think about it, it's not a wrong line of reasoning: 32-bit programs are smaller, more memory-efficient and sometimes faster by being more cache-friendly.

What percentage of Windows users run a 64-bit OS?

As you see from the data, 99% of Windows users are running a 64-bit OS. Sorry, something went wrong. @ras0219-msft: VS2019 uses x64 as a default for "open folder" and so does cmake, so why hasn't vcpkg caught up (or has it)?


1 Answers

Unfortunately the issue is serious, and neither 7.8 nor 7.10 have dynamic linking on Windows.

The problem is that with more features added to GHC some of GHC DLLs started to export more than 64k symbols. Which is impossible on Windows as 64k is an inherent limit of Windows dynamic linking.

So authors of GHC should rewrite it so it exports less symbols. Few solutions are outlined in the GHC bug tracker (one of them is splitting a big DLL into few smaller ones). But as far as I know nobody is working on this issue at the moment.

like image 93
nponeccop Avatar answered Nov 15 '22 03:11

nponeccop