[Webkit-unassigned] [Bug 180678] New: [Linux][JSCOnly] Unable to build JSC fully statically.
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Mon Dec 11 16:22:43 PST 2017
https://bugs.webkit.org/show_bug.cgi?id=180678
Bug ID: 180678
Summary: [Linux][JSCOnly] Unable to build JSC fully statically.
Product: WebKit
Version: WebKit Local Build
Hardware: Unspecified
OS: Linux
Status: NEW
Severity: Normal
Priority: P2
Component: JavaScriptCore
Assignee: webkit-unassigned at lists.webkit.org
Reporter: clopez at igalia.com
CC: annulen at yandex.ru, mcatanzaro at igalia.com
I'm trying to build a static binary of JSC for Linux (with the JSCOnly port).
$ cd WebKit && mkdir build && cd build
$ cmake -GNinja -DCMAKE_BUILD_TYPE=Release -DPORT=JSCOnly -DENABLE_STATIC_JSC=ON .. && ninja
The resulting binary is a 20mb JSC file that doesn't link with a libjavascriptcore lib (its static in that sense)
But its still linking with several system libraries like icu, libstdc++, etc.
$ file bin/jsc
bin/jsc: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, for GNU/Linux 2.6.32, BuildID[sha1]=d269adab6d32f9a2e193dbe4a5b5d85378907420, not stripped
$ ls -sh bin/jsc
20M bin/jsc
$ ldd bin/jsc
linux-vdso.so.1 (0x00007fffd5316000)
libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007f53f6dd6000)
libicudata.so.52 => /usr/lib/x86_64-linux-gnu/libicudata.so.52 (0x00007f53f5569000)
libicuuc.so.52 => /usr/lib/x86_64-linux-gnu/libicuuc.so.52 (0x00007f53f51eb000)
libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007f53f4fce000)
libicui18n.so.52 => /usr/lib/x86_64-linux-gnu/libicui18n.so.52 (0x00007f53f4bbc000)
libstdc++.so.6 => /usr/lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007f53f48b1000)
libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f53f45b0000)
libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007f53f439a000)
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f53f3fef000)
/lib64/ld-linux-x86-64.so.2 (0x00007f53f6fda000)
So its not really portable between different Linux distributions that may have a different major versions of this libraries.
For example, try to run this JSC binary that I built like that on Debian Jessie (current oldstable) with clang-3.8 on Fedora 25 and it won't work:
$ wget https://people.igalia.com/clopez/wkbug/static_jsc/jsc
$ chmod +x jsc
$ ./jsc
./jsc: error while loading shared libraries: libicudata.so.52: cannot open shared object file: No such file or directory
--
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/20171212/e6048122/attachment.html>
More information about the webkit-unassigned
mailing list