Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Docs] Build Enviroment? #45

Closed
roytam1 opened this issue Apr 20, 2022 · 20 comments
Closed

[Docs] Build Enviroment? #45

roytam1 opened this issue Apr 20, 2022 · 20 comments

Comments

@roytam1
Copy link

roytam1 commented Apr 20, 2022

@Feodor2 please tell us how to compile mypal68, i.e. using which MSVC compiler (or EWDK), which version of rustc and mozilla-build.

@Feodor2
Copy link
Owner

Feodor2 commented Apr 22, 2022

I shall put it into the wiki.
Shortly - all stuff from the old instruction, but 8gb ram; some new utils for rebuilding rust; actual rust build; clang-cl

@roytam1
Copy link
Author

roytam1 commented Apr 27, 2022

don't know how many parts in old official build instruction can be applied: https://web.archive.org/web/20200630221246/https://firefox-source-docs.mozilla.org/setup/windows_build.html

@andika207
Copy link

@roytam1 do you want to compile something different or just help @Feodor2 improve his Mypal 68 ?

@roytam1
Copy link
Author

roytam1 commented Apr 29, 2022

@roytam1 do you want to compile something different or just help @Feodor2 improve his Mypal 68 ?

both 😊

@andika207
Copy link

that sounds cool....
the S52 is apparently based on FF68 but it simply doesn't support many addons that require FF57+ jannispinter/indicatetls#47

@Feodor2
Copy link
Owner

Feodor2 commented Apr 30, 2022

I put the essential part https://github.com/Feodor2/Mypal68/wiki/Building-from-the-source
And my rust patchs

@roytam1
Copy link
Author

roytam1 commented May 1, 2022

I put the essential part https://github.com/Feodor2/Mypal68/wiki/Building-from-the-source

can you explain more about building rustc and do I have to move rust compiler files manually?

@Feodor2
Copy link
Owner

Feodor2 commented May 1, 2022

@roytam1

can you explain more about building rustc and do I have to move rust compiler files manually

What part more you want to explain - if i did not write about move files so why do want to move? Have you built own rust?

@roytam1
Copy link
Author

roytam1 commented May 1, 2022

What part more you want to explain - if i did not write about move files so why do want to move? Have you built own rust?

so the rust compiler lives in mypal68 tree? or I should download rust source tarball and extract it out of mypal tree and build it?

@Feodor2
Copy link
Owner

Feodor2 commented May 1, 2022

Ah the rust compiler is rustc.exe with few other files and it is not related to the mypal tree at all, and of course it is to be built before mypal building. I took rust source from github then set to the 1.35 version, all by git commands.

@roytam1
Copy link
Author

roytam1 commented May 2, 2022

when I really want to try building rust-1.35 on win7, there are some prerequisites:

then download rustc from https://static.rust-lang.org/dist/rustc-1.35.0-src.tar.gz

it tried to compile bootstrap:

$ python x.py
info: Downloading and building bootstrap before processing --help
      command. See src/bootstrap/README.md for help with common
      commands.
downloading https://static.rust-lang.org/dist/2019-05-14/rust-std-1.34.2-i686-pc-windows-msvc.tar.gz
extracting c:\mozilla-build-3.2\rustc-1.35.0-src\build\cache\2019-05-14\rust-std-1.34.2-i686-pc-windows-msvc.tar.gz
downloading https://static.rust-lang.org/dist/2019-05-14/rustc-1.34.2-i686-pc-windows-msvc.tar.gz
extracting c:\mozilla-build-3.2\rustc-1.35.0-src\build\cache\2019-05-14\rustc-1.34.2-i686-pc-windows-msvc.tar.gz
downloading https://static.rust-lang.org/dist/2019-05-14/cargo-0.35.0-i686-pc-windows-msvc.tar.gz
extracting c:\mozilla-build-3.2\rustc-1.35.0-src\build\cache\2019-05-14\cargo-0.35.0-i686-pc-windows-msvc.tar.gz
    Updating crates.io index
  Downloaded libc v0.2.51
  Downloaded cmake v0.1.33
  Downloaded cc v1.0.28
  Downloaded toml v0.4.10
  Downloaded lazy_static v0.2.11
  Downloaded petgraph v0.4.13
  Downloaded serde_json v1.0.33
  Downloaded serde v1.0.82
  Downloaded filetime v0.2.4
  Downloaded getopts v0.2.17
  Downloaded serde_derive v1.0.81
  Downloaded ryu v0.2.7
  Downloaded itoa v0.4.3
  Downloaded ordermap v0.3.5
  Downloaded cfg-if v0.1.6
  Downloaded fixedbitset v0.1.9
  Downloaded num_cpus v1.8.0
  Downloaded time v0.1.40
  Downloaded proc-macro2 v0.4.24
  Downloaded quote v0.6.10
  Downloaded syn v0.15.22
  Downloaded unicode-xid v0.1.0
  Downloaded winapi v0.3.6
   Compiling proc-macro2 v0.4.24
   Compiling unicode-xid v0.1.0
   Compiling ryu v0.2.7
   Compiling libc v0.2.51
   Compiling winapi v0.3.6
   Compiling serde v1.0.82
   Compiling itoa v0.4.3
   Compiling fixedbitset v0.1.9
   Compiling cc v1.0.28
   Compiling cfg-if v0.1.6
   Compiling ordermap v0.3.5
   Compiling getopts v0.2.17
   Compiling build_helper v0.1.0 (C:\mozilla-build-3.2\rustc-1.35.0-src\src\build_helper)
   Compiling lazy_static v0.2.11
   Compiling filetime v0.2.4
   Compiling petgraph v0.4.13
   Compiling num_cpus v1.8.0
   Compiling cmake v0.1.33
   Compiling quote v0.6.10
   Compiling syn v0.15.22
   Compiling time v0.1.40
   Compiling serde_derive v1.0.81
   Compiling toml v0.4.10
   Compiling serde_json v1.0.33
   Compiling bootstrap v0.0.0 (C:\mozilla-build-3.2\rustc-1.35.0-src\src\bootstrap)
    Finished dev [unoptimized] target(s) in 1m 29s
