• Welcome to Overclockers Forums! Join us to reply in threads, receive reduced ads, and to customize your site experience!

Compiling own Linux app

Overclockers is supported by our readers. When you click a link to make a purchase, we may earn a commission. Learn More.

Shelnutt2

Overclockers Team Content Editor
Joined
Jun 17, 2005
Location
/home/
I'm running gentoo, and I've got gcc 4.3.2-r2 installed. I installed boinc via portage. It works fine, and I setup SETI, it downloaded the standard client and worked fine. I'm just trying to build my own fully optimized client.

I got the svn source,

Code:
shelnutt@gentoo-64:~/seti/$ svn checkout https://setisvn.ssl.berkeley.edu/svn/seti_boinc

Set it up
Code:
shelnutt@gentoo-64:~/seti/seti_boinc$ ./_autosetup

Configured it
Code:
shelnutt@gentoo-64:~/seti/seti_boinc$ BOINCDIR="/var/lib/boinc" ./configure --enable-sse3 --enable-fast-math --enable-sse2 --enable-sse --enable-bitness=64 CFLAGS="-march=core2 -O2 -pipe" CXXFLAGS="-march=core2 -O2 -pipe"

And this is the output I got.
Code:
In file included from <command-line>:0:                                                     
./../sah_config.h:612:23: error: std_fixes.h: No such file or directory                     
In file included from vector/analyzeFuncs_fpu.cpp:16:                                       
../sah_config.h:612:23: error: std_fixes.h: No such file or directory                       
main.cpp:57:25: error: diagnostics.h: No such file or directory                             
main.cpp:58:18: error: util.h: No such file or directory                                    
In file included from vector/analyzeFuncs_vector.cpp:39:                                    
../sah_config.h:612:23: error: std_fixes.h: No such file or directory                       
In file included from ./analyzeFuncs.h:31,                                                  
                 from vector/analyzeFuncs_fpu.cpp:19:                                       
./seti.h:36:23: error: boinc_api.h: No such file or directory                               
vector/analyzeFuncs_vector.cpp:64:18: error: util.h: No such file or directory              
main.cpp:60:23: error: boinc_api.h: No such file or directory                               
vector/analyzeFuncs_vector.cpp:66:23: error: boinc_api.h: No such file or directory         
In file included from sah_gfx_main.h:29,                                                    
                 from main.cpp:62:                                                          
gdata.h:39:20: error: reduce.h: No such file or directory                                   
main.cpp:63:23: error: graphics2.h: No such file or directory                               
main.cpp:72:22: error: str_util.h: No such file or directory                                
main.cpp:73:25: error: str_replace.h: No such file or directory                             
In file included from ../db/sqlrow.h:28,                                                    
                 from ../db/db_table.h:27,                                                  
                 from ./seti_header.h:43,                                                   
                 from ./seti.h:44,                                                          
                 from ./analyzeFuncs.h:31,                                                  
                 from vector/analyzeFuncs_fpu.cpp:19:                                       
../db/xml_util.h:82:27: error: error_numbers.h: No such file or directory                   
In file included from ./sah_gfx_main.h:29,                                                  
                 from vector/analyzeFuncs_vector.cpp:68:                                    
./gdata.h:39:20: error: reduce.h: No such file or directory                                 
vector/analyzeFuncs_vector.cpp:70:25: error: diagnostics.h: No such file or directory       
In file included from ../db/sqlrow.h:28,                                                    
                 from ../db/db_table.h:27,                                                  
                 from seti_header.h:43,                                                     
                 from seti.h:44,                                                            
                 from analyzeFuncs.h:31,                                                    
                 from main.cpp:75:                                                          
../db/xml_util.h:82:27: error: error_numbers.h: No such file or directory                   
In file included from ./analyzeFuncs.h:31,                                                  
                 from vector/analyzeFuncs_fpu.cpp:19:                                       
