-
-
Notifications
You must be signed in to change notification settings - Fork 3.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
trouble building pandoc-2.9 on armv7 without -O0 #6546
Comments
Thanks! from the core team, nobody builds to ARM... but if somebody figures it out, a pull for #5450 is certainly welcome! btw. seems your build system is just running out of memory? how much RAM does it have? |
That's my understanding yes.
I checked https://kojipkgs.fedoraproject.org//work/tasks/4930/47414930/hw_info.log |
Probably not cross-compiling and hit the 4GiB limit on 32 bit system? Compiling pandoc crosses the 4GiB limit since version ~2.8. |
Seems that T.P.Readers.LaTeX is the biggest module and the usual problem with oom errors in compiling. We can try to break it up into smaller modules. |
I wrote a small perl script that collects timing info dumped by ghc and produces a table. (in tools,
|
The biggest compilation bottlenecks are:
If we could focus on these three, we might make some progress. |
Note that the "megabytes" field here is just the sum of the megabytes used in various compilation phases for the module; it does not mean that this much memory was required at one time, but it is a good relative "heaviness" measure. |
In latest master (2faa57e) I have improved things by further splitting of the LaTeX reader. Now we get
Since the original issue noted above affects the LaTeX and Markdown writers as well, we still need further splitting (also of these writers), but this is a step in the right direction. |
Latest (6a6291d):
It's notable that the LaTeX reader is now around the same size as many other modules that seem much less expensive to compile (e.g. the RST reader, 1677 lines of code, 21528/27159). I wish I understood what features of the expensive modules are making them expensive. @mpickering do you have any insight? |
As of 7f1b933:
So now the LaTeX reader is right in the same ballpark as the LaTeX and Markdown writers. |
After further trimming down these big modules (da5e9e5), I can compile pandoc (with optimizations) on a build machine with 2 GB of memory (though I had to restart the build several times as it got killed with oom errors). There is room for further improvement, but I'm hoping these changes will make it easier to build pandoc on low-memory machines. The most recent numbers from my tool (top three modules):
|
jgm/doclayout#1 seems relevant to this issue. |
Can this be considered fixed, or should we keep the issue open? |
In my experience it still takes a great deal of memory to compile on ARM specifically. |
Well I think the NCG will only be for arm64 (aarch64) fwiw. |
Most large modules have been partitioned into smaller one. I believe it should be ok to close this now. |
It looks like both Debian and Fedora experienced problems recently building pandoc-2.9 on 32bit armv7:
Anyway it seems possible to build it with
-O0
fortunately, but I thought I would report it herejust in case anyone thinks of anything else that could be done to mollify this, thanks.
cc @jonassmedegaard
The text was updated successfully, but these errors were encountered: