pkgsrc-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

pkg/30399: pkg_install-20050530 does not build on Solaris



>Number:         30399
>Category:       pkg
>Synopsis:       pkg_install-20050530 does not build on Solaris
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Thu Jun 02 09:27:00 +0000 2005
>Originator:     Neil Hoggarth
>Release:        Solaris 9
>Organization:
Laboratory of Physiology, Oxford University
>Environment:
SunOS saros 5.9 Generic_112233-11 sun4u sparc SUNW,Ultra-30

>Description:
When building pkg_install-20050530 on Solaris 9, the compile fails:

===> Building for pkg_install-20050530
gcc -DHAVE_CONFIG_H -DDEF_LOG_DIR=\"/var/db/pkg\" 
-DTAR_CMD=\""/usr/pkg/bin/tar"\" -DFTP_CMD=\""/usr/pkg/bin/ftp"\" 
-DDEF_UMASK=022 -I/export/scratch/pkgsrc/pkgtools/pkg_install/work/libnbcompat 
-I. -I. -O -c exec.c
gcc -DHAVE_CONFIG_H -DDEF_LOG_DIR=\"/var/db/pkg\" 
-DTAR_CMD=\""/usr/pkg/bin/tar"\" -DFTP_CMD=\""/usr/pkg/bin/ftp"\" 
-DDEF_UMASK=022 -I/export/scratch/pkgsrc/pkgtools/pkg_install/work/libnbcompat 
-I. -I. -O -c fexec.c
gcc -DHAVE_CONFIG_H -DDEF_LOG_DIR=\"/var/db/pkg\" 
-DTAR_CMD=\""/usr/pkg/bin/tar"\" -DFTP_CMD=\""/usr/pkg/bin/ftp"\" 
-DDEF_UMASK=022 -I/export/scratch/pkgsrc/pkgtools/pkg_install/work/libnbcompat 
-I. -I. -O -c file.c
gcc -DHAVE_CONFIG_H -DDEF_LOG_DIR=\"/var/db/pkg\" 
-DTAR_CMD=\""/usr/pkg/bin/tar"\" -DFTP_CMD=\""/usr/pkg/bin/ftp"\" 
-DDEF_UMASK=022 -I/export/scratch/pkgsrc/pkgtools/pkg_install/work/libnbcompat 
-I. -I. -O -c ftpio.c
ftpio.c: In function `ftp_start':
ftpio.c:501: error: `MAXHOSTNAMELEN' undeclared (first use in this function)
ftpio.c:501: error: (Each undeclared identifier is reported only once
ftpio.c:501: error: for each function it appears in.)
*** Error code 1

Stop.
bmake: stopped in 
/export/scratch/pkgsrc/pkgtools/pkg_install/work/pkg_install-20050530/lib
*** Error code 1

Stop.

>How-To-Repeat:

>Fix:
I searched the Solaris header files for the constant MAXHOSTNAMELEN.
It is defined in /usr/include/netdb.h. I added a #include for this file
to ftpio.c, thusly:

--- ftpio.c.orig        Thu Jun  2 10:22:59 2005
+++ ftpio.c     Thu Jun  2 10:23:40 2005
@@ -125,6 +125,9 @@
 #if HAVE_UNISTD_H
 #include <unistd.h>
 #endif
+#if HAVE_NETDB_H
+#include <netdb.h>
+#endif
 #ifdef EXPECT_DEBUG
 #if HAVE_VIS_H
 #include <vis.h>




Home | Main Index | Thread Index | Old Index