[petsc-dev] shared libraries auto-rebuild
Barry Smith
bsmith at mcs.anl.gov
Thu Oct 13 07:56:44 CDT 2011
Rich,
The check is triggered by the "chkopts" listed below, if you remove it from your makefile rule then it won't run this check
ex1: ex1.o chkopts
-${CLINKER} -o ex1 ex1.o ${PETSC_VEC_LIB}
${RM} -f ex1.o
Here is the rule that checks the shared library (from conf/rules)
chkopts: remote
@for LIBNAME in ${SHLIBS}; do \
library=${INSTALL_LIB_DIR}/$$LIBNAME.a; \
sharedlibrary=${INSTALL_LIB_DIR}/$$LIBNAME.${SL_LINKER_SUFFIX}; \
flag=""; \
if [ -f $$library ]; then \
if [ -f $$sharedlibrary ]; then \
flag=`find ${INSTALL_LIB_DIR} -type f -name $$LIBNAME.a -newer $$sharedlibrary -print`; \
fi; \
fi; \
if [ "$$flag" != "" ]; then \
echo "Shared libs in ${INSTALL_LIB_DIR} are out of date, attempting to rebuild."; \
if [ -w ${INSTALL_LIB_DIR} ]; then \
${OMAKE} PETSC_ARCH=${PETSC_ARCH} shared; \
else \
echo "*********************** ERROR ************************"; \
echo "Unable to rebuild shared libraries; you do not have write permission."; \
user=`ls -l ${INSTALL_LIB_DIR}/$$LIBNAME.${SL_LINKER_SUFFIX} | tr -s ' ' | cut -d ' ' -f 3`; \
echo "Libraries were built by user $$user; please contact him/her to have them rebuilt."; \
echo "******************************************************"; \
false; \
fi; \
fi; \
done
so for some reason the static library is "newer" than the shared library, hence it wishes to rebuild. Normally the static library is older so it doesn't want to rebuild.
Barry
On Oct 13, 2011, at 5:15 AM, Richard Katz wrote:
> Hi all,
>
> Just tried to compile my code on an Oxford cluster and got this error message:
>
> Shared libs in /system/software/hal/lib/PETSc/petsc-3.2-p3/icc-2011/lib are out of date, attempting to rebuild.
> *********************** ERROR ************************
> Unable to rebuild shared libraries; you do not have write permission.
> Libraries were built by user mihai; please contact him/her to have them rebuilt.
> ******************************************************
>
> This version of PETSc was freshly downloaded and installed, so I don't think that the libraries are actually out of date.
>
> What do you mean by "out of date"? How do you check? Is it possible to turn this feature off?
>
> Thanks,
> Rich
More information about the petsc-dev
mailing list