Bug 1378889 - Missing symbols and blobs
Summary: Missing symbols and blobs
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: v8
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Tom "spot" Callaway
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-09-23 13:04 UTC by Remi Collet
Modified: 2017-01-25 16:02 UTC (History)
4 users (show)

Fixed In Version: v8-5.2.258-7.fc25
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-11-19 21:00:42 UTC
Type: Bug


Attachments (Terms of Use)

Description Remi Collet 2016-09-23 13:04:16 UTC
As Fedora now have a recent v8 version, I start to work on v8js extension for PHP (which requires 4.6+, travis being run on 5.1 and 5.2)


1/ missing blobs

The extension rely on natives_blob.bin and snapshot_blob.bin
These blobs are available in the build tree, but not installed (ext search in /usr/lib64/ and /usr/lib64/share/v8, probably from debian packaging)

Is this intended ?

(I notice they are in chromium package, but seems strange to have a dependency on a browser...)

2/ missing symbols

When the extension is built, it doesn't load

PHP Warning:  PHP Startup: Unable to load dynamic library '/builddir/build/BUILDROOT/php-pecl-v8js-1.3.3-1.fc25.remi.7.0.x86_64/usr/lib64/php/modules/v8js.so' - /builddir/build/BUILDROOT/php-pecl-v8js-1.3.3-1.fc25.remi.7.0.x86_64/usr/lib64/php/modules/v8js.so: undefined symbol: _ZN2v88platform21CreateDefaultPlatformEi in Unknown on line 0


Despite CreateDefaultPlatform is declared in /usr/include/libplatform/libplatform.h, objdump don't see it in libv8.so.5


Any idea ?

Comment 1 Tom "spot" Callaway 2016-09-26 17:41:29 UTC
I really do not like v8.

Okay. I figured out how to generate the "blob" files. The missing symbols are trickier. It looks like libv8.so.5 is intentionally designed to not include all the symbols that other things that use v8 would need. Those other things are in static libraries (e.g. libv8_base.a, libv8_platform.a). I want to believe there is a good reason for this, but I can't think of one.

Those static libraries weren't packaged in the rawhide v8 package because I assumed they were all included in the shared library. I've included them in -devel for now. Your module will need to pass -lv8 -lv8_platform.

These changes should show up in v8-5.2.258-4. Upstream is at 5.5.288.1 (as of a few hours ago), but since I have no idea what version of v8 to package, I left it at 5.2.258. If you want a different version, let me know.

Comment 2 Fedora Update System 2016-09-28 20:51:47 UTC
v8-5.2.258-4.fc25 has been pushed to the Fedora 25 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2016-f654a05faf

Comment 3 Remi Collet 2016-09-29 13:40:17 UTC
Sorry for being late on testing your change.

Seems far better, but not yet ok.


libtool: link: cc -shared  -fPIC -DPIC  .libs/v8js_array_access.o .libs/v8js.o .libs/v8js_class.o .libs/v8js_commonjs.o .libs/v8js_convert.o .libs/v8js_exceptions.o .libs/v8js_generator_export.o .libs/v8js_methods.o .libs/v8js_object_export.o .libs/v8js_timer.o .libs/v8js_v8.o .libs/v8js_v8object_class.o .libs/v8js_variables.o   /usr/lib64/libv8_libplatform.a /usr/lib64/libv8_libbase.a -lv8 -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -O2 -g -fstack-protector-strong -grecord-gcc-switches -m64 -mtune=generic -Wl,-z -Wl,relro   -Wl,-soname -Wl,v8js.so -o .libs/v8js.so

/usr/lib64/libv8_libplatform.a: error adding symbols: Malformed archive
collect2: error: ld returned 1 exit status


FYI, spec file for pecl ext, WIP:
https://raw.githubusercontent.com/remicollet/remirepo/master/php/pecl/php-pecl-v8js/php-pecl-v8js.spec

Comment 4 Tom "spot" Callaway 2016-10-10 20:12:59 UTC
Okay, having your spec file helped. I have the v8 libraries fixed now in v8-5.2.258-5.fc26 (currently building). Upstream was generating "thin" static libraries, because they didn't know why anyone else would ever need to link to anything outside of the v8 shared lib. :P

Comment 5 Remi Collet 2016-10-11 05:24:14 UTC
Hmm... have you changed something to my spec ? (I still encounter the same error)

Comment 6 Tom "spot" Callaway 2016-10-14 14:58:18 UTC
Okay, I'm officially stumped. When I build v8 locally, it works right, and your php package builds against it. When I build the _same_ SRPM in koji, it doesn't work.

Comment 7 Fedora Update System 2016-10-19 08:31:38 UTC
v8-5.2.258-7.fc25 has been pushed to the Fedora 25 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2016-f654a05faf

Comment 8 Fedora Update System 2016-11-03 18:20:58 UTC
v8-5.2.258-7.fc25 has been pushed to the Fedora 25 stable repository. If problems still persist, please make note of it in this bug report.

Comment 9 Fedora Update System 2016-11-19 21:00:42 UTC
v8-5.2.258-7.fc25 has been pushed to the Fedora 25 stable repository. If problems still persist, please make note of it in this bug report.

Comment 10 Tom "spot" Callaway 2017-01-24 21:19:00 UTC
Um, what now?


Note You need to log in before you can comment on or make changes to this bug.