Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 40928 - configure borks on OpenGL not found, yet is present
Summary: configure borks on OpenGL not found, yet is present
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: x86 Linux
: High blocker (vote)
Assignee: Gentoo Graphics Project
Depends on:
Reported: 2004-02-08 20:08 UTC by Chris Bruner
Modified: 2004-05-06 22:36 UTC (History)
1 user (show)

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

config.log (config.log,88.80 KB, text/plain)
2004-02-08 21:10 UTC, Chris Bruner
eclass-debug.log (eclass-debug.log,1.31 KB, text/plain)
2004-02-11 21:50 UTC, Chris Bruner
env > root.env (root.env,2.56 KB, text/plain)
2004-02-19 22:24 UTC, Chris Bruner

Note You need to log in before you can comment on or make changes to this bug.
Description Chris Bruner 2004-02-08 20:08:27 UTC
When emerging blender 2.32 it complains that
checking for openpty in -lutil... no
checking for XextFindDisplay in -lXext... no
checking for XOpenDisplay in -lX11... no
checking for glIsTexture in -lGL... no
configure: error: OpenGL not found on your system - cannot continue

!!! ERROR: media-gfx/blender-2.32 failed.
!!! Function econf, Line 365, Exitcode 1
!!! econf failed

Yet OpenGl is on my system, as well as glIsTexture (which is from pyOpenGL). 
In the forums someone mentioned using 

USE="-mozilla" emerge blender

or failing that 

 USE="-arts" emerge libsdl 
 Then emerge blender without mozilla: 
 USE="-mozilla" emerge blender 
Tried and it didn't work. 

Reproducible: Always
Steps to Reproduce:
1.emerge blender
Comment 1 SpanKY gentoo-dev 2004-02-08 21:02:55 UTC
post config.log from the build dir
Comment 2 Chris Bruner 2004-02-08 21:10:51 UTC
Created attachment 25232 [details]

as requested
Comment 3 SpanKY gentoo-dev 2004-02-08 21:20:26 UTC
just updated gcc huh ?

try this: `env-update && source /etc/profile ; emerge blender`

if that doesnt work, post `emerge info`
Comment 4 Chris Bruner 2004-02-08 21:27:13 UTC
Good guess, but that wasn't it. The results look the same. Anything else you need from emerge info? 
Comment 5 SpanKY gentoo-dev 2004-02-10 16:31:31 UTC
gcc guys: any thoughts about why it'd be doing this ?
Comment 6 Martin Schlemmer (RETIRED) gentoo-dev 2004-02-11 13:52:22 UTC
Try running 'ldconfig'.  Please also post 'emerge info'
Comment 7 Chris Bruner 2004-02-11 21:50:23 UTC
Created attachment 25456 [details]

I'm not sure what you mean by emerge info, but here is the eclass-debug.log
file. If it's something else you what, let me know. The error that I'm getting
is the same as the first one I posted. 

Also ldconfig made no difference.
Comment 8 SpanKY gentoo-dev 2004-02-11 21:56:10 UTC
he means exactly that ... type 'emerge info' into a terminal and give us the results :P
Comment 9 Chris Bruner 2004-02-12 19:49:46 UTC
The things I learn :)

root@belford root # emerge info
Portage 2.0.50-r1 (default-x86-1.4, gcc-3.3.2, glibc-2.3.3_pre20031222-r0,2.3.3_pre20040117-r0,2.3.3_pre20040207-r0,2.3.2-r1,2.3.2-r3, 2.6.1-mm4)
System uname: 2.6.1-mm4 i686 AMD Athlon(TM) MP 1800+
Gentoo Base System version
distcc 2.12.1 i686-pc-linux-gnu (protocols 1 and 2) (default port 3632) [disabled]
ccache version 2.2 [enabled]
Autoconf: sys-devel/autoconf-2.58,sys-devel/autoconf-2.59
Automake: sys-devel/automake-1.7.8,sys-devel/automake-1.8.2
CFLAGS="-mcpu=athlon-mp -O2 -pipe -fomit-frame-pointer"
CONFIG_PROTECT="/etc /usr/X11R6/lib/X11/xkb /usr/kde/2/share/config /usr/kde/3.1/share/config /usr/kde/3.2/share/config /usr/kde/3/share/config /usr/share/config /usr/share/texmf/dvipdfm/config/ /usr/share/texmf/dvips/config/ /usr/share/texmf/tex/generic/config/ /usr/share/texmf/tex/platex/config/ /usr/share/texmf/xdvi/ /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/env.d"
CXXFLAGS="-O2 -mcpu=i686 -pipe"
FEATURES="autoaddcvs ccache"
USE="3dnow X Xaw3d aalib alsa apm arts avi berkdb bonobo bsf bsh cdr crypt cups dga directfb doc dvd encode esd etwin evo foomaticdb freetype fs gdbm gif gnome gphoto2 gpm gtk gtk2 guile imagemagick imlib jack jack-caps jack-tmpfs java jpeg kde ldap libg++ libwww mad mikmod mmx mng motif mozilla mpeg mpeg4 mysql ncurses nls oggvorbis openal opengl oss pam pdflib perl png python qt quicktime radeon readline ruby samba scanner sdl slang speex spell sse ssl stencil-buffer svga tcltk tcpd tetex truetype videos wxwindows x86 xine xml2 xmms xv zlib"
Comment 10 Martin Schlemmer (RETIRED) gentoo-dev 2004-02-14 05:46:12 UTC
What display drivers?
Comment 11 Chris Bruner 2004-02-19 12:03:40 UTC
Display driver is ati 3.7 running on 9200SE.  Generally it works well, opengl games are fast. Occassionally the mouse goes crazy, but otherwise, the driver works. I doubt that is the problem.
Comment 12 Martin Schlemmer (RETIRED) gentoo-dev 2004-02-19 12:48:53 UTC
Try to run:

  # opengl-update ati
Comment 13 Chris Bruner 2004-02-19 12:56:08 UTC
opengl-update ati has been run. 
Comment 14 Martin Schlemmer (RETIRED) gentoo-dev 2004-02-19 13:29:39 UTC
Maybe try to remerge gcc, as I took a look at the config.log again, and that
seems to be gcc related ...
Comment 15 Martin Schlemmer (RETIRED) gentoo-dev 2004-02-19 13:30:17 UTC
Oh, and distcc _is_ off, right?
Comment 16 Chris Bruner 2004-02-19 20:18:51 UTC
I'm using gcc all the time without problems and it is very up to date.  Distcc is off, although I'm on a 2 processor system and I've got -j2 set. (But I  don't see how that could be the problem.

The code that configure is building is:

char glIsTexture ();
main ()
glIsTexture ();
  return 0;

I tried compiling it (via gcc test.c -lGL)
and it compiled and executed without error. Tried it as root too just in case. 

I've tried switching to xfree instead of ati, (same result).

I'm not a configure expert, and I don't know what it's doing well enough to debug it, but I'm guessing it is my environment variables.

specifically LDFLAGS or something like that.

Could someone who is able to compile it, please show me their env?


Comment 17 Chris Bruner 2004-02-19 21:13:59 UTC
I think I've found it. Using the exact compile parameters contained in config.log I get an undefined reference. I've narrowed it down to:

gcc -o conftest -funsigned-char test.c -lGL -L/usr/X11R6/lib -lXext -lX11 -lm -lstdc++
/usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.2/ undefined reference to `_Unwind_Resume_or_Rethrow@GCC_3.3'
collect2: ld returned 1 exit status
gcc -o conftest -funsigned-char test.c -lGL -L/usr/X11R6/lib -lXext -lX11 -lm 

So it's nothing to do with opengl at all. (Actually this has failed several times in the log, but this was the only test that was critical).

The problem appears to be stdc++. I'm emerge gcc3.3 right now to see if that fixes the problem. 
If stdc++ isn't part of that package (I don't know how to tell) could someone please let me know?

Comment 18 Chris Bruner 2004-02-19 22:03:51 UTC
Hmm, it has no problems using g++. It has unresolved problems using gcc. Makes sense since it is trying to link in stdc++ which is a c++ library.

So the question is why is configure trying to use gcc to with stdc++ libraries, causing all sorts of failures?

also for some more strangeness, gcc == g++ (tested using cmp).

Comment 19 Chris Bruner 2004-02-19 22:23:20 UTC
Well.... ugly hack fix is
export CC=g++
emerge blender

Could someone please find out why blender for me is tacking on stdc++ libraries in the configure stage? Is this a problem with blenders configure, or my setup. 

I'm afraid that if it's my setup I've got explanations for some other weirdness happening, and I'd like to resolve it. 
Comment 20 Chris Bruner 2004-02-19 22:24:30 UTC
Created attachment 25964 [details]
env > root.env

This is my root environment.
Comment 21 Chris Bruner 2004-02-19 22:29:23 UTC
One last note before I go to bed. (sorry for all the traffic).
My ugly hack fix got past configure, but died later on in a file called mallocn.c (I think it really wanted gcc)
Comment 22 Martin Schlemmer (RETIRED) gentoo-dev 2004-02-23 11:23:16 UTC
I cannot see anything mighty suspicious.  What happens if you disable ccache?
Comment 23 Chris Bruner 2004-02-23 11:56:49 UTC
I think I've found the problem, but I don't know the solution. The problem is that it's trying to link in a c++ library (stdc++) using gcc. This won't work as stdc++ looks for Unwind_Resume_or_Rethrow which gcc doesn't know about. The test fails, because of the library. 

If you look at you can see were it's coming in.
AC_CHECK_LIB([stdc++], [printf]) dnl Zarquon's knees, this is an evil hack. 

Even the programmer know it was an evil hack.  The stdc++ library is being linked in on every test after this one, and many tests are failing because of this. I submitted a bug report to blender, but if you can come up with a local solution that would be better (for me).

Comment 24 Chris Bruner 2004-05-06 22:36:00 UTC
I entered this bug on the blender site, and they responded that they've switch to using scons instead of configure. 

I'm marking this as resolved (won't fix) as they've gone to a new version anyways.