Giter VIP home page Giter VIP logo

Comments (18)

ry avatar ry commented on May 21, 2024 1

@hayd check out denoland/chromium_build@65d79729a

Essentially you'll want to revert that commit (or better, make it conditional), and update the build submodule in rusty_v8.

from rusty_v8.

chrmoritz avatar chrmoritz commented on May 21, 2024 1

There is already the possibility to specify export GN_ARGS="no_inline_line_tables=false". Using this together with chrmoritz/chromium_build@9b42295 should work.

from rusty_v8.

chrmoritz avatar chrmoritz commented on May 21, 2024 1

@hayd FYI: The newly released llvm 10 now supports -gno-inline-line-tables out of the box. Also with it the unknown warning options are down to only complaining about -Wno-non-c-typedef-for-linkage, which is a big improvement over llvm 9 (or 8).

from rusty_v8.

chrmoritz avatar chrmoritz commented on May 21, 2024

Looks like -gno-inline-line-tables was added in llvm/llvm-project@ab76cfd (a recommit of llvm/llvm-project@6d03890), which isn't part of a stable llvm/clang release yet. To use it on Linux, you have to either use a version of llvm build from the master branch or use Google's clang binaries.

from rusty_v8.

ry avatar ry commented on May 21, 2024

We could also provide a way to opt out of this flag. Note we have hacked chromium's build repository to add this flag: denoland/chromium_build@65d79729a

from rusty_v8.

hayd avatar hayd commented on May 21, 2024

I had hoped you could grab the latest clang:

curl -s https://raw.githubusercontent.com/chromium/chromium/master/tools/clang/scripts/update.py | python - --output-dir=/tmp/clang

But this seems to provide a clang which requires GLIBC (which wasn't the case in 0.29.0).

https://github.com/hayd/deno-docker/runs/397889910

from rusty_v8.

hayd avatar hayd commented on May 21, 2024

@ry is there a way to un-hack the chromium_build from deno_src (I don't see config/compiler/BUILD.gn in deno_src.tar.gz I was hoping to try editing before building).

from rusty_v8.

ry avatar ry commented on May 21, 2024

@hayd I'm not sure what you mean, but deno_src is created here:
https://github.com/denoland/deno/blob/7fd50065a7d8a4c6ed1b1090703a7baaabdbd6aa/.github/workflows/ci.yml#L43

from rusty_v8.

hayd avatar hayd commented on May 21, 2024

Sorry for being unclear, I mean how do I edit that file to test this locally? (I wanted to just remove the '-gno-inline-line-tables' and confirm it would build.)

from rusty_v8.

hayd avatar hayd commented on May 21, 2024

Reverting to hayd@37c7578 (off of v0.1.0):

error: linking with `cc` failed: exit code: 1
  |
  = note: "cc" "-Wl,--as-needed" "-Wl,-z,noexecstack" "-m64" "-L" "/root/.rustup/toolchains/1.40.0-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib" "/deno/target/release/build/deno-68e731bd6d880308/build_script_build-68e731bd6d880308.build_script_build.cthswd1e-cgu.0.rcgu.o" "/deno/target/release/build/deno-68e731bd6d880308/build_script_build-68e731bd6d880308.build_script_build.cthswd1e-cgu.1.rcgu.o" "/deno/target/release/build/deno-68e731bd6d880308/build_script_build-68e731bd6d880308.build_script_build.cthswd1e-cgu.10.rcgu.o" "/deno/target/release/build/deno-68e731bd6d880308/build_script_build-68e731bd6d880308.build_script_build.cthswd1e-cgu.11.rcgu.o" "/deno/target/release/build/deno-68e731bd6d880308/build_script_build-68e731bd6d880308.build_script_build.cthswd1e-cgu.12.rcgu.o" "/deno/target/release/build/deno-68e731bd6d880308/build_script_build-68e731bd6d880308.build_script_build.cthswd1e-cgu.13.rcgu.o" "/deno/target/release/build/deno-68e731bd6d880308/build_script_build-68e731bd6d880308.build_script_build.cthswd1e-cgu.14.rcgu.o" "/deno/target/release/build/deno-68e731bd6d880308/build_script_build-68e731bd6d880308.build_script_build.cthswd1e-cgu.2.rcgu.o" "/deno/target/release/build/deno-68e731bd6d880308/build_script_build-68e731bd6d880308.build_script_build.cthswd1e-cgu.3.rcgu.o" "/deno/target/release/build/deno-68e731bd6d880308/build_script_build-68e731bd6d880308.build_script_build.cthswd1e-cgu.4.rcgu.o" "/deno/target/release/build/deno-68e731bd6d880308/build_script_build-68e731bd6d880308.build_script_build.cthswd1e-cgu.5.rcgu.o" "/deno/target/release/build/deno-68e731bd6d880308/build_script_build-68e731bd6d880308.build_script_build.cthswd1e-cgu.6.rcgu.o" "/deno/target/release/build/deno-68e731bd6d880308/build_script_build-68e731bd6d880308.build_script_build.cthswd1e-cgu.7.rcgu.o" "/deno/target/release/build/deno-68e731bd6d880308/build_script_build-68e731bd6d880308.build_script_build.cthswd1e-cgu.8.rcgu.o" "/deno/target/release/build/deno-68e731bd6d880308/build_script_build-68e731bd6d880308.build_script_build.cthswd1e-cgu.9.rcgu.o" "-o" "/deno/target/release/build/deno-68e731bd6d880308/build_script_build-68e731bd6d880308" "/deno/target/release/build/deno-68e731bd6d880308/build_script_build-68e731bd6d880308.3mi1i5enhiniah13.rcgu.o" "-Wl,--gc-sections" "-pie" "-Wl,-zrelro" "-Wl,-znow" "-Wl,-O1" "-nodefaultlibs" "-L" "/deno/target/release/deps" "-L" "/deno/target/release/gn_out/obj/" "-L" "/root/.rustup/toolchains/1.40.0-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib" "-Wl,-Bstatic" "/deno/target/release/deps/libdeno_typescript-cb315d03bb532af6.rlib" "/deno/target/release/deps/libdeno_core-0633541d77d82972.rlib" "/deno/target/release/deps/liburl-269c610edcd2d054.rlib" "/deno/target/release/deps/libpercent_encoding-7a28a2739828bc81.rlib" "/deno/target/release/deps/libidna-464218550c8c5c7a.rlib" "/deno/target/release/deps/libunicode_normalization-8d0023bef6e8ebeb.rlib" "/deno/target/release/deps/libsmallvec-71e9bac2f145148b.rlib" "/deno/target/release/deps/libunicode_bidi-7fc66763bf2e3ff2.rlib" "/deno/target/release/deps/libmatches-32057ddf050d1071.rlib" "/deno/target/release/deps/libserde_json-4a09f513a0f5733f.rlib" "/deno/target/release/deps/libryu-658c99df18434bd7.rlib" "/deno/target/release/deps/libitoa-bf453d7c00eccd10.rlib" "/deno/target/release/deps/libindexmap-4fe690d745c3b799.rlib" "/deno/target/release/deps/libserde-f4c0075054381ccc.rlib" "/deno/target/release/deps/librusty_v8-dc8118c98d70110d.rlib" "/deno/target/release/deps/liblazy_static-f73092d385abbdd3.rlib" "/deno/target/release/deps/libbitflags-34d6e20d451463ab.rlib" "/deno/target/release/deps/libdowncast_rs-b6c7a4b095f3701b.rlib" "/deno/target/release/deps/libfutures-ae17c9f2e99c9947.rlib" "/deno/target/release/deps/libfutures_executor-08843d008626ad68.rlib" "/deno/target/release/deps/libnum_cpus-d6a658e3a82d2bc6.rlib" "/deno/target/release/deps/libfutures_util-e0ab97afae3439ec.rlib" "/deno/target/release/deps/libmemchr-8f94c8c076c0471a.rlib" "/deno/target/release/deps/libproc_macro_nested-3a73ea783fe0a78b.rlib" "/deno/target/release/deps/libtokio_io-a70aa829aeef1b41.rlib" "/deno/target/release/deps/libbytes-76179ae36bea9e5c.rlib" "/deno/target/release/deps/libiovec-d43be0f52ab4426f.rlib" "/deno/target/release/deps/liblibc-3a23dd11839429e0.rlib" "/deno/target/release/deps/libbyteorder-0f53f5fd73f8302c.rlib" "/deno/target/release/deps/libfutures-8c87d2bd6215e345.rlib" "/deno/target/release/deps/libfutures_io-c2b682dd68323da8.rlib" "/deno/target/release/deps/libslab-dc477f7e7b73d2ea.rlib" "/deno/target/release/deps/libfutures_channel-63cc5a7c43a70ea6.rlib" "/deno/target/release/deps/libfutures_sink-f177bb11d7341522.rlib" "/deno/target/release/deps/libfutures_task-c8d48239083dbf8d.rlib" "/deno/target/release/deps/libpin_utils-4404457761adc86b.rlib" "/deno/target/release/deps/libfutures_core-debc7a148b51c7a2.rlib" "/deno/target/release/deps/liblog-0b2d00c4a1042c38.rlib" "/deno/target/release/deps/libcfg_if-f3544b1da576ae5e.rlib" "-Wl,--start-group" "/root/.rustup/toolchains/1.40.0-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libstd-74488c47a41eb313.rlib" "/root/.rustup/toolchains/1.40.0-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libpanic_unwind-efbc2c947951b8cc.rlib" "/root/.rustup/toolchains/1.40.0-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libhashbrown-b177382d9a04ffbe.rlib" "/root/.rustup/toolchains/1.40.0-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/librustc_std_workspace_alloc-ba7d2244d33447d5.rlib" "/root/.rustup/toolchains/1.40.0-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libbacktrace-39569dc87e4ea301.rlib" "/root/.rustup/toolchains/1.40.0-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libbacktrace_sys-cd9e255bd82ddb5c.rlib" "/root/.rustup/toolchains/1.40.0-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/librustc_demangle-f83165e777dccb8d.rlib" "/root/.rustup/toolchains/1.40.0-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libunwind-10b085de263b1750.rlib" "/root/.rustup/toolchains/1.40.0-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libcfg_if-9a4a22edf44da957.rlib" "/root/.rustup/toolchains/1.40.0-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/liblibc-68fabc677efa98de.rlib" "/root/.rustup/toolchains/1.40.0-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/liballoc-026dc0061b48e8b6.rlib" "/root/.rustup/toolchains/1.40.0-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/librustc_std_workspace_core-7bf75bb619341145.rlib" "/root/.rustup/toolchains/1.40.0-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libcore-ef54709e300503ed.rlib" "-Wl,--end-group" "/root/.rustup/toolchains/1.40.0-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libcompiler_builtins-4ed27d8420cb4abc.rlib" "-Wl,-Bdynamic" "-lutil" "-lutil" "-ldl" "-lrt" "-lpthread" "-lgcc_s" "-lc" "-lm" "-lrt" "-lpthread" "-lutil" "-lutil"
  = note: /deno/target/release/deps/libdeno_core-0633541d77d82972.rlib(deno_core-0633541d77d82972.deno_core.2k1o9q8c-cgu.1.rcgu.o): In function `deno_core::bindings::send::h38092064a52b8522':
          deno_core.2k1o9q8c-cgu.1:(.text._ZN9deno_core8bindings4send17h38092064a52b8522E+0x1ca): undefined reference to `v8__ArrayBuffer__New__byte_length'
          deno_core.2k1o9q8c-cgu.1:(.text._ZN9deno_core8bindings4send17h38092064a52b8522E+0x254): undefined reference to `v8__ArrayBuffer__New__byte_length'
          /deno/target/release/deps/libdeno_core-0633541d77d82972.rlib(deno_core-0633541d77d82972.deno_core.2k1o9q8c-cgu.1.rcgu.o): In function `deno_core::bindings::shared_getter::h7e6a864b1bd2b8f8':
          deno_core.2k1o9q8c-cgu.1:(.text._ZN9deno_core8bindings13shared_getter17h7e6a864b1bd2b8f8E+0x56): undefined reference to `v8__SharedArrayBuffer__New__DEPRECATED'
          collect2: error: ld returned 1 exit status

Am I doing something wrong in the revert?

from rusty_v8.

piscisaureus avatar piscisaureus commented on May 21, 2024

@hayd These are all symbols that have been removed from rusty_v8. You probably need to pull the 'deno' repo to get denoland/deno@8c3cd63.

from rusty_v8.

hayd avatar hayd commented on May 21, 2024

What I did: checked out 0.1.0 rusty_v8; cd build; reverted denoland/chromium_build@65d79729a; commit/push; then pointed Cargo.toml of deno 0.30.0 to my rusty_v8 branch 🤷‍♂ I will try this again!

from rusty_v8.

hayd avatar hayd commented on May 21, 2024

This did work for me, can -gno-inline-line-tables be behind a flag?

from rusty_v8.

ry avatar ry commented on May 21, 2024

@hayd Yes, do you know how to do that? You need to add a new "arg" to the declare_args block at the top of //build/config/compiler/BUILD.gn.

We probably need to add a cargo feature to toggle it... We don't have an example of this yet.

from rusty_v8.

hayd avatar hayd commented on May 21, 2024

Thanks for the fix!

I am still very confused at the glibc dependency (and how it plays in denoland/deno#3711 )

from rusty_v8.

hayd avatar hayd commented on May 21, 2024

Thanks @chrmoritz I bumped to clang 10 and removed it in amazonlinux1 deno-docker (for aws lambda) and get the smaller binary 🥳. What was confusing was I able to undo it, using clang 9, and it still built! (it didn't use to) https://github.com/hayd/deno-docker/actions/runs/66067472

from rusty_v8.

chrmoritz avatar chrmoritz commented on May 21, 2024

@hayd: Are you setting V8_FROM_SOURCE=1, otherwise you're getting the prebuilt rusty_v8 binary instead of building rusty_v8 from source. This would explain why -gno-inline-line-tables isn't an issue anymore for you and it doesn't need to be a bad thing for your use case (if it doesn't break something).

from rusty_v8.

hayd avatar hayd commented on May 21, 2024

Wow, you're right... I'm shocked it's compatible!

Since lambda tests still pass so looks like it isn't breaking anything.

I wonder what this means wrt musl issues...

from rusty_v8.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.