Usage: x.py <subcommand> [options] [<paths>...]

Subcommands:
    build       Compile either the compiler or libraries
    check       Compile either the compiler or libraries, using cargo check
    test        Build and run some test suites
    bench       Build and run some benchmarks
    doc         Build documentation
    clean       Clean out build directories
    dist        Build distribution artifacts
    install     Install distribution artifacts

To learn more about a subcommand, run `./x.py <subcommand> -h`

but when I really try to build, it fails:

$ cat config.toml
[llvm]
targets = "X86"
experimental-targets = ""
[build]
build = "i686-pc-windows-msvc"
host = "i686-pc-windows-msvc"
target = "i686-pc-windows-msvc"
docs = false

$ python x.py build
    Finished dev [unoptimized] target(s) in 0.42s
failed to parse TOML configuration 'config.toml': invalid type: string "i686-pc-windows-msvc", expected a sequence for key `build.host`
failed to run: c:\mozilla-build-3.2\rustc-1.35.0-src\build\bootstrap\debug\bootstrap build
Build completed unsuccessfully in 0:00:00

commenting out host line and adding square blankets (target = ["i686-pc-windows-msvc"]) to target line in config.toml works, and hitting another error:

$ python x.py build
    Finished dev [unoptimized] target(s) in 0.43s
  Downloaded owning_ref v0.3.3
  Downloaded foreign-types v0.3.2
  Downloaded string_cache_codegen v0.4.2
  Downloaded slab v0.4.2
  Downloaded miow v0.2.1
  Downloaded rustc-demangle v0.1.10
  Downloaded pest_derive v2.1.0
  Downloaded handlebars v1.1.0
  Downloaded crossbeam-epoch v0.7.0
  Downloaded libgit2-sys v0.7.11
  Downloaded pulldown-cmark v0.2.0
  Downloaded core-foundation-sys v0.6.2
  Downloaded net2 v0.2.33
  Downloaded typenum v1.10.0
  Downloaded tokio-process v0.2.3
  Downloaded crypto-hash v0.3.1
  Downloaded rustc-ap-graphviz v407.0.0
  Downloaded polonius-engine v0.6.2
  Downloaded rustc-ap-rustc_errors v407.0.0
  Downloaded same-file v1.0.4
  Downloaded itertools v0.8.0
  Downloaded redox_syscall v0.1.43
  Downloaded num-derive v0.2.3
  Downloaded json v0.11.13
  Downloaded idna v0.1.5
  Downloaded miniz-sys v0.1.11
  Downloaded lzma-sys v0.1.10
  Downloaded argon2rs v0.2.5
  Downloaded env_logger v0.6.0
  Downloaded futures v0.1.21
  Downloaded block-buffer v0.3.3
  Downloaded vcpkg v0.2.6
  Downloaded libz-sys v1.0.25
  Downloaded diff v0.1.11
  Downloaded directories v1.0.2
  Downloaded fortanix-sgx-abi v0.3.2
  Downloaded rand_hc v0.1.0
  Downloaded commoncrypto v0.2.0
  Downloaded ena v0.13.0
  Downloaded aho-corasick v0.6.9
  Downloaded fwdansi v1.0.1
  Downloaded quick-error v1.2.2
  Downloaded winapi-util v0.1.1
  Downloaded compiler_builtins v0.1.9
  Downloaded signal-hook v0.1.7
  Downloaded semver-parser v0.7.0
  Downloaded toml-query v0.6.0
  Downloaded lock_api v0.1.3
  Downloaded lazycell v1.2.1
  Downloaded cargo_metadata v0.6.2
  Downloaded pest v2.1.0
  Downloaded lsp-codec v0.1.2
  Downloaded bytes v0.4.11
  Downloaded strum v0.11.0
  Downloaded winapi v0.2.8
  Downloaded cargo_metadata v0.7.1
  Downloaded termcolor v1.0.4
  Downloaded vec_map v0.8.1
  Downloaded failure_derive v0.1.5
  Downloaded rls-data v0.18.2
  Downloaded regex v0.2.11
  Downloaded tokio-uds v0.2.5
  Downloaded winapi-build v0.1.1
  Downloaded yaml-rust v0.3.5
  Downloaded either v1.5.0
  Downloaded env_logger v0.5.13
  Downloaded fuchsia-zircon v0.3.3
  Downloaded error-chain v0.11.0
  Downloaded toml-query v0.7.0
  Downloaded log v0.4.6
  Downloaded jobserver v0.1.13
  Downloaded rustfix v0.4.4
  Downloaded wait-timeout v0.1.5
  Downloaded fnv v1.0.6
  Downloaded walkdir v2.2.7
  Downloaded rustc-rayon-core v0.1.2
  Downloaded matches v0.1.8
  Downloaded crossbeam-channel v0.3.4
  Downloaded sha-1 v0.7.0
  Downloaded tempfile v3.0.5
  Downloaded datafrog v2.0.1
  Downloaded crossbeam-deque v0.6.3
  Downloaded crc32fast v1.1.2
  Downloaded maplit v1.0.1
  Downloaded nodrop v0.1.12
  Downloaded crossbeam-utils v0.6.2
  Downloaded bufstream v0.1.4
  Downloaded tokio-executor v0.1.6
  Downloaded digest v0.7.6
  Downloaded git2-curl v0.9.0
  Downloaded log_settings v0.1.2
  Downloaded backtrace-sys v0.1.27
  Downloaded ucd-util v0.1.3
  Downloaded unicode-bidi v0.3.4
  Downloaded kernel32-sys v0.2.2
  Downloaded unreachable v1.0.0
  Downloaded hex v0.3.2
  Downloaded arrayref v0.3.5
  Downloaded libssh2-sys v0.2.11
  Downloaded pulldown-cmark v0.1.2
  Downloaded racer v2.1.21
  Downloaded regex v1.1.0
  Downloaded unicode-width v0.1.5
  Downloaded bit-vec v0.5.0
  Downloaded bytecount v0.5.1
  Downloaded openssl-probe v0.1.2
  Downloaded crossbeam-epoch v0.3.1
  Downloaded regex-syntax v0.6.4
  Downloaded is-match v0.1.0
  Downloaded rayon v1.0.1
  Downloaded bit-set v0.5.0
  Downloaded tokio-reactor v0.1.8
  Downloaded scoped-tls v1.0.0
  Downloaded parking_lot v0.7.1
  Downloaded pest_derive v1.0.8
  Downloaded curl v0.4.19
  Downloaded ammonia v1.1.0
  Downloaded flate2 v1.0.6
  Downloaded ansi_term v0.11.0
  Downloaded fst v0.3.0
  Downloaded failure v0.1.5
  Downloaded rand v0.4.3
  Downloaded xz2 v0.1.5
  Downloaded bitflags v1.0.4
  Downloaded pretty_assertions v0.5.1
  Downloaded version_check v0.1.5
  Downloaded miow v0.3.3
  Downloaded derive-new v0.5.6
  Downloaded num-integer v0.1.39
  Downloaded rls-vfs v0.7.0
  Downloaded precomputed-hash v0.1.1
  Downloaded phf v0.7.22
  Downloaded dirs v1.0.4
  Downloaded futf v0.1.4
  Downloaded clap v2.32.0
  Downloaded memmap v0.6.2
  Downloaded mdbook v0.1.7
  Downloaded unicode-segmentation v1.2.1
  Downloaded glob v0.3.0
  Downloaded tokio-tcp v0.1.3
  Downloaded unicode-xid v0.0.4
  Downloaded handlebars v0.32.4
  Downloaded chrono v0.4.6
  Downloaded arrayvec v0.4.7
  Downloaded scopeguard v0.3.3
  Downloaded toml v0.5.0
  Downloaded shell-escape v0.1.4
  Downloaded build_const v0.2.1
  Downloaded openssl-sys v0.9.40
  Downloaded synom v0.11.3
  Downloaded miniz_oxide_c_api v0.2.0
  Downloaded utf-8 v0.7.2
  Downloaded rand_pcg v0.1.1
  Downloaded tar v0.4.20
  Downloaded mio-uds v0.6.7
  Downloaded term v0.4.6
  Downloaded tester v0.5.0
  Downloaded schannel v0.1.14
  Downloaded crc v1.8.1
  Downloaded memoffset v0.2.1
  Downloaded minifier v0.0.29
  Downloaded remove_dir_all v0.5.1
  Downloaded rand_isaac v0.1.1
  Downloaded crossbeam-utils v0.2.2
  Downloaded chalk-engine v0.9.0
  Downloaded crossbeam-deque v0.2.0
  Downloaded libnghttp2-sys v0.1.1
  Downloaded memchr v2.1.1
  Downloaded vergen v3.0.4
  Downloaded lsp-types v0.55.4
  Downloaded macro-utils v0.1.2
  Downloaded byteorder v1.2.7
  Downloaded rustc-ap-serialize v407.0.0
  Downloaded utf8-ranges v1.0.2
  Downloaded rand v0.6.1
  Downloaded xattr v0.2.2
  Downloaded difference v2.0.0
  Downloaded backtrace v0.3.11
  Downloaded iovec v0.1.2
  Downloaded open v1.2.1
  Downloaded dlmalloc v0.1.3
  Downloaded generic-array v0.9.0
  Downloaded foreign-types-shared v0.1.1
  Downloaded colored v1.6.0
  Downloaded humantime v1.2.0
  Downloaded siphasher v0.2.2
  Downloaded blake2-rfc v0.2.18
  Downloaded byte-tools v0.2.0
  Downloaded wincolor v1.0.1
  Downloaded mac v0.1.1
  Downloaded strsim v0.7.0
  Downloaded quote v0.3.15
  Downloaded rustc-serialize v0.3.24
  Downloaded heck v0.3.0
  Downloaded tokio-current-thread v0.1.4
  Downloaded tokio-udp v0.1.3
  Downloaded im-rc v12.3.0
  Downloaded termion v1.5.1
  Downloaded redox_termios v0.1.1
  Downloaded new_debug_unreachable v1.0.1
  Downloaded jsonrpc-core v10.0.1
  Downloaded home v0.3.3
  Downloaded textwrap v0.10.0
  Downloaded rustc-ap-syntax v407.0.0
  Downloaded redox_users v0.2.0
  Downloaded rls-blacklist v0.1.3
  Downloaded rustc_version v0.2.3
  Downloaded parking_lot_core v0.4.0
  Downloaded constant_time_eq v0.1.3
  Downloaded smallvec v0.6.7
  Downloaded url_serde v0.2.0
  Downloaded rusty-fork v0.2.1
  Downloaded tokio-io v0.1.11
  Downloaded tokio-threadpool v0.1.10
  Downloaded compiletest_rs v0.3.21
  Downloaded html5ever v0.22.5
  Downloaded chalk-macros v0.1.0
  Downloaded serde_ignored v0.0.4
  Downloaded pkg-config v0.3.14
  Downloaded socket2 v0.3.8
  Downloaded fs2 v0.4.3
  Downloaded unicode_categories v0.1.1
  Downloaded if_chain v0.1.3
  Downloaded winapi-x86_64-pc-windows-gnu v0.4.0
  Downloaded tendril v0.4.0
  Downloaded rand_chacha v0.1.0
  Downloaded mio-named-pipes v0.1.6
  Downloaded thread_local v0.3.6
  Downloaded rustc_tools_util v0.1.1
  Downloaded openssl v0.10.16
  Downloaded num-traits v0.2.6
  Downloaded semver v0.9.0
  Downloaded proptest v0.9.2
  Downloaded rustc-ap-rustc_target v407.0.0
  Downloaded itertools v0.7.8
  Downloaded fuchsia-zircon-sys v0.3.3
  Downloaded rls-span v0.4.1
  Downloaded mdbook v0.2.3
  Downloaded pest v1.0.6
  Downloaded phf_shared v0.7.22
  Downloaded rustc-ap-rustc_data_structures v407.0.0
  Downloaded bytesize v1.0.0
  Downloaded void v1.0.2
  Downloaded ucd-trie v0.1.1
  Downloaded tokio-fs v0.1.5
  Downloaded adler32 v1.0.3
  Downloaded http v0.1.16
  Downloaded quine-mc_cluskey v0.2.4
  Downloaded string_cache_shared v0.3.0
  Downloaded bitflags v0.9.1
  Downloaded rustc-ap-arena v407.0.0
  Downloaded phf_codegen v0.7.22
  Downloaded elasticlunr-rs v2.3.4
  Downloaded arc-swap v0.3.7
  Downloaded tokio-codec v0.1.1
  Downloaded winapi-i686-pc-windows-gnu v0.4.0
  Downloaded rand_xorshift v0.1.0
  Downloaded ordslice v0.3.0
  Downloaded globset v0.4.2
  Downloaded mio v0.6.16
  Downloaded error-chain v0.12.0
  Downloaded ignore v0.4.6
  Downloaded string_cache v0.7.3
  Downloaded syn v0.11.11
  Downloaded ena v0.11.0
  Downloaded opener v0.3.2
  Downloaded percent-encoding v1.0.1
  Downloaded url v1.7.2
  Downloaded markup5ever v0.7.2
  Downloaded rayon-core v1.4.0
  Downloaded tokio v0.1.14
  Downloaded rustc-ap-syntax_pos v407.0.0
  Downloaded pest_generator v2.1.0
  Downloaded stable_deref_trait v1.1.0
  Downloaded fake-simd v0.1.2
  Downloaded regex-syntax v0.5.6
  Downloaded rustc-rayon v0.1.2
  Downloaded rustc-hash v1.0.1
  Downloaded scoped_threadpool v0.1.9
  Downloaded miniz_oxide v0.2.0
  Downloaded strum_macros v0.11.0
  Downloaded unicode-normalization v0.1.7
  Downloaded commoncrypto-sys v0.2.0
  Downloaded tokio-timer v0.2.8
  Downloaded core-foundation v0.6.3
  Downloaded shlex v0.1.1
  Downloaded term v0.5.1
  Downloaded ws2_32-sys v0.2.1
  Downloaded git2 v0.8.0
  Downloaded rls-analysis v0.16.12
  Downloaded tokio-signal v0.2.7
  Downloaded curl-sys v0.4.15
  Downloaded synstructure v0.10.1
  Downloaded rand_core v0.3.0
  Downloaded lazy_static v1.2.0
  Downloaded atty v0.2.11
  Downloaded rustc-ap-rustc_cratesio_shim v407.0.0
  Downloaded phf_generator v0.7.22
  Downloaded pest_meta v2.1.0
  Downloaded cloudabi v0.0.3
  Downloaded derive_more v0.13.0
  Downloaded 301 crates (32.2 MB) in 1m 50s (largest was `compiler_builtins` at 3.1 MB)
