albrecht.gebhardt@uni-klu.ac.at
2000-Feb-08 10:08 UTC
[Rd] configure doesn't accept f77 on alpha (PR#419)
Full_Name: Albrecht Gebhardt Version: 0.99.0 OS: alpha, osf4.0 Submission from: (NULL) (143.205.180.40) configure stops when checking if cc and f77 "agree on int and double". This is only due to a linking problem (linking fortran object with cc without for_main.o complains about unreloved dependency to main. Solution: add -expect_unresolved main to th linking step, see patch below --- ./aclocal.m4.dec-flibs-patch Mon Feb 7 14:33:25 2000 +++ ./aclocal.m4 Mon Feb 7 21:50:59 2000 @@ -366,8 +366,25 @@ r_cv_prog_f77_flibs_ok, [ echo " END" > conftest.f ${FC} -c ${FFLAGS} conftest.f 1>&AC_FD_CC 2>&AC_FD_CC - ${CC} ${LDFLAGS} -o conftest conftest.o ${FLIBS} \ - 1>&AC_FD_CC 2>&AC_FD_CC + case ${host} in + alpha*osf*) + if test -z "${G77}"; then + # DEC fortran "f77 -c" creates only a MAIN__ symbol and + # the "main" symbol is inserted by linking with "f77" + # (unless called with -nofor_main), so linking with + # cc would need /usr/lib/cmplrs/fort/for_main.o explicitely, + # but adding this to FLIBS would break the final linking step + # inserting "main" twice. So suppress ld's error message + # about unresolved "main": + ${CC} -expect_unresolved main ${LDFLAGS} -o conftest \ + conftest.o ${FLIBS} 1>&AC_FD_CC 2>&AC_FD_CC + fi + ;; + *) + ${CC} ${LDFLAGS} -o conftest conftest.o ${FLIBS} \ + 1>&AC_FD_CC 2>&AC_FD_CC + ;; + esac if test ${?} = 0; then r_cv_prog_f77_flibs_ok=yes else -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-devel mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html Send "info", "help", or "[un]subscribe" (in the "body", not the subject !) To: r-devel-request@stat.math.ethz.ch _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._