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

Cross compiling with --enable-ccache does not work #13562

Closed
alexcrichton opened this issue Apr 16, 2014 · 0 comments · Fixed by #13631
Closed

Cross compiling with --enable-ccache does not work #13562

alexcrichton opened this issue Apr 16, 2014 · 0 comments · Fixed by #13631

Comments

@alexcrichton
Copy link
Member

If you enable ccache when doing a cross compile, you get this error:

$ make VERBOSE=1    
cfg: build triple x86_64-unknown-linux-gnu
cfg: host triples i686-unknown-linux-gnu x86_64-unknown-linux-gnu
cfg: target triples i686-unknown-linux-gnu x86_64-unknown-linux-gnu
cfg: non-build host triples i686-unknown-linux-gnu
cfg: non-build target triples i686-unknown-linux-gnu
cfg: enabling more debugging (CFG_ENABLE_DEBUG)
cfg: host for i686-unknown-linux-gnu is i386
cfg: host for x86_64-unknown-linux-gnu is x86_64
cfg: os for i686-unknown-linux-gnu is unknown-linux-gnu
cfg: os for x86_64-unknown-linux-gnu is unknown-linux-gnu
cfg: using ccache gcc
cfg: enabling valgrind (CFG_ENABLE_VALGRIND)
cfg: no pdflatex found, deferring to xelatex
cfg: no xelatex found, deferring to lualatex
cfg: no lualatex found, disabling LaTeX docs
cfg: no pandoc found, omitting PDF and EPUB docs
cfg: no llnextgen found, omitting grammar-verification
MATCHES=""; if [ -n "$MATCHES" ] ; then echo "warning: removing previous" \'liblibc-*.so\' "libraries:" $MATCHES; rm $MATCHES ; fi
MATCHES=""; if [ -n "$MATCHES" ] ; then echo "warning: removing previous" \'liblibc-*.rlib\' "libraries:" $MATCHES; rm $MATCHES ; fi
LD_LIBRARY_PATH="$LD_LIBRARY_PATH:/home/alex/code/rust4/x86_64-unknown-linux-gnu/stage1/lib"   x86_64-unknown-linux-gnu/stage1/bin/rustc --cfg stage1  -O --cfg rtopt --cfg debug -C prefer-dynamic --target=i686-unknown-linux-gnu -C linker=ccache g++ -C ar=ar   -D warnings -L "i686-unknown-linux-gnu/rt" -L "/home/alex/code/rust4/i686-unknown-linux-gnu/llvm/Release+Asserts/lib" -L "/usr/lib/gcc/x86_64-linux-gnu/4.8/" --out-dir x86_64-unknown-linux-gnu/stage1/lib/rustlib/i686-unknown-linux-gnu/lib /home/alex/code/rust4/src/liblibc/lib.rs
error: multiple input filenames provided

The reason for this is that the command line has -C linker=ccache g++ and rustc then interprets g++ as an input file. Note that quoting also doesn't solve the problem because "ccache g++" is not a binary on the system.

alexcrichton added a commit to alexcrichton/rust that referenced this issue Apr 19, 2014
Instead of passing through CC which may have things like ccache and other
arguments (when using clang) this commit filters out the necessary arguments
from CC to pass the right linker to rustc.

Closes rust-lang#13562
bors added a commit that referenced this issue Apr 21, 2014
Instead of passing through CC which may have things like ccache and other
arguments (when using clang) this commit filters out the necessary arguments
from CC to pass the right linker to rustc.

Closes #13562
flip1995 pushed a commit to flip1995/rust that referenced this issue Nov 7, 2024
pulldown-cmark: don't pull getopts dep

Don't pull getopts, as it unused. Noticed in rust-lang#131892

changelog: none
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 a pull request may close this issue.

1 participant