./seti.h:183:20: error: reduce.h: No such file or directory                                 
./seti.h:184:23: error: graphics2.h: No such file or directory                              
In file included from ../db/sqlrow.h:28,                                                    
                 from ../db/db_table.h:27,                                                  
                 from ./seti_header.h:43,                                                   
                 from ./seti.h:44,                                                          
                 from ./analyzeFuncs.h:31,                                                  
                 from vector/analyzeFuncs_vector.cpp:73:                                    
../db/xml_util.h:82:27: error: error_numbers.h: No such file or directory                   
In file included from ./analyzeFuncs.h:31,                                                  
                 from vector/analyzeFuncs_vector.cpp:73:                                    
./seti.h:184:23: error: graphics2.h: No such file or directory                              
In file included from ./analyzeFuncs.h:31,                                                  
                 from vector/analyzeFuncs_fpu.cpp:19:                                       
./seti.h:40: error: 'APP_INIT_DATA' does not name a type                                    
In file included from sah_gfx_main.h:29,                                                    
                 from main.cpp:62:                                                          
gdata.h:148: error: 'REDUCED_ARRAY_DATA' does not name a type                               
In file included from main.cpp:62:                                                          
sah_gfx_main.h:33: error: 'REDUCED_ARRAY_GEN' does not name a type                          
In file included from ./sah_gfx_main.h:29,                                                  
                 from vector/analyzeFuncs_vector.cpp:68:                                    
./gdata.h:148: error: 'REDUCED_ARRAY_DATA' does not name a type                             
In file included from vector/analyzeFuncs_vector.cpp:68:                                    
./sah_gfx_main.h:33: error: 'REDUCED_ARRAY_GEN' does not name a type                        
sah_gfx_main.h:43: warning: 'sah_graphics_init' initialized and declared 'extern'           
sah_gfx_main.h:43: error: variable or field 'sah_graphics_init' declared void               
sah_gfx_main.h:43: error: 'APP_INIT_DATA' was not declared in this scope                    
sah_gfx_main.h:43: error: expected primary-expression before ')' token                      
In file included from analyzeFuncs.h:31,                                                    
                 from main.cpp:75:                                                          
seti.h:40: error: 'APP_INIT_DATA' does not name a type                                      
./sah_gfx_main.h:43: warning: 'sah_graphics_init' initialized and declared 'extern'         
./sah_gfx_main.h:43: error: variable or field 'sah_graphics_init' declared void             
./sah_gfx_main.h:43: error: 'APP_INIT_DATA' was not declared in this scope                  
./sah_gfx_main.h:43: error: expected primary-expression before ')' token                    
In file included from ./analyzeFuncs.h:31,                                                  
                 from vector/analyzeFuncs_vector.cpp:73:                                    
./seti.h:40: error: 'APP_INIT_DATA' does not name a type                                    
In file included from ../db/sqlrow.h:28,                                                    
                 from ../db/db_table.h:27,                                                  
                 from ./seti_header.h:43,                                                   
                 from ./seti.h:44,                                                          
                 from ./analyzeFuncs.h:31,                                                  
                 from vector/analyzeFuncs_vector.cpp:73:                                    
../db/xml_util.h: In function 'std::vector<T, std::allocator<_CharT> > xml_decode_field(const std::string&, const char*)':                                                              
../db/xml_util.h:888: error: 'ERR_XML_PARSE' was not declared in this scope                 
In file included from ../db/sqlrow.h:28,                                                    
                 from ../db/db_table.h:27,                                                  
                 from seti_header.h:43,                                                     
                 from seti.h:44,                                                            
                 from analyzeFuncs.h:31,                                                    
                 from main.cpp:75:                                                          
