Bug 96602 - -ldl should not be hardcoded into OPENGL_LIBS
Summary: -ldl should not be hardcoded into OPENGL_LIBS
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKitGTK (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-09-12 22:16 PDT by Alexandre Rostovtsev
Modified: 2013-01-14 12:43 PST (History)
3 users (show)

See Also:


Attachments
proposed patch for current svn trunk (1.19 KB, patch)
2012-09-12 22:19 PDT, Alexandre Rostovtsev
no flags Details | Formatted Diff | Diff
proposed patch, v2 (1.19 KB, patch)
2012-09-18 23:25 PDT, Alexandre Rostovtsev
no flags Details | Formatted Diff | Diff
proposed patch, v3 (1.27 KB, patch)
2012-10-24 01:45 PDT, Alexandre Rostovtsev
xan.lopez: review-
Details | Formatted Diff | Diff
proposed patch, v4 (1.41 KB, patch)
2012-10-24 03:08 PDT, Alexandre Rostovtsev
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Alexandre Rostovtsev 2012-09-12 22:16:31 PDT
(As reported downstream at https://bugs.gentoo.org/show_bug.cgi?id=417523)

Some non-linux systems, for example freebsd, have dlopen()/dlclose()/dlsym() etc. in their core libc, and do not install a separate libdl. On such systems, "-ldl" in OPENGL_LIBS leads to linking failure.

webkit's configure should check whether libc provides dlopen, and add -ldl to OPENGL_LIBS only if it's needed.
Comment 1 Alexandre Rostovtsev 2012-09-12 22:19:58 PDT
Created attachment 163774 [details]
proposed patch for current svn trunk
Comment 2 Patrick Nicolas 2012-09-18 23:15:23 PDT
The patch adds twice the dash: OPENGL_LIBS="-lGL --libdl" and build fails

(In reply to comment #1)
> Created an attachment (id=163774) [details]
> proposed patch for current svn trunk
Comment 3 Alexandre Rostovtsev 2012-09-18 23:25:35 PDT
Created attachment 164670 [details]
proposed patch, v2

(In reply to comment #2)
> The patch adds twice the dash: OPENGL_LIBS="-lGL --libdl" and build fails

You are right, thanks for noticing. Fixed in this revision.
Comment 4 Alexandre Rostovtsev 2012-10-24 01:45:02 PDT
Created attachment 170343 [details]
proposed patch, v3

Updated for current svn trunk
Comment 5 Xan Lopez 2012-10-24 02:14:03 PDT
Comment on attachment 170343 [details]
proposed patch, v3

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

> configure.ac:282
> +AC_SUBST([DLOPEN_LIBS])

This makes sense, but would you mind adding a small comment saying what it does? Mostly because it's checking for the uncommon case (BSD-ish systems), so it's possible that a maintainer will be confused in the future. Something like:

"We check whether dlopen is in the core libraries; if it's not we pull in libdl if it has dlopen and is available, as it's needed in GNU/Linux."

Thanks!
Comment 6 Alexandre Rostovtsev 2012-10-24 03:08:57 PDT
Created attachment 170351 [details]
proposed patch, v4

(In reply to comment #5)

OK, comment added.
Comment 7 WebKit Review Bot 2013-01-14 12:43:52 PST
Comment on attachment 170351 [details]
proposed patch, v4

Clearing flags on attachment: 170351

Committed r139643: <http://trac.webkit.org/changeset/139643>
Comment 8 WebKit Review Bot 2013-01-14 12:43:55 PST
All reviewed patches have been landed.  Closing bug.