You are not logged in.

#1 2015-04-14 10:02:34

pingpong
Member
From: Los Angeles
Registered: 2010-12-30
Posts: 104

Compling problem with w3m-mouse 0.5.3

There is a problem in compling w3m-mouse provided by abs

main.c:2661:5: warning: ignoring return value of ‘system’, declared with attribute warn_unused_result [-Wunused-result]
     system(myEditor(Editor, shell_quote(tmpf),
     ^
<builtin>: recipe for target 'main.o' failed
make: *** [main.o] Error 1
==> ERROR: A failure occurred in build().
    Aborting...
The build failed.

I then found out that it was discussed in https://bbs.archlinux.org/viewtopic.php?id=150464.

So I grapped the PKGBUILD from
https://projects.archlinux.org/svntogit … /w3m/trunk

But still got the following error:

make[1]: Leaving directory '/home/pong/absw3m/src/w3m-0.5.3/w3mimg'
gcc  -I. -I. -march=x86-64 -mtune=generic -O2 -pipe -fstack-protector-strong --param=ssp-buffer-size=4 -I./libwc  -D_FORTIFY_SOURCE=2 -DHAVE_CONFIG_H -DAUXBIN_DIR=\"/usr/lib/w3m\" -DCGIBIN_DIR=\"/usr/lib/w3m/cgi-bin\" -DHELP_DIR=\"/usr/share/w3m\" -DETC_DIR=\"/usr/etc\" -DCONF_DIR=\"/usr/etc/w3m\" -DRC_DIR=\"~/.w3m\" -DLOCALEDIR=\"/usr/share/locale\" -o w3mimgdisplay w3mimgdisplay.o w3mimg/w3mimg.a -Wl,-O1,--sort-common,--as-needed,-z,relro -lm  -lnsl -ldl -L/usr/lib -lImlib2 -L/usr/lib -lImlib2
/usr/bin/ld: w3mimg/w3mimg.a(x11_w3mimg.o): undefined reference to symbol 'XGetImage'
/usr/lib/libX11.so.6: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status
Makefile:202: recipe for target 'w3mimgdisplay' failed
make: *** [w3mimgdisplay] Error 1
==> ERROR: A failure occurred in build().
    Aborting...

Any idea of how to fix that?

Offline

#2 2015-04-14 10:19:11

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,424
Website

Re: Compling problem with w3m-mouse 0.5.3

Moving to AUR Issues...


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#3 2015-04-14 18:53:44

runical
Member
From: The Netherlands
Registered: 2012-03-03
Posts: 896

Re: Compling problem with w3m-mouse 0.5.3

What does the new PKGBUILD look like? Please post it.

N.B. w3m-mouse is AUR, not ABS.

EDIT: I just tried building the packages in a clean chroot. Both failed indeed.

Last edited by runical (2015-04-14 18:57:41)

Offline

#4 2015-04-15 06:10:55

mauritiusdadd
Member
From: Benevento, Italy
Registered: 2013-10-27
Posts: 776

Re: Compling problem with w3m-mouse 0.5.3

pingpong wrote:

But still got the following error:

make[1]: Leaving directory '/home/pong/absw3m/src/w3m-0.5.3/w3mimg'
gcc  -I. -I. -march=x86-64 -mtune=generic -O2 -pipe -fstack-protector-strong --param=ssp-buffer-size=4 -I./libwc  -D_FORTIFY_SOURCE=2 -DHAVE_CONFIG_H -DAUXBIN_DIR=\"/usr/lib/w3m\" -DCGIBIN_DIR=\"/usr/lib/w3m/cgi-bin\" -DHELP_DIR=\"/usr/share/w3m\" -DETC_DIR=\"/usr/etc\" -DCONF_DIR=\"/usr/etc/w3m\" -DRC_DIR=\"~/.w3m\" -DLOCALEDIR=\"/usr/share/locale\" -o w3mimgdisplay w3mimgdisplay.o w3mimg/w3mimg.a -Wl,-O1,--sort-common,--as-needed,-z,relro -lm  -lnsl -ldl -L/usr/lib -lImlib2 -L/usr/lib -lImlib2
/usr/bin/ld: w3mimg/w3mimg.a(x11_w3mimg.o): undefined reference to symbol 'XGetImage'
/usr/lib/libX11.so.6: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status
Makefile:202: recipe for target 'w3mimgdisplay' failed
make: *** [w3mimgdisplay] Error 1
==> ERROR: A failure occurred in build().
    Aborting...

Regarding the official package, it seems that the configure script fails to detect and add the library libX11.so as dependency. A simple way to fix the error is to manually define the variable LIBS :

build() {
        cd "${srcdir}/${pkgname}-${pkgver}"
        export LIBS=-lX11
        ./configure \
                --prefix=/usr \
                --libexecdir=/usr/lib \
                --enable-image=x11,fb \
                --with-imagelib=imlib2 \
                --with-termlib=ncurses \
                --disable-w3mmailer \
                --disable-mouse\

        make
}

However it will still fail to build if you enable mouse support.

Last edited by mauritiusdadd (2015-04-15 06:11:12)


About me - github

-- When you have eliminated the impossible, whatever remains, however improbable, must be the truth -- Spock | Sherlock Holmes

Offline

#5 2015-04-15 11:50:53

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 29,523
Website

Re: Compling problem with w3m-mouse 0.5.3

What exactly does this package do differently than the main w3m package in the repo?  I use the regular package from the repo and have mouse support.


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

#6 2015-04-15 16:49:37

mauritiusdadd
Member
From: Benevento, Italy
Registered: 2013-10-27
Posts: 776

Re: Compling problem with w3m-mouse 0.5.3

well, it seem that it only enables mouse operation support:

http://w3m.sourceforge.net/MANUAL#Mouse wrote:

If w3m is compiled with mouse option and you are using xterm/kterm/rxvt (in this case, you have to set the TERM environment variable to `xterm' or `kterm'.) or GPM environment, you can use mouse for the navigation.

left click     Move the cursor to the place pointed by the mouse cursor. If you click the cursor and it is on an anchor, follow the anchor.
middle click     Back to the previous buffer.
right click     Open pop-up menu. You can choose an item by clicking it.
left drag     Scroll document. The default behavior is to grab the document and drag it. You can reverse the behavior (grab the window and drag it) with the option setting panel.

Last edited by mauritiusdadd (2015-04-15 16:49:50)


About me - github

-- When you have eliminated the impossible, whatever remains, however improbable, must be the truth -- Spock | Sherlock Holmes

Offline

#7 2015-04-15 18:31:23

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 29,523
Website

Re: Compling problem with w3m-mouse 0.5.3

Oops!  Sorry, it seems I had rolled my own w3m some time ago with mouse support - it just hasn't been update in the repos since then and I had forgot about it.  I just reinstalled from the repos and lost mouse support ... Damn.

And my first attempt to rebuild it also failed.  I'll have to look closer at this later as I do want to use the mouse with w3m too.


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

#8 2015-04-16 12:02:18

mauritiusdadd
Member
From: Benevento, Italy
Registered: 2013-10-27
Posts: 776

Re: Compling problem with w3m-mouse 0.5.3

Wow, the problem was caused only by a lower case x in the word x11 where it should be X11. For me, the following build function works fine and gives also the mouse support:

build() {
	cd "${srcdir}/${pkgname}-${pkgver}"
	./configure \
		--prefix=/usr \
		--libexecdir=/usr/lib \
		--enable-image=X11,fb \
		--with-imagelib=imlib2 \
		--with-termlib=ncurses \
		--disable-w3mmailer \

	make
}

Can anyone confirm that it works? Note that a clean build is required so you should remove the src directory or pass the option -C to makepkg.

-- edit: If it works, can this be considered as a packaging issue and should I fill a bug report?

Last edited by mauritiusdadd (2015-04-16 12:10:38)


About me - github

-- When you have eliminated the impossible, whatever remains, however improbable, must be the truth -- Spock | Sherlock Holmes

Offline

#9 2015-04-16 12:14:08

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 29,523
Website

Re: Compling problem with w3m-mouse 0.5.3

Good catch mauritiusdadd, that works here.  As that is just a typo in the PKGBUILD that is a packaging issue and should go to the archlinux bug tracker if it is not already there.


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

#10 2015-04-16 12:17:59

mauritiusdadd
Member
From: Benevento, Italy
Registered: 2013-10-27
Posts: 776

Re: Compling problem with w3m-mouse 0.5.3

Trilby wrote:

Good catch mauritiusdadd, that works here.  As that is just a typo in the PKGBUILD that is a packaging issue and should go to the archlinux bug tracker if it is not already there.

Thank you for the confirmation smile

-- edit: Bug report sent https://bugs.archlinux.org/task/44613

-- edit: The bug is now fixed, but the mouse support must be enabled manually.

Last edited by mauritiusdadd (2015-04-16 18:51:14)


About me - github

-- When you have eliminated the impossible, whatever remains, however improbable, must be the truth -- Spock | Sherlock Holmes

Offline

#11 2015-04-17 16:19:05

randynobx
Member
Registered: 2015-04-17
Posts: 1

Re: Compling problem with w3m-mouse 0.5.3

This patch has completely broken functionalty of w3m image previews on my, and several other's system. (Had no issues before)

Why was x11 changed to X11?

Last edited by randynobx (2015-04-17 16:19:27)

Offline

#12 2015-04-17 17:07:49

mauritiusdadd
Member
From: Benevento, Italy
Registered: 2013-10-27
Posts: 776

Re: Compling problem with w3m-mouse 0.5.3

Hi randynobx and welcome to the Forums big_smile

randynobx wrote:

Why was x11 changed to X11?

Please re-read the thread and read also the bug report: w3m failed to compile because there is no libx11.so, the correct name of the library is libX11.so.

randynobx wrote:

This patch has completely broken functionalty of w3m image previews on my, and several other's system. (Had no issues before)

I can confirm that inline images are not displayed anymore but I don't think it is caused by the patch because I tested it yesterday and it worked.

-- edit: ok, It seems that the configuration script checks explicitly if the option x11 (lowercase) is passed otherwise it disables the inline image displaying. The only way to ensure that w3m compiles and displays inline images is to revert back to lowercase x11 and export the variable LIBS=-lX11 as I explained in post  #4... I filed a re-open request for the bug  and as punishment for my careless checking I've just adopted and updated the AUR package w3m-mouse smile

Last edited by mauritiusdadd (2015-04-17 18:50:15)


About me - github

-- When you have eliminated the impossible, whatever remains, however improbable, must be the truth -- Spock | Sherlock Holmes

Offline

Board footer

Powered by FluxBB