From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ville =?iso-8859-1?Q?Syrj=E4l=E4?= 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 Message-ID: <20141007100632.GS32511@intel.com> References: <1412611225-1224-1-git-send-email-damien.lespiau@intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Return-path: Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by gabe.freedesktop.org (Postfix) with ESMTP id 8390E6E033 for ; Tue, 7 Oct 2014 03:06:36 -0700 (PDT) Content-Disposition: inline In-Reply-To: <1412611225-1224-1-git-send-email-damien.lespiau@intel.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" To: Damien Lespiau Cc: intel-gfx@lists.freedesktop.org List-Id: intel-gfx@lists.freedesktop.org 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 > import chipset > File "/home/damien/gfx/sources/intel-gpu-tools/tools/quick_dump/chipset= .py", line 28, in > _chipset =3D swig_import_helper() > File "/home/damien/gfx/sources/intel-gpu-tools/tools/quick_dump/chipset= .py", line 24, in swig_import_helper > _mod =3D 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/_c= hipset.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 > --- > 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 =3D quick_dump.py reg_access.py > bin_SCRIPTS =3D chipset.py > = > lib_LTLIBRARIES =3D I915ChipsetPython.la > -I915ChipsetPython_la_LDFLAGS =3D -module -avoid-version $(PYTHON_LDFLAGS= ) $(PCIACCESS_LIBS) > -I915ChipsetPython_la_SOURCES =3D chipset_wrap_python.c chipset_macro_wra= p.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 =3D -module -avoid-version $(PYTHON_LDFLAGS) > +I915ChipsetPython_la_SOURCES =3D chipset_wrap_python.c chipset_macro_wra= p.c > +I915ChipsetPython_la_LIBADD =3D \ > + $(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/chi= pset_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 =3D getenv(env_var); > - if (!val) > - return default_value; > - > - return atoi(val) !=3D 0; > -} > - > -- = > 1.8.3.1 > = > _______________________________________________ > Intel-gfx mailing list > Intel-gfx@lists.freedesktop.org > http://lists.freedesktop.org/mailman/listinfo/intel-gfx -- = Ville Syrj=E4l=E4 Intel OTC