guanchangge / mosaik-aligner

Automatically exported from code.google.com/p/mosaik-aligner
0 stars 0 forks source link

Failure of source to compile in Mac OSx #23

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Modified makefile to include "export BLD_PLATFORM=macosx"
2. Upon invoking make results in an error regarding the definition of "struct 
stat" that affects 
most of the builds resulting in nothing being placed in the bin directory. 

What version of the product are you using? On what operating system?
current source code. 1.0.1367
Mac OsX 10.5.8

Please provide any additional information below.
 full makefile results:

Building MOSAIK for the following platform: macosx
=========================================================
- Building in CommonSource
- Building in AssemblyFormats
  * compiling Ace.cpp
/usr/include/sys/stat.h:261: error: redefinition of ‘struct stat’
/usr/include/sys/stat.h:228: error: previous definition of ‘struct stat’
make[2]: *** [../../../obj/Ace.o] Error 1

- Building in DataStructures
  * compiling JumpDnaHash.cpp
/usr/include/sys/stat.h:261: error: redefinition of ‘struct stat’
/usr/include/sys/stat.h:228: error: previous definition of ‘struct stat’
make[2]: *** [../../../obj/JumpDnaHash.o] Error 1

- Building in ExternalReadFormats
make[2]: Nothing to be done for `all'.

- Building in MosaikReadFormat
  * compiling AlignmentWriter.cpp
/usr/include/sys/stat.h:261: error: redefinition of ‘struct stat’
/usr/include/sys/stat.h:228: error: previous definition of ‘struct stat’
make[2]: *** [../../../obj/AlignmentWriter.o] Error 1

- Building in PairwiseAlignment
make[2]: Nothing to be done for `all'.

- Building in Utilities
  * compiling FileUtilities.cpp
/usr/include/sys/stat.h:261: error: redefinition of ‘struct stat’
/usr/include/sys/stat.h:228: error: previous definition of ‘struct stat’
make[2]: *** [../../../obj/FileUtilities.o] Error 1

- Building in MosaikBuild
  * compiling BuildMain.cpp
/usr/include/sys/stat.h:261: error: redefinition of ‘struct stat’
/usr/include/sys/stat.h:228: error: previous definition of ‘struct stat’
make[1]: *** [../../obj/BuildMain.o] Error 1

- Building in MosaikAligner
  * compiling AlignerMain.cpp
/usr/include/sys/stat.h:261: error: redefinition of ‘struct stat’
/usr/include/sys/stat.h:228: error: previous definition of ‘struct stat’
make[1]: *** [../../obj/AlignerMain.o] Error 1

- Building in MosaikSort
  * compiling PairedEndSort.cpp
/usr/include/sys/stat.h:261: error: redefinition of ‘struct stat’
/usr/include/sys/stat.h:228: error: previous definition of ‘struct stat’
make[1]: *** [../../obj/PairedEndSort.o] Error 1

- Building in MosaikMerge
  * compiling MergeMain.cpp
/usr/include/sys/stat.h:261: error: redefinition of ‘struct stat’
/usr/include/sys/stat.h:228: error: previous definition of ‘struct stat’
make[1]: *** [../../obj/MergeMain.o] Error 1

- Building in MosaikAssembler
  * compiling AssemblerMain.cpp
/usr/include/sys/stat.h:261: error: redefinition of ‘struct stat’
/usr/include/sys/stat.h:228: error: previous definition of ‘struct stat’
make[1]: *** [../../obj/AssemblerMain.o] Error 1

Original issue reported on code.google.com by brian.di...@gmail.com on 7 Dec 2009 at 9:23

GoogleCodeExporter commented 8 years ago
Just noticed a snownebula comment on seq answers that gcc 4.2 or higher is req. 
If true, could be part of the 
problem, I think that I have 4.0 or thereabouts.

Original comment by brian.di...@gmail.com on 7 Dec 2009 at 10:36

GoogleCodeExporter commented 8 years ago
Commenting out the fstat defines in includes/macosx.inc will fix the problem 
(fstat64 is available on Snow 
Leopard, just deprecated.)

Comment out:
-Dstat64=stat -Dfstat64=fstat

Hope this helps.

Original comment by amacbr...@gmail.com on 10 Jan 2010 at 1:59

GoogleCodeExporter commented 8 years ago
I had added the "-Dstat64=stat -Dfstat64=fstat" at the request of another user 
and
had never checked it. This is no longer included in the latest version (1370).

Either you can comment out the offending section like amacbride pointed out or 
you
can download the latest version (1370) and enjoy.

Cheers,

// Michael

Original comment by snowneb...@gmail.com on 16 Jan 2010 at 1:56