Hi,

I'm currently working on improving my Gentoo overlay for FG and added a live 
version of fgrun to it.
There is a problem to compile it with --as-needed enabled as LDFLAGS.

During configure it already prints:
checking for gl_start in -lfltk_gl... no

which leads to a compile error later on:

mv -f .deps/main.Tpo .deps/main.Po                                              
                                                                                
             
mv -f .deps/run_posix.Tpo .deps/run_posix.Po                                    
                                                                                
             
mv -f .deps/wizard_funcs.Tpo .deps/wizard_funcs.Po                              
                                                                                
             
x86_64-pc-linux-gnu-g++ -DLOCALEDIR=\"/usr/games/share/locale\" -
march=amdfam10 -O2 -pipe  -L/usr/lib64/fltk-1.1 -Wl,--as-needed -
L/usr/games/lib -lfltk -lpthread -ldl -lm -lXext -lX11 -Wl,--as-needed  -
L/usr/games/lib -o fgrun wizard.o wizard_funcs.o advanced.o advanced_funcs.o 
AirportBrowser.o AirportTable.o Fl_Table.o Fl_Table_Row.o Fl_OSG.o 
Fl_Heading_Dial.o main.o io.o fgfsrc.o logwin.o parkingloader.o settings.o 
util.o run_posix.o fgrun_pty.o -lsgmodel -lsgscreen -lsgprops -lsgxml -
lsgdebug -lsgbvh -lsgmaterial -lsgmodel -lsgutil -lsgstructure -lsgprops -
lsgtgdb -lsgmath -lsgmisc -lsgbvh -lsgio -lsgbucket -lsgmodel -lsgutil -
lplibsg -lplibul -lplibnet -losgParticle -losgSim -losgViewer -losgGA -
losgText -losgDB -losgUtil -losg -lOpenThreads -lpthread  -lfltk -lXft -lGL -
lXmu -lXt -lSM -lICE -lXi -lXext -lX11  -lm -lz -lutil -losgFX                
wizard_funcs.o: In function `Wizard::preview_aircraft()':                       
                                                                                
             
wizard_funcs.cxx:(.text+0x6c0d): undefined reference to 
`Fl_Gl_Window::make_current()'                                                  
                                     
wizard_funcs.o: In function `Wizard::reset_settings()':                         
                                                                                
             
wizard_funcs.cxx:(.text+0xab25): undefined reference to 
`Fl_Gl_Window::make_current()'                                                  
                                     
Fl_OSG.o: In function `AdapterWidget::AdapterWidget(int, int, int, int, char 
const*)':                                                                       
                
Fl_OSG.cxx:(.text+0x5c8): undefined reference to `vtable for Fl_Gl_Window'      
                                                                                
             
Fl_OSG.cxx:(.text+0x5d0): undefined reference to `Fl_Gl_Window::init()'         
                                                                                
             
Fl_OSG.cxx:(.text+0x954): undefined reference to 
`Fl_Gl_Window::~Fl_Gl_Window()'                                                 
                                            
Fl_OSG.o: In function `AdapterWidget::AdapterWidget(int, int, int, int, char 
const*)':                                                                       
                
Fl_OSG.cxx:(.text+0xe68): undefined reference to `vtable for Fl_Gl_Window'      
                                                                                
             
Fl_OSG.cxx:(.text+0xe70): undefined reference to `Fl_Gl_Window::init()'         
                                                                                
             
Fl_OSG.cxx:(.text+0x11f4): undefined reference to 
`Fl_Gl_Window::~Fl_Gl_Window()'                                                 
                                           
Fl_OSG.o: In function `AdapterWidget::resize(int, int, int, int)':              
                                                                                
             
Fl_OSG.cxx:(.text+0x1ac): undefined reference to `Fl_Gl_Window::resize(int, 
int, int, int)'                                                                 
                 
Fl_OSG.o: In function `AdapterWidget::~AdapterWidget()':                        
                                                                                
             
Fl_OSG.cxx:
(.text._ZN13AdapterWidgetD2Ev[AdapterWidget::~AdapterWidget()]+0x79): 
undefined reference to `Fl_Gl_Window::~Fl_Gl_Window()'                          
            
