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

Compile failure: No rule to make hadd.cxx #119

Open
goatface opened this issue May 1, 2017 · 5 comments
Open

Compile failure: No rule to make hadd.cxx #119

goatface opened this issue May 1, 2017 · 5 comments

Comments

@goatface
Copy link

goatface commented May 1, 2017

Attempting to compile the latest release, on two separate machines with rather different setups, after make works for awhile eventually it crashes:

Compiling grutinizer.o [OK]
Compiling grutinizer [OK]
make: *** No rule to make target /usr/main/src/hadd.cxx', needed by .build/util/gadd.o'. Stop.

@Lunderberg
Copy link
Collaborator

Lunderberg commented May 1, 2017

We currently have some issues when the version of root being used is not installed from source. Would you download and install the latest version of the source distribution and try again?

@goatface
Copy link
Author

goatface commented May 2, 2017

Thanks for the response.

My laptop's install is already from source (I run Gentoo) though not simple to update since the install is a bit old. As for my desktop I don't have su access as it's owned by the university. While it manages to have a fairly recent install of ROOT (6.06/.08) it doesn't have a very good build chain (CMake v. 2.8.11 >_< ) which has often caused me trouble in the past. I once told the admins I needed glibc-devel and they asked me what it was...

However your comment has given me the necessary spark to resolve the issue on my laptop it seems. I simply downloaded an exact copy of the source code for my version of ROOT and make a symlink in /usr (which I'm going to delete right now that compile was successful)

daid@titanium ~/downloads/ % tar xvzf root_v5.34.18.source.tar.gz

daid@titanium /usr % sudo ln -s /home/daid/downloads/root/main ./main

Then magic happens. This solution won't work for my desktop since I don't have su permission, though I could see about changing the location GRUTinizer hopes some of the ROOT source code might be.

@placebosarah
Copy link

placebosarah commented May 9, 2017

Hi- this looks very similar to the issue #118 which I solved by copying hadd.cxx into: /GRUTinizer/GRUTinizer/util

and editing line 102 in the makefile as follows:

#.build/util/gadd.o: $(ROOTSYS)/main/src/hadd.cxx #edited
.build/util/gadd.o: /_your-path-to-location_/GRUTinizer/GRUTinizer/util/hadd.cxx
	@mkdir -p $(dir $@)
	$(call run_and_test, sed s/hadd/gadd/g < $< | $(CPP) -x c++ -fPIC -c -o $@ $(CFLAGS) -,$@,$(COM_COLOR),$(COM_STRING),$(OBJ_COLOR) )

This works without su permissions.

@goatface
Copy link
Author

I had tried doing a similar thing (get root source code, point makefile at downloaded location) and it failed last week. This week it worked, so it must have been user error. Thanks for the sanity check confirming such an approach does work, so that I tried it again.

Now I could also get it to compile and run more or less successfully on my desktop PC, and moreover it can output HISTOGRAMS!

@rileyle
Copy link
Contributor

rileyle commented Jun 28, 2018

On my system (Ubuntu), the value of $ROOTSYS that is set by my thisroot.sh script is such that I needed to modify the gadd.o rule in the makefile as follows:

.build/util/gadd.o: $(ROOTSYS)/root/main/src/hadd.cxx
        @mkdir -p $(dir $@)
        $(call run_and_test,sed s/hadd/gadd/g < $< | $(CXX) -x c++ -fPIC -c -o $@ $(CFLAGS) -,$@,$(COM_COLOR),$(COM_STRING),$(OBJ_COLOR) )

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