Welcome, Guest. Please Login
YaBB - Yet another Bulletin Board
 
  HomeHelpSearchLogin  
 
build.sh on linux (Read 4621 times)
dmerl
YaBB Newbies
*
Offline



Posts: 15
build.sh on linux
Apr 12th, 2005 at 4:21pm
 

I'm trying to build a shell version of hyphy in linux, but for some reason the version of gcc on this machine doesn't like the -fnonnull-objects flag.  I modified the build.sh script so that the source files compiled with gcc (as opposed to g++) have a different set of compiler flags, namely all the default ones except for -fnonnull-objects.  It compiles fine this way, and the binary seems to run fine, but since i don't know what -fnonnull-objects does, I wanted to make sure that it wasn't something crucial.

best,
Dan
Back to top
 
 
IP Logged
 
Sergei
YaBB Administrator
*****
Offline


Datamonkeys are forever...

Posts: 1658
UCSD
Gender: male
Re: build.sh on linux
Reply #1 - Apr 12th, 2005 at 4:27pm
 
Dear Dan,

Quote:
It compiles fine this way, and the binary seems to run fine, but since i don't know what -fnonnull-objects does, I wanted to make sure that it wasn't something crucial.


-fnonull-objects is an optimization flag (I think it may now be deprecated) which doesn't really affect anything. I'll remove it from the build script for the future - thanks for pointing this out.

What is your gcc version?

Cheers,
Sergei
Back to top
 

Associate Professor
Division of Infectious Diseases
Division of Biomedical Informatics
School of Medicine
University of California San Diego
WWW WWW  
IP Logged
 
dmerl
YaBB Newbies
*
Offline



Posts: 15
Re: build.sh on linux
Reply #2 - Apr 12th, 2005 at 4:32pm
 
My linux machine has gcc (GCC) 3.2.3 20030502 (Red Hat Linux 3.2.3-49). 

On the other hand, it builds fine with the -fnonnull-objects flag in os x using gcc (GCC) 3.3 20030304 (Apple Computer, Inc. build 1666)

And even with the older gcc, it only seems to be a problem with the code compiled with gcc, not the stuff that uses g++.

Back to top
 
 
IP Logged
 
Sergei
YaBB Administrator
*****
Offline


Datamonkeys are forever...

Posts: 1658
UCSD
Gender: male
Re: build.sh on linux
Reply #3 - Apr 12th, 2005 at 4:39pm
 
Dear Dan,

I've updated the build.sh script to use only non-deprecated flags. I assume that the g++ script simply ignored the flags it didn't recognize and did not pass them on to gcc.

For the Mac I suggest you use the -fast flag in place of all other optimization options (it's a line in build.sh which can be uncommented for Darwin builds), since it's an Apple macro which turns on all platform and CPU specific optimization and tuning flags.

Cheers,
Sergei
Back to top
 

Associate Professor
Division of Infectious Diseases
Division of Biomedical Informatics
School of Medicine
University of California San Diego
WWW WWW  
IP Logged