pkgsrc-Users archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: Problems with sysutils/coreutils
On Tue, Feb 11, 2014 at 08:45:29PM +0000, John Klos wrote:
> >For me, on NetBSD-6.99.31/amd64 configure says:
> >checking whether strncat works... yes
> >and the file isn't compiled for me.
> >
> >What platform are you on, and why doesn't it find strncat there?
>
> It's an amd64 system running netbsd-6 from 20-January-2014 with pkgsrc from
> 8-February-2014. I just cleaned everything, re-CVSed and tried again and got
> the same results.
Thanks.
I've tried on NetBSD-6.0.1/amd64 and can reproduce the problem.
For some reason, the configure script thinks that strncat is broken.
configure:21990: checking whether strncat works
configure:22076: gcc -std=gnu99 -o conftest -O2 -I/usr/include -I/usr/include
-L/usr/lib -Wl,-R/usr/lib -Wl,-R/usr/pkg/lib conftest.c >&5
configure:22076: $? = 0
configure:22076: ./conftest
configure:22076: $? = 3
The program it's running is attached with an additional printf to
print dest. I can't reproduce the exit code 3 with that though, so I'm
a bit confused what's happening here.
Ideas?
(We could force the configure script to accept NetBSD's strncat by
setting some magic autoconf variable, perhaps that's the easiest
solution.)
Thomas
/* confdefs.h */
#define PACKAGE_NAME "GNU coreutils"
#define PACKAGE_TARNAME "coreutils"
#define PACKAGE_VERSION "8.22"
#define PACKAGE_STRING "GNU coreutils 8.22"
#define PACKAGE_BUGREPORT "bug-coreutils%gnu.org@localhost"
#define PACKAGE_URL "http://www.gnu.org/software/coreutils/"
#define PACKAGE "coreutils"
#define VERSION "8.22"
#define STDC_HEADERS 1
#define HAVE_SYS_TYPES_H 1
#define HAVE_SYS_STAT_H 1
#define HAVE_STDLIB_H 1
#define HAVE_STRING_H 1
#define HAVE_MEMORY_H 1
#define HAVE_STRINGS_H 1
#define HAVE_INTTYPES_H 1
#define HAVE_STDINT_H 1
#define HAVE_UNISTD_H 1
#define __EXTENSIONS__ 1
#define _ALL_SOURCE 1
#define _DARWIN_C_SOURCE 1
#define _GNU_SOURCE 1
#define _POSIX_PTHREAD_SEMANTICS 1
#define _TANDEM_SOURCE 1
#define HAVE_FSEEKO 1
#define _DARWIN_USE_64_BIT_INODE 1
#define HAVE_ALLOCA 1
#define HAVE_ARPA_INET_H 1
#define HAVE_UNISTD_H 1
#define HAVE_SYS_PARAM_H 1
#define HAVE_SYS_SOCKET_H 1
#define HAVE_DIRENT_H 1
#define HAVE_WCTYPE_H 1
#define HAVE_SYS_STAT_H 1
#define HAVE_NETDB_H 1
#define HAVE_NETINET_IN_H 1
#define HAVE_GETOPT_H 1
#define HAVE_TERMIOS_H 1
#define HAVE_SYS_TIME_H 1
#define HAVE_GRP_H 1
#define HAVE_ICONV_H 1
#define HAVE_WCHAR_H 1
#define HAVE_STDINT_H 1
#define HAVE_INTTYPES_H 1
#define HAVE_LANGINFO_H 1
#define HAVE_MATH_H 1
#define HAVE_SYS_MMAN_H 1
#define HAVE_SYS_STATVFS_H 1
#define HAVE_SYS_SELECT_H 1
#define HAVE_PTHREAD_H 1
#define HAVE_UTMP_H 1
#define HAVE_UTMPX_H 1
#define HAVE_MALLOC_H 1
#define HAVE_SCHED_H 1
#define HAVE_SPAWN_H 1
#define HAVE_SYS_IOCTL_H 1
#define HAVE_SYS_RESOURCE_H 1
#define HAVE_SYS_UIO_H 1
#define HAVE_SYS_UTSNAME_H 1
#define HAVE_SYS_WAIT_H 1
#define HAVE_UTIME_H 1
#define HAVE_PATHS_H 1
#define HAVE_SYSLOG_H 1
#define HAVE_PWD_H 1
#define D_INO_IN_DIRENT 1
#define HAVE_LONG_FILE_NAMES 1
#define HAVE_PATHCONF 1
#define HAVE_BTOWC 1
#define HAVE_REALPATH 1
#define HAVE_CHOWN 1
#define HAVE_FCHOWN 1
#define HAVE_FCHDIR 1
#define HAVE_FDOPENDIR 1
#define HAVE_POSIX_FADVISE 1
#define HAVE_LCHMOD 1
#define HAVE_FCNTL 1
#define HAVE_SYMLINK 1
#define HAVE_ISBLANK 1
#define HAVE_ISWCTYPE 1
#define HAVE_MBSRTOWCS 1
#define HAVE_WMEMCHR 1
#define HAVE_WMEMCPY 1
#define HAVE_FPURGE 1
#define HAVE_FSYNC 1
#define HAVE_STRTOF 1
#define HAVE_FTRUNCATE 1
#define HAVE_FSTATFS 1
#define HAVE_FUTIMENS 1
#define HAVE_GETDELIM 1
#define HAVE_GETDTABLESIZE 1
#define HAVE_GETLOGIN 1
#define HAVE_FLOCKFILE 1
#define HAVE_FUNLOCKFILE 1
#define HAVE_TCGETATTR 1
#define HAVE_TCSETATTR 1
#define HAVE_GETTIMEOFDAY 1
#define HAVE_GETUSERSHELL 1
#define HAVE_ISWCNTRL 1
#define HAVE_ISWBLANK 1
#define HAVE_LINK 1
#define HAVE_READLINK 1
#define HAVE_LSTAT 1
#define HAVE_MBSINIT 1
#define HAVE_MBRTOWC 1
#define HAVE_MBRLEN 1
#define HAVE_ISASCII 1
#define HAVE_MPROTECT 1
#define HAVE_GETGROUPLIST 1
#define HAVE_FCHMOD 1
#define HAVE_MKFIFO 1
#define HAVE_MKNOD 1
#define HAVE_MKSTEMP 1
#define HAVE_NL_LANGINFO 1
#define HAVE_PIPE2 1
#define HAVE_POSIX_SPAWN 1
#define HAVE_UTMPNAME 1
#define HAVE_UTMPXNAME 1
#define HAVE_SETENV 1
#define HAVE_SETTIMEOFDAY 1
#define HAVE_SIGACTION 1
#define HAVE_SIGALTSTACK 1
#define HAVE_SIGINTERRUPT 1
#define HAVE_SNPRINTF 1
#define HAVE_STPNCPY 1
#define HAVE_STRDUP 1
#define HAVE_STRERROR_R 1
#define HAVE_TZSET 1
#define HAVE_STRNDUP 1
#define HAVE_STRTOIMAX 1
#define HAVE_STRTOUMAX 1
#define HAVE_LOCALTIME_R 1
#define HAVE_PIPE 1
#define HAVE_FUTIMES 1
#define HAVE_LUTIMES 1
#define HAVE_WCRTOMB 1
#define HAVE_WCWIDTH 1
#define HAVE_WCSWIDTH 1
#define HAVE_GETEGID 1
#define HAVE_SLEEP 1
#define HAVE_CATGETS 1
#define HAVE_SHUTDOWN 1
#define HAVE_WCTOB 1
#define HAVE_SETRLIMIT 1
#define HAVE_ENDGRENT 1
#define HAVE_ENDPWENT 1
#define HAVE_ISWSPACE 1
#define HAVE_SETGROUPS 1
#define HAVE_SETHOSTNAME 1
#define HAVE_SYNC 1
#define HAVE_SYSCTL 1
#define HAVE_TCGETPGRP 1
#define restrict __restrict
#define HAVE_LANGINFO_CODESET 1
#define HAVE_C99_STRTOLD 1
#define HAVE_UNISTD_H 1
#define HAVE_CHOWN 1
#define HAVE_DECL_STRERROR_R 1
#define HAVE_STRERROR_R 1
#define GETGROUPS_T gid_t
#define HAVE_SIG_ATOMIC_T 1
#define HAVE_DECL_FCHDIR 1
#define HAVE_WORKING_O_NOATIME 0
#define HAVE_WORKING_O_NOFOLLOW 1
#define PROMOTED_MODE_T mode_t
#define HAVE_DECL_FDATASYNC 1
#define HAVE_DECL_STRMODE 1
#define HAVE_MBSTATE_T 1
#define HAVE_DECL_ALARM 1
#define HAVE_DECL_FSEEKO 1
#define FUNC_FFLUSH_STDIN 0
#define LSTAT_FOLLOWS_SLASHED_SYMLINK 1
#define HAVE_DECL_FTELLO 1
#define HAVE_SHUTDOWN 1
#define HAVE_STRUCT_SOCKADDR_STORAGE 1
#define HAVE_SA_FAMILY_T 1
#define HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY 1
#define HAVE_GETHOSTBYNAME 1
#define HAVE_GETSERVBYNAME 1
#define HAVE_DECL_INET_NTOP 1
#define HAVE_IPV4 1
#define HAVE_IPV6 1
#define HAVE_DECL_GETCWD 1
#define HAVE_DECL_GETDELIM 1
#define HAVE_UNSIGNED_LONG_LONG_INT 1
#define HAVE_LONG_LONG_INT 1
#define HAVE_DECL_GETLINE 1
#define HAVE_GETOPT_H 1
#define __GETOPT_PREFIX rpl_
#define HAVE_DECL_GETENV 1
#define HAVE_DECL_GETPASS 1
#define HAVE_DECL_FFLUSH_UNLOCKED 0
#define HAVE_DECL_FLOCKFILE 1
#define HAVE_DECL_FPUTS_UNLOCKED 0
#define HAVE_DECL_FUNLOCKFILE 1
#define HAVE_DECL_PUTC_UNLOCKED 1
#define HAVE_ICONV 1
#define ICONV_CONST const
#define HAVE_INTTYPES_H 1
#define DBL_EXPBIT0_WORD 1
#define DBL_EXPBIT0_BIT 20
#define FLT_EXPBIT0_WORD 0
#define FLT_EXPBIT0_BIT 23
#define HAVE_WINT_T 1
#define HAVE_TOWLOWER 1
#define HAVE_DECL_GETC_UNLOCKED 1
#define HAVE_WCHAR_T 1
#define USE_POSIX_THREADS 1
#define USE_POSIX_THREADS_WEAK 1
#define HAVE_STDLIB_H 1
#define MALLOC_0_IS_NONNULL 1
#define MAP_ANONYMOUS MAP_ANON
#define HAVE_MAP_ANONYMOUS 1
#define HAVE_DECL_MEMRCHR 1
#define HAVE__BOOL 1
#define HAVE_COMPOUND_LITERALS 1
#define HAVE_TM_GMTOFF 1
#define HAVE_WORKING_POSIX_SPAWN 1
#define HAVE_SIGSET_T 1
#define HAVE_DECL_SETENV 1
#define HAVE_SEARCH_H 1
#define HAVE_TSEARCH 1
#define HAVE_DECL_SNPRINTF 1
#define HAVE_DECL_STPNCPY 1
#define HAVE_DECL_STRDUP 1
#define REPLACE_STRERROR_0 1
#define HAVE_MAP_ANONYMOUS 1
/* end confdefs.h. */
#include <string.h>
#if HAVE_SYS_MMAN_H
# include <fcntl.h>
# include <unistd.h>
# include <sys/types.h>
# include <sys/mman.h>
# ifndef MAP_FILE
# define MAP_FILE 0
# endif
#endif
int
main ()
{
char *fence = NULL;
#if HAVE_SYS_MMAN_H && HAVE_MPROTECT
# if HAVE_MAP_ANONYMOUS
const int flags = MAP_ANONYMOUS | MAP_PRIVATE;
const int fd = -1;
# else /* !HAVE_MAP_ANONYMOUS */
const int flags = MAP_FILE | MAP_PRIVATE;
int fd = open ("/dev/zero", O_RDONLY, 0666);
if (fd >= 0)
# endif
{
int pagesize = getpagesize ();
char *two_pages =
(char *) mmap (NULL, 2 * pagesize, PROT_READ | PROT_WRITE,
flags, fd, 0);
if (two_pages != (char *)(-1)
&& mprotect (two_pages + pagesize, pagesize, PROT_NONE) == 0)
fence = two_pages + pagesize;
}
#endif
if (fence)
{
char dest[8];
dest[0] = '*';
dest[1] = 'a';
dest[2] = '\0';
dest[3] = 'w';
dest[4] = 'x';
dest[5] = 'y';
dest[6] = 'z';
*(fence - 3) = '7';
*(fence - 2) = '2';
*(fence - 1) = '9';
if (strncat (dest + 1, fence - 3, 3) != dest + 1)
return 1;
printf("'%s'\n", dest);
if (dest[0] != '*')
return 2;
if (dest[1] != 'a'
|| dest[2] != '7' || dest[3] != '2' || dest[4] != '9'
|| dest[5] != '\0')
return 3;
if (dest[6] != 'z')
return 4;
}
return 0;
;
return 0;
}
Home |
Main Index |
Thread Index |
Old Index