Error Building HDDM Python Module

Gcc command generated on branch different than command on master. Branch is “recon-2017_01-ver02-sim”.

branch:

running

python .Linux_CentOS7-x86_64-gcc4.8.5-cntr/libraries/HDDM/setup_hddm_mc_s.py build -b build_hddm_mc_s

generates

gcc -pthread -fno-strict-aliasing -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 \
-fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 \
-grecord-gcc-switches -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -DNDEBUG \
-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong \
--param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -D_GNU_SOURCE \
-fPIC -fwrapv -fPIC \
-I/group/halld/Software/builds/Linux_CentOS7-x86_64-gcc4.8.5-cntr/sim-recon/sim-recon-recon-2017_01-ver02-sim_ver02/Linux_CentOS7-x86_64-gcc4.8.5-cntr/include \
-I/group/halld/Software/builds/Linux_CentOS7-x86_64-gcc4.8.5-cntr/sim-recon/sim-recon-recon-2017_01-ver02-sim_ver02/src/libraries/include \
-I/group/halld/Software/builds/Linux_CentOS7-x86_64-gcc4.8.5-cntr/sim-recon/sim-recon-recon-2017_01-ver02-sim_ver02/src/.Linux_CentOS7-x86_64-gcc4.8.5-cntr/libraries/HDDM \
-I/usr/include/python2.7 -c pyhddm_mc_s.cxx -o build_hddm_mc_s/temp.linux-x86_64-2.7/pyhddm_mc_s.o -std=c++11

master:

running

python .Linux_RHEL7-x86_64-gcc4.8.5/libraries/HDDM/setup_hddm_mc_s.py build -b build_hddm_mc_s

generates

gcc -pthread -fno-strict-aliasing -g -O2 -DNDEBUG -g -fwrapv -O3 -Wall \
-Wstrict-prototypes -fPIC \
-I/u/scratch/gluex/nightly/2018-04-23/Linux_RHEL7-x86_64-gcc4.8.5/sim-recon/Linux_RHEL7-x86_64-gcc4.8.5/include \
-I/u/scratch/gluex/nightly/2018-04-23/Linux_RHEL7-x86_64-gcc4.8.5/sim-recon/src/libraries/include \
-I/u/scratch/gluex/nightly/2018-04-23/Linux_RHEL7-x86_64-gcc4.8.5/sim-recon/src/.Linux_RHEL7-x86_64-gcc4.8.5/libraries/HDDM \
-I/apps/python/2.7.12/include/python2.7 -c pyhddm_mc_s.cxx \
<span id="mce_SELREST_start" style="overflow:hidden;line-height:0;"></span>-o build_hddm_mc_s/temp.linux-x86_64-2.7/pyhddm_mc_s.o -std=c++11
Advertisements

differing scons behavior under tcsh vs. bash

Note added 10/17: could not reproduce, moving on.

bash:

g++ -pthread -shared build_hddm_mc_s/temp.linux-x86_64-2.7/pyhddm_mc_s.o build_hddm_mc_s/temp.linux-x86_64-2.7/u/group/halld/Software/builds/Linux_RHEL6-x86_64-gcc4.9.2/sim-recon/sim-recon-2.18.0/src/.Linux_RHEL6-x86_64-gcc4.9.2/libraries/HDDM/hddm_mc_s++.o -L/group/halld/Software/builds/Linux_RHEL6-x86_64-gcc4.9.2/sim-recon/sim-recon-2.18.0/Linux_RHEL6-x86_64-gcc4.9.2/lib -L. -lHDDM -lxstream -lbz2 -lz -lpython2.7 -o build_hddm_mc_s/lib.linux-x86_64-2.7/hddm_mc_s.so
/usr/bin/ld: cannot find -lpython2.7
collect2: error: ld returned 1 exit status
error: command 'g++' failed with exit status 1
scons: *** [.Linux_RHEL6-x86_64-gcc4.9.2/libraries/HDDM/hddm_mc_s.so] Error 1
scons: building terminated because of errors.

tcsh

g++ -pthread -shared build_hddm_mc_s/temp.linux-x86_64-2.7/pyhddm_mc_s.o build_hddm_mc_s/temp.linux-x86_64-2.7/u/group/halld/Software/builds/Linux_RHEL6-x86_64-gcc4.9.2/sim-recon/sim-recon-2.18.0/src/.Linux_RHEL6-x86_64-gcc4.9.2/libraries/HDDM/hddm_mc_s++.o -L/group/halld/Software/builds/Linux_RHEL6-x86_64-gcc4.9.2/sim-recon/sim-recon-2.18.0/Linux_RHEL6-x86_64-gcc4.9.2/lib -L/u/group/halld/Software/builds/Linux_RHEL6-x86_64-gcc4.9.2/python/Python-2.7.13/lib -lHDDM -lxstream -lbz2 -lz -lpython2.7 -o build_hddm_mc_s/lib.linux-x86_64-2.7/hddm_mc_s.so

Building a stand-alone library with scons

Tried prescription in email message of 7 Oct 2014 from Dave. Did not have success:

lorentz:marki:TOF> scons
scons: Reading SConscript files ...
KeyError: 'MISC_OBJECTS':
  File "/local/scratch/quick/sim-recon/src/libraries/TOF/SConstruct", line 121:
    sbms.library(env)
  File "/home/gluex/gluex_top/sim-recon/sim-recon-1.4.0/src/SBMS/sbms.py", line 41:
    objects = env['MISC_OBJECTS']
  File "/usr/lib/scons/SCons/Environment.py", line 412:
    return self._dict[key]

re-make of sim-recon does a recompile when not necessary

trying it on ltmarki, halld/sim-recon-2012-09-26

The re-compilation:

g++ -I. -I.. -I../include -I/home/marki/halld/sim-recon-2012-09-26/include -I/home/marki/halld/sim-recon-2012-09-26/include -D_FILE_OFFSET_BITS=64 -I/usr/local/gluex/jana/prod/include -I/usr/local/gluex/xerces-c/prod/include -D_ROOT_ -DROOT_MAJOR=5 -DROOT_MINOR=34 -pthread -m32 -I/usr/local/gluex/root/prod/include -I/usr/local/gluex/root/prod/include -O2 -Wall   -c -o DEventSourceHDDM.o DEventSourceHDDM.cc
^Cmake[3]: *** wait: No child processes.  Stop.
make[3]: *** Waiting for unfinished jobs….
make[3]: *** wait: No child processes.  Stop.
make[2]: *** [library] Error 2
make[1]: *** [HDDM] Interrupt
make: *** [libraries] Interrupt

same deal on multiple makes
only repeats for LOCAL_HALLD_HOME

Solved: 12/20/12

Changed the makefile in sim-recon/src/external/xstream/src to preserve timestamps when doing the install. This prevents unnecessary re-compilation in libraries/HDDM. This was only happening with the top-level make since only then did a make install get repeated in the external directory.