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

i686-pc-windows-gnu is not supported #30

Closed
oli-obk opened this issue May 2, 2020 · 10 comments
Closed

i686-pc-windows-gnu is not supported #30

oli-obk opened this issue May 2, 2020 · 10 comments
Assignees

Comments

@oli-obk
Copy link
Contributor

oli-obk commented May 2, 2020

We need this in rustc.

The error is

undefined reference to `@rust_psm_stack_pointer@0'

I'm looking into this now

@oli-obk
Copy link
Contributor Author

oli-obk commented May 2, 2020

Hmm... @nagisa did you already fix this? I am unable to cross-build because of

undefined reference to `_Unwind_RaiseException'

but there's no error about rust_psm_stack_pointer

@mati865
Copy link
Contributor

mati865 commented May 2, 2020

Oh I see, #19 enabled only x86_64 tests because only x86_64 MinGW is preinstalled on the CI. I'll open PR to enable i686 today if nothing goes wrong.

@mati865
Copy link
Contributor

mati865 commented May 2, 2020

I am unable to cross-build because of

undefined reference to `_Unwind_RaiseException'

@oli-obk you need proper toolchain.
Ubuntu and most of distributions ship i686 with SLJL exceptions but Rust needs Dwarf-2. Fedora 32 ships good i686 toolchain and you can easily install it on Arch Linux using AUR.
On Windows basically every toolchain that use mingw-w64 will have Dwarf-2 exceptions.

@mati865
Copy link
Contributor

mati865 commented May 2, 2020

i686 tests pass locally for me but I'm afraid Rust is hitting stdcall issue: rust-lang/rust#50176
I'll build Rust with stacker and see if my WIP linking fix also works here.

@nagisa
Copy link
Member

nagisa commented May 2, 2020

Hey, thanks for working on this! I didn’t have an opportunity to attempt to reproduce this yet myself (building rustc on windows is a major nuisance).

In theory if there’s no other solution we can also just look into changing the ABI used to something else entirely, though it would require changing assembly here.

@nagisa
Copy link
Member

nagisa commented May 2, 2020

Another thing that could help is replacing all #[inline(always)] with #[inline(never)] in psm. See this.

@mati865
Copy link
Contributor

mati865 commented May 3, 2020

Stacker and psm pass tests locally but on the CI build just fails with gcc returning 1. No idea what is going on.

Another thing that could help is replacing all #[inline(always)] with #[inline(never)] in psm.

I'll try that next week but there must be some underlying issue since it works for x86_64:

$ nm /d/Projekty/rust/build/i686-pc-windows-gnu/stage1/lib/rustlib/i686-pc-windows-gnu/lib/librustc_driver-cc51f7a2a2df7bf8.dll.a | rg psm
00000000 I __imp___ZN56_$LT$psm..StackDirection$u20$as$u20$core..fmt..Debug$GT$3fmt17h40cf93c5e4141e4aE
00000000 T __ZN56_$LT$psm..StackDirection$u20$as$u20$core..fmt..Debug$GT$3fmt17h40cf93c5e4141e4aE

$ nm /d/Projekty/rust/build/x86_64-pc-windows-gnu/stage1/lib/rustlib/x86_64-pc-windows-gnu/lib/librustc_driver-b892dd94b06f2aab.dll.a | rg psm
0000000000000000 I __imp_rust_psm_stack_pointer
0000000000000000 T rust_psm_stack_pointer
0000000000000000 I __imp_rust_psm_stack_direction
0000000000000000 T rust_psm_stack_direction
0000000000000000 I __imp__ZN56_$LT$psm..StackDirection$u20$as$u20$core..fmt..Debug$GT$3fmt17h51b8a647b47bbeeaE
0000000000000000 T _ZN56_$LT$psm..StackDirection$u20$as$u20$core..fmt..Debug$GT$3fmt17h51b8a647b47bbeeaE
$ nm -A /d/Projekty/rust/build/i686-pc-windows-gnu/stage1/lib/rustlib/i686-pc-windows-gnu/lib/* | rg rust_psm_stack_pointer
D:/Projekty/rust/build/i686-pc-windows-gnu/stage1/lib/rustlib/i686-pc-windows-gnu/lib/libpsm-0c7efffd6230082c.rlib:x86_windows_gnu.o:00000010 T @rust_psm_stack_pointer@0
D:/Projekty/rust/build/i686-pc-windows-gnu/stage1/lib/rustlib/i686-pc-windows-gnu/lib/librustc_ast_lowering-19f5b54b0ba18dd0.rlib:rustc_ast_lowering-19f5b54b0ba18dd0.212o0uw5wkg49o6m.rcgu.o:         U @rust_psm_stack_pointer@0
D:/Projekty/rust/build/i686-pc-windows-gnu/stage1/lib/rustlib/i686-pc-windows-gnu/lib/librustc_codegen_llvm-909b4a7a05c924c7.rlib:rustc_codegen_llvm-909b4a7a05c924c7.amn0rqy8i77omn5.rcgu.o:         U @rust_psm_stack_pointer@0
D:/Projekty/rust/build/i686-pc-windows-gnu/stage1/lib/rustlib/i686-pc-windows-gnu/lib/librustc_codegen_ssa-5ffca8de078375f5.rlib:rustc_codegen_ssa-5ffca8de078375f5.sdonbfr9ccxo61c.rcgu.o:         U @rust_psm_stack_pointer@0
D:/Projekty/rust/build/i686-pc-windows-gnu/stage1/lib/rustlib/i686-pc-windows-gnu/lib/librustc_incremental-c2e52eab5eddd81a.rlib:rustc_incremental-c2e52eab5eddd81a.2ojllhm44mxwcy7i.rcgu.o:         U @rust_psm_stack_pointer@0
D:/Projekty/rust/build/i686-pc-windows-gnu/stage1/lib/rustlib/i686-pc-windows-gnu/lib/librustc_infer-f45a95b18d830e33.rlib:rustc_infer-f45a95b18d830e33.2wqka10j28jh1rdv.rcgu.o:         U @rust_psm_stack_pointer@0
D:/Projekty/rust/build/i686-pc-windows-gnu/stage1/lib/rustlib/i686-pc-windows-gnu/lib/librustc_interface-65140c7c042fb5fc.rlib:rustc_interface-65140c7c042fb5fc.1g269pe3f6qrjyqh.rcgu.o:         U @rust_psm_stack_pointer@0
D:/Projekty/rust/build/i686-pc-windows-gnu/stage1/lib/rustlib/i686-pc-windows-gnu/lib/librustc_lint-591f7ac6439d6414.rlib:rustc_lint-591f7ac6439d6414.1lr33f37jr2xsuc9.rcgu.o:         U @rust_psm_stack_pointer@0
D:/Projekty/rust/build/i686-pc-windows-gnu/stage1/lib/rustlib/i686-pc-windows-gnu/lib/librustc_metadata-34d463118ae5ccdc.rlib:rustc_metadata-34d463118ae5ccdc.3oe4a254tzj0dpd.rcgu.o:         U @rust_psm_stack_pointer@0
D:/Projekty/rust/build/i686-pc-windows-gnu/stage1/lib/rustlib/i686-pc-windows-gnu/lib/librustc_middle-e1bd75184e7aedc5.rlib:rustc_middle-e1bd75184e7aedc5.18ezdwbwspaevkul.rcgu.o:         U @rust_psm_stack_pointer@0
D:/Projekty/rust/build/i686-pc-windows-gnu/stage1/lib/rustlib/i686-pc-windows-gnu/lib/librustc_mir_build-5a5152430666a4c3.rlib:rustc_mir_build-5a5152430666a4c3.15mf8l0z3u939lnh.rcgu.o:         U @rust_psm_stack_pointer@0
D:/Projekty/rust/build/i686-pc-windows-gnu/stage1/lib/rustlib/i686-pc-windows-gnu/lib/librustc_mir-0ec311932875b8ab.rlib:rustc_mir-0ec311932875b8ab.2r54rrc339bv2t4y.rcgu.o:         U @rust_psm_stack_pointer@0
D:/Projekty/rust/build/i686-pc-windows-gnu/stage1/lib/rustlib/i686-pc-windows-gnu/lib/librustc_passes-dd7187836c930acd.rlib:rustc_passes-dd7187836c930acd.2cif3g7ouhdc0alw.rcgu.o:         U @rust_psm_stack_pointer@0
D:/Projekty/rust/build/i686-pc-windows-gnu/stage1/lib/rustlib/i686-pc-windows-gnu/lib/librustc_plugin_impl-99f0b8158a38845e.rlib:rustc_plugin_impl-99f0b8158a38845e.1fetkqalpysdzyxy.rcgu.o:         U @rust_psm_stack_pointer@0
D:/Projekty/rust/build/i686-pc-windows-gnu/stage1/lib/rustlib/i686-pc-windows-gnu/lib/librustc_privacy-b0ff442e176f023d.rlib:rustc_privacy-b0ff442e176f023d.1ez4rpwvamdcbu8q.rcgu.o:         U @rust_psm_stack_pointer@0
D:/Projekty/rust/build/i686-pc-windows-gnu/stage1/lib/rustlib/i686-pc-windows-gnu/lib/librustc_resolve-829799b301d142f1.rlib:rustc_resolve-829799b301d142f1.kngas43fsasuam7.rcgu.o:         U @rust_psm_stack_pointer@0
D:/Projekty/rust/build/i686-pc-windows-gnu/stage1/lib/rustlib/i686-pc-windows-gnu/lib/librustc_save_analysis-60b3fe2b666a609e.rlib:rustc_save_analysis-60b3fe2b666a609e.2m5ltogp9s794q5g.rcgu.o:         U @rust_psm_stack_pointer@0
D:/Projekty/rust/build/i686-pc-windows-gnu/stage1/lib/rustlib/i686-pc-windows-gnu/lib/librustc_symbol_mangling-f6e7b7ab9b0824f4.rlib:rustc_symbol_mangling-f6e7b7ab9b0824f4.5g7lw1nsjrg4wd3e.rcgu.o:         U @rust_psm_stack_pointer@0
D:/Projekty/rust/build/i686-pc-windows-gnu/stage1/lib/rustlib/i686-pc-windows-gnu/lib/librustc_trait_selection-098e4dccde72e155.rlib:rustc_trait_selection-098e4dccde72e155.76qwusuzn8ipnou.rcgu.o:         U @rust_psm_stack_pointer@0
D:/Projekty/rust/build/i686-pc-windows-gnu/stage1/lib/rustlib/i686-pc-windows-gnu/lib/librustc_traits-bb534d7e44a59739.rlib:rustc_traits-bb534d7e44a59739.orsuftne4lvqwll.rcgu.o:         U @rust_psm_stack_pointer@0
D:/Projekty/rust/build/i686-pc-windows-gnu/stage1/lib/rustlib/i686-pc-windows-gnu/lib/librustc_ty-3c41b1dd503ba28c.rlib:rustc_ty-3c41b1dd503ba28c.2vkspvcnd7mqcm1g.rcgu.o:         U @rust_psm_stack_pointer@0
D:/Projekty/rust/build/i686-pc-windows-gnu/stage1/lib/rustlib/i686-pc-windows-gnu/lib/librustc_typeck-5761635dfa22b88c.rlib:rustc_typeck-5761635dfa22b88c.3k304fp2yzyab1x2.rcgu.o:         U @rust_psm_stack_pointer@0
D:/Projekty/rust/build/i686-pc-windows-gnu/stage1/lib/rustlib/i686-pc-windows-gnu/lib/libstacker-1b6d820f7ceb6cd0.rlib:stacker-1b6d820f7ceb6cd0.stacker.3kcyix2c-cgu.4.rcgu.o:         U @rust_psm_stack_pointer@0
D:/Projekty/rust/build/i686-pc-windows-gnu/stage1/lib/rustlib/i686-pc-windows-gnu/lib/rustc_driver-cc51f7a2a2df7bf8.dll:65af2580 T @rust_psm_stack_pointer@0

$ nm -A /d/Projekty/rust/build/x86_64-pc-windows-gnu/stage1/lib/rustlib/x86_64-pc-windows-gnu/lib/* | rg rust_psm_stack_pointer
D:/Projekty/rust/build/x86_64-pc-windows-gnu/stage1/lib/rustlib/x86_64-pc-windows-gnu/lib/libpsm-5f57c686597be673.rlib:x86_64_windows_gnu.o:0000000000000010 T rust_psm_stack_pointer
D:/Projekty/rust/build/x86_64-pc-windows-gnu/stage1/lib/rustlib/x86_64-pc-windows-gnu/lib/librustc_ast_lowering-fe4f5846c8752e39.rlib:rustc_ast_lowering-fe4f5846c8752e39.561szf5zmed3ora9.rcgu.o:                 U rust_psm_stack_pointer
D:/Projekty/rust/build/x86_64-pc-windows-gnu/stage1/lib/rustlib/x86_64-pc-windows-gnu/lib/librustc_codegen_llvm-7ffceece05856d53.rlib:rustc_codegen_llvm-7ffceece05856d53.4ofzgr9ga419m6vf.rcgu.o:                 U rust_psm_stack_pointer
D:/Projekty/rust/build/x86_64-pc-windows-gnu/stage1/lib/rustlib/x86_64-pc-windows-gnu/lib/librustc_codegen_ssa-33f49771604d11dc.rlib:rustc_codegen_ssa-33f49771604d11dc.3ez9b9adzd16zfs2.rcgu.o:                 U rust_psm_stack_pointer
D:/Projekty/rust/build/x86_64-pc-windows-gnu/stage1/lib/rustlib/x86_64-pc-windows-gnu/lib/librustc_driver-b892dd94b06f2aab.dll.a:d012412.o:0000000000000000 I __imp_rust_psm_stack_pointer
D:/Projekty/rust/build/x86_64-pc-windows-gnu/stage1/lib/rustlib/x86_64-pc-windows-gnu/lib/librustc_driver-b892dd94b06f2aab.dll.a:d012412.o:0000000000000000 T rust_psm_stack_pointer
D:/Projekty/rust/build/x86_64-pc-windows-gnu/stage1/lib/rustlib/x86_64-pc-windows-gnu/lib/librustc_incremental-f901d0e5235d01f3.rlib:rustc_incremental-f901d0e5235d01f3.8stixxxxsxwyk6l.rcgu.o:                 U rust_psm_stack_pointer
D:/Projekty/rust/build/x86_64-pc-windows-gnu/stage1/lib/rustlib/x86_64-pc-windows-gnu/lib/librustc_infer-0a67475a2928c555.rlib:rustc_infer-0a67475a2928c555.3pn73jxrrievpjgz.rcgu.o:                 U rust_psm_stack_pointer
D:/Projekty/rust/build/x86_64-pc-windows-gnu/stage1/lib/rustlib/x86_64-pc-windows-gnu/lib/librustc_interface-3a0fee10ca32aa3e.rlib:rustc_interface-3a0fee10ca32aa3e.1hcnt3lji9kacy7c.rcgu.o:                 U rust_psm_stack_pointer
D:/Projekty/rust/build/x86_64-pc-windows-gnu/stage1/lib/rustlib/x86_64-pc-windows-gnu/lib/librustc_lint-bc0625fa618df8a0.rlib:rustc_lint-bc0625fa618df8a0.clyt8robqkaphao.rcgu.o:                 U rust_psm_stack_pointer
D:/Projekty/rust/build/x86_64-pc-windows-gnu/stage1/lib/rustlib/x86_64-pc-windows-gnu/lib/librustc_metadata-f93d24bd489a26c0.rlib:rustc_metadata-f93d24bd489a26c0.5cfm5nsp1x35a5by.rcgu.o:                 U rust_psm_stack_pointer
D:/Projekty/rust/build/x86_64-pc-windows-gnu/stage1/lib/rustlib/x86_64-pc-windows-gnu/lib/librustc_middle-6a66a8022ccc5361.rlib:rustc_middle-6a66a8022ccc5361.53gbdelcfhbkufmr.rcgu.o:                 U rust_psm_stack_pointer
D:/Projekty/rust/build/x86_64-pc-windows-gnu/stage1/lib/rustlib/x86_64-pc-windows-gnu/lib/librustc_mir_build-302e9af443d013e2.rlib:rustc_mir_build-302e9af443d013e2.4a8ecnwm6hp5z6bg.rcgu.o:                 U rust_psm_stack_pointer
D:/Projekty/rust/build/x86_64-pc-windows-gnu/stage1/lib/rustlib/x86_64-pc-windows-gnu/lib/librustc_mir-aeb1cde024706aa1.rlib:rustc_mir-aeb1cde024706aa1.4c8qjlm3s9ug9lu8.rcgu.o:                 U rust_psm_stack_pointer
D:/Projekty/rust/build/x86_64-pc-windows-gnu/stage1/lib/rustlib/x86_64-pc-windows-gnu/lib/librustc_passes-ea69bec1d60ebbfc.rlib:rustc_passes-ea69bec1d60ebbfc.4zu9imkg2fitpssq.rcgu.o:                 U rust_psm_stack_pointer
D:/Projekty/rust/build/x86_64-pc-windows-gnu/stage1/lib/rustlib/x86_64-pc-windows-gnu/lib/librustc_plugin_impl-c0314b4d4c7f6d22.rlib:rustc_plugin_impl-c0314b4d4c7f6d22.z822u30gtdvfy3v.rcgu.o:                 U rust_psm_stack_pointer
D:/Projekty/rust/build/x86_64-pc-windows-gnu/stage1/lib/rustlib/x86_64-pc-windows-gnu/lib/librustc_privacy-f96086dd660f55ca.rlib:rustc_privacy-f96086dd660f55ca.1ug06uadxym2elct.rcgu.o:                 U rust_psm_stack_pointer
D:/Projekty/rust/build/x86_64-pc-windows-gnu/stage1/lib/rustlib/x86_64-pc-windows-gnu/lib/librustc_resolve-9c8529e657dc2306.rlib:rustc_resolve-9c8529e657dc2306.1y7xxv83ts28qwmx.rcgu.o:                 U rust_psm_stack_pointer
D:/Projekty/rust/build/x86_64-pc-windows-gnu/stage1/lib/rustlib/x86_64-pc-windows-gnu/lib/librustc_save_analysis-e51c2b666738e519.rlib:rustc_save_analysis-e51c2b666738e519.45rw1am5cljzn6zx.rcgu.o:                 U rust_psm_stack_pointer
D:/Projekty/rust/build/x86_64-pc-windows-gnu/stage1/lib/rustlib/x86_64-pc-windows-gnu/lib/librustc_symbol_mangling-d1497802dc974b79.rlib:rustc_symbol_mangling-d1497802dc974b79.27ltazi12qk11qpm.rcgu.o:                 U rust_psm_stack_pointer
D:/Projekty/rust/build/x86_64-pc-windows-gnu/stage1/lib/rustlib/x86_64-pc-windows-gnu/lib/librustc_trait_selection-955f5261199f95fa.rlib:rustc_trait_selection-955f5261199f95fa.5bc6483t5q7e0he0.rcgu.o:                 U rust_psm_stack_pointer
D:/Projekty/rust/build/x86_64-pc-windows-gnu/stage1/lib/rustlib/x86_64-pc-windows-gnu/lib/librustc_traits-382b0bb4899d9611.rlib:rustc_traits-382b0bb4899d9611.7wfzqvgwx9ktz20.rcgu.o:                 U rust_psm_stack_pointer
D:/Projekty/rust/build/x86_64-pc-windows-gnu/stage1/lib/rustlib/x86_64-pc-windows-gnu/lib/librustc_ty-7f2a2dee0108ef85.rlib:rustc_ty-7f2a2dee0108ef85.2oh53kxndhrxrew4.rcgu.o:                 U rust_psm_stack_pointer
D:/Projekty/rust/build/x86_64-pc-windows-gnu/stage1/lib/rustlib/x86_64-pc-windows-gnu/lib/librustc_typeck-53b9556db66eb191.rlib:rustc_typeck-53b9556db66eb191.4yyry2axt5ld0s9x.rcgu.o:                 U rust_psm_stack_pointer
D:/Projekty/rust/build/x86_64-pc-windows-gnu/stage1/lib/rustlib/x86_64-pc-windows-gnu/lib/libstacker-a91010df389989d1.rlib:stacker-a91010df389989d1.stacker.3kqsn93b-cgu.2.rcgu.o:                 U rust_psm_stack_pointer
D:/Projekty/rust/build/x86_64-pc-windows-gnu/stage1/lib/rustlib/x86_64-pc-windows-gnu/lib/rustc_driver-b892dd94b06f2aab.dll:000000006a2446e0 T rust_psm_stack_pointer

@nagisa
Copy link
Member

nagisa commented May 6, 2020

Published psm 0.1.8 with the change.

Will try rebasing/landing the compiler change, if nobody gets to it before me before the weekend.

@mati865
Copy link
Contributor

mati865 commented May 6, 2020

I've pushed rebase yesterday to my fork. See the latest comment on the PR.

@nagisa
Copy link
Member

nagisa commented May 8, 2020

This can be closed, I think.

@nagisa nagisa closed this as completed May 8, 2020
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