Skip Menu |

Preferred bug tracker

Please visit the preferred bug tracker to report your issue.

This queue is for tickets about the OpenGL CPAN distribution.

Report information
The Basics
Id: 52350
Status: resolved
Priority: 0/
Queue: OpenGL

People
Owner: Nobody in particular
Requestors: g.grigelionis [...] computer.org
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: (no value)
Fixed in: (no value)



Subject: OpenGL fails to compile with old gcc due to optimisation
Date: Wed, 02 Dec 2009 11:47:57 +0100
To: bug-OpenGL [...] rt.cpan.org
From: Gintas Grigelionis <g.grigelionis [...] computer.org>
A construction similar to ifneq ($(NOOPT),) pogl_const.o: OPTIMIZE:= $(filter-out -O2,$(OPTIMIZE)) endif is necessary in order to compile OpenGL successfully on RHEL 3 (gcc 3.2.3).
If I understand the problem, for the indicated gcc version, gcc -O2 pogl_const.o (or whatever) dies? Please attach the compiler output from the failed compile so we can better understand where the problem arises in the code being compiled. If you look at the generated C output being compiled, is there an incorrect construction or something leading to the failure? --Chris On Wed Dec 02 05:48:22 2009, g.grigelionis@computer.org wrote: Show quoted text
> A construction similar to > > ifneq ($(NOOPT),) > pogl_const.o: OPTIMIZE:= $(filter-out -O2,$(OPTIMIZE)) > endif > > is necessary in order to compile OpenGL successfully on RHEL 3 (gcc
3.2.3).
Subject: Re: [rt.cpan.org #52350] OpenGL fails to compile with old gcc due to optimisation
Date: Mon, 07 Dec 2009 20:25:20 +0100
To: bug-OpenGL [...] rt.cpan.org
From: Gintas Grigelionis <g.grigelionis [...] computer.org>
Chris Marshall via RT wrote: Show quoted text
> <URL: https://rt.cpan.org/Ticket/Display.html?id=52350 > > > If I understand the problem, for the indicated gcc version, > gcc -O2 pogl_const.o (or whatever) dies? > > Please attach the compiler output from the failed compile > so we can better understand where the problem arises in > the code being compiled. If you look at the generated C > output being compiled, is there an incorrect construction > or something leading to the failure? > > --Chris > > On Wed Dec 02 05:48:22 2009, g.grigelionis@computer.org wrote:
>> A construction similar to >> >> ifneq ($(NOOPT),) >> pogl_const.o: OPTIMIZE:= $(filter-out -O2,$(OPTIMIZE)) >> endif >> >> is necessary in order to compile OpenGL successfully on RHEL 3 (gcc
> 3.2.3).
Hi, gcc doesn't die, it hangs: cc1 cannot produce any output that is piped to as. Gintas
One thing to check is whether gcc is hung or if instead it is swapping. I recently reworked the XS files for OpenGL to split the biggest one into a number of smaller files to allow me to compile on a memory limited machine. That said, the pogl_const.xs and its generated .c file are by far the largest now. We've had folks claim that OpenGL did not compile for them when if they waited 10s of minutes to an hour or more the compile completed. Cheers, Chris On Mon Dec 07 14:25:44 2009, g.grigelionis@computer.org wrote: Show quoted text
> > gcc doesn't die, it hangs: cc1 cannot produce any output > that is piped to as.
OpenGL-0.61_002 is being released to CPAN with your gcc problem added to the KNOWN_PROBLEMS file. If you determine that the problem is actually just a *very long* compile time, please let me know. Thanks. --Chris
Subject: Re: [rt.cpan.org #52350] OpenGL fails to compile with old gcc due to optimisation
Date: Thu, 10 Dec 2009 11:04:56 +0100
To: bug-OpenGL [...] rt.cpan.org
From: Gintas Grigelionis <g.grigelionis [...] computer.org>
Chris Marshall via RT wrote: Show quoted text
> <URL: https://rt.cpan.org/Ticket/Display.html?id=52350 > > > OpenGL-0.61_002 is being released to CPAN with your gcc problem added > to the KNOWN_PROBLEMS file. If you determine that the problem is > actually just a *very long* compile time, please let me know. Thanks. > > --Chris
Thanks, I'll try to be patient. However, the pattern of memory usage is such that resident image suddenly shrinks by half, and strace shows no activity whatsoever... Gintas
I added a note on the apparent gcc-3.2.3 bug and work around
to the OpenGL KNOWN_PROBLEMS file.  It will be in the first
CPAN release following yesterday's OpenGL-0.62.

Thanks for reporting the problem.  --Chris
Subject: Re: [rt.cpan.org #52350] Resolved: OpenGL fails to compile with old gcc due to optimisation
Date: Mon, 28 Dec 2009 05:44:00 +0100
To: bug-OpenGL [...] rt.cpan.org
From: Gintas Grigelionis <g.grigelionis [...] computer.org>
Unfortunately I cannot confirm this. There's another bug, too: on 64-bit Linuxes (SuSE, in my case), Makefile.PL and utils/Makefile need /usr/lib64 and /usr/X11R6/lib64 in library path list (-L). Cheers, Gintas Chris Marshall via RT wrote: Show quoted text
> <URL: https://rt.cpan.org/Ticket/Display.html?id=52350 > > > According to our records, your request has been resolved. If you have any > further questions or concerns, please respond to this message.
On Sun Dec 27 23:44:21 2009, g.grigelionis@computer.org wrote:
Show quoted text
> Unfortunately I cannot confirm this. There's another bug, too: on 64-bit
> Linuxes (SuSE, in my case), Makefile.PL and utils/Makefile need
> /usr/lib64 and /usr/X11R6/lib64 in library path list (-L).

You don't say where the corresponding include headers are but if you
add an appropriate -I entry after line 463 in OpenGL-0.62/Makefile.PL
and -L/usr/lib64 and -L/usr/X11R6/lib64 lines after line 123, does the
Perl OpenGL configure and build correctly?

Thanks,
Chris

Subject: Re: [rt.cpan.org #52350] OpenGL fails to compile with old gcc due to optimisation
Date: Mon, 28 Dec 2009 07:02:42 +0100
To: bug-OpenGL [...] rt.cpan.org
From: Gintas Grigelionis <g.grigelionis [...] computer.org>
Chris Marshall via RT wrote: Show quoted text
> <URL: https://rt.cpan.org/Ticket/Display.html?id=52350 > > > On Sun Dec 27 23:44:21 2009, g.grigelionis@computer.org wrote:
>> Unfortunately I cannot confirm this. There's another bug, too: on 64-bit >> Linuxes (SuSE, in my case), Makefile.PL and utils/Makefile need >> /usr/lib64 and /usr/X11R6/lib64 in library path list (-L).
> > You don't say where the corresponding include headers are but if you > add an appropriate -I entry after line 463 in OpenGL-0.62/Makefile.PL > and -L/usr/lib64 and -L/usr/X11R6/lib64 lines after line 123, does the > Perl OpenGL configure and build correctly? > > Thanks, > Chris
I need to change both Makefile.PL 119,120c119,120 < -L/usr/lib64 < -L/usr/X11R6/lib64 --- Show quoted text
> -L/usr/lib > -L/usr/X11R6/lib
and utils/Makefile 9c9 < LIBS=-L/usr/lib64 -L/usr/X11R6/lib64 -L/usr/local/lib -L/usr/openwin/lib -L/usr/lib/xorg/modules -L/usr/X11R6/lib/modules -L/usr/lib/xorg/modules/extensions -L/usr/X11R6/lib/modules/extensions --- Show quoted text
> LIBS=-L/usr/lib -L/usr/X11R6/lib -L/usr/local/lib -L/usr/openwin/lib
-L/usr/lib/xorg/modules -L/usr/X11R6/lib/modules -L/usr/lib/xorg/modules/extensions -L/usr/X11R6/lib/modules/extensions Regards, Gintas
Ok, but does it work if you put the lib64 at the end rather than
changing the lib stuff completely?  As you can appreciate,
there are many 32bit OSes out there that might still like to
build OpenGL.

If it doesn't work with it at the end (both places) then it will
take more work to sort out.  I suggest leaving the utils/Makefile
with your change and try the fix I suggested for Makefile.PL
to see if that works first.

Do you have duplicate OpenGL libraries on your system in
the /usr/lib and /usr/X11R6/lib locations?

Thanks for the debugging.  I would like to get OpenGL working
for 64bit platforms as it currently does for 32bit ones.

Cheers,
Chris

On Mon Dec 28 01:03:00 2009, g.grigelionis@computer.org wrote:
Show quoted text
>
> I need to change both Makefile.PL
>
> 119,120c119,120
> < -L/usr/lib64
> < -L/usr/X11R6/lib64
> ---
> > -L/usr/lib
> > -L/usr/X11R6/lib
>
> and utils/Makefile
>
> 9c9
> < LIBS=-L/usr/lib64 -L/usr/X11R6/lib64 -L/usr/local/lib
> -L/usr/openwin/lib -L/usr/lib/xorg/modules -L/usr/X11R6/lib/modules
> -L/usr/lib/xorg/modules/extensions -L/usr/X11R6/lib/modules/extensions
> ---
> > LIBS=-L/usr/lib -L/usr/X11R6/lib -L/usr/local/lib -L/usr/openwin/lib
> -L/usr/lib/xorg/modules -L/usr/X11R6/lib/modules
> -L/usr/lib/xorg/modules/extensions -L/usr/X11R6/lib/modules/extensions
>
> Regards,
> Gintas


  Hi again Gintas, I just saw a CPAN testers report for OpenGL that appeared to
be coming from you.  It is pretty clear that the problem is a gcc bug in the
attached output so it is not just a wait time there.

I did notice that you are using parallel make with your CPAN test report
so the multiple processes running could make it more likely to hit
an out of memory situation on the system (I've seen it before and it
is anyone's guess what the symptom of that might be---gcc crashing,
for example).

Thanks for reporting,
Chris


Subject: Re: [rt.cpan.org #52350] OpenGL fails to compile with old gcc due to optimisation
Date: Tue, 29 Dec 2009 19:02:05 +0100
To: bug-OpenGL [...] rt.cpan.org
From: Gintas Grigelionis <g.grigelionis [...] computer.org>
Chris Marshall via RT wrote: Show quoted text
> <URL: https://rt.cpan.org/Ticket/Display.html?id=52350 > > > Hi again Gintas, I just saw a CPAN testers report for OpenGL that appeared to > be coming from you. It is pretty clear that the problem is a gcc bug in the > attached output so it is not just a wait time there. > > I did notice that you are using parallel make with your CPAN test report > so the multiple processes running could make it more likely to hit > an out of memory situation on the system (I've seen it before and it > is anyone's guess what the symptom of that might be---gcc crashing, > for example). > > Thanks for reporting, > Chris
I killed the as process, so it's not of much use, just an indication that things go wrong. Regards, Gintas
Subject: Re: [rt.cpan.org #52350] OpenGL fails to compile with old gcc due to optimisation
Date: Tue, 29 Dec 2009 19:06:06 +0100
To: bug-OpenGL [...] rt.cpan.org
From: Gintas Grigelionis <g.grigelionis [...] computer.org>
This is a quick-and-dirty change. I'd rather use Config for generating both Makefiles. Maybe I'll find a few hours to propose a more elegant solution, but utils/Makefile could be a tough nut for a general case (perhaps LIBS could be passed through environment or command line). Regards, Gintas Chris Marshall via RT wrote: Show quoted text
> <URL: https://rt.cpan.org/Ticket/Display.html?id=52350 > > > Ok, but does it work if you put the lib64 at the end rather than > changing the lib stuff completely? As you can appreciate, > there are many 32bit OSes out there that might still like to > build OpenGL. > > If it doesn't work with it at the end (both places) then it will > take more work to sort out. I suggest leaving the utils/Makefile > with your change and try the fix I suggested for Makefile.PL > to see if that works first. > > Do you have duplicate OpenGL libraries on your system in > the /usr/lib and /usr/X11R6/lib locations? > > Thanks for the debugging. I would like to get OpenGL working > for 64bit platforms as it currently does for 32bit ones. > > Cheers, > Chris > > On Mon Dec 28 01:03:00 2009, g.grigelionis@computer.org wrote:
>> I need to change both Makefile.PL >> >> 119,120c119,120 >> < -L/usr/lib64 >> < -L/usr/X11R6/lib64 >> ---
>>> -L/usr/lib >>> -L/usr/X11R6/lib
>> and utils/Makefile >> >> 9c9 >> < LIBS=-L/usr/lib64 -L/usr/X11R6/lib64 -L/usr/local/lib >> -L/usr/openwin/lib -L/usr/lib/xorg/modules -L/usr/X11R6/lib/modules >> -L/usr/lib/xorg/modules/extensions -L/usr/X11R6/lib/modules/extensions >> ---
>>> LIBS=-L/usr/lib -L/usr/X11R6/lib -L/usr/local/lib -L/usr/openwin/lib
>> -L/usr/lib/xorg/modules -L/usr/X11R6/lib/modules >> -L/usr/lib/xorg/modules/extensions -L/usr/X11R6/lib/modules/extensions >> >> Regards, >> Gintas
The key information I need is the header locations and library
locations for all the OpenGL stuff on your system and the
include search order and library search order for same.

For example, if you don't have the FreeGLUT and OpenGL libraries
in both 32bit and 64bit flavor in your path, putting the lib64 stuff
at the end of the search list in Makefile.PL should work.  That
may not work if there is a 32bit library ahead in the search paths.

If the Makefile.PL works, I can have it call a lib64 version of the
utils/Makefile.

In the meantime, we'll probably end up implementing a user
specified library and includes.  The longer term plan is to
switch to Module::Build and Devel::CheckLib to dynamically
check for the needed libraries.

--Chris
On Tue Dec 29 13:06:34 2009, g.grigelionis@computer.org wrote:
Show quoted text
>
> This is a quick-and-dirty change. I'd rather use Config for generating
> both Makefiles. Maybe I'll find a few hours to propose a more elegant
> solution, but utils/Makefile could be a tough nut for a general case
> (perhaps LIBS could be passed through environment or command line).
Subject: Re: [rt.cpan.org #52350] OpenGL fails to compile with old gcc due to optimisation
Date: Sun, 03 Jan 2010 22:24:43 +0100
To: bug-OpenGL [...] rt.cpan.org
From: Gintas Grigelionis <g.grigelionis [...] computer.org>
The point is, I can have both 32-bit and 64-bit libraries as well as both 32-bit and 64-bit perls _and_ no clues about correct library paths in Config. Or, as I discovered another day, I can have broken Mesa in /usr/lib for backwards compatibility and working libGL in /usr/X11/lib so that I have to do some clever dance with LD_RUN_PATH. So, letting one specify the correct -I, -L and LD_RUN_PATH through the environment could be the best solution for automatic testing (as a bonus, you may harvest the configuration data from tester reports). Cheers, Gintas Chris Marshall via RT wrote: Show quoted text
> <URL: https://rt.cpan.org/Ticket/Display.html?id=52350 > > > The key information I need is the header locations and library > locations for all the OpenGL stuff on your system and the > include search order and library search order for same. > > For example, if you don't have the FreeGLUT and OpenGL libraries > in both 32bit and 64bit flavor in your path, putting the lib64 stuff > at the end of the search list in Makefile.PL should work. That > may not work if there is a 32bit library ahead in the search paths. > > If the Makefile.PL works, I can have it call a lib64 version of the > utils/Makefile. > > In the meantime, we'll probably end up implementing a user > specified library and includes. The longer term plan is to > switch to Module::Build and Devel::CheckLib to dynamically > check for the needed libraries. > > --Chris
I fixed the Makefile.PL to set the OPTIMIZE to -O0 for the case of gcc 3.2.3 as a work around for the compiler crash with optimization on. I tried to do a more precise fix but was not able to come up with a portable solution easily. If you could, I would appreciate if you could test the latest git (available from the read-only repository on sf.net): git clone git://pdl.git.sourceforge.net/gitroot/pdl/pogl OpenGL I plan to postpone more sophisticated solutions until I have time to migrate to Module::Build with its simpler set of dependency issues. --Chris On Sun Dec 27 16:58:21 2009, CHM wrote: Show quoted text
> I added a note on the apparent gcc-3.2.3 bug and work around > to the OpenGL KNOWN_PROBLEMS file. It will be in the first > CPAN release following yesterday's OpenGL-0.62. > > Thanks for reporting the problem. --Chris
Updating this ticket status to Stalled.  The planed
rework of OpenGL will include the ability to specify
specific build environment information to override
or supplement the built-in detection and config.
This problem has been worked around for the specific instance reported
and the ability for the user to customize the compile, link and load at
module build time has been added as a feature request on the new
Perl OpenGL sourceforge.net project:

  3364859 add ability to specify OpenGL compile/link options

The URL of the ticket tracking this request is at

  https://sourceforge.net/tracker/?func=detail&amp;aid=3364859&amp;group_id=562483&amp;atid=2281761