Subject: | ld: cannot find -lMesaGL (w/fix) |
[Example failure]
cd GtkGLArea && /usr/bin/perl5.8.6 Makefile.PL LIB="" LIBPERL_A="libperl.a"
LINKTYPE="dynamic" PREFIX="/var/tmp/portage/gtk-perl-0.7009-r1/image//usr"
OPTIMIZE="" PASTHRU_DEFINE="" PASTHRU_INC="" INSTALLDIRS=vendor
Found Gtk::Install::Files in /var/tmp/portage/gtk-perl-0.7009-r1/work/Gtk-Perl-0.7009/GtkGLArea/../Gtk/../blib/arch/Gtk/Install/
Loading pkg.defs
Dir ||
/usr/lib/gcc/i686-pc-linux-gnu/3.4.3-20050110/../../../../i686-pc-linux-gnu/bin/
ld: cannot find -lMesaGL
collect2: ld returned 1 exit status
/bin/sh: line 1: 1520 Broken pipe /usr/bin/perl5.8.6 Makefile.PL LIB="" LIBPERL_A="libperl.a" LINKTYPE="dynamic" PREFIX="/var/tmp/portage/gtk-
perl-0.7009-r1/image//usr" OPTIMIZE="" PASTHRU_DEFINE="" PASTHRU_INC=""
INSTALLDIRS=vendor
make: *** [GtkGLArea/Makefile] Error 141
Using the libMesaGL(U) linkage is now both deprecated and unavailable on current linux systems. The name of these libraries was changed to libGL(U) per the openGL ABI (http://oss.sgi.com/projects/ogl-sample/ABI/index.html). Attached patch fixes this issue in the GtkGLArea Makefile.PL and pkg.pl. Thanks for the great package :)
--- GtkGLArea/Makefile.PL.orig 2005-07-19 18:55:52.000000000 -0400
+++ GtkGLArea/Makefile.PL 2005-07-19 18:56:19.000000000 -0400
@@ -11,7 +11,7 @@ mkdir('build', 0777);
$gl = new ExtUtils::Depends ('Gtk::GLArea', 'Gtk');
$gl->set_inc (`gtk-config --cflags`);
-$libs = "-lgtkgl -lMesaGL -lMesaGLU " . `gtk-config --libs`;
+$libs = "-lgtkgl -lGL -lGLU " . `gtk-config --libs`;
chomp($libs);
$nomesa = $libs;
$nomesa =~ s/Mesa//g;
--- GtkGLArea/pkg.pl.orig 2005-07-19 18:56:04.000000000 -0400
+++ GtkGLArea/pkg.pl 2005-07-19 18:56:25.000000000 -0400
@@ -12,4 +12,4 @@ add_headers "<gtkgl/gtkglarea.h>", "<gtk
add_pm 'Constants.pm' => '$(INST_LIBDIR)/Gtk/GLArea/Constants.pm',
'Glut.pm' => '$(INST_LIBDIR)/Gtk/GLArea/Glut.pm';
-$libs =~ s/-l/-lgtkgl -lMesaGL -lMesaGLU -l/; #hack hack
+$libs =~ s/-l/-lgtkgl -lGL -lGLU -l/; #hack hack