Skip to content
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

32bit compiler can't compile binaries over 16 megabytes #7335

Closed
vicuna opened this issue Aug 29, 2016 · 4 comments
Closed

32bit compiler can't compile binaries over 16 megabytes #7335

vicuna opened this issue Aug 29, 2016 · 4 comments
Labels

Comments

@vicuna
Copy link

vicuna commented Aug 29, 2016

Original bug ID: 7335
Reporter: @hcarty
Status: resolved (set by @xavierleroy on 2017-10-15T14:37:08Z)
Resolution: unable to duplicate
Priority: normal
Severity: minor
Platform: Any 32bit
Version: 4.02.3
Category: misc
Related to: #5920 #5957
Monitored by: @hcarty

Bug description

Invalid_argument("String.create") is raised during linking if the generated binary is > 16 megabytes. I ran into this while trying to compile a program which includes approximately 30 megabytes of static data included using ppx_blob.

Steps to reproduce

  1. Create a program which generates a main.o > 16 megabytes
  2. Compile and link using a 32bit OCaml and see the raised exception

Additional information

In my case I also had to split up the static data into sub-16 megabyte chunks because ppx_blob inlines external file content as a string.

@vicuna
Copy link
Author

vicuna commented Aug 29, 2016

Comment author: @hcarty

If anyone else runs into a similar situation, my work-around was to split the data up into multiple modules. As long as no one file compiles to >16 megabytes compilation works just fine.

@vicuna
Copy link
Author

vicuna commented Aug 29, 2016

Comment author: @gasche

I linked two related issues, which were solved by applying a patch of Benoît Vaugon. Would you investigate the difference with your problem? (I haven't thought about it but at first sight it seems to be the same issue, although I suppose yours isn't fixed in recent OCaml versions; maybe the previous fix was specific to long debug sections?). If there is a not-very-invasive adaptation of Benoît Vaugon's approach that also fixes your issue, a patch would be welcome.

@vicuna
Copy link
Author

vicuna commented Feb 16, 2017

Comment author: @xavierleroy

I just succeeded in compiling and linking (on ARM 32 bits) a compilation unit and a bytecode executable having 20 Mbytes of static data. I'm at a loss to find a repro case. Can someone provide one? Preferably without ppx stuff.

@vicuna
Copy link
Author

vicuna commented Oct 15, 2017

Comment author: @xavierleroy

Marking "resolved" by lack of a repro case. Please reopen if you can provide one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant