最新消息:20190529 VPS服务器已从腾讯云香港换为Vultr新加坡,主题仍用朋友推荐的大前端D8

【已解决】MingW下,w3m-0.5.3中./configure时出错:configure: error: gc.h not found

MingW crifan 2273浏览 0评论

【问题】

折腾:

【记录】尝试把w3m添加到MingW中

的过程中,需要先去配置再编译。

但是配置./configrue时,却出错了,找不到gc.h:

Administrator@NYBDHB7EB3XEHP6 /e/Dev_Tools/w3m/w3m-0.5.3
$ ./configure
checking for g++... g++
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 g++ accepts -g... yes
checking for gawk... gawk
checking for gcc... gcc
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 how to run the C preprocessor... gcc -E
checking for a BSD-compatible install... /bin/install -c
checking whether ln -s works... no, using cp -p
checking whether make sets $(MAKE)... yes
checking for ranlib... ranlib
checking for perl... /bin/perl
checking for nkf... no
checking for man... no
checking build system type... i686-pc-mingw32
checking host system type... i686-pc-mingw32
checking if m17n support is enabled... yes
checking if unicode support is enabled... yes
checking if message l10n... no
checking if japanese support is enabled... no
checking which charset is used for display... UTF-8
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking whether NLS is requested... yes
checking for msgfmt... /mingw/bin/msgfmt
checking for gmsgfmt... /mingw/bin/msgfmt
checking for xgettext... /mingw/bin/xgettext
checking for msgmerge... /mingw/bin/msgmerge
checking for ld used by GCC... e:/dev_install_root/mingw/mingw32/bin/ld.exe
checking if the linker (e:/dev_install_root/mingw/mingw32/bin/ld.exe) is GNU ld... yes
checking for shared library run path origin... done
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for CFPreferencesCopyAppValue... no
checking for CFLocaleCopyCurrent... no
checking for GNU gettext in libc... no
checking for iconv... yes
checking for working iconv... yes
checking how to link with libiconv... -liconv
checking for GNU gettext in libintl... yes
checking whether to use NLS... yes
checking where the gettext function comes from... external libintl
checking how to link with libintl... -lintl
checking if color escape sequence for kterm/pxvt is enabled... yes
checking if ansi color escape sequence support is enabled... yes
checking if background color support is enabled... yes
checking if image is enabled... yes
checking image library... gtk2 gdk-pixbuf imlib imlib2
configure: WARNING: GdkPixbuf is not installed.  Install GdkPixbuf (version >= 2.0.0)
configure: WARNING: GdkPixbuf is not installed.  Install GdkPixbuf (version >= 0.16.0)
configure: WARNING: Imlib is not installed.  Install Imlib (version >= 1.9.8)
configure: WARNING: Imlib2 is not installed.  Install Imlib2 (version >= 1.0.5)
configure: WARNING: unable to build w3mimgdisplay with X11 support
checking if xface is enabled... yes
checking for uncompface... no
configure: WARNING: uncompface is not installed.
checking default keymap... w3m
checking if popup menu is enabled... yes
checking if mouse operation enabled... yes
checking if URL history is enabled... yes
checking if alarm is enabled... yes
checking if cookie is enabled... yes
checking if nntp is enabled... yes
checking if gopher is enabled... no
checking if dictionary lookup is enabled... yes
checking if help cgi is enabled... yes
checking if external URI loader is enabled... yes
checking if w3mmail is used... yes
checking if migemo is supported with... migemo -t egrep /usr/local/share/migemo/migemo-dict
checking which editor is used by default... /usr/bin/vi
checking which mailer is used by default... /usr/bin/mail
checking which external browser is used by default... /usr/bin/mozilla
checking for -lbsd... not found
checking for -lBSD... not found
checking for -l44bsd... not found
checking for -lsocket... not found
checking for -lnsl... not found
checking for -ldld... not found
checking for -ldl... not found
checking if IPv6 support is enabled... yes
checking if IPv6 API available... checking for getaddrinfo... no
checking for libinet6...
checking for pkg-config... no
checking if SSL is suported... yes
checking for SSL... no
checking for SSL library/header... /usr/openssl /usr/ssl /usr /usr/local/openssl /usr/local/ssl /usr/
checking for SSL_new in -lssl... no
checking if digest auth is enabled... no
checking for sqrt... yes
checking for Gpm_Open in -lgpm... no
checking terminal library... yes
checking for tgetent in -lterminfo... no
checking for tgetent in -lmytinfo... no
checking for tgetent in -ltermlib... no
checking for tgetent in -ltermcap... no
checking for tgetent in -lncurses... no
checking for tgetent in -lcurses... no
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 GC library exists... yes
checking gc.h usability... no
checking gc.h presence... no
checking for gc.h... no
checking GC header location... /usr /usr/local /home/Administrator
checking /usr/include... checking gc.h usability... no
checking gc.h presence... no
checking for gc.h... no
checking /usr/include/gc... checking gc.h usability... no
checking gc.h presence... no
checking for gc.h... no
checking /usr/local/include... checking gc.h usability... no
checking gc.h presence... no
checking for gc.h... no
checking /usr/local/include/gc... checking gc.h usability... no
checking gc.h presence... no
checking for gc.h... no
checking /home/Administrator/include... checking gc.h usability... no
checking gc.h presence... no
checking for gc.h... no
checking /home/Administrator/include/gc... checking gc.h usability... no
checking gc.h presence... no
checking for gc.h... no
configure: error: gc.h not found

