Mike Bristow
2003-Jun-09 15:42 UTC
[syslinux] [patch] ./configure problem on Solaris with Sun's CC
Hi, I have a problem with tftpd-hpa on Solaris-8, in that the configure script cannot find the regex engine. This is because of the following in configure.in: LIBXTRA=false AC_SEARCH_LIBS(xmalloc, iberty, , LIBXTRA=true AC_LIBOBJ(xmalloc)) AC_SEARCH_LIBS(xstrdup, iberty, , LIBXTRA=true AC_LIBOBJ(xstrdup)) AC_SEARCH_LIBS(bsd_signal, bsd, , LIBXTRA=true AC_LIBOBJ(bsdsignal)) if $LIBXTRA; then LIBS="../lib/libxtra.a $LIBS" fi Solaris doesn't have xmalloc and friends available and so LIBS includes ../lib/libxtra.a. This causes all future invokations of the compiler to fail like so: configure:10955: /opt/SUNWspro/bin/cc -o conftest -fast -g -xs -v -xstrconst -xdepend -xtarget=ultra2 -xarch=v8plusa -xprefetch -fast -g -xs -v -xstrconst -xdepend -xtarget=ultra2 -xarch=v8plusa -xprefetch -D_XPG4_2 -D_XOPEN_SOURCE -D__EXTENSIONS__ -D_BSD_SOURCE -D_ISO9X_SOURCE -D_OSF_SOURCE -D_XOPEN_SOURCE_EXTENDED -fno-strict-aliasing -xildoff -xildoff -xildoff -xildoff conftest.c ../lib/libxtra.a -lresolv -lnsl -lsocket >&5 cc: Warning: illegal option -fno-strict-aliasing ld: fatal: file ../lib/libxtra.a: open failed: No such file or directory ld: fatal: File processing errors. No output written to conftest Because, of course, libxtra doesn't exist yet. (The illegal option warning is annoying in the build logs, but harmless and easily ignorable). I've attached a patch which I believe fixes this problem, without any undesirable side effects. Can anyone see a problem with it? Ta, Mike Index: tftphpa/configure.in ==================================================================RCS file: /cvsroot/upstream/tftphpa/configure.in,v retrieving revision 1.1.1.1 diff -u -r1.1.1.1 configure.in --- tftphpa/configure.in 2003/01/31 02:17:01 1.1.1.1 +++ tftphpa/configure.in 2003/06/09 15:05:41 @@ -124,7 +124,7 @@ AC_SEARCH_LIBS(xstrdup, iberty, , LIBXTRA=true AC_LIBOBJ(xstrdup)) AC_SEARCH_LIBS(bsd_signal, bsd, , LIBXTRA=true AC_LIBOBJ(bsdsignal)) if $LIBXTRA; then - LIBS="../lib/libxtra.a $LIBS" + XTRA_LIBS="../lib/libxtra.a" fi dnl @@ -159,7 +159,7 @@ ]) ],:) -TFTPD_LIBS="$LIBS" +TFTPD_LIBS="$LIBS $XTRA_LIBS" LIBS="$common_libs" dnl @@ -187,8 +187,8 @@ ]) ],:) -TFTP_LIBS="$LIBS" -LIBS="$common_libs" +TFTP_LIBS="$LIBS $XTRA_LIBS" +LIBS="$common_libs $XTRA_LIBS" AC_SUBST(TFTP_LIBS) AC_SUBST(TFTPD_LIBS)
Mike Bristow
2003-Jun-10 15:40 UTC
[syslinux] [patch] ./configure problem on Solaris with Sun's CC
On Mon, Jun 09, 2003 at 04:42:22PM +0100, Mike Bristow wrote:> cc: Warning: illegal option -fno-strict-aliasing > ld: fatal: file ../lib/libxtra.a: open failed: No such file or directory > ld: fatal: File processing errors. No output written to conftest > > Because, of course, libxtra doesn't exist yet. > > (The illegal option warning is annoying in the build logs, but > harmless and easily ignorable).Actually, I lied when I said that the illegal option warning wasn't a problem. I don't know how I missed it; I can only presume it was configure cunningly caching the answer so some tests didn't get run. But: configure:8619: /opt/SUNWspro/bin/cc -o conftest -fast -g -xs -v -xstrconst -xdepend -xtarget=ultra2 -xarch=v8plusa -xprefetch -fast -g -xs -v -xstrconst -xdepend -xtarget=ultra2 -xarch=v8plusa -xprefetch -D_XPG4_2 -D_XOPEN_SOURCE -D__EXTENSIONS__ -D_BSD_SOURCE -D_ISO9X_SOURCE -D_OSF_SOURCE -D_XOPEN_SOURCE_EXTENDED -pipe -fno-strict-aliasing -I/opt/THUSlibtool/include -xildoff -xildoff -xildoff -xildoff conftest.c -lsocket >&5 ld: fatal: entry point symbol `-fno-strict-aliasing' is undefined Given that all of the flags added with PA_ADD_CFLAGS are rather gcc-specific, is it worth wrapping the lot in a test on GCC? -- Good night little fishey-wishes.... I've counted you, so no sneaky eating each other. -- FW (should I worry?)