LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (http://www.linuxquestions.org/questions/slackware-14/)
-   -   Slackware64 -current: w3m fails to build... (http://www.linuxquestions.org/questions/slackware-14/slackware64-current-w3m-fails-to-build-932748/)

andrew.46 03-05-2012 12:00 AM

Slackware64 -current: w3m fails to build...
 
w3m fails to build on the 64bit slackware -current using the Slackbuilds.org script with the following error:

Code:

main.c: In function 'getChar':
main.c:2264:5: warning: passing argument 1 of 'wtf_parse1' from incompatible pointer type [enabled by default]
./libwc/wtf.h:71:19: note: expected 'wc_uchar **' but argument is of type 'char **'
make: *** [main.o] Error 1

I have seen some discussion of this error via Google (here for example) but no solutions. Has anybody encountered this problem and solved it?

andrew.46 03-05-2012 12:31 AM

Issue seems resolved with the patch on this page.

Lufbery 03-06-2012 09:50 PM

Good to know! I use w3m in Emacs.

andrew.46 03-06-2012 11:25 PM

While I use it to clean up html emails with mutt :).

sahko 03-09-2012 08:59 AM

Thanks andrew.

The current w3m SBo script maintainer.

andrew.46 03-09-2012 08:06 PM

Quote:

Originally Posted by sahko (Post 4622732)
Thanks andrew.

My pleasure :). I was going to email the slackbuilds.org mailing list but I thought the message would get through here anyway. I hope you noticed that snyderx, who created the patch, is a slackware user.....

sahko 03-10-2012 02:48 PM

Quote:

Originally Posted by andrew.46 (Post 4623098)
I hope you noticed that snyderx, who created the patch, is a slackware user.....

Yes i did. I assumed it was you tbh.
I doubt w3m will have a release before next Slackware comes out, so this patch will come handy for sure. I'll keep in mind to submit a bumped version incl. the patch eventually.

burbabro 06-15-2013 01:34 AM

I'm also getting this make error when I try to compile w3m-0.5.3 on the 32bit version of slackware-14. I'd like to try this patch, but don't know how to use it. Would someone give instructions?

andrew.46 06-15-2013 01:46 AM

Sure :). Download the patch and place it with the slackbuild, source, slack-desc etc. Then modify the slackbuild as follows:

Code:

tar xvf $CWD/$PRGNAM-$VERSION.tar.gz
cd $PRGNAM-$VERSION

patch -p1 < $CWD/w3m-istream.diff


chown -R root:root .
find . \
 \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \

Hopefully this will get you going...

burbabro 06-15-2013 02:00 AM

Well, I found some instructions to use the patch and tried it. The compilation got farther, but still failed.

$ tar -xzvf w3m-0.5.3.tar.gz
$ cp w3m-istream.diff w3m-0.5.3
$ cd w3m-0.5.3
patch < w3m-istream.diff

(patching file istream.c)
(patching file istream.h)

$ ./configure
$ make

...make[2]: Entering directory `/home/steven/w3m-0.5.3/w3mimg/x11'
gcc -I../.. -I../.. -I. -g -O2 -I./libwc -DHAVE_CONFIG_H -pthread -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/libpng14 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/gtk-2.0 -I/usr/lib/gtk-2.0/include -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/pango-1.0 -I/usr/include/pixman-1 -I/usr/include/freetype2 -c x11_w3mimg.c
make[2]: Leaving directory `/home/steven/w3m-0.5.3/w3mimg/x11'
gcc -I.. -I.. -I. -g -O2 -I./libwc -DHAVE_CONFIG_H -pthread -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/libpng14 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/gtk-2.0 -I/usr/lib/gtk-2.0/include -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/pango-1.0 -I/usr/include/pixman-1 -I/usr/include/freetype2 -c w3mimg.c
ar rv w3mimg.a w3mimg.o x11/x11_w3mimg.o
ar: creating w3mimg.a
a - w3mimg.o
a - x11/x11_w3mimg.o
ranlib w3mimg.a
make[1]: Leaving directory `/home/steven/w3m-0.5.3/w3mimg'
gcc -I. -I. -g -O2 -I./libwc -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\" -o w3mimgdisplay w3mimgdisplay.o w3mimg/w3mimg.a -lm -lnsl -ldl -pthread -lgdk_pixbuf_xlib-2.0 -lgmodule-2.0 -lrt -lgtk-x11-2.0 -lgdk-x11-2.0 -latk-1.0 -lgio-2.0 -lpangoft2-1.0 -lpangocairo-1.0 -lgdk_pixbuf-2.0 -lcairo -lpango-1.0 -lfreetype -lfontconfig -lgobject-2.0 -lglib-2.0
/usr/lib/gcc/i486-slackware-linux/4.7.1/../../../../i486-slackware-linux/bin/ld: w3mimg/w3mimg.a(x11_w3mimg.o): undefined reference to symbol 'XQueryTree'
/usr/lib/gcc/i486-slackware-linux/4.7.1/../../../../i486-slackware-linux/bin/ld: note: 'XQueryTree' is defined in DSO /usr/lib/libX11.so.6 so try adding it to the linker command line
/usr/lib/libX11.so.6: could not read symbols: Invalid operation
collect2: error: ld returned 1 exit status
make: *** [w3mimgdisplay] Error 1

burbabro 06-15-2013 02:13 AM

I tried it once more with the -p1 option to patch. I also tried changing the files to be owned by root. I'm not sure what the purpose of the find command with the various permission numbers.

I got the same make error the second time.

ponce 06-15-2013 02:26 AM

use the slackbuild on SBo (become root first with "su -"), it already includes all the needed patches.

burbabro 06-16-2013 01:05 AM

Thanks, Ponce. Your slackbuild worked.

In case anyone wants to see, I used w3m for mutt like this.

1. gc
http://www.hpl.hp.com/personal/Hans_Boehm/gc/gc_source/
$ tar -xzvf gc.tar.gz
$ cd gc6.8
$ ./configure --enable-threads=posix --enable-parallel-mark
$ make
# make install
# ldconfig /usr/local/lib
# ldconfig /usr/local/include

2. w3m
http://slackbuilds.org/repository/14.0/network/w3m/
http://slackbuilds.org/howto/
Downloaded w3m.tar.gz (The slackbuild files. Doesn't contain the source.)
Downloaded the w3m version specified in w3m.info (w3m-0.5.3.tar.gz).
$ tar -xzvf w3m.tar.gz (w3m directory created.)
$ mv w3m-0.5.3.tar.gz w3m
$ cd w3m
$ su -
# pwd
/root
# cd /home/username/w3m
# ./w3m.Slackbuild
...
Slackware package /tmp/w3m-0.5.3-i486-3_SBo.tgz created.

# cp /tmp/w3m-0.5.3-i486-3_SBo.tgz /home/username
# installpkg w3m-0.5.3-i486-3_SBo.tgz
$ which w3m
/usr/bin/w3m

3. mutt
The default mutt in slackware14 seems to have been compiled with the following options, so it doesn't need to be recompiled.
--enable-imap
--enable-smtp
--enable-hcache
--with-ssl
--with-sasl

I have a .mailcap file with this line among a few others.
text/html; echo && /usr/bin/w3m -dump %s; nametemplate=%s.html; copiousoutput

I have a .muttrc file with imap settings and the following line for sending mail.
set smtp_url="smtps://some_email_name\@gmail.com@smtp.gmail.com/"
or
set smtp_url=smtps://someplace.somewhere.com:465


All times are GMT -5. The time now is 04:32 AM.