Closed CraftedCat closed 2 years ago
Thanks for the report.
I don't have access to a Windows/MinGW machine in order to test builds, so I am going to need your help to solve this issue.
Please attach a copy of the config.h file generated during your build.
Please add these changes and try to build again:
In the AC_CHECK_HEADERS
call in configure.ac
, add sys/ipc.h
just before sys/shm.h
.
In src/define.h
add these lines just before sys/shm.h
:
#ifdef HAVE_SYS_IPC_H
#include <sys/ipc.h>
#endif
I don't see sys/shm.h and
#include <sys/ipc.h>
in src/define.h
/ config.h. Generated from config.h.in by configure. / / config.h.in. Generated from configure.ac by autoheader. /
/ Define to 1 if using 'alloca.c'. / / #undef C_ALLOCA /
/ Define to 1 to force debug dump file creation / / #undef DEBUG_ALL /
/ Define to 1 if translation of program messages to the user's native language is requested. /
/ Define to 1 if you have the `alarm' function. /
/ Define to 1 if you have 'alloca', as a function or macro. /
/ Define to 1 if
/ Define to 1 if you have the `argz_count' function. / / #undef HAVE_ARGZ_COUNT /
/ Define to 1 if you have the
/ Define to 1 if you have the `argz_next' function. / / #undef HAVE_ARGZ_NEXT /
/ Define to 1 if you have the `argz_stringify' function. / / #undef HAVE_ARGZ_STRINGIFY /
/ Define to 1 if you have the `asprintf' function. /
/ define if the Boost library is available /
/ define if the Boost::Python library is available /
/ Define to 1 if the compiler understands __builtin_expect. /
/ Define to 1 if you have the MacOS X function CFLocaleCopyCurrent in the CoreFoundation framework. / / #undef HAVE_CFLOCALECOPYCURRENT /
/ Define to 1 if you have the MacOS X function CFPreferencesCopyAppValue in the CoreFoundation framework. / / #undef HAVE_CFPREFERENCESCOPYAPPVALUE /
/ Define to 1 if you have the `chdir' function. /
/ Define to 1 if you have the
/ Define if the GNU dcgettext() function is already present or preinstalled. /
/ Define to 1 if you have the declaration of `feof_unlocked', and to 0 if you don't. /
/ Define to 1 if you have the declaration of `fgets_unlocked', and to 0 if you don't. /
/ Define to 1 if you have the declaration of `getc_unlocked', and to 0 if you don't. /
/ Define to 1 if you have the declaration of `_snprintf', and to 0 if you don't. /
/ Define to 1 if you have the declaration of `_snwprintf', and to 0 if you don't. /
/ Define to 1 if you have the
/ Define to 1 if you have the
/ Define to 1 if you don't have vprintf' but do have
_doprnt.' /
/ #undef HAVE_DOPRNT /
/ Define to 1 if you have the
/ Define to 1 if you have the
/ Define to 1 if you have the `fork' function. / / #undef HAVE_FORK /
/ Define to 1 if fseeko (and presumably ftello) exists and is declared. /
/ Define to 1 if you have the `fwprintf' function. /
/ Define to 1 if you have the
/ Define to 1 if you have the `getcwd' function. /
/ Define to 1 if you have the `getegid' function. / / #undef HAVE_GETEGID /
/ Define to 1 if you have the `geteuid' function. / / #undef HAVE_GETEUID /
/ Define to 1 if you have the `getgid' function. / / #undef HAVE_GETGID /
/ Define to 1 if you have the `getpagesize' function. /
/ Define if the GNU gettext() function is already present or preinstalled. /
/ Define to 1 if you have the `getuid' function. / / #undef HAVE_GETUID /
/ Define to 1 if you have the `get_current_dir_name' function. / / #undef HAVE_GET_CURRENT_DIR_NAME /
/ Define if you have the iconv() function and it works. /
/ Define if you have the 'intmax_t' type in
/ Define to 1 if you have the
/ Define if
/ Define if you have
/ Define if your
/ Define to 1 if you have the
/ Define to 1 if the system has the type `long long int'. /
/ Define to 1 if `lstat' has the bug that it succeeds when given the zero-length file name argument. /
/ Define to 1 if your system has a GNU libc compatible `malloc' function, and to 0 otherwise. /
/ Define to 1 if you have the `memchr' function. /
/ Define to 1 if you have the `memmove' function. /
/ Define to 1 if you have the `mempcpy' function. /
/ Define to 1 if you have the `memset' function. /
/ Define to 1 if you have the <minix/config.h> header file. / / #undef HAVE_MINIX_CONFIG_H /
/ Define to 1 if you have a working `mmap' system call. / / #undef HAVE_MMAP /
/ Define to 1 if you have the `munmap' function. / / #undef HAVE_MUNMAP /
/ Define to 1 if you have the
/ Define if you have
/ Define if your printf() function supports format strings with positions. / / #undef HAVE_POSIX_PRINTF /
/ Define if the
/ Define if the POSIX multithreading library has read/write locks. /
/ Define to 1 if you have the `putenv' function. /
/ If available, contains the Python version number currently in use. /
/ Define to 1 if your system has a GNU libc compatible `realloc' function, and to 0 otherwise. /
/ Define to 1 if you have the `regcomp' function. / / #undef HAVE_REGCOMP /
/ Define to 1 if you have the regexec function. /
/ Define to 1 if you have the
/ Define to 1 if you have the
/ Define to 1 if you have the `setenv' function. / / #undef HAVE_SETENV /
/ Define to 1 if you have the `setlocale' function. /
/ Define to 1 if you have the
/ Define to 1 if you have the `snprintf' function. /
/ Define to 1 if `stat' has the bug that it succeeds when given the zero-length file name argument. / / #undef HAVE_STAT_EMPTY_STRING_BUG /
/ Define to 1 if you have the
/ Define to 1 if stdbool.h conforms to C99. /
/ Define to 1 if you have the
/ Define to 1 if you have the
/ Define if
/ Define to 1 if you have the
/ Define to 1 if you have the
/ Define to 1 if you have the `stpcpy' function. / / #undef HAVE_STPCPY /
/ Define to 1 if you have the `strcasecmp' function. /
/ Define to 1 if you have the `strchr' function. /
/ Define to 1 if you have the `strdup' function. /
/ Define to 1 if you have the `strerror' function. /
/ Define to 1 if you have the `strftime' function. /
/ Define to 1 if you have the
/ Define to 1 if you have the
/ Define to 1 if you have the `strncasecmp' function. /
/ Define to 1 if you have the `strpbrk' function. /
/ Define to 1 if you have the `strrchr' function. /
/ Define to 1 if you have the `strstr' function. /
/ Define to 1 if you have the `strtol' function. /
/ Define to 1 if you have the `strtoul' function. /
/ Define to 1 if you have the <sys/dir.h> header file, and it defines `DIR'. / / #undef HAVE_SYS_DIR_H /
/ Define to 1 if you have the <sys/ndir.h> header file, and it defines `DIR'. / / #undef HAVE_SYS_NDIR_H /
/ Define to 1 if you have the <sys/param.h> header file. /
/ Define to 1 if you have the <sys/shm.h> header file. / / #undef HAVE_SYS_SHM_H /
/ Define to 1 if you have the <sys/stat.h> header file. /
/ Define to 1 if you have the <sys/time.h> header file. /
/ Define to 1 if you have the <sys/types.h> header file. /
/ Define to 1 if you have <sys/wait.h> that is POSIX.1 compatible. / / #undef HAVE_SYS_WAIT_H /
/ Define to 1 if you have the
/ Define to 1 if you have the `tsearch' function. /
/ Define if you have the 'uintmax_t' type in
/ Define to 1 if you have the
/ Define to 1 if the system has the type `unsigned long long int'. /
/ Define to 1 if you have the `vfork' function. / / #undef HAVE_VFORK /
/ Define to 1 if you have the
/ Define to 1 or 0, depending whether the compiler supports simple visibility declarations. /
/ Define to 1 if you have the `vprintf' function. /
/ Define to 1 if you have the
/ Define if you have the 'wchar_t' type. /
/ Define to 1 if you have the `wcslen' function. /
/ Define if you have the 'wint_t' type. /
/ Define to 1 if `fork' works. / / #undef HAVE_WORKING_FORK /
/ Define to 1 if `vfork' works. / / #undef HAVE_WORKING_VFORK /
/ Define to 1 if the system has the type `_Bool'. /
/ Define to 1 if you have the `__fsetlocking' function. / / #undef HAVE___FSETLOCKING /
/ Define as const if the declaration of iconv() needs const. /
/ Define if integer division by zero raises signal SIGFPE. /
/ Define to 1 if `lstat' dereferences a symlink specified with a trailing slash. / / #undef LSTAT_FOLLOWS_SLASHED_SYMLINK /
/ Define to the sub-directory where libtool stores uninstalled libraries. /
/ Name of package /
/ Define to the address where bug reports for this package should be sent. /
/ Define to the full name of this package. /
/ Define to the full name and version of this package. /
/ Define to the one symbol short name of this package. /
/ Define to the home page for this package. /
/ Define to the version of this package. /
/ Define if
/ Define if the pthread_in_use() detection is hard. / / #undef PTHREAD_IN_USE_DETECTION_HARD /
/ The size of `off_t', as computed by sizeof. /
/ Define as the maximum value of type 'size_t', if the system doesn't define it. / / #undef SIZE_MAX /
/ If using the C implementation of alloca, define if you know the direction of stack growth for your system; otherwise it will be automatically deduced at runtime. STACK_DIRECTION > 0 => grows toward higher addresses STACK_DIRECTION < 0 => grows toward lower addresses STACK_DIRECTION = 0 => direction of growth unknown / / #undef STACK_DIRECTION /
/ Define to 1 if all of the C90 standard headers exist (not just the ones required in a freestanding environment). This macro is provided for backward compatibility; new code need not use it. /
/ Define to 1 if your <sys/time.h> declares `struct tm'. / / #undef TM_IN_SYS_TIME /
/ Define if the POSIX multithreading library can be used. /
/ Define if references to the POSIX multithreading library should be made weak. /
/ Define if the GNU Pth multithreading library can be used. / / #undef USE_PTH_THREADS /
/ Define if references to the GNU Pth multithreading library should be made weak. / / #undef USE_PTH_THREADS_WEAK /
/ Define if the old Solaris multithreading library can be used. / / #undef USE_SOLARIS_THREADS /
/ Define if references to the old Solaris multithreading library should be made weak. / / #undef USE_SOLARIS_THREADS_WEAK /
/ Enable extensions on AIX 3, Interix. /
/ Enable general extensions on macOS. /
/ Enable general extensions on Solaris. /
/ Enable GNU extensions on systems that have them. /
/ Enable X/Open compliant socket functions that do not require linking with -lxnet on HP-UX 11.11. /
/ Identify the host operating system as Minix. This macro does not affect the system headers' behavior. A future release of Autoconf may stop defining this macro. /
/ # undef _MINIX /
/ Enable general extensions on NetBSD. Enable NetBSD compatibility extensions on Minix. /
/ Enable OpenBSD compatibility extensions on NetBSD. Oddly enough, this does nothing on OpenBSD. /
/ Define to 1 if needed for POSIX-compatible behavior. /
/ # undef _POSIX_SOURCE /
/ Define to 2 if needed for POSIX-compatible behavior. /
/ # undef _POSIX_1_SOURCE /
/ Enable POSIX-compatible threading on Solaris. /
/ Enable extensions specified by ISO/IEC TS 18661-5:2014. /
/ Enable extensions specified by ISO/IEC TS 18661-1:2014. /
/ Enable extensions specified by ISO/IEC TS 18661-2:2015. /
/ Enable extensions specified by ISO/IEC TS 18661-4:2015. /
/ Enable extensions specified by ISO/IEC TS 18661-3:2015. /
/ Enable extensions specified by ISO/IEC TR 24731-2:2010. /
/ Enable extensions specified by ISO/IEC 24747:2009. /
/ Enable extensions on HP NonStop. /
/ Enable X/Open extensions. Define to 500 only if necessary to make mbstate_t available. /
/ # undef _XOPEN_SOURCE /
/ Define if the Win32 multithreading API can be used. / / #undef USE_WIN32_THREADS /
/ Version number of package /
/ Number of bits in a file offset, on hosts where this is settable. /
/ Define to 1 to make fseeko visible on some hosts (e.g. glibc 2.2). / / #undef _LARGEFILE_SOURCE /
/ Define for large files, on AIX-style hosts. / / #undef _LARGE_FILES /
/ Define to empty if `const' does not conform to ANSI C. / / #undef const /
/ Define to __inline__' or
__inline' if that's what the C compiler
calls it, or to nothing if 'inline' is not supported under any name. /
/ #undef inline /
/ Define to rpl_malloc if the replacement function should be used. / / #undef malloc /
/ Define to `long int' if <sys/types.h> does not define. / / #undef off_t /
/ Define as a signed integer type capable of holding a process identifier. / / #undef pid_t /
/ Define as the type of the result of subtracting two pointers, if the system doesn't define it. / / #undef ptrdiff_t /
/ Define to rpl_realloc if the replacement function should be used. / / #undef realloc /
/ Define to `unsigned int' if <sys/types.h> does not define. / / #undef size_t /
/* Define to unsigned long or unsigned long long if
@CraftedCat thanks for the report and the details!
I made a commit that should fix this particular error, please update to the latest git version and try again.
Since this particular issue is fixed I am closing this bug now.
If you get a new build failure with a different error message, then please file a new issue.
PS: for future issues, please attach files to GitHub issues instead of pasting them.
I don't see nay pull requests....
PS: for future issues, please attach files to GitHub issues instead of pasting them. github doesn't allow you to attach .h files
No pull request needed, the fix was pushed to the main git branch.
-- bye, pabs
Hi! Cant compile on minGW...
define.h:87:17: warning: '_fseeki64' redeclared without dllimport attribute: previous dllimport ignored [-Wattributes] 87 | int cdecl _fseeki64(FILE *, __int64, int); | ^
~~~~ define.h:88:21: warning: '_ftelli64' redeclared without dllimport attribute: previous dllimport ignored [-Wattributes] 88 | int64 __cdecl _ftelli64(FILE ); | ^~~~~ readpst.c: In function 'main': readpst.c:595:28: warning: implicit declaration of function 'shmget' [-Wimplicit-function-declaration] 595 | shared_memory_id = shmget(IPC_PRIVATE, sizeof(sem_t)2, 0777); | ^~readpst.c:595:35: error: 'IPC_PRIVATE' undeclared (first use in this function); did you mean 'IMN_PRIVATE'? 595 | shared_memory_id = shmget(IPC_PRIVATE, sizeof(sem_t)2, 0777); | ^~~| IMN_PRIVATE readpst.c:595:35: note: each undeclared identifier is reported only once for each function it appears in readpst.c:597:40: warning: implicit declaration of function 'shmat' [-Wimplicit-function-declaration] 597 | global_children = (sem_t )shmat(shared_memory_id, NULL, 0); | ^~~~~ readpst.c:597:31: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast] 597 | global_children = (sem_t *)shmat(shared_memory_id, NULL, 0); | ^ readpst.c:604:13: warning: implicit declaration of function 'shmctl' [-Wimplicit-function-declaration] 604 | shmctl(shared_memory_id, IPC_RMID, NULL); | ^~readpst.c:604:38: error: 'IPC_RMID' undeclared (first use in this function) 604 | shmctl(shared_memory_id, IPC_RMID, NULL); | ^~~~ readpst.c:673:9: warning: implicit declaration of function 'shmdt' [-Wimplicit-function-declaration] 673 | shmdt(global_children); | ^~~~~ make[2]: [Makefile:791: readpst-readpst.o] Error 1 make[2]: Leaving directory '/home/gdvvl/libpst/src' make[1]: [Makefile:569: all-recursive] Error 1 make[1]: Leaving directory '/home/gdvvl/libpst' make: *** [Makefile:457: all] Error 2