Skip to content
This repository has been archived by the owner on Jun 16, 2022. It is now read-only.

Don't explicitly link to libraries (use libdl instead) #9

Open
jljusten opened this issue May 6, 2014 · 5 comments
Open

Don't explicitly link to libraries (use libdl instead) #9

jljusten opened this issue May 6, 2014 · 5 comments
Assignees

Comments

@jljusten
Copy link
Member

jljusten commented May 6, 2014

For platforms that support libdl, we should not link directly to libraries.

Instead, libwaffle should dlopen libraries at runtime.

This will allow libwaffle to be used in scenarios where the other system libraries are not installed.

For example, this should be possible:

  • Build libwaffle with glx and wayland support
  • Run a waffle application on wayland even if glx libraries are not installed on the system
@jljusten jljusten self-assigned this May 6, 2014
@evelikov
Copy link
Member

Rough split of current dependencies:

  • libEGL
  • libGL
  • libgbm
  • libudev
  • libwayland*
  • lib{X11,xcb}*

@jljusten jljusten assigned evelikov and unassigned jljusten Sep 4, 2014
@evelikov
Copy link
Member

evelikov commented Sep 5, 2014

libEGL - v1, v2
Tested

  • x11_egl - evelikov, jljusten
  • gbm - jljusten
  • wayland - pq
  • Android

Todo:

  • Use libEGL.so.1 for Linux (fixed with v2)
  • Fix the Android build (fixed with v2)

@evelikov
Copy link
Member

The libX11* dependencies

  • libX11 - XFree, XOpenDisplay, XCloseDisplay, XSetErrorHandler
  • libX11-xcb - XGetXCBConnection

The above could be replaced with

  • XFree - free (?)
  • XOpenDisplay, XSetErrorHandler, XGetXCBConnection - xcb_connect + xcb_connection_has_error
  • XCloseDisplay - xcb_disconnect

Update: the above has to be done once piglit is "fixed" to use xcb alone - currently it uses a strange mix of xlib + xcb.

@evelikov
Copy link
Member

libgbm, libGL v1

Tested:

  • glx - evelikov
  • x11_egl - evelikov
  • gbm - evelikov (note it actually fails, due to a mesa bug)

@evelikov
Copy link
Member

libwayland* v1, Patch 4 v2

Tested:

  • wayland - evelikov (v2)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants