After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 352750 - GStreamer: alsa-plugin test is 32-bit specific
GStreamer: alsa-plugin test is 32-bit specific
Status: RESOLVED FIXED
Product: gnome-perl
Classification: Bindings
Component: general
unspecified
Other Linux
: Normal normal
: ---
Assigned To: gtk2-perl-bugs
gtk2-perl-bugs
Depends on:
Blocks:
 
 
Reported: 2006-08-24 22:39 UTC by Chris Weyl
Modified: 2006-08-27 11:42 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Try harder to find the alsa plugin file (970 bytes, patch)
2006-08-26 19:04 UTC, Torsten Schoenfeld
committed Details | Review

Description Chris Weyl 2006-08-24 22:39:22 UTC
On my x86_64 system, the alsa plugin tests in t/GstPlugin.t are skipped:

SKIP: {
  my $so = "/usr/lib/gstreamer-0.10/libgstalsa.so";

  skip "alsa plugin tests", 1
    unless -r $so;

  $plugin = GStreamer::Plugin::load_file($so);
  isa_ok($plugin, "GStreamer::Plugin");
}

Note the value of $so; but on 64-bit systems this library is typically at /usr/lib64/gstreamer-0.10/libgstalsa.so.  Changing $so to "/usr/lib64..." allows the test to execute (and pass) but is clearly a non-optimal solution :)
Comment 1 muppet 2006-08-25 00:32:39 UTC
Perhaps the test could use `pkg-config --variable=libdir correct-pc-name-for-the-alsa-plugin` to look for the .so?  I have neither gstreamer-0.10 or the gstalsa plugin on my system, but:

homie:~/cvs$ pkg-config --variable=libdir gstreamer-plugins-0.8
/home/muppet/sandboxes/gnome2/lib

Does that style command return some value containing lib64 for you?  If so, we should be able to concatenate the filename to the path and do a -f test...

We should be reasonably well guaranteed that pkg-config is available since we're running as part of the build system.  It looks like we could also use the ExtUtils::PkgConfig module instead of calling the command directly:

     # warning, totally untested code
     $pkg = ExtUtils::PkgConfig->find ($correct_package_name);
     if (-f File::Spec->catfile ($pkg->libdir, 'libgstalsa.so')) {
          ...
     }
Comment 2 Chris Weyl 2006-08-25 17:10:24 UTC
That sounds like a good solution; it should handle both arch-specific issues and the cases where people decided to install gstreamer in funky locations.
Comment 3 Torsten Schoenfeld 2006-08-26 19:04:02 UTC
Good idea indeed.  The gstreamer-0.10 pkg-config contains a variable pluginsdir which is perfect.  Patch attached.
Comment 4 Torsten Schoenfeld 2006-08-26 19:04:37 UTC
Created attachment 71670 [details] [review]
Try harder to find the alsa plugin file
Comment 5 muppet 2006-08-27 02:04:03 UTC
Not sure how much you want to be concerned with the possibility that EU::PkgConfig->variable() could return undef if the variable isn't there, which would indicate a broken or missing .pc file.

Otherwise, it looks fine.
Comment 6 Torsten Schoenfeld 2006-08-27 11:42:47 UTC
File::Spec::catfile seems to handle undef gracefully.

Patch committed.