git could not determine the LLVM submodule commit hash. Assuming that an LLVM build is necessary.
Building stage0 std artifacts (i686-pc-windows-msvc -> i686-pc-windows-msvc)
   Compiling cc v1.0.28
   Compiling core v0.0.0 (C:\mozilla-build-3.2\rustc-1.35.0-src\src\libcore)
   Compiling libc v0.2.51
   Compiling unwind v0.0.0 (C:\mozilla-build-3.2\rustc-1.35.0-src\src\libunwind)
   Compiling compiler_builtins v0.1.9
   Compiling backtrace-sys v0.1.27
   Compiling std v0.0.0 (C:\mozilla-build-3.2\rustc-1.35.0-src\src\libstd)
   Compiling rustc-std-workspace-core v1.0.0 (C:\mozilla-build-3.2\rustc-1.35.0-src\src\tools\rustc-std-workspace-core)
   Compiling alloc v0.0.0 (C:\mozilla-build-3.2\rustc-1.35.0-src\src\liballoc)
   Compiling rustc-demangle v0.1.10
   Compiling panic_abort v0.0.0 (C:\mozilla-build-3.2\rustc-1.35.0-src\src\libpanic_abort)
   Compiling panic_unwind v0.0.0 (C:\mozilla-build-3.2\rustc-1.35.0-src\src\libpanic_unwind)
   Compiling std v0.0.0 (C:\mozilla-build-3.2\rustc-1.35.0-src\src\libstd)
error: unused import: `OsStr`======================================>   ] 21/22: std
 --> src\libstd\sys\windows\fs.rs:3:18
  |
3 | use crate::ffi::{OsStr};
  |                  ^^^^^
  |
  = note: `-D unused-imports` implied by `-D warnings`

error: aborting due to previous error

error: Could not compile `std`.

commenting out that line, build continues:

$ python x.py build
    Finished dev [unoptimized] target(s) in 0.42s
git could not determine the LLVM submodule commit hash. Assuming that an LLVM build is necessary.
Building stage0 std artifacts (i686-pc-windows-msvc -> i686-pc-windows-msvc)
   Compiling std v0.0.0 (C:\mozilla-build-3.2\rustc-1.35.0-src\src\libstd)
    Finished release [optimized] target(s) in 7.53s
Copying stage0 std from stage0 (i686-pc-windows-msvc -> i686-pc-windows-msvc / i686-pc-windows-msvc)
Building stage0 test artifacts (i686-pc-windows-msvc -> i686-pc-windows-msvc)
   Compiling proc_macro v0.0.0 (C:\mozilla-build-3.2\rustc-1.35.0-src\src\libproc_macro)
   Compiling getopts v0.2.17
   Compiling term v0.0.0 (C:\mozilla-build-3.2\rustc-1.35.0-src\src\libterm)
   Compiling test v0.0.0 (C:\mozilla-build-3.2\rustc-1.35.0-src\src\libtest)
    Finished release [optimized] target(s) in 8.55s
