flagflag  If you want to see English page, please click "English" Button at Left.

W3mコンパイル anchor.png

CentOS7でインストールできないため、ソールからインストール。

Page Top

手順 anchor.png

# tar xzfv w3m-0.5.3.tar.gz
# cd w3m-0.5.3
# yum install ncurses* 
# ./configure --with-termlib=ncurses --disable-mouse
# make

ここでエラー

gcc  -I. -I. -g -O2 -I./libwc  -I/usr/local/openssl/include/openssl -I/usr/local/openssl/include  -DHAVE_CONFIG_H -DAUXBIN_DIR=\"/usr/local/libexec/w3m\" -DCGIBIN_DIR=\"/usr/local/libexec/w3m/cgi-bin\" -DHELP_DIR=\"/usr/local/share/w3m\" -DETC_DIR=\"/usr/local/etc\" -DCONF_DIR=\"/usr/local/etc/w3m\" -DRC_DIR=\"~/.w3m\" -DLOCALEDIR=\"/usr/local/share/locale\"   -c -o main.o main.c
In file included from html.h:10:0,                                                                                                                           
                 from fm.h:39,                                                                                                                               
                 from main.c:3:                                                                                                                              
istream.h:23:8: error: redefinition of 'struct file_handle'                                                                                                  
 struct file_handle {
        ^                                                                                                                                                    
In file included from /usr/include/bits/fcntl.h:61:0,                                                                                                        
                 from /usr/include/fcntl.h:35,                                                                                                               
                 from istream.h:14,                                                                                                                          
                 from html.h:10,                                                                                                                             
                 from fm.h:39,                                                                                                                               
                 from main.c:3:                                                                                                                              
/usr/include/bits/fcntl-linux.h:300:8: note: originally defined here                                                                                         
 struct file_handle
        ^                                                                                                                                                    
main.c: In function 'main':                                                                                                                                  
main.c:836:23: error: void value not ignored as it ought to be                                                                                               
     orig_GC_warn_proc = GC_set_warn_proc(wrap_GC_warn_proc);
                       ^                                                                                                                                     
main.c: In function 'getChar':                                                                                                                               
main.c:2264:5: warning: passing argument 1 of 'wtf_parse1' from incompatible pointer type [enabled by default]                                               
     return wc_any_to_ucs(wtf_parse1(&p));
     ^                                                                                                                                                       
In file included from fm.h:44:0,                                                                                                                             
                 from main.c:3:                                                                                                                              
./libwc/wtf.h:71:19: note: expected 'wc_uchar **' but argument is of type 'char **'                                                                          
 extern wc_wchar_t wtf_parse1(wc_uchar **p);
                   ^                                                                                                                                         
gmake: *** [main.o] Error 1

調べた結果以下を参照し、パッチをDL https://build.opensuse.org/package/view_​file?file=w3m-fh-def.patch&package=w3m&p​roject=network&rev=02bc48adba1f62318d8c9​3eacb2aaab6

--- istream.c.orig
+++ istream.c
@@ -22,8 +22,8 @@
 static void basic_close(int *handle);
 static int basic_read(int *handle, char *buf, int len);
 
-static void file_close(struct file_handle *handle);
-static int file_read(struct file_handle *handle, char *buf, int len);
+static void file_close(struct w3m_file_handle *handle);
+static int file_read(struct w3m_file_handle *handle, char *buf, int len);
 
 static int str_read(Str handle, char *buf, int len);
 
@@ -114,7 +114,7 @@ newFileStream(FILE * f, void (*closep) (
     stream = New(union input_stream);
     init_base_stream(&stream->base, STREAM_BUF_SIZE);
     stream->file.type = IST_FILE;
-    stream->file.handle = New(struct file_handle);
+    stream->file.handle = New(struct w3m_file_handle);
     stream->file.handle->f = f;
     if (closep)
 	stream->file.handle->close = closep;
@@ -658,13 +658,13 @@ basic_read(int *handle, char *buf, int l
 }
 
 static void
-file_close(struct file_handle *handle)
+file_close(struct w3m_file_handle *handle)
 {
     handle->close(handle->f);
 }
 
 static int
-file_read(struct file_handle *handle, char *buf, int len)
+file_read(struct w3m_file_handle *handle, char *buf, int len)
 {
     return fread(buf, 1, len, handle->f);
 }
--- istream.h.orig
+++ istream.h
@@ -20,7 +20,7 @@ struct stream_buffer {
 
 typedef struct stream_buffer *StreamBuffer;
 
-struct file_handle {
+struct w3m_file_handle {
     FILE *f;
     void (*close) ();
 };
@@ -53,7 +53,7 @@ struct base_stream {
 
 struct file_stream {
     struct stream_buffer stream;
-    struct file_handle *handle;
+    struct w3m_file_handle *handle;
     char type;
     char iseos;
     int (*read) ();

https://lists.freebsd.org/pipermail/free​bsd-ports-bugs/2013-October/264429.html

--- main.c.orig	2011-01-04 10:42:19.000000000 +0100
+++ main.c	2013-10-21 13:43:11.000000000 +0200
@@ -833,7 +833,8 @@
     mySignal(SIGPIPE, SigPipe);
 #endif
 
-    orig_GC_warn_proc = GC_set_warn_proc(wrap_GC_warn_proc);
+    orig_GC_warn_proc = GC_get_warn_proc();
+    GC_set_warn_proc(wrap_GC_warn_proc);
     err_msg = Strnew();
     if (load_argc == 0) {
 	/* no URL specified */

https://lists.freebsd.org/pipermail/svn-​ports-head/2013-October/032845.html ※不要かも

--- www/w3m/files/patch-main.c	(revision 0)
+++ www/w3m/files/patch-main.c	(working copy)
@@ -0,0 +1,15 @@
+--- main.c
++++ main.c
+@@ -833,7 +833,12 @@ main(int argc, char **argv, char **envp)
+     mySignal(SIGPIPE, SigPipe);
+ #endif
+ 
++#if GC_VERSION_MAJOR >= 7 && GC_VERSION_MINOR >= 2
++    orig_GC_warn_proc = GC_get_warn_proc();
++    GC_set_warn_proc(wrap_GC_warn_proc);
++#else
+     orig_GC_warn_proc = GC_set_warn_proc(wrap_GC_warn_proc);
++#endif
+     err_msg = Strnew();
+     if (load_argc == 0) {
+ 	/* no URL specified */

トップ   凍結 差分 バックアップ 複製 名前変更 リロード   新規 ページ一覧 単語検索 最終更新   ヘルプ   最終更新のRSS 1.0 最終更新のRSS 2.0 最終更新のRSS Atom
Counter: 1721, today: 1, yesterday: 1
最終更新: 2017-02-18 (土) 16:35:25 (JST) (2622d) by macsatou

サイト内 検索

ログイン

ユーザー名:

パスワード:


パスワード紛失
新規登録

サブ メニュー

ミニカレンダー

前月2024年 4月翌月
1 2 3 4 5 6
7 8 9 10 11 12 13
14 15 16 17 18 19 20
21 22 23 24 25 26 27
28 29 30
<今日>

オンライン状況

65 人のユーザが現在オンラインです。 (5 人のユーザが xpwiki を参照しています。)

登録ユーザ: 0
ゲスト: 65

もっと...

アクセスカウンタ

今日 : 6836683668366836
昨日 : 6596659665966596
総計 : 2332433623324336233243362332433623324336233243362332433623324336
Powered by XOOPS Cube 2.1© 2001-2006 XOOPS Cube Project
Design by XoopsDesign.com