Homebrew / legacy-homebrew

💀 The former home of Homebrew/homebrew (deprecated)
https://brew.sh
26.96k stars 11.34k forks source link

Failed to install luarocks formula #10595

Closed datanoise closed 12 years ago

adamv commented 12 years ago

Please (A) put this in a gist instead of inline and (B) include the OS information at the end of the failed install command.

datanoise commented 12 years ago

Here is the gist with all the information: https://gist.github.com/1944640

dom-verity commented 12 years ago

I've experienced the same problem, details at https://gist.github.com/1945486

All the best.

mxcl commented 12 years ago

Edit the formula (brew edit luarocks) and try moving the ENV.j1 above the make line. I bet j2 would work, but we don't have a function for that at this time.

I bet it because my luarocks compiled fine and I only have two cores. However I could be wrong about the cause of the bug.

People who write Makefiles that don't work with multiple jobs are my nemesis.

datanoise commented 12 years ago

Nope, it still fails: https://gist.github.com/1953678

mxcl commented 12 years ago

Don't have a clue then sorry. WORKSFORME.

The error is not a build error, some temporary file is not created. Hard to diagnose.

adamv commented 12 years ago

Pushed 2.0.8 in f4e6cc4f32437cf33e009141b2834017eec7191c - does this still happen?

eagleflo commented 12 years ago

Yes: https://gist.github.com/1987045

mxcl commented 12 years ago

brew doctor would help.

adamv commented 12 years ago

Please report this upstream as well.

eagleflo commented 12 years ago

For what it's worth, could not repro on my MacBook Air (failed on MacBook Pro). Looks like a dualcore vs quadcore issue. brew doctor is clean on both.

adamv commented 12 years ago

Probably just need to move ENV.j1 above system make then.

mxcl commented 12 years ago

Apparently moving the ENV.j1 was already tested by @datanoise. But that was my suspicion as well.

adamv commented 12 years ago

I fail reading comprehension.

But more seriously, please report this issue upstream with LuaRocks.

mxcl commented 12 years ago

If someone else with four cores could test the j1 attempted fix, would be good to be sure.

I need a better computer.

adamv commented 12 years ago

I was going to get a new Mac Pro but then noticed that they haven't been updated in a while, and what with Mountain Lion coming out, I wouldn't get it until then anyway.

datanoise commented 12 years ago

Hm. Strange but I was able to install 2.0.8 with no problems.

dom-verity commented 12 years ago

I'm running running a Macbook Pro with 4 cores and 2.0.8 now seems to install for me.

eagleflo commented 12 years ago

I have no idea what changed, but now it compiles just fine. Intermittent failure? I had to double check my gist to see that I wasn't dreaming it up yesterday.

lboulard commented 12 years ago

Moving ENV.j1 before system commands works on my MacPro with 4 cores:

ENV.j1 # 2.0.4.1 worked in parallel but 2.0.7.1 does not
system "./configure", *args
system "make"
system "make install"
mxcl commented 12 years ago

@adamv I'm going to add ENV.j2 and fix this with that. You think this is okay?

adamv commented 12 years ago

I don't trust "more than 1 but less than all" fixes; feels like 2 jobs just works "magically" if 4 fails. If you want to do it that way, go for it; I'll try to complain on their upstream mailing list either way.

jacknagel commented 12 years ago

Dunno if it's worth another ENV method to fix what is usually just a matter of adding a missing dependency to a make target.

jacknagel commented 12 years ago

Looks to me like cleanup_bins should be declaring a dep on build_bins, otherwise there is race and I can trigger it intermittently with make -j4 on my two-core machine.

mxcl commented 12 years ago

Yes, agreed. It's not safe.

mxcl commented 12 years ago

If we can fix the makefile then we rock. I'll report it upstream if the project is on GitHub, otherwise I can't be arsed.

jacknagel commented 12 years ago

https://github.com/keplerproject/luarocks

adamv commented 12 years ago

https://github.com/keplerproject/luarocks/commit/0431ed91571e4b7986a1178df48232abff7c0916

adamv commented 12 years ago

Parallel builds re-enabled with upstream patch - 252cf63d7f95232e6b661491d476997498f77519 - can remove in next version.