Fl_OSG.cxx:
(.text._ZN13AdapterWidgetD2Ev[AdapterWidget::~AdapterWidget()]+0x42): 
undefined reference to `Fl_Gl_Window::~Fl_Gl_Window()'                          
            
Fl_OSG.o: In function `AdapterWidget::~AdapterWidget()':                        
                                                                                
             
Fl_OSG.cxx:
(.text._ZN13AdapterWidgetD0Ev[AdapterWidget::~AdapterWidget()]+0x3c): 
undefined reference to `Fl_Gl_Window::~Fl_Gl_Window()'                          
            
Fl_OSG.cxx:
(.text._ZN13AdapterWidgetD0Ev[AdapterWidget::~AdapterWidget()]+0x81): 
undefined reference to `Fl_Gl_Window::~Fl_Gl_Window()'                          
            
Fl_OSG.o: In function `AdapterWidget::~AdapterWidget()':                        
                                                                                
             
Fl_OSG.cxx:
(.text._ZN13AdapterWidgetD1Ev[AdapterWidget::~AdapterWidget()]+0x79): 
undefined reference to `Fl_Gl_Window::~Fl_Gl_Window()'                          
            
Fl_OSG.o:Fl_OSG.cxx:
(.text._ZN13AdapterWidgetD1Ev[AdapterWidget::~AdapterWidget()]+0x42): more 
undefined references to `Fl_Gl_Window::~Fl_Gl_Window()' follow                
Fl_OSG.o:(.rodata._ZTV13AdapterWidget[vtable for AdapterWidget]+0x38): 
undefined reference to `Fl_Gl_Window::flush()'                                  
                      
Fl_OSG.o:(.rodata._ZTV13AdapterWidget[vtable for AdapterWidget]+0x40): 
undefined reference to `Fl_Gl_Window::show()'                                   
                      
Fl_OSG.o:(.rodata._ZTV13AdapterWidget[vtable for AdapterWidget]+0x48): 
undefined reference to `Fl_Gl_Window::hide()'                                   
                      
Fl_OSG.o:(.rodata._ZTV13AdapterWidget[vtable for AdapterWidget]+0x50): 
undefined reference to `Fl_Gl_Window::draw_overlay()'                           
                      
Fl_OSG.o:(.rodata._ZTV6Fl_OSG[vtable for Fl_OSG]+0x268): undefined reference 
to `Fl_Gl_Window::flush()'                                                      
                
Fl_OSG.o:(.rodata._ZTV6Fl_OSG[vtable for Fl_OSG]+0x270): undefined reference 
to `Fl_Gl_Window::show()'                                                       
                
Fl_OSG.o:(.rodata._ZTV6Fl_OSG[vtable for Fl_OSG]+0x278): undefined reference 
to `Fl_Gl_Window::hide()'                                                       
                
Fl_OSG.o:(.rodata._ZTV6Fl_OSG[vtable for Fl_OSG]+0x280): undefined reference 
to `Fl_Gl_Window::draw_overlay()'                                               
                
Fl_OSG.o:(.rodata._ZTI13AdapterWidget[typeinfo for AdapterWidget]+0x10): 
undefined reference to `typeinfo for Fl_Gl_Window'                              
                    
collect2: ld returned 1 exit status                                             
                                                                                
             
make[2]: *** [fgrun] Error 1

When running the whole thing without --as-needed, the compile (and configure) 
finish with no issues.
I tried to figure out here the problem could be but did not find anything. 
Here is a Gentoo howto with some explenations:
http://www.gentoo.org/proj/en/qa/asneeded.xml

I hope fredb can fix this....

Cheers,
papillon81

------------------------------------------------------------------------------
The Planet: dedicated and managed hosting, cloud storage, colocation
Stay online with enterprise data centers and the best network in the business
Choose flexible plans and management services without long-term contracts
Personal 24x7 support from experience hosting pros just a phone call away.
http://p.sf.net/sfu/theplanet-com
_______________________________________________
Flightgear-devel mailing list
Flightgear-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/flightgear-devel

Reply via email to