Problem with "make install" with linuxx8664icc

Greetings all,

I am trying to install root on Ubuntu 11.04.

Because of a bug in gcc4.5 which is preventing compilation I am trying to use INTEL icc (using version that is part of the composerxe-2011.3.174 release).

The configure string I am using is

Configure runs fine, make runs fine but when I try to execute “sudo make install” I get the following error

[quote]bin/rmkdepend -R -fcint/cint/src/g__cfunc.d -Y -w 1000 – -fPIC -Iinclude -DR__HAVE_CONFIG -restrict -DG__REGEXP -DG__UNIX -DG__SHAREDLIB -DG__OSFDLL -DG__ROOT -DG__REDIRECTIO -DG__STD_EXCEPTION -DG__64BIT -DG__HAVE_CONFIG -DG__NOMAKEINFO -DG__CINTBODY -I/home/russell/Documents/Root_src/rootSVN39047/cint/cint/inc -I/home/russell/Documents/Root_src/rootSVN39047/cint/cint/src -I/home/russell/Documents/Root_src/rootSVN39047/cint/cint/src/dict -pthread -I. – /home/russell/Documents/Root_src/rootSVN39047/cint/cint/src/g__cfunc.c
icc -O -fPIC -Iinclude -DR__HAVE_CONFIG -restrict -DG__REGEXP -DG__UNIX -DG__SHAREDLIB -DG__OSFDLL -DG__ROOT -DG__REDIRECTIO -DG__STD_EXCEPTION -DG__64BIT -DG__HAVE_CONFIG -DG__NOMAKEINFO -DG__CINTBODY -I/home/russell/Documents/Root_src/rootSVN39047/cint/cint/inc -I/home/russell/Documents/Root_src/rootSVN39047/cint/cint/src -I/home/russell/Documents/Root_src/rootSVN39047/cint/cint/src/dict -pthread -I. -o cint/cint/src/g__cfunc.o -c /home/russell/Documents/Root_src/rootSVN39047/cint/cint/src/g__cfunc.c
make: icc: Command not found
make: *** [cint/cint/src/g__cfunc.o] Error 127[/quote]

I have set all of the appropriate paths using

Any suggestions as to what might be wrong? Your help will be greatly appreciated

Regards

Hi Rusell,

it looks like icc is not know in the sudo’ed environment. Try “sudo -E make install”.

Cheers, Fons.

Dear Fons,

Thanks for the reply.

I should have specified I was trying “sudo make install”, I have since tried “sudo -E make install” but the result is exactly the same.

Any further suggestions.

Regards

What happens with “sudo icc -v”? If that does not work, try to make it work by setting up icc also so that it works for su.

Cheers, Fons.

Dear Fons,

I get

How do I tell sudo to acknowledge “icc” and “ifort”?

Russell

Where do you source the compilevars.sh? I’ve it in my .bash_profile and I’ve no problem seeing icc when doing sudo.

Cheers, Fons.

Dear Fons,

I include the line “source /opt/intel/composerxe-2011.3.174/bin/compilervars.sh intel64” in my .bashrc file. This is the only situation I have encountered where it hasn’t worked as expected.

Russell

Dear Fons,

I still don’t know why it doesn’t work in straightforward fashion, but it does work if I do the following

sudo su source /opt/intel/composerxe-2011.3.174/bin/compilervars.sh intel64 make install exit

Good, you should be ok with this workaround. However, for “private use” I would not install ROOT using the --prefix method (so the install step is not needed), but just in ~/root (so it is also easier to have multiple versions).

Cheers, Fons.

Hi,
Is there a way around installing root with gcc-4.5 on ubuntu 11.04. As Russell mentioned, it crashes during make due to a bug in compiler.

Hardev.

Hi,

You could install your own version of gcc.

What is the file that fails to compile with gcc-4.5?

Philippe.

Hi,
This is the message I get after the compiler crash.

/home/install/root/proof/proof/src/TDataSetManager.cxx: In member function ‘virtual void TDataSetManager::MonitorUsedSpace(TVirtualMonitoringWriter*)’:
/home/install/root/proof/proof/src/TDataSetManager.cxx:708:1: internal compiler error: in redirect_jump, at jump.c:1443
Please submit a full bug report,
with preprocessed source if appropriate.
See <file:///usr/share/doc/gcc-4.5/README.Bugs> for instructions.
make: *** [proof/proof/src/TDataSetManager.o] Error 1

Thanks,
Hardev.

Hi,

I’ve provided a fix in the trunk and v5-28-00-patches trunk for this issue (you need to compile this file with -O instead of -O2).

Cheers, Fons.

Thanks, Fons. But I would appreciate any more details. I don’t even get where I should use option -O instead of - O2. Can you please elaborate.

Hardev.

Simple. Run “make”. When it breaks it you’ll see:

bin/rmkdepend -R -fproof/proof/src/TDataSetManager.d -Y -w 1000 – -m64 -pipe -Wshadow -W -Wall -Woverloaded-virtual -fsigned-char -fno-common -Iinclude -D_REENTRANT -pthread -D__cplusplus – /Volumes/proof/Users/rdm/root/proof/proof/src/TDataSetManager.cxx
g++ -O2 -m64 -pipe -Wshadow -W -Wall -Woverloaded-virtual -fsigned-char -fno-common -Iinclude -D_REENTRANT -pthread -o proof/proof/src/TDataSetManager.o -c /Volumes/proof/Users/rdm/root/proof/proof/src/TDataSetManager.cxx
/Volumes/proof/Users/rdm/root/proof/proof/src/TDataSetManager.cxx: In member function ‘virtual void TDataSetManager::MonitorUsedSpace(TVirtualMonitoringWriter*)’:
/Volumes/proof/Users/rdm/root/proof/proof/src/TDataSetManager.cxx:708:1: internal compiler error: in redirect_jump, at jump.c:1443
Please submit a full bug report,
with preprocessed source if appropriate.
See <file:///usr/share/doc/gcc-4.5/README.Bugs> for instructions.
make: *** [proof/proof/src/TDataSetManager.o] Error 1

Now cut and paste the compile statement:

g++ -O2 -m64 -pipe -Wshadow -W -Wall -Woverloaded-virtual -fsigned-char -fno-common -Iinclude -D_REENTRANT -pthread -o proof/proof/src/TDataSetManager.o -c /Volumes/proof/Users/rdm/root/proof/proof/src/TDataSetManager.cxx

and change the -O2 to -O and hit return. Continue the compilation by typing “make” again.

Cheers, Fons.

Dear Fons,

Thanks for posting the workaround for the gcc-4.5 compiler bug.

Since I am now running well with INTEL icc can you think of any compelling reason to recompile with gcc? Everything seems to be working under icc.

Does compiling root under gcc have any advantages over the icc version?

Regards

No advantage for gcc, the latest icc produces slightly faster executables. An alternative free compiler is clang. Get version 2.9 or the trunk, it compiles ROOT fine (much faster compilation than either g++ or icc) and binary performance is on par with the other two. To use with ROOT do:

./configure --with-clang
make

Cheers, Fons.

Thanks a lot. Its working!!!

Hardev.

Hi,

The workaround posted by Fons seems to not be working for me. This could very well be my fault because I am new to Linux.

Here is what I tried:

