Ticket #32650

Makefile_GNU depend target calls main Makefile

Open Date: 2013-12-22 23:14 Last Update: 2013-12-25 17:36

Reporter:
Owner:
Type:
Status:
Closed
Component:
(None)
MileStone:
Priority:
5 - Medium
Severity:
5 - Medium
Resolution:
Fixed
File:
None

Details

The depend target in src/Makefile_GNU has been reworked since 0.2.0, probably to make sure it is always run. However, it is now setup to run "make depend", and at least sometimes t first runs depend, then removes the file and creates it again, this time calling the "regular" src/Makefile, which specifies "mpiicpc" as CC, so it fails:

(cd src; make -f Makefile_GNU depend)
make[2]: Entering directory `/«PKGBUILDDIR»/src'
g++ -MM base/Enums.cpp                   base/PrintController.cpp base/MolDSException.cpp                                     base/MallocerFreer.cpp              mpi/MpiProcess.cpp mpi/AsyncCommunicator.cpp wrappers/Blas.cpp wrappers/Lapack.cpp base/Utilities.cpp base/MathUtilities.cpp base/EularAngle.cpp base/Parameters.cpp base/atoms/Atom.cpp base/atoms/Hatom.cpp base/atoms/Liatom.cpp base/atoms/Catom.cpp base/atoms/Natom.cpp base/atoms/Oatom.cpp base/atoms/Satom.cpp base/atoms/mm/EnvironmentalPointCharge.cpp base/factories/AtomFactory.cpp base/Molecule.cpp base/InputParser.cpp base/GTOExpansionSTO.cpp base/RealSphericalHarmonicsIndex.cpp base/loggers/MOLogger.cpp base/loggers/DensityLogger.cpp base/loggers/HoleDensityLogger.cpp base/loggers/ParticleDensityLogger.cpp                            cndo/Cndo2.cpp                                    indo/Indo.cpp zindo/ZindoS.cpp mndo/Mndo.cpp am1/Am1.cpp am1/Am1D.cpp pm3/Pm3.cpp pm3/Pm3D.cpp pm3/Pm3Pddg.cpp base/factories/ElectronicStructureFactory.cpp md/MD.cpp mc/MC.cpp rpmd/RPMD.cpp nasco/NASCO.cpp optimization/Optimizer.cpp optimization/ConjugateGradient.cpp optimization/SteepestDescent.cpp optimization/BFGS.cpp optimization/GEDIIS.cpp base/factories/OptimizerFactory.cpp  base/MolDS.cpp     Main.cpp -I/usr//include/ -I/usr/lib/openblas-base//include/ | sed 's/^\([^ ]\)/obj\/\1/g' | sed 's/\($*\)\.o[ :]*/\1.o : /g'  > obj/objfile.dep
make[2]: Leaving directory `/«PKGBUILDDIR»/src'
make[2]: Entering directory `/«PKGBUILDDIR»/src'
rm obj/objfile.dep
make obj/objfile.dep
make[3]: Entering directory `/«PKGBUILDDIR»/src'
mpiicpc -MM base/Enums.cpp                   base/PrintController.cpp base/MolDSException.cpp                                     base/MallocerFreer.cpp              mpi/MpiProcess.cpp mpi/AsyncCommunicator.cpp wrappers/Blas.cpp wrappers/Lapack.cpp base/Utilities.cpp base/MathUtilities.cpp base/EularAngle.cpp base/Parameters.cpp base/RealSphericalHarmonicsIndex.cpp base/atoms/Atom.cpp base/atoms/Hatom.cpp base/atoms/Liatom.cpp base/atoms/Catom.cpp base/atoms/Natom.cpp base/atoms/Oatom.cpp base/atoms/Satom.cpp base/atoms/mm/EnvironmentalPointCharge.cpp base/factories/AtomFactory.cpp base/Molecule.cpp base/InputParser.cpp base/GTOExpansionSTO.cpp base/loggers/MOLogger.cpp base/loggers/DensityLogger.cpp base/loggers/HoleDensityLogger.cpp base/loggers/ParticleDensityLogger.cpp                            cndo/Cndo2.cpp                                    indo/Indo.cpp zindo/ZindoS.cpp mndo/Mndo.cpp am1/Am1.cpp am1/Am1D.cpp pm3/Pm3.cpp pm3/Pm3D.cpp pm3/Pm3Pddg.cpp base/factories/ElectronicStructureFactory.cpp md/MD.cpp mc/MC.cpp rpmd/RPMD.cpp nasco/NASCO.cpp optimization/Optimizer.cpp optimization/ConjugateGradient.cpp optimization/SteepestDescent.cpp optimization/BFGS.cpp optimization/GEDIIS.cpp base/factories/OptimizerFactory.cpp  base/MolDS.cpp     Main.cpp -I/usr/local/boost//include/ | sed 's/^\([^ ]\)/obj\/\1/g' | sed 's/\($*\)\.o[ :]*/\1.o : /g' > obj/objfile.dep
/bin/sh: 1: mpiicpc: not found
make[3]: Leaving directory `/«PKGBUILDDIR»/src'

Running regular make then fails like this:

(cd src; make -f Makefile_GNU)
make[2]: Entering directory `/«PKGBUILDDIR»/src'
g++ -I/usr//include/ -I/usr/lib/openblas-base//include/ -o obj/Enums.o  -g -Wall -fopenmp -O2 -fopenmp -c
g++: fatal error: no input files
compilation terminated.
make[2]: *** [obj/Enums.o] Error 4

This is unfortunately not very well reproducible, but it should be made more robust I think

Ticket History (3/7 Histories)

2013-12-22 23:14 Updated by: mbanck
  • New Ticket "Makefile_GNU depend target calls main Makefile" created
2013-12-23 07:22 Updated by: mbanck
Comment

I think the problem happens when one runs "make depend" explicitly, rather than implicitly via "make". I have now removed this explicit "make depend" command, and then I no longer see this bug.

Nevertheless, I believe this could be made more robust.

2013-12-23 09:54 Updated by: mikiya_fujii
  • Milestone Update from (None) to ver0.3.1 (closed)
  • Owner Update from (None) to mikiya_fujii
2013-12-23 09:57 Updated by: mikiya_fujii
Comment

Thanks mbanck! I could reproduce this.

>I think the problem happens when one runs "make depend" explicitly

YES. "make depend" was changed to be called implicity. Users usulally can build with "make -f Makefile_GNU" only. Anyway, This will be fixed by 0.3.1 to make molds be more robust and to keep compatibility with 0.2.0.

2013-12-25 15:58 Updated by: mikiya_fujii
  • Ticket Close date is changed to 2013-12-25 15:58
  • Status Update from Open to Closed
  • Resolution Update from None to Fixed
Comment

fixed at r1591

2013-12-25 17:17 Updated by: mikiya_fujii
Comment

merged to trunk at r1598

2013-12-25 17:36 Updated by: mikiya_fujii
Comment

merged to fx10 at r1599 and Makefile_FX10 is also modified at r1600

Attachment File List

No attachments

Edit

Please login to add comment to this ticket » Login