I do scientific computing (ecological modeling) but I am not a “computer of system” person so this may look like a silly question but I need help. I have been creating my own libraries for my research projects using the Make file that I show at the end. It has always worked OK. Our computer center, however, is always updating compilers, libraries, etc. When I tried to update my libraries yesterday however (after running Make spotless) I got these 2 messages (one a warning and another fatal):
pgCC-Warning-Unknown switch: --one_instantiation_per_object
/usr/bin/ld /usr/lib/crt1.o /usr/lib/crti.o /usr/lib/gcc-lib/i686-pc-linux-gnu/2.95.3//crtbegin.o -m elf_i386 -dynamic-linker /lib/ld-linux.so.2 /hurd/pgi/linux86/6.1/lib/pgi.ld -L/opt/mpi/lammpi/lib binomial.o frct1d.o frct2d.o icovar.o integrt.o isfrct1d.o isfrct2d.o istd.o matrix.o mmemory.o mpi_handlers.o mrpp.o parallel_plants_N_P_v4_viz.o parallel_plants_N_P_v5_viz.o parallel_plants_N_P_v6_viz.o parallel_plants_v5_viz.o parallel_plants_v6_viz.o parallel_plants_v7_viz.o parallel_plants_v8_viz.o posbin.o sfrct1d.o sfrct2d.o sfrct3d.o soilOM_N_v1.o soilOM_N_v2.o soilOM_P_v2.o soilOM_v1.o soilOM_v2.o soilevap.o soilnutr.o soilnutr_v2.o soilnutr_v3.o soilnutr_v4.o soilnutr_v5.o soilnutr_v6.o soiltemp.o soiltemp_v2.o soiltemp_v3.o soplarco.o soplarco_v2.o soplarco_v3.o soplarco_v4.o soplarco_v5.o unormal.o -llammpi++ -llammpio -lpmpi -llamf77mpi -lmpi -llam -lutil -L/hurd/pgi/linux86/6.1/lib -L/usr/lib -L/usr/lib/gcc-lib/i686-pc-linux-gnu/2.95.3/ -rpath /hurd/pgi/linux86/6.1/lib -lstd -lC -lc -lnspgc -lpgc -lm -lgcc -lc -lgcc /usr/lib/gcc-lib/i686-pc-linux-gnu/2.95.3//crtend.o /usr/lib/crtn.o
/usr/lib/crt1.o: In function _start': /usr/lib/crt1.o(.text+0x18): undefined reference to
main’
pgCC-Fatal-linker completed with exit code 1
I would appreciate any help I can get.
Makefile:
**export TMP = /var/tmp/
export TMPDIR = /var/tmp/
SRCS := $(wildcard *.cpp)
INCL := $(SRCS:.cpp=.h)
OBJS := $(SRCS:.cpp=.o)
CC = hcp
CFLAGS = -v -O2 -tp p6 --one_instantiation_per_object
.SUFFIXES: .cpp .h
all : libmario.a install
.cpp.o :
${CC} ${CFLAGS} --prelink_objects -c $<
#objs : $(SRCS) $(INCL)
${CC} ${CFLAGS} -c ${SRCS}\
libmario.a : ${OBJS}
${CC} ${CFLAGS} --prelink_objects ${SRCS}
ar -crvs libmario.a ${OBJS} Template.dir/*.o
install : libmario.a
cp -f ${INCL} ${HOME}/include
cp -f libmario.a ${HOME}/lib
clean :
rm -f *.o
rm -f *.ii
rm -f .ti
rm -f Template.dir/.o
spotless : clean
rm -f *.a
rm -f *.out
rm -f *.bin
rm -f .txt
rm -f ~