blatm@Bob:~/Documents/root$ make
bin/rmkdepend -R -fproof/proof/src/TDataSetManagerFile.d -Y -w 1000 -- -pipe -m64 -Wshadow -Wall -W -Woverloaded-virtual -fPIC -Iinclude  -pthread -D__cplusplus -- /home/blatm/Documents/root/proof/proof/src/TDataSetManagerFile.cxx
g++ -O2 -pipe -m64 -Wshadow -Wall -W -Woverloaded-virtual -fPIC -Iinclude  -pthread -o proof/proof/src/TDataSetManagerFile.o -c /home/blatm/Documents/root/proof/proof/src/TDataSetManagerFile.cxx
bin/rmkdepend -R -fproof/proof/src/TDSet.d -Y -w 1000 -- -pipe -m64 -Wshadow -Wall -W -Woverloaded-virtual -fPIC -Iinclude  -pthread -D__cplusplus -- /home/blatm/Documents/root/proof/proof/src/TDSet.cxx
g++ -O2 -pipe -m64 -Wshadow -Wall -W -Woverloaded-virtual -fPIC -Iinclude  -pthread -o proof/proof/src/TDSet.o -c /home/blatm/Documents/root/proof/proof/src/TDSet.cxx
/home/blatm/Documents/root/proof/proof/src/TDSet.cxx: In member function ‘void TDSet::Validate()’:
/home/blatm/Documents/root/proof/proof/src/TDSet.cxx:1531:1: internal compiler error: in redirect_jump, at jump.c:1443
Please submit a full bug report,
with preprocessed source if appropriate.
See <file:///usr/share/doc/gcc-4.5/README.Bugs> for instructions.
make: *** [proof/proof/src/TDSet.o] Error 1
blatm@Bob:~/Documents/root$ g++ -O -m64 -pipe -Wshadow -W -Wall -Woverloaded-virtual -fsigned-char -fno-common -Iinclude -D_REENTRANT -pthread -o proof/proof/src/TDataSetManager.o -c /home/blatm/Documents/root/proof/proof/src/TDataSetManager.cxx
blatm@Bob:~/Documents/root$ make
bin/rmkdepend -R -fproof/proof/src/TDSet.d -Y -w 1000 -- -pipe -m64 -Wshadow -Wall -W -Woverloaded-virtual -fPIC -Iinclude  -pthread -D__cplusplus -- /home/blatm/Documents/root/proof/proof/src/TDSet.cxx
g++ -O2 -pipe -m64 -Wshadow -Wall -W -Woverloaded-virtual -fPIC -Iinclude  -pthread -o proof/proof/src/TDSet.o -c /home/blatm/Documents/root/proof/proof/src/TDSet.cxx
/home/blatm/Documents/root/proof/proof/src/TDSet.cxx: In member function ‘void TDSet::Validate()’:
/home/blatm/Documents/root/proof/proof/src/TDSet.cxx:1531:1: internal compiler error: in redirect_jump, at jump.c:1443
Please submit a full bug report,
with preprocessed source if appropriate.
See <file:///usr/share/doc/gcc-4.5/README.Bugs> for instructions.
make: *** [proof/proof/src/TDSet.o] Error 1

Thanks for any help.

EDIT:

Update: In root/config/Makefile.linuxx8664gcc I changed OPTFLAGS = -O2 to OPTFLAGS = -O and now the previous error seems to have dissipated, but I’m getting another error:

Creating executable ../../bin/xrdadler32
g++ -m64 -D_ALL_SOURCE -D_REENTRANT -D_GNU_SOURCE -fPIC -rdynamic -Wall -Wno-deprecated -D__linux__  -O2 ../../obj/Xrdadler32.o ../../lib/libXrdPosix.a   ../../lib/libXrdClient.a -L../../lib -lXrdNet -lXrdOuc -lXrdNetUtil -lXrdSys  -lnsl  -lrt -ldl -lc  -o ../../bin/xrdadler32
../../obj/Xrdadler32.o: In function `main':
/home/blatm/Documents/root/net/xrootd/src/xrootd/src/XrdApps/Xrdadler32.cc:176: undefined reference to `adler32'
/home/blatm/Documents/root/net/xrootd/src/xrootd/src/XrdApps/Xrdadler32.cc:218: undefined reference to `adler32'
/home/blatm/Documents/root/net/xrootd/src/xrootd/src/XrdApps/Xrdadler32.cc:255: undefined reference to `adler32'
collect2: ld returned 1 exit status
make[5]: *** [../../bin/xrdadler32] Error 1
make[4]: *** [Linuxall] Error 2
make[3]: *** [all] Error 2
make[2]: *** [XrdApps] Error 2
make[1]: *** [all] Error 2
make[1]: Leaving directory `/home/blatm/Documents/root/net/xrootd/src/xrootd'
*** Error condition reported by make (rc = 2):
make: *** [net/xrootd/src/xrootd/LastBuild.d] Error 1

This is on ubuntu 11.04 with gcc 4.5.

Which version of ROOT are you using? Please use the v5-30-00-rc1.

Cheers, Fons.