../db/xml_util.h: In function 'std::string base64_encode(const T*, size_t)':                
../db/xml_util.h:278: warning: array subscript has type 'char'                              
../db/xml_util.h: In function 'std::string base85_encode(const T*, size_t)':                
../db/xml_util.h:373: warning: array subscript has type 'char'                              
../db/xml_util.h: In function 'std::vector<T, std::allocator<_CharT> > xml_decode_field(const std::string&, const char*)':                                                              
../db/xml_util.h:888: error: 'ERR_XML_PARSE' was not declared in this scope                 
In file included from ../db/sqlrow.h:28,                                                    
                 from ../db/db_table.h:27,                                                  
                 from ./seti_header.h:43,                                                   
                 from ./seti.h:44,                                                          
                 from ./analyzeFuncs.h:31,                                                  
                 from vector/analyzeFuncs_fpu.cpp:19:                                       
../db/xml_util.h: In function 'std::vector<T, std::allocator<_Tp1> > xml_decode_field(const std::string&, const char*)':                                                                
../db/xml_util.h:888: error: 'ERR_XML_PARSE' was not declared in this scope                 
vector/analyzeFuncs_vector.cpp: At global scope:                                            
vector/analyzeFuncs_vector.cpp:779: warning: deprecated conversion from string constant to 'char*'                                                                                      
In file included from ./sah_gfx_main.h:29,                                                  
                 from vector/analyzeFuncs_fpu.cpp:22:                                       
