SqlCipher Mingw/msys 问题

Posted

技术标签:

【中文标题】SqlCipher Mingw/msys 问题【英文标题】:SqlCipher Mingw/msys problem 【发布时间】:2010-03-25 13:17:02 【问题描述】:

我有一个问题 - 我无法编译 SqlCipher。 我正在使用这个http://groups.google.com/group/sqlcipher/browse_thread/thread/55c6296b56bf4533/c792bbec6df7d4f4?tvc=2#c792bbec6df7d4f4 指令(感谢 Sam),但仍然无法编译它。我执行以下操作:

$ ./configure --disable-tcl CFLAGS="-DSQLITE_HAS_CODEC -I/usr/usr/src/openssl/i
nclude" LDFLAGS="-leay32"
checking build system type... i686-pc-mingw32
checking host system type... i686-pc-mingw32
checking for gcc... gcc
checking for C compiler default output file name... rm: cannot remove directory
`conftest': Is a directory
a.exe
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables... .exe
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 a sed that does not truncate output... /bin/sed
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for fgrep... /bin/grep -F
checking for ld used by gcc... c:/mingw/mingw32/bin/ld.exe
checking if the linker (c:/mingw/mingw32/bin/ld.exe) is GNU ld... yes
checking for BSD- or MS-compatible name lister (nm)... /mingw/bin/nm
checking the name lister (/mingw/bin/nm) interface... BSD nm
checking whether ln -s works... yes
checking the maximum length of command line arguments... 8192
checking whether the shell understands some XSI constructs... yes
checking whether the shell understands "+="... yes
checking for c:/mingw/mingw32/bin/ld.exe option to reload object files... -r
checking for objdump... objdump
checking how to recognize dependent libraries... file_magic ^x86 archive import|
^x86 DLL
checking for ar... ar
checking for strip... strip
checking for ranlib... ranlib
checking command to parse /mingw/bin/nm output from gcc object... ok
checking how to run the C preprocessor... gcc -E
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 for dlfcn.h... no
checking for objdir... .libs
checking if gcc supports -fno-rtti -fno-exceptions... no
checking for gcc option to produce PIC... -DDLL_EXPORT -DPIC
checking if gcc PIC flag -DDLL_EXPORT -DPIC works... yes
checking if gcc static flag -static works... yes
checking if gcc supports -c -o file.o... ./configure: line 10444:  4076 Segmenta
tion fault      (core dumped) $RM -r conftest 2>/dev/null
mkdir: cannot create directory `conftest': File exists
mkdir: cannot create directory `out': File exists
rmdir: out: Directory not empty
      0 [main] rm 5688 open_stackdumpfile: Dumping stack trace to rm.exe.stackdu
mp
./configure: line 10444:  5688 Segmentation fault      (core dumped) $RM -r conf
test
yes
checking if gcc supports -c -o file.o... (cached) yes
checking whether the gcc linker (c:/mingw/mingw32/bin/ld.exe) supports shared li
braries... yes
checking whether -lc should be explicitly linked in... yes
checking dynamic linker characteristics... Win32 ld.exe
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... yes
checking for a BSD-compatible install...       0 [main] rm 468 open_stackdumpfil
e: Dumping stack trace to rm.exe.stackdump
./configure: line 10509:   468 Segmentation fault      (core dumped) rm -rf conf
test.one conftest.two conftest.dir
mkdir: cannot create directory `conftest.dir': File exists
      0 [main] rm 5040 open_stackdumpfile: Dumping stack trace to rm.exe.stackdu
