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

ld.exe: unrecognized option '-zignore' when ld.exe: unrecognized option '-zignore' #84467

Closed
iladin opened this issue Apr 23, 2021 · 3 comments
Closed
Labels
A-linkage Area: linking into static, shared libraries and binaries C-bug Category: This is a bug. O-solaris Operating system: Solaris T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Comments

@iladin
Copy link
Contributor

iladin commented Apr 23, 2021

Trying to cross-compile for sparcv9-sun-solaris getting a error message for -zignore

I believe this was introduced when -z -ignore was seperated here
22d0ab0

Here is the documentation to Solaris ld that references the -z ignore

Reproduce

rustup target add sparcv9-sun-solaris
cargo new --bin hello && cd hello && cargo run --target=sparcv9-sun-solaris

config.toml
[target.sparcv9-sun-solaris]
linker = "gcc"

Error log

C:\git\hello>cargo run --target=sparcv9-sun-solaris
   Compiling hello v0.1.0 (C:\git\hello)
error: linking with `gcc` failed: exit code: 1
  |
  = note: "gcc" "-m64" "-L" "C:\\Users\\brief\\.rustup\\toolchains\\stable-x86_64-pc-windows-msvc\\lib\\rustlib\\sparcv9-sun-solaris\\lib" "C:\\git\\hello\\target\\sparcv9-sun-solaris\\debug\\deps\\hello-5a8c9dc823b47100.16tanzbuse5clmtl.rcgu.o" "C:\\git\\hello\\target\\sparcv9-sun-solaris\\debug\\deps\\hello-5a8c9dc823b47100.213ariqv7amnemx1.rcgu.o" "C:\\git\\hello\\target\\sparcv9-sun-solaris\\debug\\deps\\hello-5a8c9dc823b47100.2gx8yv0j0sk9qren.rcgu.o" "C:\\git\\hello\\target\\sparcv9-sun-solaris\\debug\\deps\\hello-5a8c9dc823b47100.3arptv49ej9zmj7t.rcgu.o" "C:\\git\\hello\\target\\sparcv9-sun-solaris\\debug\\deps\\hello-5a8c9dc823b47100.3br1bpaovzl5ifag.rcgu.o" "C:\\git\\hello\\target\\sparcv9-sun-solaris\\debug\\deps\\hello-5a8c9dc823b47100.3j4sjvxpf4kzlk20.rcgu.o" "C:\\git\\hello\\target\\sparcv9-sun-solaris\\debug\\deps\\hello-5a8c9dc823b47100.3raza3336vmbyk5a.rcgu.o" "C:\\git\\hello\\target\\sparcv9-sun-solaris\\debug\\deps\\hello-5a8c9dc823b47100.54a5fojyldkdi94l.rcgu.o" "-o" "C:\\git\\hello\\target\\sparcv9-sun-solaris\\debug\\deps\\hello-5a8c9dc823b47100" "C:\\git\\hello\\target\\sparcv9-sun-solaris\\debug\\deps\\hello-5a8c9dc823b47100.4t2cg6ozspc1xwt7.rcgu.o" "-Wl,-zignore" "-nodefaultlibs" "-L" "C:\\git\\hello\\target\\sparcv9-sun-solaris\\debug\\deps" "-L" "C:\\git\\hello\\target\\debug\\deps" "-L" "C:\\Users\\brief\\.rustup\\toolchains\\stable-x86_64-pc-windows-msvc\\lib\\rustlib\\sparcv9-sun-solaris\\lib" "-Wl,--start-group" "-Wl,-Bstatic" "C:\\Users\\brief\\.rustup\\toolchains\\stable-x86_64-pc-windows-msvc\\lib\\rustlib\\sparcv9-sun-solaris\\lib\\libstd-c241dc3a737d5e51.rlib" "C:\\Users\\brief\\.rustup\\toolchains\\stable-x86_64-pc-windows-msvc\\lib\\rustlib\\sparcv9-sun-solaris\\lib\\libpanic_unwind-9daf35af2073faa7.rlib" "C:\\Users\\brief\\.rustup\\toolchains\\stable-x86_64-pc-windows-msvc\\lib\\rustlib\\sparcv9-sun-solaris\\lib\\libminiz_oxide-36601c43420211d7.rlib" "C:\\Users\\brief\\.rustup\\toolchains\\stable-x86_64-pc-windows-msvc\\lib\\rustlib\\sparcv9-sun-solaris\\lib\\libadler-855241155c1f03da.rlib" "C:\\Users\\brief\\.rustup\\toolchains\\stable-x86_64-pc-windows-msvc\\lib\\rustlib\\sparcv9-sun-solaris\\lib\\libobject-d7c656c4ec5c8357.rlib" "C:\\Users\\brief\\.rustup\\toolchains\\stable-x86_64-pc-windows-msvc\\lib\\rustlib\\sparcv9-sun-solaris\\lib\\libaddr2line-b77a478db5572f82.rlib" "C:\\Users\\brief\\.rustup\\toolchains\\stable-x86_64-pc-windows-msvc\\lib\\rustlib\\sparcv9-sun-solaris\\lib\\libgimli-860eaed4446805b5.rlib" "C:\\Users\\brief\\.rustup\\toolchains\\stable-x86_64-pc-windows-msvc\\lib\\rustlib\\sparcv9-sun-solaris\\lib\\librustc_demangle-7769662dcf2099a5.rlib" "C:\\Users\\brief\\.rustup\\toolchains\\stable-x86_64-pc-windows-msvc\\lib\\rustlib\\sparcv9-sun-solaris\\lib\\libhashbrown-bfe1ecd1473e2ace.rlib" "C:\\Users\\brief\\.rustup\\toolchains\\stable-x86_64-pc-windows-msvc\\lib\\rustlib\\sparcv9-sun-solaris\\lib\\librustc_std_workspace_alloc-2ed53cd2b117a62e.rlib" "C:\\Users\\brief\\.rustup\\toolchains\\stable-x86_64-pc-windows-msvc\\lib\\rustlib\\sparcv9-sun-solaris\\lib\\libunwind-28f09d6b3078d53f.rlib" "C:\\Users\\brief\\.rustup\\toolchains\\stable-x86_64-pc-windows-msvc\\lib\\rustlib\\sparcv9-sun-solaris\\lib\\libcfg_if-52f1f3ea28f62fca.rlib" "C:\\Users\\brief\\.rustup\\toolchains\\stable-x86_64-pc-windows-msvc\\lib\\rustlib\\sparcv9-sun-solaris\\lib\\liblibc-3c5e8c862bafe903.rlib" "C:\\Users\\brief\\.rustup\\toolchains\\stable-x86_64-pc-windows-msvc\\lib\\rustlib\\sparcv9-sun-solaris\\lib\\liballoc-3dfa7899a026edd0.rlib" "C:\\Users\\brief\\.rustup\\toolchains\\stable-x86_64-pc-windows-msvc\\lib\\rustlib\\sparcv9-sun-solaris\\lib\\librustc_std_workspace_core-59a3391d32496e20.rlib" "C:\\Users\\brief\\.rustup\\toolchains\\stable-x86_64-pc-windows-msvc\\lib\\rustlib\\sparcv9-sun-solaris\\lib\\libcore-1840907aed784f3c.rlib" "-Wl,--end-group" "C:\\Users\\brief\\.rustup\\toolchains\\stable-x86_64-pc-windows-msvc\\lib\\rustlib\\sparcv9-sun-solaris\\lib\\libcompiler_builtins-9bd78a46c8a684d7.rlib" "-Wl,-Bdynamic" "-lsocket" "-lposix4" "-lpthread" "-lresolv" "-lgcc_s" "-lc" "-lm" "-lrt" "-lpthread"
  = note: C:\GnuCobol3.1\bin/ld.exe: unrecognized option '-zignore'
          C:\GnuCobol3.1\bin/ld.exe: use the --help option for usage information
          collect2.exe: error: ld returned 1 exit status

