Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 335169 - media-libs/mesa-7.8.2, libGlw.so is missing glwMDrawingAreaWidgetClass and similar
Summary: media-libs/mesa-7.8.2, libGlw.so is missing glwMDrawingAreaWidgetClass and si...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Library (show other bugs)
Hardware: x86 Linux
: High normal (vote)
Assignee: Gentoo X packagers
URL: https://bugs.freedesktop.org/show_bug...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-08-30 01:58 UTC by Robert Penny
Modified: 2011-07-10 03:48 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
Add GLAPI to the two functions in question (mesa-7.10.2-glw-visibility.patch,499 bytes, patch)
2011-06-02 11:56 UTC, Gert Wollny
Details | Diff
possibly more complete patch that needs testing (glw-GLAPI-restore-default-visibility.patch,1.53 KB, patch)
2011-06-17 00:39 UTC, David J Cozatt
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Robert Penny 2010-08-30 01:58:42 UTC
When emerging media-libs/openinventor-2.1.5.10-r3

Undefined reference to `glwMDrawingAreaWidgetClass' when compiling inventor/apps/samples/widgets/componentTest.c++

Mesa has been compiled with the +motif flag set, as this is required by openinventor.

make[4]: Entering directory `/var/tmp/portage/media-libs/openinventor-2.1.5.10-r3/work/inventor/apps/samples/widgets'
i686-pc-linux-gnu-g++  -O1 -mtune=i686 -pipe  -I/usr/X11R6/include -I. -I../../../lib/database/include -I../../../lib/interaction/include -I../../../lib/nodekits/include -I../../../libSoXt/include -fPIC -DIVPREFIX=\"/usr\"          -c componentTest.c++
i686-pc-linux-gnu-g++ -L/var/tmp/portage/media-libs/openinventor-2.1.5.10-r3/work/inventor/lib -L/var/tmp/portage/media-libs/openinventor-2.1.5.10-r3/work/inventor/libSoXt -L//usr/lib  -L/usr/X11R6/lib  componentTest.o          libInventorWidget.a -lInventor -lInventorXt -lGLw  -o componentTest
libInventorWidget.a(MyTextureEd.o): In function `MyTextureEditor::openImageDialog()':
MyTextureEd.c++:(.text+0x19ae): undefined reference to `glwMDrawingAreaWidgetClass'
libInventorWidget.a(MyTextureEd.o): In function `MyTextureEditor::buildTexturePaletteWidget(_WidgetRec*)':
MyTextureEd.c++:(.text+0x4014): undefined reference to `glwMDrawingAreaWidgetClass'
collect2: ld returned 1 exit status
make[4]: *** [componentTest] Error 1

# pwd
/var/tmp/portage/media-libs/mesa-7.8.2/image/usr/lib

# nm -D libGLw.so.1.0.0 | grep DrawingArea
00002ab0 T GLwCreateMDrawingArea


... note the lack of glwMDrawingAreaWidgetClass

Reverting to mesa-7.7.1 fixes problem.

pwd
/var/tmp/portage/media-libs/mesa-7.7.1/image/usr/lib

cohetes lib # nm -D libGLw.so.1.0.0 | grep DrawingArea
00002c80 T GLwCreateMDrawingArea
00002110 T GLwDrawingAreaMakeCurrent
000020e0 T GLwDrawingAreaSwapBuffers
00005120 D glwDrawingAreaClassRec
00005198 D glwDrawingAreaWidgetClass
000055a0 D glwMDrawingAreaClassRec
00005634 D glwMDrawingAreaWidgetClass

Interestingly, a symbol for glwMDrawingAreaWidgetClass does exist in the data area of libGLw.so.1.0.0 in mesa-7.8.2, though this normally gets stripped during installation.

In mesa-7.8.2

cohetes lib # nm  libGLw.so.1.0.0 | grep DrawingArea
00002ab0 T GLwCreateMDrawingArea
00001f40 t GLwDrawingAreaMakeCurrent
00001f10 t GLwDrawingAreaSwapBuffers
00004120 d glwDrawingAreaClassRec
00004198 d glwDrawingAreaWidgetClass
000045a0 d glwMDrawingAreaClassRec
00004634 d glwMDrawingAreaWidgetClass

In mesa-7.7.1 

cohetes lib # nm libGLw.so.1.0.0 | grep glwMDrawingAreaWidgetClass
00005634 D glwMDrawingAreaWidgetClass

I haven't dug through mesa build to see where the difference arises between the two.  Hopefully someone more familiar with mesa can do this.  The difference between 'd' and 'D' in the symbol definition is local versus global.  Maybe this is a hint to the problem.

Use flags and emerge --info follow.

Thanks!

cohetes media-libs # equery uses mesa
[ Searching for packages matching mesa... ]
[ Colour Code : set unset ]
[ Legend : Left column  (U) - USE flags from make.conf              ]
[        : Right column (I) - USE flags packages was installed with ]
[ Found these USE variables for media-libs/mesa-7.8.2 ]
 U I
 - - debug                : Enable extra debug codepaths, like asserts and extra output. If you want to get meaningful backtraces see http://www.gentoo.org/proj/en/qa/backtraces.xml
 - - gallium              : Gallium3D is new architecture for building 3D graphics drivers.
 - - kernel_FreeBSD       : KERNEL setting for system using the FreeBSD kernel
 + + motif                : Adds support for the Motif toolkit
 + + nptl                 : Enable support for Native POSIX Threads Library, the new threading module (requires linux-2.6 or better usually)
 - - pic                  : disable optimized assembly code that is not PIC friendly
 - - selinux              : !!internal use only!! Security Enhanced Linux support, this must be set by the selinux profile or breakage will occur
 - - video_cards_intel    : VIDEO_CARDS setting to build driver for Intel video cards
 - - video_cards_mach64   : VIDEO_CARDS setting to build driver for mach64 video cards
 - - video_cards_mga      : VIDEO_CARDS setting to build driver for mga video cards
 - - video_cards_none     : VIDEO_CARDS setting to build no drivers (useful when using binary drivers)
 - - video_cards_nouveau  : VIDEO_CARDS setting to build reverse-engineered driver for nvidia cards
 - - video_cards_r128     : VIDEO_CARDS setting to build driver for ATI r128 video cards
 + + video_cards_radeon   : VIDEO_CARDS setting to build driver for ATI radeon video cards
 - - video_cards_radeonhd : VIDEO_CARDS setting to build driver for ATI radeon HD video cards (radeon also works)
 + + video_cards_savage   : VIDEO_CARDS setting to build driver for savage video cards
 - - video_cards_sis      : VIDEO_CARDS setting to build driver for SiS video cards
 - - video_cards_svga     : VIDEO_CARDS setting to build driver for svga (VMware Virtual GPU) via Gallium
 - - video_cards_tdfx     : VIDEO_CARDS setting to build driver for tdfx video cards
 - - video_cards_via      : VIDEO_CARDS setting to build driver for via video cards
 - + xcb                  : Support the X C-language Binding, a replacement for Xlib




Reproducible: Always

Steps to Reproduce:
1. emerge =media-libs/mesa-7.8.2 openinventor  ... fails
2. emerge =media-libs/mesa-7.7.1 openinventor  ... succeeds




$ emerge --info
Portage 2.1.8.3 (default/linux/x86/10.0, gcc-4.4.3, glibc-2.11.2-r0, 2.6.31-gentoo-r6 i686)
=================================================================
System uname: Linux-2.6.31-gentoo-r6-i686-Intel-R-_Pentium-R-_4_CPU_3.06GHz-with-gentoo-1.12.13
Timestamp of tree: Sun, 22 Aug 2010 00:00:01 +0000
app-shells/bash:     4.0_p37
dev-java/java-config: 2.1.11
dev-lang/python:     2.5.4-r4, 2.6.5-r3, 3.1.2-r4
dev-util/cmake:      2.8.1-r2
sys-apps/baselayout: 1.12.13
sys-apps/sandbox:    1.6-r2
sys-devel/autoconf:  2.13, 2.65
sys-devel/automake:  1.10.3, 1.11.1
sys-devel/binutils:  2.20.1-r1
sys-devel/gcc:       4.4.3-r2
sys-devel/gcc-config: 1.4.1
sys-devel/libtool:   2.2.6b
sys-devel/make:      3.81-r2
virtual/os-headers:  2.6.30-r1
ACCEPT_KEYWORDS="x86"
ACCEPT_LICENSE="* -@EULA"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-O2 -mtune=i686 -pipe"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/X11/xkb"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/eselect/postgresql /etc/fonts/fonts.conf /etc/gconf /etc/php/apache2-php5/ext-active/ /etc/php/cgi-php5/ext-active/ /etc/php/cli-php5/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c"
CXXFLAGS="-O2 -mtune=i686 -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="assume-digests distlocks fixpackages news parallel-fetch protect-owned sandbox sfperms strict unmerge-logs unmerge-orphans userfetch"
GENTOO_MIRRORS="ftp://mirror.mcs.anl.gov/pub/gentoo ftp://mirror.iawnet.sandia.gov/pub/gentoo/ ftp://ftp.ucsb.edu/pub/mirrors/linux/gentoo/"
LANG="C"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
MAKEOPTS="-j3"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="X acl acpi alsa apache2 berkdb blas bzip2 cairo cli cracklib crypt cups cxx dri fftw firefox fortran gdbm gif glut gnome gpm gsteamer gtk iconv imagemagick imap imlib ipod ipv6 java javascript jpeg jpeg2k kerberos lapack ldap modules motif mp3 mpeg mplayer mudflap ncurses nls nptl nptlonly offensive opengl openmp pam pcre pdf perl php plotutils png postgres pppd python qt3 qt3support qt4 quicktime readline reflection ruby samba sasl session sockets spell spl ssl svg sysfs tcl tcpd tetex tiff tk unicode usb vhosts vorbis wifi win32codecs wmf x86 xine xinerama xinetd xml xorg xpm xscreensaver xv xvid zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1 emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" ELIBC="glibc" INPUT_DEVICES="keyboard mouse wacom" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" RUBY_TARGETS="ruby18" USERLAND="GNU" VIDEO_CARDS="radeon savage vesa" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account" 
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, LC_ALL, LINGUAS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, PORTDIR_OVERLAY
Comment 1 Rémi Cardona (RETIRED) gentoo-dev 2010-09-21 21:51:25 UTC
I'd say no-one really tests motif support anymore. You might want to file a bug upstream [1] and see what they have to say. If you do file a bug, please add "remi@gentoo.org" as a CC on the bug so I can track the issue.

Thanks

[1] https://bugs.freedesktop.org/enter_bug.cgi?product=Mesa
Comment 2 Justin Lecher (RETIRED) gentoo-dev 2010-11-01 13:53:56 UTC
Upstream bug filed.
Comment 3 Justin Lecher (RETIRED) gentoo-dev 2010-11-01 13:57:28 UTC
It has to be in the build system, as the code didn't change from 7.7 to 7.8.
Comment 4 Jose Torres 2011-01-08 04:50:41 UTC
(In reply to comment #2)
> Upstream bug filed.
> 

Hi Justin,
Can you provide a link to the upstream bug report?
Comment 5 Justin Lecher (RETIRED) gentoo-dev 2011-01-08 14:19:39 UTC
(In reply to comment #4)
> (In reply to comment #2)
> > Upstream bug filed.
> > 
> 
> Hi Justin,
> Can you provide a link to the upstream bug report?
> 

see the URL field.
Comment 6 Gert Wollny 2011-06-02 11:36:45 UTC
I think I found the problem: At some point mesa started to use the --visibilizy=hidden attribute if gcc supports it. 
Since in mesa libGLw is build by default as a static library this is of no consequence when linking. But in Gentoo the library is build as a shared library, and hence the visibility is important. 

By adding GLAPI to the function declaration in question, the problem should go away.
Comment 7 Gert Wollny 2011-06-02 11:56:37 UTC
Created attachment 275607 [details, diff]
Add GLAPI to the two functions in question

This patch fixed it for me (amd64, gcc 4.5.2).
Comment 8 Justin Lecher (RETIRED) gentoo-dev 2011-06-02 12:50:36 UTC
Could you also attach the patch at the upstream bug?
Comment 9 Justin Lecher (RETIRED) gentoo-dev 2011-06-02 12:50:42 UTC
Could you also attach the patch at the upstream bug?
Comment 10 David J Cozatt 2011-06-17 00:39:57 UTC
Created attachment 277319 [details, diff]
possibly more complete patch that needs testing

You need motif or lesstif to check this?

I don't use those it applied fine for me but did not get called. 

the option would be '--enable-glw' was not on my system.
Comment 11 Justin Lecher (RETIRED) gentoo-dev 2011-06-20 07:25:15 UTC
The patch works here.
Comment 12 Chí-Thanh Christopher Nguyễn gentoo-dev 2011-07-10 03:48:39 UTC
Fixed in mesa-7.11_rc1