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

"make" on OSX fails #11862

Closed
rstout opened this issue Jan 28, 2014 · 12 comments
Closed

"make" on OSX fails #11862

rstout opened this issue Jan 28, 2014 · 12 comments

Comments

@rstout
Copy link

rstout commented Jan 28, 2014

OSX 10.9.1

Commands I ran leading up to the issue:

$> git clone https://github.com/mozilla/rust.git 
$> cd rust
$> ./configure
$> make install

"make install" outputs the following error message:

make[2]: *** No rule to make target `/home/rust/src/llvm/home/rust/x86_64-apple-darwin/llvm/Makefile', needed by `Makefile'.  Stop.
make[1]: *** [clean-llvmx86_64-apple-darwin] Error 2
make: *** [/home/rust/x86_64-apple-darwin/llvm/llvm-auto-clean-stamp] Error 2

The issue is that the path "home/rust/x86_64-apple-darwin/llvm/Makefile" has been appended to the path "/home/rust/src/llvm", and I imagine that the path should just be "home/rust/x86_64-apple-darwin/llvm/Makefile". Looking at the output of "make --print-data-base", I found:

# makefile (from `Makefile.config', line 55)
PROJ_SRC_DIR := /home/rust/src/llvm/home/rust/x86_64-apple-darwin/llvm

There are other variables that are assigned the same broken path that PROJ_SRC_DIR is, but after my preliminary debugging I think PROJ_SRC_DIR might be the culprit. On line 55 of rust/x86_64-apple-darwin/llvm/Makefile.config:

PROJ_SRC_DIR := $(LLVM_SRC_ROOT)$(patsubst $(PROJ_OBJ_ROOT)%,%,$(PROJ_OBJ_DIR))

I've only ever written the most trivial of Makefiles, so I don't really know how to continue here.

@alexcrichton
Copy link
Member

Do you have the full log of a session? I just tried to reproduce this but was unable to.

@rstout
Copy link
Author

rstout commented Jan 28, 2014

Here's the output of "make":

https://github.com/rstout/misc/blob/master/make_output.txt

and the output of "make --print-data-base":

https://raw2.github.com/rstout/misc/master/make_print_data_base.txt

@alexcrichton
Copy link
Member

Do you have some symlinks in your path? It looks like it's using realpath in a few places and llvm's makefiles might be getting confused.

@rstout
Copy link
Author

rstout commented Jan 28, 2014

The issue still occurs after getting rid of all the "alias" declarations in my .bash_profile

@alexcrichton
Copy link
Member

Oh sorry, by path I mean the path to the rust source code.

@rstout
Copy link
Author

rstout commented Jan 28, 2014

No, there aren't any symlinks in my path (I used ls -l to determine this)

@rstout
Copy link
Author

rstout commented Feb 4, 2014

This issue has gone away when building from master today (2/4/14)

@rstout rstout closed this as completed Feb 4, 2014
@mindon
Copy link

mindon commented Apr 16, 2015

got same issue ... today

@richo
Copy link
Contributor

richo commented Apr 16, 2015

It seems very unlikely this is the same root cause, so can you open a new issue with the full build log?

@mindon
Copy link

mindon commented Apr 28, 2015

llvm[2]: Constructing LLVMBuild project information.
make[2]: * No rule to make target '/Users/lab/rust/src/llvm**/Users/lab/rust/x86_64-apple-darwin/llvm/Makefile', needed by 'Makefile'. Stop.

the Makefile path is repeating something...

@richo
Copy link
Contributor

richo commented Apr 28, 2015

I still somewhat doubt that this is the same issue.

Could you post a full build log in a new issue?

@mindon
Copy link

mindon commented Apr 28, 2015

new issue #24887

bors added a commit to rust-lang-ci/rust that referenced this issue Dec 1, 2023
…t-loop-over-range, r=llogiq

suggest alternatives to iterate an array of ranges

works towards rust-lang#7125
changelog: [`single_element_loop`]: suggest better syntax when iterating over an array of a single range

`@thinkerdreamer` and myself worked on this issue during a workshop by `@llogiq` at the RustLab 2023 conference. It is our first contribution to clippy.

When iterating over an array of only one element, _which is a range_, our change suggests to replace the array with the contained range itself. Additionally, a hint is printed stating that the user probably intended to iterate over the range and not the array. If the single element in the array is not a range, the previous suggestion in the form of `let {pat_snip} = {prefix}{arg_snip};{block_str}`is used.

This change lints the array with the single range directly, so any prefixes or suffixes are covered as well.
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

4 participants