Let me know if you have any further questions and thank you for your time reading through this.

@jonas-schievink jonas-schievink added A-linkage Area: linking into static, shared libraries and binaries C-bug Category: This is a bug. O-solaris Operating system: Solaris T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Apr 23, 2021
@bjorn3
Copy link
Member

bjorn3 commented Jul 13, 2023

It looks like the gcc you are using as linker driver invoked the linker from GnuCobol. Are you sure the GnuCobol linker for Windows supports Solaris in the first place?

@iladin
Copy link
Contributor Author

iladin commented Jul 14, 2023

It looks like the gcc you are using as linker driver invoked the linker from GnuCobol. Are you sure the GnuCobol linker for Windows supports Solaris in the first place?

Sure does!

This was actually resolved #84468 and I didn't close this issue, I will do so now.

Thank you so much for taking the time to reply and for cranelift!

@iladin iladin closed this as completed Jul 14, 2023
@bjorn3
Copy link
Member

bjorn3 commented Jul 14, 2023

Sure does!

This was actually resolved #84468 and I didn't close this issue, I will do so now.

I see. In any case I'm glad it is working now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-linkage Area: linking into static, shared libraries and binaries C-bug Category: This is a bug. O-solaris Operating system: Solaris T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

No branches or pull requests

3 participants