Hi Matěj,

On 17 February 2015 at 00:05, Matěj Cepl <mc...@cepl.eu> wrote:
> Hi,
>
> after complete failure of building on older Linux distribution
> (specifically RHEL-6 ... it is just not possible to patch out
> all development which increase the dependency requirements
> enough) I have decided to try to run the current version of
> piglit in chroot with more recent versio of Linux (RHEL_7) and
> using RHEL-6 mesa libraries via bind-mounted directory from the
> RHEL-6.
>
> I was thinking how to change environment (particularly
> LD_LIBRARY_PATH and LIBGL_DRIVERS_PATH, right?) to be as close
> to the testing binaries but with as little as possible impact on
> the piglit itself.
>
> Do you think that this patch could accomplish this or do you
> think there is other place (or other mean) in piglit which could
> serve me better?
>
> Thank you in advance for any suggestions,
>
> Matěj
>
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>
> --- a/framework/core.py
> +++ b/framework/core.py
> @@ -114,6 +114,13 @@ class Options(object):
>                   os.path.abspath(os.path.join(os.path.dirname(__file__), 
> '..')))
>          }
>
> +        # For setting another library path
> +        if 'PIGLIT_LIB_DIR' in os.environ:
> +            self.env.update({
> +                'LD_LIBRARY_PATH': os.environ['PIGLIT_LIB_DIR'],
> +                'LIBGL_DRIVERS_PATH': os.environ['PIGLIT_LIB_DIR'],
> +            })
> +
As Dylan pointed out I don't think you needs any extra patches for
piglit for this scenario.
Just set the variables prior to running piglit and have fun :-)

For example:
export LD_LIBRARY_PATH="/opt/rhel6/usr/lib/"
export LIBGL_DRIVERS_PATH="/opt/rhel6/usr/lib/xorg/modules/dri"

That said, you might end up in a "mess" as you'll be using(?) a mix of
rhel6 and rhel7 libraries as required by mesa - xcb*, expat, gcc_s,
llvm to name a few. LD_DEBUG=libs is your friend, but if it was me I
would port the mako package and be done with it :-)

-Emil
_______________________________________________
Piglit mailing list
Piglit@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/piglit

Reply via email to