WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
Bug 55484
[Qt][WK2] Memory exhausted when building qtwebkit2 on linux
https://bugs.webkit.org/show_bug.cgi?id=55484
Summary
[Qt][WK2] Memory exhausted when building qtwebkit2 on linux
aravind.akella
Reported
2011-03-01 10:56:39 PST
Getting a memory exhausted error when building qtwebkit2 on linux desktop. Error occurs during the linking phase. ./build-webkit --qt --debug --qmakearg=CONFIG+=webkit2 --makeargs="-j10" /usr/bin/ld: failed to set dynamic section sizes: Memory exhausted collect2: ld returned 1 exit status make[1]: *** [../lib/libQtWebKit.so.4.9.0] Error 1
Attachments
Proposed Patch
(8.53 KB, patch)
2011-03-01 12:47 PST
,
aravind.akella
benjamin
: review-
Details
Formatted Diff
Diff
Patch
(17.40 KB, patch)
2011-03-02 12:17 PST
,
aravind.akella
no flags
Details
Formatted Diff
Diff
Patch
(17.40 KB, patch)
2011-03-02 12:53 PST
,
aravind.akella
no flags
Details
Formatted Diff
Diff
Show Obsolete
(3)
View All
Add attachment
proposed patch, testcase, etc.
Benjamin Poulain
Comment 1
2011-03-01 12:01:43 PST
And what exactly are you expecting from this bug report???
Csaba Osztrogonác
Comment 2
2011-03-01 12:44:34 PST
AFAIK you need minimum 3-4Gb of free memory for debug linking.
aravind.akella
Comment 3
2011-03-01 12:47:40 PST
Created
attachment 84276
[details]
Proposed Patch Tried to build webkit2 on a 32 bit machine with 4G RAM. It is failing during the linking phase. (probably hitting the per process memory limit). Using the "AllInOne" files from WebCore/rendering/svg/ and WebCore/svg/ we can get it to work. Modified webkit.pro to include RenderSVGAllInOne.cpp and SVGAllInOne.cpp.
Benjamin Poulain
Comment 4
2011-03-01 12:53:19 PST
Comment on
attachment 84276
[details]
Proposed Patch Best case make that an option. You should not break everyone debug build.
Csaba Osztrogonác
Comment 5
2011-03-01 12:54:30 PST
(In reply to
comment #3
)
> Created an attachment (id=84276) [details] > Proposed Patch > > Tried to build webkit2 on a 32 bit machine with 4G RAM. It is failing during the linking phase. > (probably hitting the per process memory limit). > > Using the "AllInOne" files from WebCore/rendering/svg/ and WebCore/svg/ we can get it to work. > Modified webkit.pro to include RenderSVGAllInOne.cpp and SVGAllInOne.cpp.
It might solve linking problem for a while, but we will run into similar problem in the near future because of growing project. :( Additionally all-in-one file will cause longer building time. Because if you touch only one svg file, all svg source will be rebuilt. Reopen to discuss which one is more important. What do you think if we add a command line option to build-webkit for all-in-one file enabled or disabled.
Chang Shu
Comment 6
2011-03-01 13:10:13 PST
> Reopen to discuss which one is more important. What do you think if we add a command line option to build-webkit for all-in-one file enabled or disabled.
It seems to me you guys don't see this build problem in your env. But in Boston, people who use a 32-bit Ubuntu with at least 3G RAM are having trouble with the latest code. Having an option for build-webkit would be nice.
Yael
Comment 7
2011-03-01 13:49:48 PST
(In reply to
comment #5
)
> Reopen to discuss which one is more important. What do you think if we add a command line option to build-webkit for all-in-one file enabled or disabled.
It would be really nice to have this build option. ATM, the only I can make a debug build is if I disable svg and video. (Even with gold linker).
Andras Becsi
Comment 8
2011-03-01 14:28:48 PST
(In reply to
comment #7
)
> (In reply to
comment #5
) > > Reopen to discuss which one is more important. What do you think if we add a command line option to build-webkit for all-in-one file enabled or disabled. > > It would be really nice to have this build option. ATM, the only I can make a debug build is if I disable svg and video. (Even with gold linker).
Debug linking needs almost 4G of memory, but is not hitting the per process memory limit. If you have a build farm (icecc for ex.) mounting swap-files (or partitions) is a feasible work-around, so the build lasts approximately twice the time of a release build on my 32bit machine using gold linker. However I also support the usage of opt-in all-in-one files, which would make the things a bit easier at least for a while.
Benjamin Poulain
Comment 9
2011-03-01 14:41:07 PST
I am not too fan of an option, I think that should work out of the box. Only a few devs are still using 32 bits machines. I think it is reasonable to use the SVGAllInOne for linux+debug+32bits (you can check that in the .pro file). The other config would keep the regular SOURCES and enjoy the benefit of having those files separated :)
Csaba Osztrogonác
Comment 10
2011-03-01 15:10:30 PST
(In reply to
comment #9
)
> I am not too fan of an option, I think that should work out of the box. > > Only a few devs are still using 32 bits machines. I think it is reasonable to use the SVGAllInOne for linux+debug+32bits (you can check that in the .pro file). The other config would keep the regular SOURCES and enjoy the benefit of having those files separated :)
Hm, it is a good idea. I'd like to see a fix like this: # Comment: why we need it ... linux-g++:CONFIG(debug, debug|release):isEqual(QT_ARCH,i386) { # all-in-one-file } else { # separated files }
aravind.akella
Comment 11
2011-03-02 12:17:34 PST
Created
attachment 84447
[details]
Patch Using AllInOne files to avoid memory exhaustion for debug builds on 32 bit linux machines.
Benjamin Poulain
Comment 12
2011-03-02 12:36:19 PST
Comment on
attachment 84447
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=84447&action=review
> Source/WebCore/ChangeLog:9 > + builds on 32 bit liiux machines.
liiux -> Linux.
> Source/WebCore/ChangeLog:11 > + No new tests.Fixing a build issue.
Space missing after the dot.
> Source/WebCore/WebCore.pro:3091 > +
No need for space here.
aravind.akella
Comment 13
2011-03-02 12:53:36 PST
Created
attachment 84449
[details]
Patch
Benjamin Poulain
Comment 14
2011-03-02 14:00:21 PST
Comment on
attachment 84449
[details]
Patch LGTM. I can't r+ just yet since the bot won't take it into account.
Csaba Osztrogonác
Comment 15
2011-03-02 14:33:19 PST
Comment on
attachment 84449
[details]
Patch LGTM, r=me. cq-, because it seems the patch can't be applied. I'll land it manually.
Csaba Osztrogonác
Comment 16
2011-03-02 14:41:51 PST
Landed in
http://trac.webkit.org/changeset/80169
Laszlo Gombos
Comment 17
2011-03-02 18:00:30 PST
Just out of curiosity, wouldn't this build option might result in more efficient (less binary size/faster code) code as the complier can optimize a set of files together instead of a file by file basis ? If that is the case (and we can perhaps even measure the difference) this might be a preferred build option for productization even though this option is not preferred during development. Anyone ?
Csaba Osztrogonác
Comment 18
2011-03-03 00:36:08 PST
linux-g++ check was incorrect, we have to use linux-g++* , fix landed in:
http://trac.webkit.org/changeset/80212
Csaba Osztrogonác
Comment 19
2011-03-03 00:38:34 PST
(In reply to
comment #17
)
> Just out of curiosity, wouldn't this build option might result in more efficient (less binary size/faster code) code as the complier can optimize a set of files together instead of a file by file basis ? > > If that is the case (and we can perhaps even measure the difference) this might be a preferred build option for productization even though this option is not preferred during development. > > Anyone ?
You're right, it might be good for code size and/or performance. But we can be sure if any volunteer do some measurements.
Csaba Osztrogonác
Comment 20
2011-03-03 07:30:33 PST
(In reply to
comment #17
)
> Just out of curiosity, wouldn't this build option might result in more efficient (less binary size/faster code) code as the complier can optimize a set of files together instead of a file by file basis ? > > If that is the case (and we can perhaps even measure the difference) this might be a preferred build option for productization even though this option is not preferred during development. > > Anyone ?
File size of stripped libQtWebKit.so in release mode on 32 bit: - with all-in-one SVG files : 26,899,312 bytes - without all-in-one SVG files: 26,910,468 bytes - difference : 11,156 bytes (0.041 %) All-in-one file is the winner, but the difference is negligible. Unfortunately we don't know any SVG performance benchmark, so I don't know if this change has performance impact or not.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug