[Webkit-unassigned] [Bug 187701] [GTK][BUILD] FAILED: lib/libwebkit2gtk-4.0.so.37.31.0 collect2: error: ld returned 1 exit status

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Jul 18 23:02:15 PDT 2018


https://bugs.webkit.org/show_bug.cgi?id=187701

--- Comment #8 from karogyoker2+webkit at gmail.com ---
I created a Virtual Box VM on one of my other machines, it is a 4 core i5 at 3.5GHz with 8GB RAM. I gave the VM 4GB RAM.

First I used this command:
cmake .. -DPORT=GTK -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_C_FLAGS="-march=pentium3" -DCMAKE_CXX_FLAGS="-march=pentium3" -DUSE_WOFF2=OFF -DENABLE_MINIBROWSER=ON -GNinja

Then after ninja -j1 I got:
[4/45] Linking CXX shared library lib/libwebkit2gtk-4.0.so.37.31.0
FAILED: lib/libwebkit2gtk-4.0.so.37.31.0 
...
/usr/bin/i686-linux-gnu-ld.gold: fatal error: lib/libwebkit2gtk-4.0.so.37.31.0: mmap: failed to allocate 1895756280 bytes for output file: Cannot allocate memory
collect2: error: ld returned 1 exit status
ninja: build stopped: subcommand failed.

Which is strange since the VM didn't even use 1GB of RAM, reported by htop. Also the host still had plenty of RAM, see attachment.

So then I used the command:
cmake .. -DPORT=GTK -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_C_FLAGS="-march=pentium3 -Wl,--no-keep-memory -Wl,--reduce-memory-overheads -g1" -DCMAKE_CXX_FLAGS="-march=pentium3 -Wl,--no-keep-memory -Wl,--reduce-memory-overheads -g1" -DUSE_WOFF2=OFF -DENABLE_MINIBROWSER=ON -GNinja

Then I got:
[148/2065] Linking CXX executable bin/LLIntOffsetsExtractor
FAILED: bin/LLIntOffsetsExtractor 
: && /usr/bin/c++  -fdiagnostics-color=always -Wno-expansion-to-defined -Wno-attributes -Wno-noexcept-type -Wno-maybe-uninitialized -Wwrite-strings -Wundef -Wpointer-arith -Wmissing-format-attribute -Wformat-security -Wcast-align -Wextra -Wall -march=pentium3 -Wl,--no-keep-memory -Wl,--reduce-memory-overheads -g1 -fno-strict-aliasing -fno-exceptions -fno-rtti -std=c++17 -O2 -g -DNDEBUG  -fuse-ld=gold -Wl,--disable-new-dtags   -rdynamic Source/JavaScriptCore/CMakeFiles/LLIntOffsetsExtractor.dir/llint/LLIntOffsetsExtractor.cpp.o  -o bin/LLIntOffsetsExtractor  lib/libWTFGTK.a lib/libbmalloc.a -ldl -licudata -licui18n -licuuc -lpthread -lgio-2.0 -lgobject-2.0 -lglib-2.0 -lz && :
/usr/bin/i686-linux-gnu-ld.gold: --reduce-memory-overheads: unknown option
/usr/bin/i686-linux-gnu-ld.gold: use the --help option for usage information
collect2: error: ld returned 1 exit status
ninja: build stopped: subcommand failed.

I copied what you wrote, I don't know why -Wl is there two times, etc, I could do experiment with trial and error but it would take more time, easier to ask. So how to correctly use these parameters? Thanks.

ld -v
GNU ld (GNU Binutils for Ubuntu) 2.30

uname -a
Linux oldboi-VirtualBox 4.15.0-23-generic #25-Ubuntu SMP Wed May 23 17:59:24 UTC 2018 i686 i686 i686 GNU/Linux

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20180719/a9c4eb2b/attachment-0001.html>


More information about the webkit-unassigned mailing list