All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
To: Damien Lespiau <damien.lespiau@intel.com>
Cc: intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH i-g-t 1/2] quick-dump: Make quick dump link against libintel_tools
Date: Tue, 7 Oct 2014 13:06:32 +0300	[thread overview]
Message-ID: <20141007100632.GS32511@intel.com> (raw)
In-Reply-To: <1412611225-1224-1-git-send-email-damien.lespiau@intel.com>

On Mon, Oct 06, 2014 at 05:00:24PM +0100, Damien Lespiau wrote:
> Because quick-dump was only selecting a few files in lib/ and we move
> stuff around and/or add new dependencies we were failing to provide the
> necessary symbols to the shim library providing python bindings. And so
> we had a run-time error:
> 
> Traceback (most recent call last):
>   File "./tools/quick_dump/quick_dump.py", line 17, in <module>
>     import chipset
>   File "/home/damien/gfx/sources/intel-gpu-tools/tools/quick_dump/chipset.py", line 28, in <module>
>     _chipset = swig_import_helper()
>   File "/home/damien/gfx/sources/intel-gpu-tools/tools/quick_dump/chipset.py", line 24, in swig_import_helper
>     _mod = imp.load_module('_chipset', fp, pathname, description)
>   File "/usr/lib64/python3.3/imp.py", line 183, in load_module
>     return load_dynamic(name, filename, file)
> ImportError: /home/damien/gfx/sources/intel-gpu-tools/tools/quick_dump/_chipset.so: undefined symbol: kmstest_pipe_name
> 
> So, let's simplify maintainance and just link against the library we're
> building and using elsewhere.
> 
> Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
> ---
>  tools/quick_dump/Makefile.am          | 17 ++++++++---------
>  tools/quick_dump/chipset_macro_wrap.c | 12 ------------
>  2 files changed, 8 insertions(+), 21 deletions(-)
> 
> diff --git a/tools/quick_dump/Makefile.am b/tools/quick_dump/Makefile.am
> index 89ac520..4bc5eca 100644
> --- a/tools/quick_dump/Makefile.am
> +++ b/tools/quick_dump/Makefile.am
> @@ -6,15 +6,14 @@ dist_bin_SCRIPTS = quick_dump.py reg_access.py
>  bin_SCRIPTS = chipset.py
>  
>  lib_LTLIBRARIES = I915ChipsetPython.la
> -I915ChipsetPython_la_LDFLAGS = -module -avoid-version $(PYTHON_LDFLAGS) $(PCIACCESS_LIBS)
> -I915ChipsetPython_la_SOURCES = chipset_wrap_python.c chipset_macro_wrap.c \
> -			       $(top_srcdir)/lib/igt_core.c  \
> -			       $(top_srcdir)/lib/igt_debugfs.c  \
> -			       $(top_srcdir)/lib/intel_os.c  \
> -			       $(top_srcdir)/lib/intel_chipset.c  \
> -			       $(top_srcdir)/lib/intel_reg_map.c  \
> -			       $(top_srcdir)/lib/intel_mmio.c  \
> -			       $(top_srcdir)/lib/intel_iosf.c
> +I915ChipsetPython_la_LDFLAGS = -module -avoid-version $(PYTHON_LDFLAGS)
> +I915ChipsetPython_la_SOURCES = chipset_wrap_python.c chipset_macro_wrap.c
> +I915ChipsetPython_la_LIBADD =			\
> +	$(top_srcdir)/lib/libintel_tools.la	\

top_builddir

> +	$(PCIACCESS_LIBS)			\
> +	$(DRM_LIBS)				\
> +	$(CAIRO_LIBS)				\
> +	$(NULL)
>  
>  chipset_wrap_python.c chipset.py: chipset.i
>  	$(AM_V_GEN)$(SWIG) $(AX_SWIG_PYTHON_OPT) -I/usr/include -I$(top_srcdir)/lib -o $@ $<
> diff --git a/tools/quick_dump/chipset_macro_wrap.c b/tools/quick_dump/chipset_macro_wrap.c
> index 8bba9f7..862281e 100644
> --- a/tools/quick_dump/chipset_macro_wrap.c
> +++ b/tools/quick_dump/chipset_macro_wrap.c
> @@ -38,15 +38,3 @@ unsigned short pcidev_to_devid(struct pci_device *pdev)
>  {
>  	return pdev->device_id;
>  }
> -
> -bool igt_check_boolean_env_var(const char *env_var, bool default_value)
> -{
> -	char *val;
> -
> -	val = getenv(env_var);
> -	if (!val)
> -		return default_value;
> -
> -	return atoi(val) != 0;
> -}
> -
> -- 
> 1.8.3.1
> 
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/intel-gfx

-- 
Ville Syrjälä
Intel OTC

  parent reply	other threads:[~2014-10-07 10:06 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-10-06 16:00 [PATCH i-g-t 1/2] quick-dump: Make quick dump link against libintel_tools Damien Lespiau
2014-10-06 16:00 ` [PATCH i-g-t 2/2] quick_dump: Add a test to verify we can load the dynamic library Damien Lespiau
2014-10-07 10:06 ` Ville Syrjälä [this message]
2014-10-08  9:21   ` [PATCH i-g-t 1/2] quick-dump: Make quick dump link against libintel_tools Damien Lespiau

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20141007100632.GS32511@intel.com \
    --to=ville.syrjala@linux.intel.com \
    --cc=damien.lespiau@intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.