dash klibc DEBUG compile trouble
on top of the two easy patches I sent I am seeing this one:usr/dash/exec.c: In function ‘find_command’:usr/dash/exec.c:290: error: storage size of ‘statb’ isn’t known usr/dash/exec.c:299: warning: implicit declaration of function ‘stat64’ usr/dash/exec.c:290: warning: unused variable ‘statb’ make[2]: *** [usr/dash/exec.o] Error 1
hmm which include is exec.c missing?
netbsd ash seems to have evolved using stat and no longer stat64, any hint what I should do here to make this compile:
~/src/klibc$ make KLIBCKERNELSRC=pwd/../linux-2.6 EXTRA_KLIBCCFLAGS="-DDEBUG=1"
it be cool to be able to compile klibc again with global debug on. :)
Quoted 9 lines · maximilian attems
on top of the two easy patches I sent I am seeing this one:
usr/dash/exec.c: In function ‘find_command’:usr/dash/exec.c:290: error: storage size of ‘statb’ isn’t knownusr/dash/exec.c:299: warning: implicit declaration of function ‘stat64’usr/dash/exec.c:290: warning: unused variable ‘statb’ make[2]: *** [usr/dash/exec.o] Error 1hmm which include is
exec.cmissing?
What does config.h say?
Cheers,
Signature · 3 lines
Email: Herbert Xu <[email protected]> Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
Quoted 9 lines · Herbert Xu
Quoted 8 lines · maximilian attems
on top of the two easy patches I sent I am seeing this one:
usr/dash/exec.c: In function ???find_command???:usr/dash/exec.c:290: error: storage size of ???statb??? isn???t knownusr/dash/exec.c:299: warning: implicit declaration of function ???stat64???usr/dash/exec.c:290: warning: unused variable ???statb??? make[2]: *** [usr/dash/exec.o] Error 1
Quoted 3 lines
Quoted 1 line
hmm which include is
exec.cmissing?What does
config.hsay?
It says that the 64 bit operations are the same as the 32 bit ones, that's why I'm confused.
klibc dash config.h below:
/* config.h. Generated from config.h.in by configure. */ /* config.h.in. Generated from configure.ac by autoheader. */
/* Define if __attribute__((__alias__())) is supported */ #define HAVE_ALIAS_ATTRIBUTE 1
/* Define to 1 if you have the <alloca.h> header file. */ #define HAVE_ALLOCA_H 1
/* Define to 1 if you have the `bsearch' function. */ #define HAVE_BSEARCH 1
/* Define to 1 if you have the `faccessat' function. */ /* #undef HAVE_FACCESSAT */
/* Define to 1 if you have the `fnmatch' function. */ /* #undef HAVE_FNMATCH */
/* Define to 1 if you have the `getpwnam' function. */ #define HAVE_GETPWNAM 1
/* Define to 1 if you have the `getrlimit' function. */ /* #undef HAVE_GETRLIMIT */
/* Define to 1 if you have the `glob' function. */ /* #undef HAVE_GLOB */
/* Define to 1 if you have the `imaxdiv' function. */ /* #undef HAVE_IMAXDIV */
/* Define to 1 if you have the <inttypes.h> header file. */ #define HAVE_INTTYPES_H 1
/* Define to 1 if you have the `isalpha' function. */ #define HAVE_ISALPHA 1
/* Define to 1 if you have the `killpg' function. */ /* #undef HAVE_KILLPG */
/* Define to 1 if you have the <memory.h> header file. */ /* #undef HAVE_MEMORY_H */
/* Define to 1 if you have the `mempcpy' function. */ /* #undef HAVE_MEMPCPY */
/* Define to 1 if you have the `sigsetmask' function. */ /* #undef HAVE_SIGSETMASK */
/* Define to 1 if you have the <stdint.h> header file. */ #define HAVE_STDINT_H 1
/* Define to 1 if you have the <stdlib.h> header file. */ #define HAVE_STDLIB_H 1
/* Define to 1 if you have the `stpcpy' function. */ /* #undef HAVE_STPCPY */
/* Define to 1 if you have the `strchrnul' function. */ /* #undef HAVE_STRCHRNUL */
/* Define to 1 if you have the <strings.h> header file. */ /* #undef HAVE_STRINGS_H */
/* Define to 1 if you have the <string.h> header file. */ #define HAVE_STRING_H 1
/* Define to 1 if you have the `strsignal' function. */ #define HAVE_STRSIGNAL 1
/* Define to 1 if you have the `strtod' function. */ /* #undef HAVE_STRTOD */
/* Define to 1 if you have the `strtoimax' function. */ #define HAVE_STRTOIMAX 1
/* Define to 1 if you have the `strtoumax' function. */ #define HAVE_STRTOUMAX 1
/* Define to 1 if you have the `sysconf' function. */ /* #undef HAVE_SYSCONF */
/* Define to 1 if you have the <sys/stat.h> header file. */ #define HAVE_SYS_STAT_H 1
/* Define to 1 if you have the <sys/types.h> header file. */ #define HAVE_SYS_TYPES_H 1
/* Define to 1 if you have the <unistd.h> header file. */ #define HAVE_UNISTD_H 1
/* Name of package */
#define PACKAGE "dash"
/* Define to the address where bug reports for this package should be sent. */ #define PACKAGE_BUGREPORT ""
/* Define to the full name of this package. */
#define PACKAGE_NAME "dash"
/* Define to the full name and version of this package. */ #define PACKAGE_STRING "dash 0.5.6"
/* Define to the one symbol short name of this package. */ #define PACKAGE_TARNAME "dash"
/* Define to the home page for this package. */
#define PACKAGE_URL ""
/* Define to the version of this package. */
#define PACKAGE_VERSION "0.5.6"
/* Define if you build with -DSMALL */
#define SMALL 1
/* Define to 1 if you have the ANSI C header files. */ /* #undef STDC_HEADERS */
/* Enable extensions on AIX 3, Interix. */
#ifndef _ALL_SOURCE
# define _ALL_SOURCE 1 #endif /* Enable GNU extensions on systems that have them. */ #ifndef _GNU_SOURCE # define _GNU_SOURCE 1 #endif /* Enable threading extensions on Solaris. */ #ifndef _POSIX_PTHREAD_SEMANTICS # define _POSIX_PTHREAD_SEMANTICS 1 #endif /* Enable extensions on HP NonStop. */ #ifndef _TANDEM_SOURCE # define _TANDEM_SOURCE 1 #endif /* Enable general extensions on Solaris. */ #ifndef __EXTENSIONS__ # define __EXTENSIONS__ 1 #endif
/* Version number of package */
#define VERSION "0.5.6"
/* Define to 1 if on MINIX. */
/* #undef _MINIX */
/* Define to 2 if the system does not provide POSIX.1 features except with
this defined. */
/* #undef _POSIX_1_SOURCE */
/* Define to 1 if you need to in order for `stat' and other things to work. */ /* #undef _POSIX_SOURCE */
/* 64-bit operations are the same as 32-bit */
#define fstat64 fstat
/* 64-bit operations are the same as 32-bit */
#define lstat64 lstat
/* 64-bit operations are the same as 32-bit */
#define open64 open
/* klibc has bsd_signal instead of signal */
/* #undef signal */
/* 64-bit operations are the same as 32-bit */
#define stat64 stat
Quoted 3 lines · maximilian attems
It says that the 64 bit operations are the same as the 32 bit ones, that's why I'm confused.
Ah, klibc must be undefining stat64, which then causes struct stat64 to be undeclared.
I'll look into it.
Thanks,
Signature · 3 lines
Email: Herbert Xu <[email protected]> Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
Quoted 9 lines · Herbert Xu
Quoted 3 lines · maximilian attems
It says that the 64 bit operations are the same as the 32 bit ones, that's why I'm confused.
Ah, klibc must be undefining stat64, which then causes struct stat64 to be undeclared.
I'll look into it.
ihmm well seems to be a klibc bug and not a dash trouble:
~/src/klibc-latest$ egrep stat64 -r usr/klibc/ usr/klibc/SYSCALLS.def:<!ppc64> int stat64,stat::stat(const char *, struct stat *); usr/klibc/SYSCALLS.def:<!ppc64> int lstat64,lstat::lstat(const char *, struct stat *); usr/klibc/SYSCALLS.def:<!ppc64> int fstat64,fstat::fstat(int, struct stat *);
but no mention in the headers.