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

Upgrade rust-toolchain to nightly-2018-09-09 #852

Merged
merged 10 commits into from
Sep 18, 2018
Merged

Conversation

harryfei
Copy link
Member

@harryfei harryfei commented Sep 4, 2018

Closes #752
Closes #759
Closes #725
Unblock #757

@harryfei harryfei changed the title upgrade rust-toolchain to nightly-2018-09-03 [WIP] upgrade rust-toolchain to nightly-2018-09-03 Sep 4, 2018
@harryfei harryfei changed the title [WIP] upgrade rust-toolchain to nightly-2018-09-03 Upgrade rust-toolchain to nightly-2018-09-03 Sep 4, 2018
@@ -26,28 +26,22 @@ max_width = 100
merge_derives = true
newline_style = "Unix"
normalize_comments = false
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are these still supported in some way?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

They are default already. The options are deleted.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good! Thanks.

#![feature(const_fn)]
#![feature(const_size_of)]
#![allow(non_upper_case_globals)]
#![allow(non_snake_case)]
#![allow(private_no_mangle_fns)]
#![allow(non_camel_case_types, non_snake_case, non_upper_case_globals)]
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe move this comment before the allow instead of allowing it to be placed after?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed

shaleh
shaleh previously requested changes Sep 4, 2018
Copy link
Collaborator

@shaleh shaleh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When I looked at this last there were issues with the OSX allocation code. I do not see any patches in here for that. What was the final resolution?

@harryfei
Copy link
Member Author

harryfei commented Sep 5, 2018

@shaleh Yes, you are right. After checking the travis-ci output, I found this PR breaks the build on OSX (allocation code).
However, I don't have an OSX machine. I can't fix the build issue by myself.
Could we merge the PR first and wait for a new patch to fix the OSX build issue (by someone else).

@shaleh
Copy link
Collaborator

shaleh commented Sep 5, 2018

A significant number of us use OSX. I am loathe to merge this without a solution.

I had not worked on it because the Rust team was still deciding on the API for the allocation interface. If that has settled porting this over should not be too hard.