./gdata.h: At global scope:                                                                 
./gdata.h:148: error: 'REDUCED_ARRAY_DATA' does not name a type                             
In file included from vector/analyzeFuncs_fpu.cpp:22:                                       
./sah_gfx_main.h:33: error: 'REDUCED_ARRAY_GEN' does not name a type                        
./sah_gfx_main.h:43: warning: 'sah_graphics_init' initialized and declared 'extern'
./sah_gfx_main.h:43: error: variable or field 'sah_graphics_init' declared void
./sah_gfx_main.h:43: error: 'APP_INIT_DATA' was not declared in this scope
./sah_gfx_main.h:43: error: expected primary-expression before ')' token
main.cpp: At global scope:
main.cpp:161: error: 'APP_INIT_DATA' does not name a type
main.cpp: In function 'int main(int, char**)':
main.cpp:215: error: 'BOINC_DIAG_DUMPCALLSTACKENABLED' was not declared in this scope
main.cpp:216: error: 'BOINC_DIAG_HEAPCHECKENABLED' was not declared in this scope
main.cpp:217: error: 'BOINC_DIAG_TRACETOSTDERR' was not declared in this scope
main.cpp:218: error: 'BOINC_DIAG_REDIRECTSTDERR' was not declared in this scope
main.cpp:220: error: 'boinc_init_diagnostics' was not declared in this scope
main.cpp:239: error: 'boinc_parse_init_data_file' was not declared in this scope
main.cpp:240: error: 'app_init_data' was not declared in this scope
main.cpp:240: error: 'boinc_get_init_data' was not declared in this scope
main.cpp:242: error: 'sah_graphics_init' was not declared in this scope
main.cpp:244: error: 'boinc_init' was not declared in this scope
make[2]: *** [seti_boinc-analyzeFuncs_fpu.o] Error 1
make[2]: *** Waiting for unfinished jobs....
make[2]: *** [seti_boinc-main.o] Error 1
make[2]: *** [seti_boinc-analyzeFuncs_vector.o] Error 1
make[2]: Leaving directory `/home/shelnutt/seti/seti_boinc/client'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/shelnutt/seti/seti_boinc'
make: *** [all] Error 2
shelnutt@gentoo-64:~/seti/seti_boinc$


Any ideas?
 
Any ideas?

Yes, my first idea was: this clearly shows why Gentoo is a **** distro to learn anything about linux. It doesn't help one to understand stuff. At all.

Now on to your problem. Basically your compiler can't find a lot of header files. After entering the first missed header "std_fixes.h" in the proper http://packages.debian.org entry form I get it's part of boinc-dev. Since your source you got via svn should come with this header, it probably means your compiler doesn't look in the proper directory. Add the boinc include directory to your gcc commandline via gcc -I<directory> (upper case i). Look into the gcc docs or use gcc -v --help to see how it's used.
 
Uhm, Gentoo isn't a ****ty distro. It's one of the best distro out there imho. I realize it's not linking to the header properly, and I even added the boinc directory to the ./configure option because it couldn't find it.

I really don't appreciate the condescending tone. I am quite well versed with gcc and all it's functions. I'm the one who created the cuda wrapper for wine, for FAH.

For your info in the svn trunk I got those header aren't to be found. From what I can tell the entire build system, make and configure is in pretty bad shape. It's pretty sloppy. Not only could the configure script not find the boinc dir or the opengl headers but I had to specify the GCC and GXX flags. It wouldn't grab the environmental ones, like it should, instead using preset ones. The only reason I caught this was because it was complaining about trying to build 64bit for a 32bit cpu.

I'm trying to do you guys a favor here, and optimize my client for this gauntlet. It's simple enough for me to go back to FAH. (I will say I do envy the fact that at least SETI/BOINC is open source)
 
It wasn|t directed at you directly, just at the many people, here and other places, who constantly advocate gentoo to be the best distro for learning whatever. When in fact it doesn't do any of the sort. And a missing header should be pretty obvious to spot and remedy if you can program C/C++

If the svn is simply gone to hell, why not get a stable version of the source? CVS software is never guaranteed to work anyways. If all else fails you could get a source package of another linux distro and ignore the distro specific stuff but just use the source to compile the app.
 
Where is there a source download though? http://setiathome.berkeley.edu/sah_porting.php . There are only svn or nightly trunks (which is basically the same thing). Yes I could go find some source from debian or red hat or something, but shouldn't there be source from berkley? How do I know if I have the most recent stable version of the source? What the latest version # for seti (not boinc).
 
Show how much I know about Boinc/SETI (nothing. never ever ran it or even looked at it). Didn't know therefore that SETI and Boinc are different programs.

However, <5 minutes of googling and reading the SETI site: http://boinc.berkeley.edu/trac/wiki/SourceCode

SETI depends on Boinc, which contains the header files you need. Linux basics 101: get your dependencies straight.
 
Show how much I know about Boinc/SETI (nothing. never ever ran it or even looked at it). Didn't know therefore that SETI and Boinc are different programs.

However, <5 minutes of googling and reading the SETI site: http://boinc.berkeley.edu/trac/wiki/SourceCode

SETI depends on Boinc, which contains the header files you need. Linux basics 101: get your dependencies straight.

This is the last time I'm going to ask you to stop treating me like I am an idiot. I know you have to resolve your dependencies. I have plenty of experience with linux, gentoo, debian, and compiling my own apps. I'm not dumb and I'm not stupid.

Yes it's sort of like in FAH. Where we have a client (fah6) and then cores (A1/A2, etc). The "client" is BOINC. The core is "SETI". BOINC is the framwork but it's SETI client that crunches the numbers.

I will download the svn trunk, but I have already installed BOINC via portage. Version, boinc-6.4.5-r2 . I realize this isn't the newest version but it's the only one in portage. I like to keep things via portage is possible, save me the headaches when trying to uninstall or update.
 
Sorry I can't be of more help - you're waaaay over my head here. I've dealt with simple security issues and adding the username to the boinc group (as you suggested) was what I did way back when to resolve my issues. I'm no expert in Windows or Linux but adding a user to a group that already had read/wrote access made the most since at the time. I'm not even sure what half that other stuff that Jolly-Swagman got from the SETI@Home forums was all about - looked like Greek to me. ;)


The Lunatics forums might have more information for you: http://lunatics.kwsn.net/linux/index.0.html
If I had realized you were this deep into it I would have suggested them sooner since I think all our Linux optimizers have come from there ...
 
Back