View Issue Details

IDProjectCategoryView StatusLast Update
0000870LDMudCompilation, Installationpublic2019-02-03 12:43
Reportermudlet Assigned ToGnomi  
PrioritynormalSeveritymajorReproducibilityalways
Status closedResolutionwon't fix 
Summary0000870: compile LDMUD under cygwin64 pkg-sqlite.c:839:18: error
DescriptionI can't compile LDMUD under cygwin64 it shows
gcc -I/usr/include/libxml2 -I/usr/include/mysql -fwrapv -DMSWIN -O2 -g -Wall -Wparentheses -Wshadow -Wstrict-overflow=2 -DMUD_LIB='"/tmp"' -DBINDIR='"/UNItopia/mudadm/magyra/bin"' -DERQ_DIR='"/UNItopia/mudadm/magyra/erq"' -c -o pkg-sqlite.o pkg-sqlite.c
pkg-sqlite.c: 在函数‘pkg_sqlite_init’中:
pkg-sqlite.c:839:18: 错误:未知的类型名‘sqlite3_mem_methods’ ------/////pkg-sqlite.c:839:18: error : Unknown type name ‘sqlite3_mem_methods’
     static const sqlite3_mem_methods mem_methods = {
                  ^~~~~~~~~~~~~~~~~~~
pkg-sqlite.c:840:9: 警告:初始化将指针赋给整数,未作类型转换 [-Wint-conversion]
         sl_mem_malloc,
         ^~~~~~~~~~~~~
pkg-sqlite.c:840:9: 附注:(在‘mem_methods’的初始化附近)
pkg-sqlite.c:840:9: 错误:初始值设定中的元素在载入时无法被计算出 ///Elements in initial settings cannot be computed when loaded

 ./unitopia
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.exe
checking for suffix of executables... .exe
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking for gcc option to accept ISO C99... none needed
checking for gcc option to accept ISO Standard C... (cached) none needed
checking whether compiler supports -fwrapv... yes
checking whether compiler supports -Wall... yes
checking whether compiler supports -Wparentheses... yes
checking whether compiler supports -Wshadow... no
checking whether compiler supports -Wstrict-overflow=2... yes
checking warning CFLAGS... -Wall -Wparentheses -Wstrict-overflow=2
checking for inline... inline
checking for typeof syntax and keyword spelling... typeof
checking how to run the C preprocessor... gcc -E
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking for preprocessor stringizing operator... yes
checking for variable-length arrays... yes
checking for working volatile... yes
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking whether byte ordering is bigendian... no
checking for int8_t... yes
checking for int16_t... yes
checking for int32_t... yes
checking for int64_t... yes
checking for unsigned long long int... yes
checking for long long int... yes
checking for intmax_t... yes
checking for intptr_t... yes
checking for uint8_t... yes
checking for uint16_t... yes
checking for uint32_t... yes
checking for uint64_t... yes
checking for uintmax_t... yes
checking for uintptr_t... yes
checking for long long int... (cached) yes
checking for unsigned long long int... (cached) yes
checking for long double... yes
checking for long double with more range or precision than double... yes
checking for ssize_t... yes
checking for size_t... yes
checking for off_t... yes
checking for mode_t... yes
checking for pid_t... yes
checking return type of signal handlers... void
checking size of char *... 8
checking size of int... 4
checking size of short... 2
checking size of long... 8
checking size of long long... 8
checking size of intptr_t... 8
checking size of intmax_t... 8
checking size of double... 8
checking for a BSD-compatible install... /usr/bin/install -c
checking for bison... bison -y
checking how to run the C preprocessor... gcc -E
checking for stdbool.h that conforms to C99... yes
checking for _Bool... yes
checking sys/rusage.h usability... no
checking sys/rusage.h presence... no
checking for sys/rusage.h... no
checking sys/time.h usability... yes
checking sys/time.h presence... yes
checking for sys/time.h... yes
checking for unistd.h... (cached) yes
checking for stdlib.h... (cached) yes
checking libc.h usability... no
checking libc.h presence... no
checking for libc.h... no
checking for memory.h... (cached) yes
checking for string.h... (cached) yes
checking bstring.h usability... no
checking bstring.h presence... no
checking for bstring.h... no
checking netdb.h usability... yes
checking netdb.h presence... yes
checking for netdb.h... yes
checking crypt.h usability... yes
checking crypt.h presence... yes
checking for crypt.h... yes
checking sys/param.h usability... yes
checking sys/param.h presence... yes
checking for sys/param.h... yes
checking sys/termios.h usability... yes
checking sys/termios.h presence... yes
checking for sys/termios.h... yes
checking limits.h usability... yes
checking limits.h presence... yes
checking for limits.h... yes
checking for dirent.h that defines DIR... yes
checking for library containing opendir... none required
checking whether time.h and sys/time.h may both be included... yes
checking for sys/time.h... (cached) yes
checking for unistd.h... (cached) yes
checking for alarm... yes
checking for working mktime... yes
checking for working alloca.h... yes
checking for alloca... yes
checking for fchmod... yes
checking for getrusage... yes
checking for memmem... yes
checking for getcwd... yes
checking for sysconf... yes
checking for gettimeofday... yes
checking for wait3... yes
checking for waitpid... yes
checking for fcntl... yes
checking for getdomainname... yes
checking for poll... yes
checking for trunc... yes
checking for mmap... yes
checking for getpagesize... yes
checking for main in -lm... yes
checking for main in -lsocket... no
checking for main in -lnsl... no
checking for main in -lucb... no
checking if -lresolv is needed... no
checking for crypt... no
checking for _crypt... no
checking for main in -lcrypt... yes
checking for crypt... yes
checking for _crypt... no
checking if inet_ntoa() ok... yes
checking for IPv6 support... yes
checking if -linet6 is needed... yes
checking for main in -linet6... no
checking for GnuTLS support... yes
checking if -lgnutls or similar is needed... yes
checking for gnutls_global_init in -lgnutls... yes
checking for libgcrypt... yes
checking for gcry_check_version in -lgcrypt... yes
checking for main in -lpcre... yes
checking for PCRE usability... yes
checking for iconv... yes
checking if iconv takes a non-const char**... yes
checking if -liconv is needed... yes
checking for libiconv_close in -liconv... yes
checking idna.h usability... yes
checking idna.h presence... yes
checking for idna.h... yes
checking stringprep.h usability... yes
checking stringprep.h presence... yes
checking for stringprep.h... yes
checking for stringprep_check_version in -lidn... yes
checking for mySQL... yes
checking for PostgresSQL... yes
checking for pkg-config... /usr/bin/pkg-config
checking pkg-config is at least version 0.9.0... yes
checking for SQLITE3... yes
checking for library containing pthread_create... none required
checking for PYTHON... no
checking for python3 support... no
Python3 library not found - disabling Python support
checking for XML2... yes
checking for main in -lz... yes
checking if rename handles directories... yes
checking full availability of struct rusage members... yes
checking struct rusage timeval members with tv_usec... yes
checking if return type of free is void... yes
checking if void* or char* from malloc... void *
checking if CHAR_BIT == 8 or undef... yes
checking nonblocking using ioctl with FIONBIO... yes
checking nonblocking using fcntl with O_NDELAY... yes
checking nonblocking using fcntl with FNDELAY... yes
checking if fcntl with SETOWN works... yes
checking if OOBINLINE works... yes
checking low optimization CFLAGS... -O -g
checking medium optimization CFLAGS... -O2 -g
checking highest optimization CFLAGS... -O4 -fomit-frame-pointer -g
checking if tail accepts the -n parameter... yes
checking if bison -y includes bogus malloc prototypes... no
checking for bison -y / <malloc.h> / -DSGI_SOURCE / afree name clash... no
checking for a working sbrk()... no
checking malloc overhead... 8
configure: creating ./config.status
config.status: creating Makefile
config.status: creating config.h
config.status: creating util/Makefile
config.status: creating util/indent/Makefile
config.status: creating util/xerq/Makefile
config.status: creating util/erq/Makefile
config.status: creating machine.h
config.status: machine.h is unchanged

WARNING: The following options were disabled because the system
lacked the necessary support: use-python.

TagsNo tags attached.
External Data (URL)

Activities

mudlet

2019-01-29 13:27

reporter   ~0002467

I add somecode in the pkg-sqlite.c then I can compile it. the code is :

typedef struct sqlite3_mem_methods sqlite3_mem_methods;

struct sqlite3_mem_methods {
  void *(*xMalloc)(int); /* Memory allocation function */
  void (*xFree)(void*); /* Free a prior allocation */
  void *(*xRealloc)(void*,int); /* Resize an allocation */
  int (*xSize)(void*); /* Return the size of an allocation */
  int (*xRoundup)(int); /* Round up request size to allocation size */
  int (*xInit)(void*); /* Initialize the memory allocator */
  void (*xShutdown)(void*); /* Deinitialize the memory allocator */
  void *pAppData; /* Argument to xInit() and xShutdown() */
};

Gnomi

2019-02-03 12:43

manager   ~0002468

This is a packaging error in Cygwin. They are removing the definition sqlite3_mem_methods without any apparent reason.
It's not our task to correct these things, otherwise we would have to bundle all 3rd party libraries with the driver, which we do not want.

Issue History

Date Modified Username Field Change
2019-01-28 15:11 mudlet New Issue
2019-01-29 13:27 mudlet Note Added: 0002467
2019-02-03 12:43 Gnomi Note Added: 0002468
2019-02-03 12:43 Gnomi Assigned To => Gnomi
2019-02-03 12:43 Gnomi Status new => closed
2019-02-03 12:43 Gnomi Resolution open => won't fix