Skip to content

Conversation

kallisti5
Copy link
Contributor

No description provided.

@rust-highfive
Copy link

r? @alexcrichton

(rust_highfive has picked a reviewer for you, use r? to override)

@kallisti5
Copy link
Contributor Author

This should be just about the last build fixes. I'm far enough std is almost linking:

Documenting stage2 standalone (x86_64-unknown-haiku)
Building stage2 std artifacts (x86_64-unknown-linux-gnu -> x86_64-unknown-haiku)
   Compiling core v0.0.0 (file:///home/kallisti5/Code/rust/src/libcore)
   Compiling unwind v0.0.0 (file:///home/kallisti5/Code/rust/src/libunwind)
   Compiling libc v0.0.0 (file:///home/kallisti5/Code/rust/src/rustc/libc_shim)
   Compiling std v0.0.0 (file:///home/kallisti5/Code/rust/src/libstd)
   Compiling compiler_builtins v0.0.0 (file:///home/kallisti5/Code/rust/src/libcompiler_builtins)
   Compiling rand v0.0.0 (file:///home/kallisti5/Code/rust/src/librand)
   Compiling alloc v0.0.0 (file:///home/kallisti5/Code/rust/src/liballoc)
   Compiling rustc_unicode v0.0.0 (file:///home/kallisti5/Code/rust/src/librustc_unicode)
   Compiling alloc_system v0.0.0 (file:///home/kallisti5/Code/rust/src/liballoc_system)
   Compiling panic_abort v0.0.0 (file:///home/kallisti5/Code/rust/src/libpanic_abort)
   Compiling panic_unwind v0.0.0 (file:///home/kallisti5/Code/rust/src/libpanic_unwind)
   Compiling collections v0.0.0 (file:///home/kallisti5/Code/rust/src/libcollections)
error: linking with `cc` failed: exit code: 1
  |
  = note: "cc" "-m64" "-L" "/home/kallisti5/Code/rust/generated.haiku/build/x86_64-unknown-linux-gnu/stage2/lib/rustlib/x86_64-unknown-haiku/lib" "/home/kallisti5/Code/rust/generated.haiku/build/x86_64-unknown-linux-gnu/stage2-std/x86_64-unknown-haiku/release/deps/std-d8a6cc1478c5db9d.0.o" "-o" "/home/kallisti5/Code/rust/generated.haiku/build/x86_64-unknown-linux-gnu/stage2-std/x86_64-unknown-haiku/release/deps/libstd-d8a6cc1478c5db9d.so" "/home/kallisti5/Code/rust/generated.haiku/build/x86_64-unknown-linux-gnu/stage2-std/x86_64-unknown-haiku/release/deps/std-d8a6cc1478c5db9d.metadata.o" "-Wl,-O1" "-nodefaultlibs" "-L" "/home/kallisti5/Code/rust/generated.haiku/build/x86_64-unknown-linux-gnu/stage2-std/x86_64-unknown-haiku/release/deps" "-L" "/home/kallisti5/Code/rust/generated.haiku/build/x86_64-unknown-linux-gnu/stage2-std/x86_64-unknown-haiku/release/build/std-07b7501857e2a858/out/.libs" "-L" "/home/kallisti5/Code/rust/generated.haiku/build/x86_64-unknown-linux-gnu/stage2-std/x86_64-unknown-haiku/release/build/compiler_builtins-9734521b54594229/out" "-L" "/home/kallisti5/Code/rust/generated.haiku/build/x86_64-unknown-linux-gnu/stage2/lib/rustlib/x86_64-unknown-haiku/lib" "-Wl,-Bstatic" "-Wl,--whole-archive" "-l" "backtrace" "-Wl,--no-whole-archive" "-Wl,-Bdynamic" "-Wl,--whole-archive" "/tmp/rustc.zooecDKdSGKo/libpanic_unwind-eb34f7fa41054e2f.rlib" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "/tmp/rustc.zooecDKdSGKo/libcollections-9733680f2020ce9f.rlib" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "/tmp/rustc.zooecDKdSGKo/liballoc-ed58344ca3d700e9.rlib" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "/tmp/rustc.zooecDKdSGKo/liballoc_system-15c47616c189f14f.rlib" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "/tmp/rustc.zooecDKdSGKo/librustc_unicode-f4b8177343581733.rlib" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "/tmp/rustc.zooecDKdSGKo/libunwind-daa256cef88cf5fa.rlib" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "/tmp/rustc.zooecDKdSGKo/liblibc-b7c62ebc89012cfb.rlib" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "/tmp/rustc.zooecDKdSGKo/librand-accc4b4a4017bf13.rlib" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "/tmp/rustc.zooecDKdSGKo/libcore-254b2218cd876a2a.rlib" "-Wl,--no-whole-archive" "/tmp/rustc.zooecDKdSGKo/libcompiler_builtins-caf9eea0439968c2.rlib" "-l" "root" "-l" "network" "-shared" "-Wl,-rpath,$ORIGIN/../lib"
  = note: /usr/bin/ld: cannot find -lroot
/usr/bin/ld: cannot find -lnetwork
collect2: error: ld returned 1 exit status


error: aborting due to previous error

error: Could not compile `std`.

@kallisti5
Copy link
Contributor Author

hm. I injected those libraries into one of the library paths.. and now have arrived at the following:

gen-install-script: looking for install programs
gen-install-script: 
gen-install-script: found sed
gen-install-script: found chmod
gen-install-script: found cat
gen-install-script: 
gen-install-script: processing arguments
gen-install-script: 
gen-install-script: CFG_PRODUCT_NAME     := Rust 
gen-install-script: CFG_REL_MANIFEST_DIR := rustlib 
gen-install-script: CFG_SUCCESS_MESSAGE  := std-is-standing-at-the-ready. 
gen-install-script: CFG_OUTPUT_SCRIPT    := /home/kallisti5/Code/rust/generated ...
gen-install-script: CFG_LEGACY_MANIFEST_DIRS := rustlib,cargo 
gen-install-script: 
gen-install-script: validating arguments
gen-install-script: 
Documenting stage2 standalone (x86_64-unknown-haiku)
Building stage2 std artifacts (x86_64-unknown-linux-gnu -> x86_64-unknown-haiku)
    Finished release [optimized] target(s) in 0.0 secs
thread 'main' panicked at 'called `Option::unwrap()` on a `None` value', ../src/libcore/option.rs:326
note: Run with `RUST_BACKTRACE=1` for a backtrace.
Makefile:53: recipe for target 'dist' failed
make: *** [dist] Error 101

@kallisti5
Copy link
Contributor Author

following instructions:

    Finished release [optimized] target(s) in 0.0 secs
thread 'main' panicked at 'called `Option::unwrap()` on a `None` value', ../src/libcore/option.rs:326
stack backtrace:
   1:     0x565263d6af69 - std::sys::backtrace::tracing::imp::write::h6f07380f45fe1307
   2:     0x565263d731cc - std::panicking::default_hook::_{{closure}}::he6993150602797ff
   3:     0x565263d72519 - std::panicking::default_hook::h42f7cdc1bed8dd00
   4:     0x565263d72bd8 - std::panicking::rust_panic_with_hook::hdcce59947203a4c0
   5:     0x565263d72a72 - std::panicking::begin_panic::h832a3d3207d44464
   6:     0x565263d729a0 - std::panicking::begin_panic_fmt::hd1709f2e7b5289b9
   7:     0x565263d72921 - rust_begin_unwind
   8:     0x565263dab59f - core::panicking::panic_fmt::hdd0d476d63f35c21
   9:     0x565263dab4cb - core::panicking::panic::haba30b5fad636e40
  10:     0x565263ad81f5 - _<core..option..Option<T>>::unwrap::hc24ba3bceeeae158
                        at /buildslave/rust-buildbot/slave/beta-dist-rustc-linux/build/obj/../src/libcore/option.rs:21
  11:     0x565263b7190e - bootstrap::compile::add_to_sysroot::hbd61fa7c32c6bb16
                        at /home/kallisti5/Code/rust/src/bootstrap/compile.rs:342
  12:     0x565263b6d16c - bootstrap::compile::std_link::ha61942aae72144be
                        at /home/kallisti5/Code/rust/src/bootstrap/compile.rs:104
  13:     0x565263b6cbc0 - bootstrap::compile::std::h97fed4ea4b998665
                        at /home/kallisti5/Code/rust/src/bootstrap/compile.rs:82
  14:     0x565263ba6ec0 - bootstrap::Build::build::h8bb4721b73c7eed9
                        at /home/kallisti5/Code/rust/src/bootstrap/lib.rs:256
  15:     0x565263ab8ce3 - bootstrap::main::h2394f1acf3c66dfa
                        at /home/kallisti5/Code/rust/src/bootstrap/bin/main.rs:36
  16:     0x565263d7acb6 - __rust_maybe_catch_panic
  17:     0x565263d71c82 - std::rt::lang_start::h14913182d401dec2
  18:     0x565263ab8e93 - main
  19:     0x7fe1d409b730 - __libc_start_main
  20:     0x565263ab0a08 - _start
  21:                0x0 - <unknown>
Makefile:53: recipe for target 'dist' failed
make: *** [dist] Error 101

@alexcrichton
Copy link
Member

@bors: r+

@bors
Copy link
Contributor

bors commented Oct 4, 2016

📌 Commit 573c5fe has been approved by alexcrichton

bors added a commit that referenced this pull request Oct 4, 2016
@bors
Copy link
Contributor

bors commented Oct 4, 2016

⌛ Testing commit 573c5fe with merge 4577f08...

@bors
Copy link
Contributor

bors commented Oct 5, 2016

☀️ Test successful - status-appveyor, travis
Approved by: alexcrichton
Pushing 4577f08 to master...

@bors bors merged commit 573c5fe into rust-lang:master Oct 5, 2016
Susurrus pushed a commit to Susurrus/libc that referenced this pull request Mar 26, 2017
add unistd::getcwd and unistd::mkdir

As a (late) followup of [this withdrawn PR](rust-lang#326) I have added getcwd (wrapper around `libc::getcwd`) and mkdir (wrapper around `libc::mkdir`) and added testing.

A few notes:

 - I'm new to rust so I would appreciate some pair of eyes testing the code, plus I'm open for revision of code or general remarks about my coding style
 - I have run the tests both on OSX as on Linux (Ubuntu)
 - I've run `clippy` to see if my code is well formatted, however clippy issues many warnings about the project. I think I didn't add any more warnings
 - the methods in unistd are not documented so I also left out the documentation of `getcwd` and `mkdir`, although I think it'd probably be good to add some documentation, especially some example code how to use the methods
 - the base idea of `getcwd` is [taken from std](https://github.com/rust-lang/rust/blob/1.9.0/src/libstd/sys/unix/os.rs#L95-L119), should I mention that somewhere?
Susurrus pushed a commit to Susurrus/libc that referenced this pull request Mar 26, 2017
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

Successfully merging this pull request may close these issues.

4 participants