[GRASS5] 5.02 fails to build on Solaris 8 Sparc

Glynn Clements glynn.clements at virgin.net
Thu Mar 6 00:41:06 EST 2003


Chris Heg wrote:

> The new CVS head fails to build on Solaris 8 Sparc because (it
> seems) -lsocket is missing from XDRLIB. all of the failed files use
> $(XDRLIB). How do I add it and make it effective? What file do I edit and
> what commands do I have to run to change the definition of XDRLIB?

To add it manually, edit the file src/CMD/head/head after running
configure but before running make (this file is generated from head.in
by configure and renamed to head.<arch> at the beginning of the make
process).

The reason why it may have worked before was that XDRLIB included the
value of X_EXTRA_LIBS from the autoconf AC_PATH_XTRA macro:

 - Macro: AC_PATH_XTRA
     An enhanced version of `AC_PATH_X'.  It adds the C compiler flags
     that X needs to output variable `X_CFLAGS', and the X linker flags
     to `X_LIBS'.  If X is not available, adds `-DX_DISPLAY_MISSING' to
     `X_CFLAGS'.

     This macro also checks for special libraries that some systems
     need in order to compile X programs.  It adds any that the system
     needs to output variable `X_EXTRA_LIBS'.  And it checks for
     special X11R6 libraries that need to be linked with before
     `-lX11', and adds any found to the output variable `X_PRE_LIBS'.

X_EXTRA_LIBS is specific to X11, and shouldn't have been used by
anything other than XDRIVER, xganim and NVIZ. Additionally, there's no
guarantee that it would actually contain -lsocket (if libX11 had
libsocket as a dependency, there would be no need for an explicit
reference), and it might also contain switches which were completely
unnecessary (or even harmful) for non-X programs.

I'll add the appropriate checks to the configure script.

-- 
Glynn Clements <glynn.clements at virgin.net>




More information about the grass-dev mailing list