Copying stage0 test from stage0 (i686-pc-windows-msvc -> i686-pc-windows-msvc / i686-pc-windows-msvc)
Building stage0 compiler artifacts (i686-pc-windows-msvc -> i686-pc-windows-msvc)
   Compiling semver-parser v0.7.0
   Compiling winapi v0.3.6
   Compiling nodrop v0.1.12
   Compiling cfg-if v0.1.6
   Compiling libc v0.2.51
   Compiling void v1.0.2
   Compiling memoffset v0.2.1
   Compiling lazy_static v1.2.0
   Compiling scopeguard v0.3.3
   Compiling rand_core v0.3.0
   Compiling rustc-rayon-core v0.1.2
   Compiling stable_deref_trait v1.1.0
   Compiling rustc-rayon v0.1.2
   Compiling proc-macro2 v0.4.24
   Compiling bitflags v1.0.4
   Compiling either v1.5.0
   Compiling unicode-width v0.1.5
   Compiling byteorder v1.2.7
   Compiling graphviz v0.0.0 (C:\mozilla-build-3.2\rustc-1.35.0-src\src\libgraphviz)
   Compiling unicode-xid v0.1.0
   Compiling cc v1.0.28
   Compiling rustc_target v0.0.0 (C:\mozilla-build-3.2\rustc-1.35.0-src\src\librustc_target)
   Compiling crc32fast v1.1.2
   Compiling scoped-tls v1.0.0
   Compiling lazy_static v0.2.11
   Compiling syntax v0.0.0 (C:\mozilla-build-3.2\rustc-1.35.0-src\src\libsyntax)
   Compiling datafrog v2.0.1
   Compiling rustc v0.0.0 (C:\mozilla-build-3.2\rustc-1.35.0-src\src\librustc)
   Compiling rustc-demangle v0.1.10
   Compiling rustc_metadata v0.0.0 (C:\mozilla-build-3.2\rustc-1.35.0-src\src\librustc_metadata)
   Compiling fmt_macros v0.0.0 (C:\mozilla-build-3.2\rustc-1.35.0-src\src\libfmt_macros)
   Compiling rustc_fs_util v0.0.0 (C:\mozilla-build-3.2\rustc-1.35.0-src\src\librustc_fs_util)
   Compiling rustc_incremental v0.0.0 (C:\mozilla-build-3.2\rustc-1.35.0-src\src\librustc_incremental)
   Compiling rustc-serialize v0.3.24
   Compiling quick-error v1.2.2
   Compiling rustc_driver v0.0.0 (C:\mozilla-build-3.2\rustc-1.35.0-src\src\librustc_driver)
   Compiling crossbeam-utils v0.2.2
   Compiling log v0.4.6
   Compiling arrayvec v0.4.7
   Compiling unreachable v1.0.0
   Compiling log_settings v0.1.2
   Compiling owning_ref v0.3.3
   Compiling rand_isaac v0.1.1
   Compiling rand_xorshift v0.1.0
   Compiling rand_hc v0.1.0
   Compiling semver v0.9.0
   Compiling rustc-hash v1.0.1
   Compiling chalk-macros v0.1.0
   Compiling itertools v0.8.0
   Compiling humantime v1.2.0
   Compiling smallvec v0.6.7
   Compiling ena v0.13.0
   Compiling rustc_cratesio_shim v0.0.0 (C:\mozilla-build-3.2\rustc-1.35.0-src\src\librustc_cratesio_shim)
   Compiling crossbeam-epoch v0.3.1
   Compiling lock_api v0.1.3
   Compiling polonius-engine v0.6.2
   Compiling serialize v0.0.0 (C:\mozilla-build-3.2\rustc-1.35.0-src\src\libserialize)
   Compiling chalk-engine v0.9.0
   Compiling rustc_version v0.2.3
   Compiling rustc_apfloat v0.0.0 (C:\mozilla-build-3.2\rustc-1.35.0-src\src\librustc_apfloat)
   Compiling num_cpus v1.8.0
   Compiling miniz-sys v0.1.11
   Compiling crossbeam-deque v0.2.0
   Compiling rand_pcg v0.1.1
   Compiling rand_chacha v0.1.0
   Compiling rand v0.6.1
   Compiling parking_lot_core v0.4.0
   Compiling quote v0.6.10
   Compiling flate2 v1.0.6
   Compiling rls-span v0.4.1
   Compiling syn v0.15.22
   Compiling rls-data v0.18.2
   Compiling winapi-util v0.1.1
   Compiling atty v0.2.11
   Compiling remove_dir_all v0.5.1
   Compiling backtrace v0.3.11
   Compiling memmap v0.6.2
   Compiling wincolor v1.0.1
   Compiling termcolor v1.0.4
   Compiling jobserver v0.1.13
   Compiling tempfile v3.0.5
   Compiling env_logger v0.5.13
   Compiling parking_lot v0.7.1
   Compiling rustc_data_structures v0.0.0 (C:\mozilla-build-3.2\rustc-1.35.0-src\src\librustc_data_structures)
   Compiling arena v0.0.0 (C:\mozilla-build-3.2\rustc-1.35.0-src\src\libarena)
   Compiling syntax_pos v0.0.0 (C:\mozilla-build-3.2\rustc-1.35.0-src\src\libsyntax_pos)
   Compiling rustc_errors v0.0.0 (C:\mozilla-build-3.2\rustc-1.35.0-src\src\librustc_errors)
   Compiling synstructure v0.10.1
   Compiling rustc_macros v0.1.0 (C:\mozilla-build-3.2\rustc-1.35.0-src\src\librustc_macros)
   Compiling syntax_ext v0.0.0 (C:\mozilla-build-3.2\rustc-1.35.0-src\src\libsyntax_ext)
   Compiling rustc_mir v0.0.0 (C:\mozilla-build-3.2\rustc-1.35.0-src\src\librustc_mir)
   Compiling rustc_typeck v0.0.0 (C:\mozilla-build-3.2\rustc-1.35.0-src\src\librustc_typeck)
   Compiling rustc_allocator v0.0.0 (C:\mozilla-build-3.2\rustc-1.35.0-src\src\librustc_allocator)
   Compiling rustc_traits v0.0.0 (C:\mozilla-build-3.2\rustc-1.35.0-src\src\librustc_traits)
   Compiling rustc_lint v0.0.0 (C:\mozilla-build-3.2\rustc-1.35.0-src\src\librustc_lint)
   Compiling rustc_resolve v0.0.0 (C:\mozilla-build-3.2\rustc-1.35.0-src\src\librustc_resolve)
   Compiling rustc_plugin v0.0.0 (C:\mozilla-build-3.2\rustc-1.35.0-src\src\librustc_plugin)
   Compiling rustc_privacy v0.0.0 (C:\mozilla-build-3.2\rustc-1.35.0-src\src\librustc_privacy)
   Compiling rustc_codegen_utils v0.0.0 (C:\mozilla-build-3.2\rustc-1.35.0-src\src\librustc_codegen_utils)
   Compiling rustc_borrowck v0.0.0 (C:\mozilla-build-3.2\rustc-1.35.0-src\src\librustc_borrowck)
   Compiling rustc_passes v0.0.0 (C:\mozilla-build-3.2\rustc-1.35.0-src\src\librustc_passes)
   Compiling rustc_interface v0.0.0 (C:\mozilla-build-3.2\rustc-1.35.0-src\src\librustc_interface)
   Compiling rustc_save_analysis v0.0.0 (C:\mozilla-build-3.2\rustc-1.35.0-src\src\librustc_save_analysis)
   Compiling rustc_codegen_ssa v0.0.0 (C:\mozilla-build-3.2\rustc-1.35.0-src\src\librustc_codegen_ssa)
   Compiling rustc-main v0.0.0 (C:\mozilla-build-3.2\rustc-1.35.0-src\src\rustc)
    Finished release [optimized] target(s) in 5m 08s
Copying stage0 rustc from stage0 (i686-pc-windows-msvc -> i686-pc-windows-msvc / i686-pc-windows-msvc)
git could not determine the LLVM submodule commit hash. Assuming that an LLVM build is necessary.
Building LLVM for i686-pc-windows-msvc
running: "cmake" "c:\\mozilla-build-3.2\\rustc-1.35.0-src\\src/llvm-project/llvm" "-G" "Visual Studio 14 2015" "-DLLVM_E
NABLE_ASSERTIONS=OFF" "-DLLVM_TARGETS_TO_BUILD=X86" "-DLLVM_EXPERIMENTAL_TARGETS_TO_BUILD=" "-DLLVM_INCLUDE_EXAMPLES=OFF
" "-DLLVM_INCLUDE_TESTS=OFF" "-DLLVM_INCLUDE_DOCS=OFF" "-DLLVM_INCLUDE_BENCHMARKS=OFF" "-DLLVM_ENABLE_ZLIB=OFF" "-DWITH_
POLLY=OFF" "-DLLVM_ENABLE_TERMINFO=OFF" "-DLLVM_ENABLE_LIBEDIT=OFF" "-DLLVM_PARALLEL_COMPILE_JOBS=16" "-DLLVM_TARGET_ARC
H=i686" "-DLLVM_DEFAULT_TARGET_TRIPLE=i686-pc-windows-msvc" "-DLLVM_OCAML_INSTALL_PATH=usr/lib/ocaml" "-DLLVM_USE_CRT_DE
BUG=MT" "-DLLVM_USE_CRT_RELEASE=MT" "-DLLVM_USE_CRT_RELWITHDEBINFO=MT" "-DLLVM_BUILD_32_BITS=ON" "-DLLVM_ENABLE_LIBXML2=
OFF" "-DLLVM_VERSION_SUFFIX=-rust-1.35.0-dev" "-DPYTHON_EXECUTABLE=c:\\mozilla-build-3.2\\python\\python2.7" "-DCMAKE_IN
STALL_PREFIX=c:\\mozilla-build-3.2\\rustc-1.35.0-src\\build\\i686-pc-windows-msvc\\llvm" "-DCMAKE_C_FLAGS= /nologo /MT"
"-DCMAKE_C_FLAGS_RELEASE= /nologo /MT" "-DCMAKE_CXX_FLAGS= /nologo /MT" "-DCMAKE_CXX_FLAGS_RELEASE= /nologo /MT" "-DCMAK
E_BUILD_TYPE=Release"
CMake Warning at CMakeLists.txt:33 (message):
  Visual Studio generators use the x86 host compiler by default, even for
  64-bit targets.  This can result in linker instability and out of memory
  errors.  To use the 64-bit host compiler, pass -Thost=x64 on the CMake
  command line.


