You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
Create a program which generates a main.o > 16 megabytes
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.
The text was updated successfully, but these errors were encountered:
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.
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.
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.
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
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.
The text was updated successfully, but these errors were encountered: