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 ?
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.
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
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
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
Hmm... have you changed something to my spec ? (I still encounter the same error)
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.
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
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.
Um, what now?