【解决过程】

1.参考:

Re: From newbie: problems with installation of w3m

http://www.hpl.hp.com/personal/Hans_Boehm/gc/

下载gc.tar.gz,下载后解压,进入:

E:\Dev_Tools\gc\gc-7.2

再去执行./configure

2.然后gc的配置,终于完毕了:

Administrator@NYBDHB7EB3XEHP6 /e/Dev_Tools/gc/gc-7.2
$ ./configure
checking build system type... i686-pc-mingw32
checking host system type... i686-pc-mingw32
checking target system type... i686-pc-mingw32
checking GC version numbers... major=7 minor=2
checking for a BSD-compatible install... /bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking whether to enable maintainer-specific portions of Makefiles... no
checking for style of include used by make... GNU
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 dependency style of gcc... gcc3
checking whether gcc and cc understand -c and -o together... yes
checking for g++... g++
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking dependency style of g++... gcc3
checking dependency style of gcc... gcc3
checking for thread model used by GCC... win32
checking for inline... inline
checking for xlc... no
checking whether gcc supports -fno-strict-aliasing... yes
checking for dlopen in -ldl... no
checking whether to build shared libraries... yes
checking which machine-dependent code should be used...
checking how to print strings... printf
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... e:/dev_install_root/mingw/mingw32/bin/ld.exe
checking if the linker (e:/dev_install_root/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... no, using cp -p
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 how to convert i686-pc-mingw32 file names to i686-pc-mingw32 format... func_convert_file_msys_to_w32
checking how to convert i686-pc-mingw32 file names to toolchain format... func_convert_file_msys_to_w32
checking for e:/dev_install_root/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 dlltool... dlltool
checking how to associate runtime and link libraries... func_cygming_dll_for_implib
checking for ar... ar
checking for archiver @FILE support... @
checking for strip... strip
checking for ranlib... ranlib
checking command to parse /mingw/bin/nm output from gcc object... ok
checking for sysroot... no
checking for mt... no
checking if : is a manifest tool... no
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... yes
checking if gcc supports -c -o file.o... (cached) yes
checking whether the gcc linker (e:/dev_install_root/mingw/mingw32/bin/ld.exe) supports shared libraries... 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 how to run the C++ preprocessor... g++ -E
checking for ld used by g++... e:/dev_install_root/mingw/mingw32/bin/ld.exe
checking if the linker (e:/dev_install_root/mingw/mingw32/bin/ld.exe) is GNU ld... yes
checking whether the g++ linker (e:/dev_install_root/mingw/mingw32/bin/ld.exe) supports shared libraries... yes
checking for g++ option to produce PIC... -DDLL_EXPORT -DPIC
checking if g++ PIC flag -DDLL_EXPORT -DPIC works... yes
checking if g++ static flag -static works... yes
checking if g++ supports -c -o file.o... yes
checking if g++ supports -c -o file.o... (cached) yes
checking whether the g++ linker (e:/dev_install_root/mingw/mingw32/bin/ld.exe) supports shared libraries... yes
checking dynamic linker characteristics... Win32 ld.exe
checking how to hardcode library paths into programs... immediate
checking whether Solaris gcc optimization fix is necessary... no
checking sys/dg_sys_info.h usability... no
checking sys/dg_sys_info.h presence... no
checking for sys/dg_sys_info.h... no
checking for pkg-config... no
checking for ATOMIC_OPS... checking which libatomic_ops to use... internal
configure: creating ./config.status
config.status: creating Makefile
config.status: creating bdw-gc.pc
config.status: creating include/private/config.h
config.status: executing depfiles commands
config.status: executing libtool commands
config.status: executing default commands
=== configuring in libatomic_ops (/e/Dev_Tools/gc/gc-7.2/libatomic_ops)
configure: running /bin/sh ./configure --disable-option-checking '--prefix=/usr/local'  --cache-file=/dev/null --srcdir=
.
checking build system type... i686-pc-mingw32
checking host system type... i686-pc-mingw32
checking target system type... i686-pc-mingw32
checking for a BSD-compatible install... /bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking for ranlib... ranlib
checking for style of include used by make... GNU
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 dependency style of gcc... gcc3
checking whether gcc and cc understand -c and -o together... yes
checking dependency style of gcc... gcc3
checking how to run the C preprocessor... gcc -E
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -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 stdlib.h... (cached) yes
checking for unistd.h... (cached) yes
checking for sys/param.h... yes
checking for getpagesize... yes
checking for working mmap... no
checking for ANSI C header files... (cached) yes
checking for PIC compiler flag... "<none>"
checking for pthread_self in -lpthread... yes
configure: creating ./config.status
config.status: creating Makefile
config.status: creating pkgconfig/atomic_ops.pc
config.status: creating pkgconfig/atomic_ops-uninstalled.pc
config.status: creating doc/Makefile
config.status: creating src/Makefile
config.status: creating src/atomic_ops/Makefile
config.status: creating src/atomic_ops/sysdeps/Makefile
config.status: creating tests/Makefile
config.status: creating src/config.h
config.status: executing depfiles commands
config.status: executing default commands
 

2. 然后就是去make了。

3. 完毕后,再继续参考那人的:

I downloaded the package gc.tar.gz, and installed it with ‘$ ./configure’, `$ make’, `$ make check’ and `# make install’.

去make check。

4. 之后再去make install:

Administrator@NYBDHB7EB3XEHP6 /e/Dev_Tools/gc/gc-7.2
$ make install
make[1]: Entering directory `/e/Dev_Tools/gc/gc-7.2'
make[2]: Entering directory `/e/Dev_Tools/gc/gc-7.2'
test -z "/usr/local/lib" || /bin/mkdir -p "/usr/local/lib"
 /bin/sh ./libtool   --mode=install /bin/install -c   libgc.la libcord.la '/usr/local/lib'
libtool: install: /bin/install -c .libs/libgc.dll.a /usr/local/lib/libgc.dll.a
libtool: install: base_file=`basename libgc.la`
libtool: install:  dlpath=`/bin/sh 2>&1 -c '. .libs/'libgc.la'i; echo libgc-1.dll'`
libtool: install:  dldir=/usr/local/lib/`dirname ../bin/libgc-1.dll`
libtool: install:  test -d /usr/local/lib/../bin || mkdir -p /usr/local/lib/../bin
libtool: install:  /bin/install -c .libs/libgc-1.dll /usr/local/lib/../bin/libgc-1.dll
libtool: install:  chmod a+x /usr/local/lib/../bin/libgc-1.dll
libtool: install:  if test -n '' && test -n 'strip --strip-unneeded'; then eval 'strip --strip-unneeded /usr/local/lib/.
./bin/libgc-1.dll' || exit 0; fi
libtool: install: /bin/install -c .libs/libgc.lai /usr/local/lib/libgc.la
libtool: install: /bin/install -c .libs/libcord.dll.a /usr/local/lib/libcord.dll.a
libtool: install: base_file=`basename libcord.la`
libtool: install:  dlpath=`/bin/sh 2>&1 -c '. .libs/'libcord.la'i; echo libcord-1.dll'`
libtool: install:  dldir=/usr/local/lib/`dirname ../bin/libcord-1.dll`
libtool: install:  test -d /usr/local/lib/../bin || mkdir -p /usr/local/lib/../bin
libtool: install:  /bin/install -c .libs/libcord-1.dll /usr/local/lib/../bin/libcord-1.dll
libtool: install:  chmod a+x /usr/local/lib/../bin/libcord-1.dll
libtool: install:  if test -n '' && test -n 'strip --strip-unneeded'; then eval 'strip --strip-unneeded /usr/local/lib/.
./bin/libcord-1.dll' || exit 0; fi
libtool: install: /bin/install -c .libs/libcord.lai /usr/local/lib/libcord.la
libtool: install: /bin/install -c .libs/libgc.a /usr/local/lib/libgc.a
libtool: install: chmod 644 /usr/local/lib/libgc.a
libtool: install: ranlib /usr/local/lib/libgc.a
libtool: install: /bin/install -c .libs/libcord.a /usr/local/lib/libcord.a
libtool: install: chmod 644 /usr/local/lib/libcord.a
libtool: install: ranlib /usr/local/lib/libcord.a
test -z "/usr/local/share/gc" || /bin/mkdir -p "/usr/local/share/gc"
 /bin/install -c -m 644 doc/barrett_diagram doc/debugging.html doc/gc.man doc/gcdescr.html doc/README doc/README.amiga d
oc/README.arm.cross doc/README.autoconf doc/README.changes doc/README.cmake doc/README.contributors doc/README.cords doc
/README.DGUX386 doc/README.dj doc/README.environment doc/README.ews4800 doc/README.hp doc/README.linux doc/README.Mac do
c/README.MacOSX doc/README.macros doc/README.OS2 doc/README.rs6000 doc/README.sgi doc/README.solaris2 doc/README.uts doc
/README.win32 doc/README.win64 doc/overview.html doc/tree.html doc/leak.html doc/gcinterface.html doc/scale.html doc/REA
DME.darwin doc/simple_example.html doc/porting.html '/usr/local/share/gc'
test -z "/usr/local/include" || /bin/mkdir -p "/usr/local/include"
 /bin/install -c -m 644 include/extra/gc.h '/usr/local/include'
test -z "/usr/local/lib/pkgconfig" || /bin/mkdir -p "/usr/local/lib/pkgconfig"
 /bin/install -c -m 644 bdw-gc.pc '/usr/local/lib/pkgconfig'
test -z "/usr/local/include/gc" || /bin/mkdir -p "/usr/local/include/gc"
 /bin/install -c -m 644 include/gc.h include/gc_typed.h include/gc_inline.h include/gc_mark.h include/weakpointer.h incl
ude/new_gc_alloc.h include/gc_allocator.h include/gc_backptr.h include/gc_gcj.h include/leak_detector.h include/gc_amiga
_redirects.h include/gc_pthread_redirects.h include/gc_config_macros.h include/gc_tiny_fl.h include/gc_version.h include
/cord.h '/usr/local/include/gc'
make[2]: Leaving directory `/e/Dev_Tools/gc/gc-7.2'
make[1]: Leaving directory `/e/Dev_Tools/gc/gc-7.2'

5.gc安装完毕后,再去重新配置和安装w3m,还是先去执行./configure,这下终于正常配置成功了。

 

【总结】

w3m-0.5.3在

./configure

时出现

configure: error: gc.h not found

是由于w3m在0.5.0之后,不再包含gc了,所以需要自己另外下载安装gc,然后才能继续安装w3m。

转载请注明:在路上 » 【已解决】MingW下,w3m-0.5.3中./configure时出错:configure: error: gc.h not found

发表我的评论
取消评论

表情

Hi,您需要填写昵称和邮箱!

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址
67 queries in 0.099 seconds, using 19.00MB memory