mp
./configure: line 10554:  5040 Segmentation fault      (core dumped) rm -rf conf
test.one conftest.two conftest.dir
/bin/install -c
checking for gawk... gawk
checking for special C compiler options needed for large files... no
checking for _FILE_OFFSET_BITS value needed for large files... unknown
checking for _LARGE_FILES value needed for large files... unknown
checking for int8_t... yes
checking for int16_t... yes
checking for int32_t... yes
checking for int64_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 uintptr_t... yes
checking for sys/types.h... (cached) yes
checking for stdlib.h... (cached) yes
checking for stdint.h... (cached) yes
checking for inttypes.h... (cached) yes
checking for usleep... yes
checking for fdatasync... no
checking for localtime_r... no
checking for gmtime_r... no
checking for localtime_s... no
checking for tclsh8.4... no
checking for tclsh... no
Warning: can't find tclsh - defaulting to non-amalgamation build.
./configure: line 12322: tclsh: command not found
configure: Version set to 3.6
configure: Release set to 3.6.21
configure: Version number set to 3006021
checking whether to support threadsafe operation... yes
checking for library containing pthread_create... no
checking whether to allow connections to be shared across threads... no
checking whether threads can override each others locks... no
checking whether to support shared library linked as release mode or not... no
checking whether to use an in-ram database for temporary tables... no
checking if executables have the .exe suffix... unknown
checking host system type... (cached) i686-pc-mingw32
checking for library containing tgetent... no
checking for readline in -lreadline... no
checking readline.h usability... no
checking readline.h presence... no
checking for readline.h... no
checking for /usr/include/readline.h... no
checking for /usr/include/readline/readline.h... no
checking for /usr/local/include/readline.h... no
checking for /usr/local/include/readline/readline.h... no
checking for /usr/local/readline/include/readline.h... no
checking for /usr/local/readline/include/readline/readline.h... no
checking for /usr/contrib/include/readline.h... no
checking for /usr/contrib/include/readline/readline.h... no
checking for /mingw/include/readline.h... no
checking for /mingw/include/readline/readline.h... no
checking for library containing fdatasync... no
configure: creating ./config.status
config.status: creating Makefile
config.status: creating sqlite3.pc
config.status: creating config.h
config.status: config.h is unchanged
config.status: executing libtool commands
      0 [main] rm 5064 open_stackdumpfile: Dumping stack trace to rm.exe.stackdu
mp
./config.status: line 1895:  5064 Segmentation fault      (core dumped) rm -fr "
$tmp"

ilukyanov@DEPONEOS-230-3 /usr/usr/src/sqlcipher
$ make
make: *** No targets specified and no makefile found.  Stop.

ilukyanov@DEPONEOS-230-3 /usr/usr/src/sqlcipher
$ mingw32-make
tclsh ./tool/mksqlite3h.tcl . >sqlite3.h
/bin/sh: sqlite3.h: No such file or directory
mingw32-make: *** [sqlite3.h] Error 1

怎么了?

【问题讨论】:

【参考方案1】:

我遇到了完全相同的问题,这就是我解决它的方法

你必须先从here安装tcl

现在,用文本编辑器打开 C:\msys\1.0\etc\fstab 并在最后添加这一行: c:/Tcl /tcl

【讨论】:

【参考方案2】:

在我看来,您的 msys / mingw 安装有问题。如果您查看配置结果,它会显示 rm 失败并且实际上在配置中间转储了核心。我会认真考虑卸载 MinGW 和 msys 并从头开始重新安装。验证一些基本命令是否有效(即 rm),然后尝试从源代码重建。

要注意的另一件事是,如果您没有安装 TCL,则标准合并构建将失败。因此,您应该在 msys 下安装 TCL,安装 ActiveState 分发并将 tclsh 链接到 tclsh85,或者使用 --disable-amalgamation 配置 SQLCipher。

【讨论】:

谢谢你,斯蒂芬。你的建议有帮助!但是还有另一个麻烦。我是在群里发的。

以上是关于SqlCipher Mingw/msys 问题的主要内容,如果未能解决你的问题,请参考以下文章

Mingw+MSYS 中的 libevent 静态编译错误

如何安装 MinGW-w64 和 MSYS2?

让 mingw-get 正确安装 - 缺少 mingw/msys 路径以及更多!

在 msysgit 中运行 MinGW/MSYS 工具

使用 MinGW/MSYS 制作“xz-5.2.1”时出错

MinGW/MSYS 外壳颜色