scarrazza / applgridphoton

APPLgrid implementation with photon channels based on applgrid-1.4.70
http://applgrid.hepforge.org
GNU General Public License v3.0
0 stars 1 forks source link

Installin applphoton with conda packages #6

Open tgiani opened 6 years ago

tgiani commented 6 years ago

Hi, I m trying to install applphoton using conda packages. I ve created a new environment and I ve installed the conda packages for root:

conda create --name nnpdfroot 
source activate nnpdfroot
conda install cern-root

Then I ve cloned the repo and I ve tried to install the compilers, automake and libtool

git clone  https://github.com/scarrazza/applgridphoton.git
cd applgridphoton
autoreconf -i
./configure --prefix=/scratch/anaconda2/envs/nnpdfroot

Here there is the output of the last two lines

(nnpdfroot) bash-4.2$  autoreconf -i
aclocal: warning: couldn't open directory 'm4': No such file or directory
libtoolize: putting auxiliary files in '.'.
libtoolize: copying file './ltmain.sh'
libtoolize: putting macros in AC_CONFIG_MACRO_DIRS, 'm4'.
libtoolize: copying file 'm4/libtool.m4'
libtoolize: copying file 'm4/ltoptions.m4'
libtoolize: copying file 'm4/ltsugar.m4'
libtoolize: copying file 'm4/ltversion.m4'
libtoolize: copying file 'm4/lt~obsolete.m4'
libtoolize: Consider adding '-I m4' to ACLOCAL_AMFLAGS in Makefile.am.
src/Makefile.am:17: warning: shell root-config --cflags: non-POSIX variable name
src/Makefile.am:17: (probably a GNU make extension)
src/Makefile.am:18: warning: shell root-config --nonew --libs: non-POSIX variable name
src/Makefile.am:18: (probably a GNU make extension)
src/Makefile.am:19: warning: shell root-config --nonew --glibs: non-POSIX variable name
src/Makefile.am:19: (probably a GNU make extension)
src/Makefile.am:20: warning: shell root-config --ldflags: non-POSIX variable name
src/Makefile.am:20: (probably a GNU make extension)
src/Makefile.am:24: warning: shell hoppet-config --prefix: non-POSIX variable name
src/Makefile.am:24: (probably a GNU make extension)
src/Makefile.am:25: warning: shell hoppet-config --cxxflags: non-POSIX variable name
src/Makefile.am:25: (probably a GNU make extension)
src/Makefile.am:26: warning: shell hoppet-config --libs: non-POSIX variable name
src/Makefile.am:26: (probably a GNU make extension)
src/Makefile.am:36: warning: shell lhapdf-config --cxxflags: non-POSIX variable name
src/Makefile.am:36: (probably a GNU make extension)
src/Makefile.am:42: warning: shell gfortran -print-file-name=libgfortran.a: non-POSIX variable name
src/Makefile.am:42: (probably a GNU make extension)
src/Makefile.am:43: warning: subst /libgfortran.a, ,$(FRTLIB: non-POSIX variable name
src/Makefile.am:43: (probably a GNU make extension)
src/Makefile.am:98: warning: '%'-style pattern rules are a GNU make extension
(nnpdfroot) bash-4.2$ 
(nnpdfroot) bash-4.2$ 
(nnpdfroot) bash-4.2$ ./configure --prefix=/scratch/anaconda2/envs/nnpdfroot
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
/home/s1792848/applgridphoton/missing: Unknown `--is-lightweight' option
Try `/home/s1792848/applgridphoton/missing --help' for more information
configure: WARNING: 'missing' script is too old or missing
checking for a thread-safe mkdir -p... /usr/bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking for gcc... gcc
checking whether the C compiler works... no
configure: error: in `/home/s1792848/applgridphoton':
configure: error: C compiler cannot create executables
See `config.log' for more details

Thanks

scarrazza commented 6 years ago

Sounds like the gcc compiler is not able to compile, so I would say this is not related to the cern-root package. Are you sure you can compile c/c++ code? The conda package provides the root-config?

tgiani commented 6 years ago

If i try to compile without creating a new clean conda environment I m able to compile c++ code, but then I will have problems in creating the applgrid grid, as reported in issue #5 in NNPDF/external.

I guess the problem in compiling c++ code is happening only when I m working in a new environment with nothing in it. Following the instructions of Zahari's email of some weeks ago i was trying to install the compilers, automake and libtool from conda, with these commands:

autoreconf -i
./configure --prefix=$CONDA_PREFIX
make
 make install

I don 't know if I m missing some steps.

If i try to run root-config from the conda env with the root packages installed i get

(nnpdfroot) bash-4.2$ root-config
Usage: root-config [--prefix[=DIR]] [--exec-prefix[=DIR]] [--version] [--cflags] [--auxcflags] [--ldflags] [--new] [--nonew] [--libs] [--glibs] [--evelibs] [--bindir] [--libdir] [--incdir] [--etcdir] [--srcdir] [--noauxcflags] [--noauxlibs] [--noldflags] [--has-<feature>] [--arch] [--platform] [--config] [--features] [--ncpu] [--git-revision] [--python-version] [--cc] [--cxx] [--f77] [--ld ] [--help]

so i guess that root is there

tgiani commented 6 years ago

Just realised that maybe i should have referred directly to issue #5 in NNPDF/external, intead of opening a new one here