guanchangge / mosaik-aligner

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

Unable to compile Mosaik in Mac OS X #107

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Changed BLD_PLATFORM ?= macosx
2. Typed make in terminal
3.

What is the expected output? What do you see instead?

All tool packages invoked error messages like:
/usr/include/sys/stat.h:264: error: redefinition of ‘struct stat’
/usr/include/sys/stat.h:225: error: previous definition of ‘struct stat’

What version of the product are you using? On what operating system?
Mosaik-1.1.0021
Mac OS X 10.6.8
XCode (64 bit) 3.2.6
g++ 4.2.1

Please provide any additional information below.
1. unlike previous issue posted (23), I do not have "-Dstat64=stat 
-Dfstat64=fstat" defined in includes/macosx.inc in my makefile, and still got 
similar error messages.

2. terminal output following 'make' execution

Building MOSAIK for the following platform: macosx
=========================================================
- Building in CommonSource
- Building in AssemblyFormats
  * compiling AbstractAssemblyFormat.cpp
  * compiling Ace.cpp
In file included from ../../CommonSource/Utilities/FileUtilities.h:17,
                 from Ace.h:18,
                 from Ace.cpp:11:
/usr/include/sys/stat.h:264: error: redefinition of ‘struct stat’
/usr/include/sys/stat.h:225: error: previous definition of ‘struct stat’
make[2]: *** [../../../obj/Ace.o] Error 1

- Building in DataStructures
  * compiling AbstractDnaHash.cpp
  * compiling DnaHash.cpp
  * compiling HashRegionTree.cpp
  * compiling JumpDnaHash.cpp
In file included from ../../CommonSource/Utilities/FileUtilities.h:17,
                 from JumpDnaHash.h:20,
                 from JumpDnaHash.cpp:13:
/usr/include/sys/stat.h:264: error: redefinition of ‘struct stat’
/usr/include/sys/stat.h:225: error: previous definition of ‘struct stat’
make[2]: *** [../../../obj/JumpDnaHash.o] Error 1

- Building in ExternalReadFormats
  * compiling Fasta.cpp
  * compiling Fastq.cpp
  * compiling SRF.cpp
  * compiling BamWriter.cpp

- Building in MosaikReadFormat
  * compiling AlignmentReader.cpp
  * compiling AlignmentWriter.cpp
In file included from ../../CommonSource/Utilities/FileUtilities.h:17,
                 from AlignmentWriter.h:23,
                 from AlignmentWriter.cpp:11:
/usr/include/sys/stat.h:264: error: redefinition of ‘struct stat’
/usr/include/sys/stat.h:225: error: previous definition of ‘struct stat’
make[2]: *** [../../../obj/AlignmentWriter.o] Error 1

- Building in PairwiseAlignment
  * compiling SmithWatermanGotoh.cpp
  * compiling BandedSmithWaterman.cpp

- Building in Utilities
  * compiling AlignmentQuality.cpp
  * compiling ArchiveMerge.cpp
In file included from FileUtilities.h:17,
                 from ArchiveMerge.h:27,
                 from ArchiveMerge.cpp:19:
/usr/include/sys/stat.h:264: error: redefinition of ‘struct stat’
/usr/include/sys/stat.h:225: error: previous definition of ‘struct stat’
make[2]: *** [../../../obj/ArchiveMerge.o] Error 1

- Building in MosaikBuild
  * compiling BuildMain.cpp
In file included from ../CommonSource/Utilities/FileUtilities.h:17,
                 from BuildMain.cpp:14:
/usr/include/sys/stat.h:264: error: redefinition of ‘struct stat’
/usr/include/sys/stat.h:225: error: previous definition of ‘struct stat’
make[1]: *** [../../obj/BuildMain.o] Error 1

- Building in MosaikAligner
  * compiling AlignerMain.cpp
In file included from ../CommonSource/Utilities/FileUtilities.h:17,
                 from ../CommonSource/MosaikReadFormat/AlignmentWriter.h:23,
                 from AlignmentThread.h:18,
                 from AlignerMain.cpp:13:
/usr/include/sys/stat.h:264: error: redefinition of ‘struct stat’
/usr/include/sys/stat.h:225: error: previous definition of ‘struct stat’
make[1]: *** [../../obj/AlignerMain.o] Error 1

- Building in MosaikSort
  * compiling PairedEndSort.cpp
In file included from ../CommonSource/Utilities/FileUtilities.h:17,
                 from ../CommonSource/MosaikReadFormat/AlignmentWriter.h:23,
                 from PairedEndSort.h:22,
                 from PairedEndSort.cpp:12:
/usr/include/sys/stat.h:264: error: redefinition of ‘struct stat’
/usr/include/sys/stat.h:225: error: previous definition of ‘struct stat’
PairedEndSort.cpp: In member function ‘void 
CPairedEndSort::ResolvePairedEndReads(const std::string&, const 
std::string&)’:
PairedEndSort.cpp:642: warning: unused variable ‘isUM’
make[1]: *** [../../obj/PairedEndSort.o] Error 1

- Building in MosaikMerge
  * compiling MergeMain.cpp
In file included from ../CommonSource/Utilities/FileUtilities.h:17,
                 from MergeMain.cpp:18:
/usr/include/sys/stat.h:264: error: redefinition of ‘struct stat’
/usr/include/sys/stat.h:225: error: previous definition of ‘struct stat’
make[1]: *** [../../obj/MergeMain.o] Error 1

- Building in MosaikAssembler
  * compiling AssemblerMain.cpp
In file included from ../CommonSource/Utilities/FileUtilities.h:17,
                 from AssemblerMain.cpp:16:
/usr/include/sys/stat.h:264: error: redefinition of ‘struct stat’
/usr/include/sys/stat.h:225: error: previous definition of ‘struct stat’
make[1]: *** [../../obj/AssemblerMain.o] Error 1

Original issue reported on code.google.com by lilly.y...@mh.org.au on 5 Sep 2011 at 3:43

GoogleCodeExporter commented 8 years ago
Compiling on MacOS 10.5.8 required the following:

1. A change to includes/macosx.inc:

from this:
export PLATFORM_FLAGS = -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE 
-Dstat64=stat -Dfstat64=fstat

to this:
export PLATFORM_FLAGS = -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE 
#-Dstat64=stat -Dfstat64=fstat

2. installed gcc 4.2 (via 'sudo macports install gcc42').

The final "make" command looked like this:

make CXX=g++-mp-4.2 BLD_PLATFORM=macosx

Original comment by wfisc...@lanl.gov on 30 Jan 2012 at 9:19