Bug 119688 - [GTK] WK does not link properly against libxslt
Summary: [GTK] WK does not link properly against libxslt
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Xabier Rodríguez Calvar
URL:
Keywords:
: 121282 (view as bug list)
Depends on:
Blocks:
 
Reported: 2013-08-12 09:01 PDT by Xabier Rodríguez Calvar
Modified: 2013-09-14 08:17 PDT (History)
8 users (show)

See Also:


Attachments
Patch (2.65 KB, patch)
2013-08-12 09:06 PDT, Xabier Rodríguez Calvar
no flags Details | Formatted Diff | Diff
Patch (2.64 KB, patch)
2013-08-13 08:28 PDT, Xabier Rodríguez Calvar
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Xabier Rodríguez Calvar 2013-08-12 09:01:46 PDT
[GTK] WK does not compile properly against libxslt
Comment 1 Xabier Rodríguez Calvar 2013-08-12 09:06:29 PDT
Created attachment 208544 [details]
Patch

Fixes the -lm match problem when linking against libxslt.
Comment 2 Xabier Rodríguez Calvar 2013-08-12 09:07:43 PDT
(In reply to comment #1)
> Created an attachment (id=208544) [details]
> Patch
> 
> Fixes the -lm match problem when linking against libxslt.

The math symbols cannot be found though libxslt needs them and the cause is that we are not acknowledging its flags.
Comment 3 Gustavo Noronha (kov) 2013-08-13 05:32:01 PDT
Comment on attachment 208544 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=208544&action=review

> Source/WebKit/gtk/ChangeLog:3
> +        [GTK] WK does not compile properly against libxslt

Nit: you should say link instead of compile
Comment 4 Xabier Rodríguez Calvar 2013-08-13 08:28:30 PDT
Created attachment 208635 [details]
Patch

Fixes the -lm match problem when linking against libxslt.
Comment 5 Xabier Rodríguez Calvar 2013-08-13 14:26:05 PDT
If this gets again the r+, I could set cq tomorrow.
Comment 6 WebKit Commit Bot 2013-08-13 23:35:14 PDT
Comment on attachment 208635 [details]
Patch

Clearing flags on attachment: 208635

Committed r154041: <http://trac.webkit.org/changeset/154041>
Comment 7 WebKit Commit Bot 2013-08-13 23:35:16 PDT
All reviewed patches have been landed.  Closing bug.
Comment 8 Carlos Garcia Campos 2013-08-24 01:36:10 PDT
This still happens to me with Debian testing:

/usr/lib/gcc/x86_64-linux-gnu/4.7/../../../x86_64-linux-gnu/libxslt.so: error: undefined reference to 'fmod'
/usr/lib/gcc/x86_64-linux-gnu/4.7/../../../x86_64-linux-gnu/libxslt.so: error: undefined reference to 'floor'
/usr/lib/gcc/x86_64-linux-gnu/4.7/../../../x86_64-linux-gnu/libxslt.so: error: undefined reference to 'pow'
collect2: error: ld returned 1 exit status
make[1]: *** [Programs/unittests/testdomdomwindow] Error 1

The only way I managed to build was adding -lm explicitly to WK1 tests, MiniBrowser and WTR makefiles. Adding LIBXSLT_LIBS doesn't seem to be enough here. I wonder why it works in the bots, though.
Comment 9 Xabier Rodríguez Calvar 2013-08-24 02:19:00 PDT
(In reply to comment #8)
> This still happens to me with Debian testing:
> 
> /usr/lib/gcc/x86_64-linux-gnu/4.7/../../../x86_64-linux-gnu/libxslt.so: error: undefined reference to 'fmod'
> /usr/lib/gcc/x86_64-linux-gnu/4.7/../../../x86_64-linux-gnu/libxslt.so: error: undefined reference to 'floor'
> /usr/lib/gcc/x86_64-linux-gnu/4.7/../../../x86_64-linux-gnu/libxslt.so: error: undefined reference to 'pow'
> collect2: error: ld returned 1 exit status
> make[1]: *** [Programs/unittests/testdomdomwindow] Error 1
> 
> The only way I managed to build was adding -lm explicitly to WK1 tests, MiniBrowser and WTR makefiles. Adding LIBXSLT_LIBS doesn't seem to be enough here. I wonder why it works in the bots, though.

Yes, you need to recompile libxslt, because the one in your system doesn't have -lm when you do a pkg-config --libs libxslt . The one upstream does.
Comment 10 Philippe Normand 2013-09-02 01:05:17 PDT
(In reply to comment #9)
> (In reply to comment #8)
> > This still happens to me with Debian testing:
> > 
> > /usr/lib/gcc/x86_64-linux-gnu/4.7/../../../x86_64-linux-gnu/libxslt.so: error: undefined reference to 'fmod'
> > /usr/lib/gcc/x86_64-linux-gnu/4.7/../../../x86_64-linux-gnu/libxslt.so: error: undefined reference to 'floor'
> > /usr/lib/gcc/x86_64-linux-gnu/4.7/../../../x86_64-linux-gnu/libxslt.so: error: undefined reference to 'pow'
> > collect2: error: ld returned 1 exit status
> > make[1]: *** [Programs/unittests/testdomdomwindow] Error 1
> > 
> > The only way I managed to build was adding -lm explicitly to WK1 tests, MiniBrowser and WTR makefiles. Adding LIBXSLT_LIBS doesn't seem to be enough here. I wonder why it works in the bots, though.
> 
> Yes, you need to recompile libxslt, because the one in your system doesn't have -lm when you do a pkg-config --libs libxslt . The one upstream does.

This is rather annoying. Shouldn't we (for now) put libxslt in our jhbuild? I'd like to avoid "all" our Debian users to rebuild a system-wide lib...
Comment 11 Xabier Rodríguez Calvar 2013-09-02 01:23:04 PDT
(In reply to comment #10)
> This is rather annoying. Shouldn't we (for now) put libxslt in our jhbuild? I'd like to avoid "all" our Debian users to rebuild a system-wide lib...

We could, but if we go for current master, we need to apply https://bugzilla.gnome.org/show_bug.cgi?id=706882 .
Comment 12 ChangSeok Oh 2013-09-13 02:26:07 PDT
*** Bug 121282 has been marked as a duplicate of this bug. ***
Comment 13 Alberto Garcia 2013-09-13 02:28:35 PDT
A workaround is to add -lm to the Libs: section in /usr/lib/*/pkgconfig/libxslt.pc

See also http://bugs.debian.org/721602
Comment 14 Martin Robinson 2013-09-13 10:44:39 PDT
This patch seems wrong, because it's adding libxslt to the linker line of binaries that do not use it directly.
Comment 15 Alberto Garcia 2013-09-13 14:33:40 PDT
(In reply to comment #14)
> This patch seems wrong, because it's adding libxslt to the linker line of binaries that do not use it directly.

Okay, after our IRC conversation I've been trying to understand the
whole thing.

I've just reverted this patch (r154041) and compiled WebKit again from
scratch but I didn't notice anything wrong.

Xabier, what was exactly the original problem you were trying to solve
with this?
Comment 16 Alberto Garcia 2013-09-14 08:17:27 PDT
I just filed bug 121356 in order to revert this and other XSLT changes.