When building fileutils-4.1 (or textutils-2.1) on HPUX 11.00 64-bit with gcc and GNU ld I get the following error message:
hppa64-hp-hpux11.00-gcc -g -O2 -o csplit csplit.o ../lib/libfetish.a /usr/local/lib/libintl.sl -L/usr/local/lib /usr/local/lib/libiconv.sl -lc -Wl,-rpath -Wl,/usr/local/lib ../lib/libfetish.a -lsec -lgen ../lib/libfetish.a(xstrtoumax.o): In function `xstrtoumax': /usr/local/build/textutils-2.1/lib/xstrtol.c:141: undefined reference to `__strtoull' I traced this back to the fact that the HP system headers define strtoumax as a macro which calls __strtoull, which is fine, but for some stupid reason this function is not defined in the 64-bit HP libraries, only the 32-bit libraries. So I applied the following patch to fileutils-4.1 m4/xstrtoumax.m4 and re-ran aclocal, autoconf and automake, which fixes my problem. This added code, when strtoumax is detected to be a macro, is supposed to check whether this macro actually works. If it doesn't, it resets the flag to indicate that it is not a macro, so that the functions will correctly be replaced. However, I'm not sure that AC_CHECK_FUNC() is appropriate for testing whether a macro works. If correct, this patch will also need to be applied to the m4 directory in the textutils package, and the other package that shares this directory. - Josh Martin --- xstrtoumax.m4~ Fri Sep 20 18:19:21 2002 +++ xstrtoumax.m4 Fri Sep 20 18:19:29 2002 @@ -19,6 +19,13 @@ jm_cv_func_strtoumax_macro=yes, jm_cv_func_strtoumax_macro=no)) + if test "$jm_cv_func_strtoumax_macro" != no; then + AC_MSG_CHECKING([whether strtoumax macro works]) + AC_CHECK_FUNC(strtoumax, + jm_cv_func_strtoumax_macro=yes, + jm_cv_func_strtoumax_macro=no) + fi + if test "$jm_cv_func_strtoumax_macro" != yes; then AC_REPLACE_FUNCS(strtoumax) fi _______________________________________________ Bug-textutils mailing list [EMAIL PROTECTED] http://mail.gnu.org/mailman/listinfo/bug-textutils