-- The C compiler identification is MSVC 19.0.24215.1
-- The CXX compiler identification is MSVC 19.0.24215.1
-- The ASM compiler identification is MSVC
-- Found assembler: C:/Program Files (x86)/Microsoft Visual Studio 14.0/VC/bin/cl.exe
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio 14.0/VC/bin/cl.exe - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual Studio 14.0/VC/bin/cl.exe - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
CMake Error at cmake/modules/CheckCompilerVersion.cmake:40 (message):
  Host Visual Studio version should be at least 19.1 because LLVM will soon
  use new C++ features which your toolchain version doesn't support.  Your
  version is 19.0.24215.1.  You can temporarily opt out using
  LLVM_TEMPORARILY_ALLOW_OLD_TOOLCHAIN, but very soon your toolchain won't be
  supported.
Call Stack (most recent call first):
  cmake/modules/CheckCompilerVersion.cmake:48 (check_compiler_version)
  cmake/config-ix.cmake:13 (include)
  CMakeLists.txt:590 (include)


-- Configuring incomplete, errors occurred!
See also "C:/mozilla-build-3.2/rustc-1.35.0-src/build/i686-pc-windows-msvc/llvm/build/CMakeFiles/CMakeOutput.log".
See also "C:/mozilla-build-3.2/rustc-1.35.0-src/build/i686-pc-windows-msvc/llvm/build/CMakeFiles/CMakeError.log".
thread 'main' panicked at '
command did not execute successfully, got: exit code: 1

