(v8 8.4) libv8_libplatform.a: error adding symbols: Malformed archive

83 views
Skip to first unread message

Richard Hughes

unread,
Jul 20, 2020, 8:07:59 AM7/20/20
to v8-users
I have built and linked against `v8` 8.4 successfully on Windows and Mac, but with Ubuntu 18.04, I get the following error when I try to link against `libv8_libplatform.a` that was built:

    ../../lib/Linux/libv8_libplatform.a: error adding symbols: Malformed archive
    clang: error: linker command failed with exit code 1 (use -v to see invocation)
    CMakeFiles/v8_test_project.dir/build.make:86: recipe for target 'v8_test_project' failed
    make[2]: *** [v8_test_project] Error 1

Here are the `gn` arguments I used:

    is_component_build = false
    is_debug = false
    target_cpu = x64
    use_custom_libcxx = false
    v8_monolithic = true
    v8_use_external_startup_data = false
    is_clang = true
    use_lld = true
    use_sysroot = false
    linux_use_bundled_binutils = true

The `v8` documentation doesn't seem to indicate that I need to do anything particular to setup the build chain for Ubuntu, but I may have missed something.

Here is my `clang` version:

    Ubuntu clang version 10.0.1-++20200708123507+ef32c611aa2-1~exp1~20200707224105.191 
    Target: x86_64-pc-linux-gnu
    Thread model: posix
    InstalledDir: /usr/bin
    Found candidate GCC installation: /usr/bin/../lib/gcc/x86_64-linux-gnu/10
    Found candidate GCC installation: /usr/bin/../lib/gcc/x86_64-linux-gnu/7
    Found candidate GCC installation: /usr/bin/../lib/gcc/x86_64-linux-gnu/7.5.0
    Found candidate GCC installation: /usr/bin/../lib/gcc/x86_64-linux-gnu/8
    Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/10
    Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/7
    Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/7.5.0
    Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/8
    Selected GCC installation: /usr/bin/../lib/gcc/x86_64-linux-gnu/10
    Candidate multilib: .;@m64
    Selected multilib: .;@m64

Ben Noordhuis

unread,
Jul 21, 2020, 5:20:18 AM7/21/20
to v8-users
I bumped into that error when I ran out of disk space. Maybe that's
what's happening here?

Richard

unread,
Jul 21, 2020, 7:49:25 AM7/21/20
to v8-users
Thanks for the response. I have plenty of disk space. I've tried in two VMs and have the same error.

Perhaps it is a setup issue somehow?

Richard

unread,
Jul 21, 2020, 11:48:15 AM7/21/20
to v8-users
The error still exists, but I found that Ubuntu doesn't need to link against `libv8_libplatform.a` to build, so the error can be avoided.
Reply all
Reply to author
Forward
0 new messages