Closed sorhawell closed 1 year ago
(Following discord discussion, a public summary) This is an issue with linker. Other framework and tools face this problem as well, and there appears to be no one-fits-all solution. We will try to explore what we can do to solve it. Unfortunately, at this point no ETA.
something like this patch-function could be a candidate fix:
useful url-links to linker LD docs:
For the case of most rextendr projects almost the same .def file can be used to solve the problem. Only change name of package: see this example
problem:
The following error occours if compiling a big project with latest rextendr on windows:
C:\rtools42\x86_64-w64-mingw32.static.posix\bin/ld.exe: error: export ordinal too large: 88000
issue
It seems the rtools42 gnu linker currently uses a 16bit enumeration of symbols (ordinal symbol table). If using a large rust crate such as
polars
the compilation will fail for windows as this table is exceeded.Minimal reproducible example:
I have made a minimal inclusion of
polars
in helloextendr to show the error hereWhat I could google:
one tried to solve the issue by moving back
mvsc
another needed to usegnu/msys2
but alledgely got by doing some mix msys2+mvsc compilingSome golang people have the same isssue and are discussion to limit the number of exported symbols
... and it seems the gophers found some kind of solution here