@SolarAquarion
Copy link

   Compiling remacs-macros v0.1.0 (file:///home/solaraquarion/build/remacs-git/src/remacs-git/rust_src/remacs-macros)
   Compiling remacs v0.1.0 (file:///home/solaraquarion/build/remacs-git/src/remacs-git/rust_src)
error[E0573]: expected type, found module `AtkScrollType`
      --> /home/solaraquarion/build/remacs-git/src/remacs-git/rust_src/target/release/build/remacs-4c2b5b016a5b1bfb/out/bindings.rs:141760:67
       |
141760 |         unsafe extern "C" fn(component: *mut AtkComponent, type_: AtkScrollType) -> gboolean,
       |                                                                   ^^^^^^^^^^^^^ did you mean `GtkScrollType`?

error[E0573]: expected type, found module `AtkScrollType`
      --> /home/solaraquarion/build/remacs-git/src/remacs-git/rust_src/target/release/build/remacs-4c2b5b016a5b1bfb/out/bindings.rs:142069:73
       |
142069 |     pub fn atk_component_scroll_to(component: *mut AtkComponent, type_: AtkScrollType) -> gboolean;
       |                                                                         ^^^^^^^^^^^^^ did you mean `GtkScrollType`?

error: aborting due to 2 previous errors

For more information about this error, try `rustc --explain E0573`.
error: Could not compile `remacs`.

To learn more, run the command again with --verbose.
make[1]: *** [Makefile:609: ../rust_src/target/release/libremacs_lib.a] Error 101
make[1]: Leaving directory '/home/solaraquarion/build/remacs-git/src/remacs-git/src'

@harryfei
Copy link
Member Author

harryfei commented Sep 7, 2018

@SolarAquarion Which platform did you build on?The code can built on Linux perfectly while has some issues on MacOS.

Besides, do make clean may be helpful in some situation.

@SolarAquarion
Copy link

SolarAquarion commented Sep 7, 2018 via email

@harryfei
Copy link
Member Author

harryfei commented Sep 7, 2018

@shaleh I will try my best to fix the OSX build issues in future updates.

@harryfei harryfei changed the title Upgrade rust-toolchain to nightly-2018-09-03 Upgrade rust-toolchain to nightly-2018-09-09 Sep 9, 2018
@harryfei
Copy link
Member Author

harryfei commented Sep 9, 2018

@shaleh

  • Fix the build issue on mac osx
  • update the toolchain to nightly-2018-09-09

@shaleh
Copy link
Collaborator

shaleh commented Sep 9, 2018

Thanks! Last time I tried the alloc code was not settled enough. That diff is what I was hoping to eventually see.

Copy link
Collaborator

@shaleh shaleh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great work!

@shaleh shaleh dismissed their stale review September 10, 2018 14:24

OSX is still not building....

@cbbrowne
Copy link

I tried doing a build of this (Linux - Debian) and had failures:

There were a number of broken references when trying to make temacs:

/home/cbbrowne/GitStuff/remacs/rust_src/src/lists.rs:184: undefined reference to Ffuncall' /usr/bin/ld: .././rust_src/target/debug/libremacs.a(remacs-f8aa2273ee52276d.u0bumo365vjn2b3.rcgu.o): in function remacs::multibyte::string_overflow':
/home/cbbrowne/GitStuff/remacs/rust_src/src/multibyte.rs:239: undefined reference to make_string' /usr/bin/ld: .././rust_src/target/debug/libremacs.a(remacs-f8aa2273ee52276d.u0bumo365vjn2b3.rcgu.o): in function remacs::multibyte::write_codepoint':
/home/cbbrowne/GitStuff/remacs/rust_src/src/multibyte.rs:340: undefined reference to make_string' /usr/bin/ld: .././rust_src/target/debug/libremacs.a(remacs-f8aa2273ee52276d.y54rppfya31h0vi.rcgu.o): in function store_symval_forwarding':
/home/cbbrowne/GitStuff/remacs/rust_src/src/data.rs:480: undefined reference to Fget' /usr/bin/ld: /home/cbbrowne/GitStuff/remacs/rust_src/src/data.rs:486: undefined reference to Fget'
/usr/bin/ld: /home/cbbrowne/GitStuff/remacs/rust_src/src/data.rs:494: undefined reference to Ffuncall' /usr/bin/ld: .././rust_src/target/debug/libremacs.a(remacs-f8aa2273ee52276d.y54rppfya31h0vi.rcgu.o): in function remacs::data::aset':
/home/cbbrowne/GitStuff/remacs/rust_src/src/data.rs:216: undefined reference to CHECK_IMPURE' /usr/bin/ld: /home/cbbrowne/GitStuff/remacs/rust_src/src/data.rs:222: undefined reference to CHAR_TABLE_SET'
/usr/bin/ld: /home/cbbrowne/GitStuff/remacs/rust_src/src/data.rs:229: undefined reference to CHECK_IMPURE' /usr/bin/ld: /home/cbbrowne/GitStuff/remacs/rust_src/src/data.rs:237: undefined reference to aset_multibyte_string'
/usr/bin/ld: /home/cbbrowne/GitStuff/remacs/rust_src/src/data.rs:245: undefined reference to aset_multibyte_string' /usr/bin/ld: .././rust_src/target/debug/libremacs.a(remacs-f8aa2273ee52276d.y54rppfya31h0vi.rcgu.o): in function remacs::data::defalias':
/home/cbbrowne/GitStuff/remacs/rust_src/src/data.rs:(.text._ZN6remacs4data8defalias17h404658934f808684E+0x60): undefined reference to globals' /usr/bin/ld: /home/cbbrowne/GitStuff/remacs/rust_src/src/data.rs:273: undefined reference to Fpurecopy'
/usr/bin/ld: /home/cbbrowne/GitStuff/remacs/rust_src/src/data.rs:(.text._ZN6remacs4data8defalias17h404658934f808684E+0x177): undefined reference to globals' /usr/bin/ld: /home/cbbrowne/GitStuff/remacs/rust_src/src/data.rs:284: undefined reference to Fcons'
/usr/bin/ld: /home/cbbrowne/GitStuff/remacs/rust_src/src/data.rs:286: undefined reference to Fcons' /usr/bin/ld: /home/cbbrowne/GitStuff/remacs/rust_src/src/data.rs:294: undefined reference to Ffset'
/usr/bin/ld: /home/cbbrowne/GitStuff/remacs/rust_src/src/data.rs:292: undefined reference to Ffuncall' /usr/bin/ld: .././rust_src/target/debug/libremacs.a(remacs-f8aa2273ee52276d.y54rppfya31h0vi.rcgu.o): in function remacs::data::subr_name':
/home/cbbrowne/GitStuff/remacs/rust_src/src/data.rs:331: undefined reference to build_string' /usr/bin/ld: .././rust_src/target/debug/libremacs.a(remacs-f8aa2273ee52276d.1dwmoq06oofj5ott.rcgu.o): in function remacs::keyboard::posn_at_x_y::{{closure}}':
/home/cbbrowne/GitStuff/remacs/rust_src/src/keyboard.rs:92: undefined reference to window_box_left_offset' /usr/bin/ld: .././rust_src/target/debug/libremacs.a(remacs-f8aa2273ee52276d.1tn7rjievkgqjie.rcgu.o): in function remacs::indent::current_column':
/home/cbbrowne/GitStuff/remacs/rust_src/src/indent.rs:24: undefined reference to current_column' /usr/bin/ld: .././rust_src/target/debug/libremacs.a(remacs-f8aa2273ee52276d.1xqnas3v3yvelud5.rcgu.o): in function remacs::buffers::overlay_lists::{{closure}}::{{closure}}':
/home/cbbrowne/GitStuff/remacs/rust_src/src/buffers.rs:676: undefined reference to Fcons' /usr/bin/ld: .././rust_src/target/debug/libremacs.a(remacs-f8aa2273ee52276d.2cjkz0ycvxa12t8f.rcgu.o): in function remacs::eval::progn::{{closure}}':
/home/cbbrowne/GitStuff/remacs/rust_src/src/eval.rs:117: undefined reference to eval_sub' /usr/bin/ld: .././rust_src/target/debug/libremacs.a(remacs-f8aa2273ee52276d.2oz1lhgpxhulw3ac.rcgu.o): in function remacs::crypto::hash_alg':
/home/cbbrowne/GitStuff/remacs/rust_src/src/crypto/mod.rs:60: undefined reference to make_string' /usr/bin/ld: .././rust_src/target/debug/libremacs.a(remacs-f8aa2273ee52276d.2oz1lhgpxhulw3ac.rcgu.o): in function remacs::crypto::_secure_hash':
/home/cbbrowne/GitStuff/remacs/rust_src/src/crypto/mod.rs:373: undefined reference to extract_data_from_object' /usr/bin/ld: /home/cbbrowne/GitStuff/remacs/rust_src/src/crypto/mod.rs:376: undefined reference to make_string'
/usr/bin/ld: /home/cbbrowne/GitStuff/remacs/rust_src/src/crypto/mod.rs:401: undefined reference to make_uninit_string' /usr/bin/ld: .././rust_src/target/debug/libremacs.a(remacs-f8aa2273ee52276d.2oz1lhgpxhulw3ac.rcgu.o): in function remacs::crypto::buffer_hash':
/home/cbbrowne/GitStuff/remacs/rust_src/src/crypto/mod.rs:502: undefined reference to make_uninit_string' /usr/bin/ld: .././rust_src/target/debug/libremacs.a(remacs-f8aa2273ee52276d.2s66ktsaf5qo96rv.rcgu.o): in function remacs::minibuf::minibufferp':
/home/cbbrowne/GitStuff/remacs/rust_src/src/minibuf.rs:(.text._ZN6remacs7minibuf11minibufferp17hf083d0dc0e03bdbbE+0xcb): undefined reference to Vminibuffer_list' /usr/bin/ld: .././rust_src/target/debug/libremacs.a(remacs-f8aa2273ee52276d.2s66ktsaf5qo96rv.rcgu.o): in function remacs::minibuf::active_minibuffer_window':
/home/cbbrowne/GitStuff/remacs/rust_src/src/minibuf.rs:30: undefined reference to minibuf_level' /usr/bin/ld: /home/cbbrowne/GitStuff/remacs/rust_src/src/minibuf.rs:(.text._ZN6remacs7minibuf24active_minibuffer_window17h65e9a6f6bee6a8b2E+0x2a): undefined reference to minibuf_window'
/usr/bin/ld: .././rust_src/target/debug/libremacs.a(remacs-f8aa2273ee52276d.2s66ktsaf5qo96rv.rcgu.o): in function remacs::minibuf::set_minibuffer_window': /home/cbbrowne/GitStuff/remacs/rust_src/src/minibuf.rs:(.text._ZN6remacs7minibuf21set_minibuffer_window17hc87f388f8a056037E+0x37): undefined reference to minibuf_window'
/usr/bin/ld: .././rust_src/target/debug/libremacs.a(remacs-f8aa2273ee52276d.2s66ktsaf5qo96rv.rcgu.o): in function remacs::minibuf::minibuffer_depth': /home/cbbrowne/GitStuff/remacs/rust_src/src/minibuf.rs:57: undefined reference to minibuf_level'
/usr/bin/ld: .././rust_src/target/debug/libremacs.a(remacs-f8aa2273ee52276d.2s66ktsaf5qo96rv.rcgu.o): in function remacs::minibuf::minibuffer_prompt': /home/cbbrowne/GitStuff/remacs/rust_src/src/minibuf.rs:65: undefined reference to Fcopy_sequence'
/usr/bin/ld: .././rust_src/target/debug/libremacs.a(remacs-f8aa2273ee52276d.36mw6hewk31ce7k1.rcgu.o): in function remacs::chartable::<impl remacs::lisp::ExternalPtr<remacs::remacs_sys::Lisp_Char_Table>>::get::{{closure}}': /home/cbbrowne/GitStuff/remacs/rust_src/src/chartable.rs:84: undefined reference to make_string'
/usr/bin/ld: .././rust_src/target/debug/libremacs.a(remacs-f8aa2273ee52276d.3epecmtd0umddjpe.rcgu.o): in function remacs::decompress::zlib_decompress_region': /home/cbbrowne/GitStuff/remacs/rust_src/src/decompress.rs:45: undefined reference to make_string'
/usr/bin/ld: /home/cbbrowne/GitStuff/remacs/rust_src/src/decompress.rs:56: undefined reference to move_gap_both' /usr/bin/ld: /home/cbbrowne/GitStuff/remacs/rust_src/src/decompress.rs:60: undefined reference to buf_charpos_to_bytepos'
/usr/bin/ld: /home/cbbrowne/GitStuff/remacs/rust_src/src/decompress.rs:83: undefined reference to make_gap' /usr/bin/ld: /home/cbbrowne/GitStuff/remacs/rust_src/src/decompress.rs:97: undefined reference to del_range'
/usr/bin/ld: /home/cbbrowne/GitStuff/remacs/rust_src/src/decompress.rs:106: undefined reference to insert_from_gap' /usr/bin/ld: /home/cbbrowne/GitStuff/remacs/rust_src/src/decompress.rs:111: undefined reference to maybe_quit'
/usr/bin/ld: /home/cbbrowne/GitStuff/remacs/rust_src/src/decompress.rs:118: undefined reference to del_range' /usr/bin/ld: /home/cbbrowne/GitStuff/remacs/rust_src/src/decompress.rs:125: undefined reference to buf_charpos_to_bytepos'
/usr/bin/ld: .././rust_src/target/debug/libremacs.a(remacs-f8aa2273ee52276d.3x33h1ajugv5boo4.rcgu.o): in function remacs::editfns::region_limit::{{closure}}': /home/cbbrowne/GitStuff/remacs/rust_src/src/editfns.rs:116: undefined reference to make_string'
/usr/bin/ld: .././rust_src/target/debug/libremacs.a(remacs-f8aa2273ee52276d.582qonl6ddfrp3mi.rcgu.o): in function remacs::syntax::set_syntax_table': /home/cbbrowne/GitStuff/remacs/rust_src/src/syntax.rs:(.text._ZN6remacs6syntax16set_syntax_table17hb09b4e9d9d3ddf4aE+0x57): undefined reference to buffer_local_flags'

I'm hoping that this moves things forwards soon; my last successful remacs build was back in June, and I certainly have been assortedly getting bitten by changes to the rust toolchain obsolescing some code within remacs. I tried forcing a build using the 2018-03-03 nightly rust, and that's breaking somewhat similarly, with some different missing objects upon trying to build temacs.

@shaleh
Copy link
Collaborator

shaleh commented Sep 10, 2018

Use the version in rust-toolchain it actually does work. Really.

@cjohansson
Copy link
Contributor

I was able to build this on my macOS 10.13.6 system

@harryfei
Copy link
Member Author

@cbbrowne It's so odd, I don't have any idea about that.

Could you try to build on both the master and this branch cleanly? The results may be helpful to find the root cause.

Besides, don't override the toolchain using rustup. The make task will install the right toolchain before it starts building.

@harryfei
Copy link
Member Author

@shaleh

Use the version in rust-toolchain it actually does work. Really.

Do you mean you can build on OSX now?

@shaleh
Copy link
Collaborator

shaleh commented Sep 11, 2018

@harryfei no, I meant they should not be trying to use any version of Rust that is not in the checked in rust_toolchain file.

@shaleh
Copy link
Collaborator

shaleh commented Sep 11, 2018

OSX does build now. But the test segfaults. So the alloc change is either incomplete or incorrect.

@harryfei
Copy link
Member Author

harryfei commented Sep 11, 2018

@shaleh If you find the root cause, you can update this PR as you wish.

FWIW, the Travis CI shows that the tests can be run normally (except for one failed test).

@harryfei
Copy link
Member Author

harryfei commented Sep 17, 2018

@shaleh

@sbillig has fixed the macOS make check segfaults. I have merged his commits already.
See harryfei#1

@sbillig
Copy link

sbillig commented Sep 17, 2018

I'll admit that I'm not entirely sure yet why rand::thread_rng causes a seg fault. I'm hoping that the portable dumper lands on the emacs master branch "soon", so the unexec stuff can go away, which should clear this up for good.

https://www.reddit.com/r/emacs/comments/95vwej/pdumper_status/e3xkvt3/

@shaleh
Copy link
Collaborator

shaleh commented Sep 17, 2018

OSX still failing?

@sbillig
Copy link

sbillig commented Sep 17, 2018

@shaleh Are you saying that it's still failing for you? If so, could you describe where it's failing and post relevant log messages, etc here?

@sbillig
Copy link

sbillig commented Sep 17, 2018

Oh, I see that the travis mac build is failing. The results are the same as on the master branch ("FAILED 1/7 epg-decrypt-1"). Seems like a travis environment issue; incompatible gpg version, perhaps. Definitely not introduced by this PR, anyway.

@brotzeit
Copy link
Member

brotzeit commented Sep 18, 2018

@Wilfred @shaleh @db48x Merge ?

@shaleh shaleh merged commit 51884cd into remacs:master Sep 18, 2018
@shaleh
Copy link
Collaborator

shaleh commented Sep 18, 2018

We need a ticket to track the gpg issue.

@shaleh
Copy link
Collaborator

shaleh commented Sep 18, 2018

@harryfei thanks for helping carry this.

@sbillig
Copy link

sbillig commented Sep 18, 2018

Added a ticket for the gpg failure: #858

@harryfei harryfei deleted the toolchain branch September 19, 2018 00:28
@Wilfred
Copy link
Collaborator

Wilfred commented Sep 19, 2018

@harryfei Awesome, thank you!

@Wilfred
Copy link
Collaborator

Wilfred commented Sep 23, 2018

@harryfei I've also made you a collaborator, so you can review/merge PRs if you wish! :)

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.

9 participants