flagflag  
1: 2017-02-18 (Sat) 15:17:34 macsatou source
Line 1: Line 1:
 +*W3mコンパイル [#j478421b]
 +CentOS7でインストールできないため、ソールからインストール。
 +**手順 [#j802e581]
 + # tar xzfv w3m-0.5.3.tar.gz
 + # cd w3m-0.5.3
 + # ./configure
 + # 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/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 */


Front page   New List of Pages Search Recent changes   Help   RSS of recent changes (RSS 1.0) RSS of recent changes (RSS 2.0) RSS of recent changes (RSS Atom)

Site Search

Login

Username:

Password:


Lost Password?
Register now!!

Sub Menu

mini Calendar

Last MonthMay 2024Next Month
Su Mo Tu We Th Fr Sa
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 31
Today

Who's Online

39 user(s) are online (1 user(s) are browsing xpwiki)

Members: 0
Guests: 39

more...

Access Counter

Today : 4839483948394839
Yesterday : 8599859985998599
Total : 2365184523651845236518452365184523651845236518452365184523651845
Powered by XOOPS Cube 2.1© 2001-2006 XOOPS Cube Project
Design by XoopsDesign.com