build script failed, must exit now', C:\Users\Roy\.cargo\registry\src\github.com-1ecc6299db9ec823\cmake-0.1.33\src\lib.r
s:773:5
note: Run with `RUST_BACKTRACE=1` environment variable to display a backtrace.
        finished in 6.210
failed to run: c:\mozilla-build-3.2\rustc-1.35.0-src\build\bootstrap\debug\bootstrap build
Build completed unsuccessfully in 0:05:33

but you have VS 2015 (but not newer) and you want to use EWDK to build, you hit cmake error.

setting these environment variables can help to bypass registry checking, but fails on MSBuild:

set EnterpriseWDK=True
set DisableRegistryUse=True

@Feodor2
Copy link
Owner

Feodor2 commented May 2, 2022

For config.toml brackets mean - host and target is to bracket.
The EWDK i use the same way and no VC 2015, though i have VC 2013 express installed including net4.

I remember errors with msbuild was fail to look include path
Look for files kile "Microsoft.Cpp.targets" where the word "useenv" is, delete all related that useenv

@roytam1
Copy link
Author

roytam1 commented May 4, 2022

@Feodor2 maybe it is easier if you may provide your copy of compiled rustc and/or clang-cl
instead of people trying to figure out how to build them by themselves.

@Feodor2
Copy link
Owner

Feodor2 commented May 5, 2022

Not because i don't get license stuff which rust has different. This is not the obstacle too difficult, after you will set all things you begin malign whatever you want or try the oldest rust for win9x may be it will make.

@roytam1
Copy link
Author

roytam1 commented May 5, 2022

but you have VS 2015 (but not newer) and you want to use EWDK to build, you hit cmake error.

setting these environment variables can help to bypass registry checking, but fails on MSBuild:

set EnterpriseWDK=True
set DisableRegistryUse=True

I have to switch to plain EWDK's LaunchBuildEnv.cmd and set LIB and INCLUDE environment variables manually in order to get pass LLVM CMake hell. Still compiling in plain EWDK building environment...

@Feodor2
Copy link
Owner

Feodor2 commented May 5, 2022

Hell yes cmake unnecessary rely on msbiuld or unnecessary itself - modern fashion.
Examine config file where is possible to abandon LLVM building and set its regular setup.

@roytam1
Copy link
Author

roytam1 commented May 6, 2022

So build both x86 and x64 rusts.

@Feodor2 and x64 rust's libstd can't link:

  = note:    Creating library C:\mozilla-build-3.2\rustc-1.35.0-src\build\x86_64-pc-windows-msvc\stage0-std\x86_64-pc-windows-msvc\release\deps\std-d69cc7093c8783d5.dll.lib and object C:\mozilla-build-3.2\rustc-1.35.0-src\build\x86_64-pc-windows-msvc\stage0-std\x86_64-pc-windows-msvc\release\deps\std-d69cc7093c8783d5.dll.exp
          std-d69cc7093c8783d5.std.5n8l6vgk-cgu.2.rcgu.o : error LNK2019: unresolved external symbol InterlockedIncrement referenced in function _ZN3std3sys7windows7condvar7Condvar12wait_timeout17hf3f32d74653dffedE
          std-d69cc7093c8783d5.std.5n8l6vgk-cgu.2.rcgu.o : error LNK2019: unresolved external symbol InterlockedExchangeAdd referenced in function _ZN3std3sys7windows7condvar7Condvar12wait_timeout17hf3f32d74653dffedE
          C:\mozilla-build-3.2\rustc-1.35.0-src\build\x86_64-pc-windows-msvc\stage0-std\x86_64-pc-windows-msvc\release\deps\std-d69cc7093c8783d5.dll : fatal error LNK1120: 2 unresolved externals

@Feodor2
Copy link
Owner

Feodor2 commented May 7, 2022

Hmm.... did not get this. Do you use the same ewdk and llvm as i?
x86_64 lib not needed for x86 mypal so check if you have ready x64 rustc.exe (build\x86_64-pc-windows-msvc\stage2\bin) you may take it without lib

@roytam1
Copy link
Author

roytam1 commented May 7, 2022

Hmm.... did not get this. Do you use the same ewdk and llvm as i?
x86_64 lib not needed for x86 mypal so check if you have ready x64 rustc.exe (build\x86_64-pc-windows-msvc\stage2\bin) you may take it without lib

it didn't even get pass stage1, and I can build x86-32 rustc.exe only

@Feodor2
Copy link
Owner

Feodor2 commented May 7, 2022

This all mess about the rust lib so if you will not resolve the error preserve x86 lib then comment that code or cancel patch at all.

@Feodor2 Feodor2 closed this as completed Jul 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants