Bug 963185

Summary: preprocessor error: Unterminated #if
Product: [Fedora] Fedora Reporter: Matthias Runge <mrunge>
Component: FlightGearAssignee: Fabrice Bellet <fabrice>
Status: CLOSED EOL QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 19CC: fabrice
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-01-29 12:16:33 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Matthias Runge 2013-05-15 11:00:22 UTC
When starting fgfs on f19:

[mrunge@gauss ~]$ fgfs
KMA20 audio panel initialized
KI266 dme indicator #0 initialized
loading scenario 'nimitz_demo'
PNG lib warning : Interlace handling should be turned on when using png_read_image
Electrical system initialized
FRAGMENT glCompileShader "/usr/share/flightgear/Shaders/urban.frag" FAILED
FRAGMENT Shader "/usr/share/flightgear/Shaders/urban.frag" infolog:
0:95(22): preprocessor error: syntax error, unexpected IDENTIFIER, expecting NEWLINE
0:92(1): preprocessor error: Unterminated #if


glLinkProgram "" FAILED
Program "" infolog:
error: linking with uncompiled shader
Stack dump:
0.	Running pass 'Function Pass Manager' on module 'tgsi'.
1.	Running pass 'Greedy Register Allocator' on function '@main'
Segmentation fault (core dumped)

Comment 1 Matthias Runge 2013-05-16 07:22:02 UTC
*** Bug 963183 has been marked as a duplicate of this bug. ***

Comment 2 Matthias Runge 2013-05-17 08:43:54 UTC
*** Bug 963180 has been marked as a duplicate of this bug. ***

Comment 3 Matthias Runge 2013-05-17 08:44:59 UTC
*** Bug 963181 has been marked as a duplicate of this bug. ***

Comment 4 Fabrice Bellet 2013-05-19 14:22:47 UTC
Interesting, because the same error shows up in my case, but doesn't generate a segfault. Does the suggested patch to urban.frag, around line 95, from this message helps :

http://sourceforge.net/mailarchive/message.php?msg_id=30240528

Comment 5 Matthias Runge 2013-06-27 08:43:15 UTC
Ah, sorry for lagging this.

No, adding the braces does not help at all.

Comment 6 Matthias Runge 2013-06-27 08:49:28 UTC
I changed that to:
 #ifdef USE_QDM_ASCEND_INTERVAL
                if(frac(level*0.5) > EPSILON)
                  level++;
                #elif defined(USE_QDM_ASCEND_CONST)
                 level++;
                #endif


[mrunge@gauss ~]$ fgfs
KMA20 audio panel initialized
KI266 dme indicator #0 initialized
loading scenario 'nimitz_demo'
PNG lib warning : Interlace handling should be turned on when using png_read_image
Electrical system initialized
PNG lib warning : Interlace handling should be turned on when using png_read_image
Stack dump:
0.	Running pass 'Function Pass Manager' on module 'tgsi'.
1.	Running pass 'Greedy Register Allocator' on function '@main'
Segmentation fault (core dumped)

If it's dependent of graphics, I'm using an AMD card, plain fedora drivers, no options set at all.

Comment 7 Fabrice Bellet 2013-07-16 05:37:37 UTC
I cannot reproduce the segmentation fault on my ATI hardware (Gallium 0.4 on ATI RV530). The stack dump seems to come from the llvm compiler, so this may be driver-specific. Before reassigning to the Mesa folks, maybe you could try to play with environment variables related to LLVM ? (http://www.mesa3d.org/envvars.html). The output of glxinfo would certainly be useful too.

Comment 8 Fedora End Of Life 2015-01-09 18:07:23 UTC
This message is a notice that Fedora 19 is now at end of life. Fedora 
has stopped maintaining and issuing updates for Fedora 19. It is 
Fedora's policy to close all bug reports from releases that are no 
longer maintained. Approximately 4 (four) weeks from now this bug will
be closed as EOL if it remains open with a Fedora 'version' of '19'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 19 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.