# $NetBSD: undefined-reference.help,v 1.4 2007/11/29 09:13:30 rillig Exp $ # # This file covers the common linker failures. For each function, it # describes the needed libraries. There are many ways to get the # libraries linked in. The most common ways are: # # Add a definition for LIBS.${OPSYS} to the package Makefile. For example, # "LIBS.SunOS+= -lsocket -lnsl". # # Modify some Makefile inside ${WRKSRC}. Since the libraries are usually # platform-dependent, be sure not to break other platforms when modifying # the Makefiles. The most portable way is to use the @LIBS@ macro from # autoconf and define LIBS.${OPSYS} like in the paragraph above. # # Keywords: libs undefined # === Internationalization === # _ # libintl_gettext # libintl_textdomain # libintl_bindtextdomain # # When the linker finds an undefined reference to one of the libintl_* # functions, and the package uses a GNU configure script, you should set # BROKEN_GETTEXT_DETECTION=yes and "bmake clean && bmake" again. # # See also: # devel/gettext-lib/builtin.mk # # Keywords: intl lintl -lintl gettext # === Networking === # gethostbyname # gethostbyaddr # # Needs -lnsl on Solaris # socket # # Needs -lsocket on Solaris. # accept # bind # connect # getservbyname # getservbyport # getservent # recv # recvfrom # send # sendto # # Needs -lsocket -lnsl on Solaris. # sendfile # # Needs -lsendfile on Solaris. # inet_aton # # Solaris doesn't have this function. You can use inet_pton(AF_INET, # name, &addr) instead. # gethostbyname2 # # Solaris doesn't have this function. # === String functions === # strcasestr # strndup # strsep # # Solaris doesn't have this function. # === Mathematics === # ceil # cos # exp # fabs # # Needs -lm on about every platform. # === Miscellaneous === # alloca # # Should be replaced with malloc. XXX: claraocr # wattr_off # wattr_on # # XXX: cpmtools