statgen/libStatGen — Issue #1: Compiling Error
Author: Kasthuri
Created: 2011-12-12 18:16:21+00:00
State: open

Hi,

I am trying to compile libStatGen and I get this error when I give 'make all'
I thank you for your support.

[~/Documents/Tools/bamUtil/libStatGen ] $ make
ln -s ../samtools/bgzf.h ../include/bgzf.h
ln -s ../samtools/knetfile.h ../include/knetfile.h
ln -s ../samtools/khash.h ../include/khash.h
ln -s ../samtools/bam.h ../include/bam.h
gcc -O4 -pipe -Wall -I../include -I. -D__ZLIB_AVAILABLE__ -D_FILE_OFFSET_BITS=64 -D__STDC_LIMIT_MACROS -D_USE_KNETFILE -o obj/bgzf.o -c bgzf.c
gcc -O4 -pipe -Wall -I../include -I. -D__ZLIB_AVAILABLE__ -D_FILE_OFFSET_BITS=64 -D__STDC_LIMIT_MACROS -D_USE_KNETFILE -o obj/knetfile.o -c knetfile.c
ar -cr ../libStatGen.a obj/bgzf.o obj/knetfile.o
ln -s ../general/BaseAsciiMap.h ../include/BaseAsciiMap.h
ln -s ../general/BaseQualityHelper.h ../include/BaseQualityHelper.h
ln -s ../general/BaseUtilities.h ../include/BaseUtilities.h
ln -s ../general/BasicHash.h ../include/BasicHash.h
ln -s ../general/BgzfFileType.h ../include/BgzfFileType.h
ln -s ../general/BgzfFileTypeRecovery.h ../include/BgzfFileTypeRecovery.h
ln -s ../general/CharBuffer.h ../include/CharBuffer.h
ln -s ../general/Chromosome.h ../include/Chromosome.h
ln -s ../general/Cigar.h ../include/Cigar.h
ln -s ../general/CigarRoller.h ../include/CigarRoller.h
ln -s ../general/Error.h ../include/Error.h
ln -s ../general/FileType.h ../include/FileType.h
ln -s ../general/FortranFormat.h ../include/FortranFormat.h
ln -s ../general/GenomeSequence.h ../include/GenomeSequence.h
ln -s ../general/GenotypeLists.h ../include/GenotypeLists.h
ln -s ../general/glfHandler.h ../include/glfHandler.h
ln -s ../general/GzipFileType.h ../include/GzipFileType.h
ln -s ../general/GzipHeader.h ../include/GzipHeader.h
ln -s ../general/Hash.h ../include/Hash.h
ln -s ../general/Input.h ../include/Input.h
ln -s ../general/InputFile.h ../include/InputFile.h
ln -s ../general/IntArray.h ../include/IntArray.h
ln -s ../general/IntHash.h ../include/IntHash.h
ln -s ../general/LongHash.h ../include/LongHash.h
ln -s ../general/LongLongCounter.h ../include/LongLongCounter.h
ln -s ../general/MapFunction.h ../include/MapFunction.h
ln -s ../general/MathMatrix.h ../include/MathMatrix.h
ln -s ../general/MathVector.h ../include/MathVector.h
ln -s ../general/MemoryAllocators.h ../include/MemoryAllocators.h
ln -s ../general/MemoryInfo.h ../include/MemoryInfo.h
ln -s ../general/MemoryMapArray.h ../include/MemoryMapArray.h
ln -s ../general/MemoryMap.h ../include/MemoryMap.h
ln -s ../general/MiniDeflate.h ../include/MiniDeflate.h
ln -s ../general/NonOverlapRegions.h ../include/NonOverlapRegions.h
ln -s ../general/Parameters.h ../include/Parameters.h
ln -s ../general/PedigreeAlleleFreq.h ../include/PedigreeAlleleFreq.h
ln -s ../general/Pedigree.h ../include/Pedigree.h
ln -s ../general/PedigreeDescription.h ../include/PedigreeDescription.h
ln -s ../general/PedigreeFamily.h ../include/PedigreeFamily.h
ln -s ../general/PedigreeGlobals.h ../include/PedigreeGlobals.h
ln -s ../general/PedigreePerson.h ../include/PedigreePerson.h
ln -s ../general/QuickIndex.h ../include/QuickIndex.h
ln -s ../general/Random.h ../include/Random.h
ln -s ../general/ReferenceSequence.h ../include/ReferenceSequence.h
ln -s ../general/SmithWaterman.h ../include/SmithWaterman.h
ln -s ../general/Sort.h ../include/Sort.h
ln -s ../general/STLUtilities.h ../include/STLUtilities.h
ln -s ../general/StringAlias.h ../include/StringAlias.h
ln -s ../general/StringArray.h ../include/StringArray.h
ln -s ../general/StringBasics.h ../include/StringBasics.h
ln -s ../general/StringHash.h ../include/StringHash.h
ln -s ../general/StringMap.h ../include/StringMap.h
ln -s ../general/TrimSequence.h ../include/TrimSequence.h
ln -s ../general/UncompressedFileType.h ../include/UncompressedFileType.h
ln -s ../general/WindowsHelper.h ../include/WindowsHelper.h
ln -s ../general/Constant.h ../include/Constant.h
ln -s ../general/Generic.h ../include/Generic.h
ln -s ../general/GenomeSequenceHelpers.h ../include/GenomeSequenceHelpers.h
ln -s ../general/GreedyTupleAligner.h ../include/GreedyTupleAligner.h
ln -s ../general/InplaceMerge.h ../include/InplaceMerge.h
ln -s ../general/LongInt.h ../include/LongInt.h
ln -s ../general/MathConstant.h ../include/MathConstant.h
ln -s ../general/PackedVector.h ../include/PackedVector.h
ln -s ../general/PedigreeAlleles.h ../include/PedigreeAlleles.h
ln -s ../general/Performance.h ../include/Performance.h
ln -s ../general/SimpleStats.h ../include/SimpleStats.h
ln -s ../general/UnitTest.h ../include/UnitTest.h
g++ -O4 -pipe -Wall -I../include -I. -D__ZLIB_AVAILABLE__ -D_FILE_OFFSET_BITS=64 -D__STDC_LIMIT_MACROS -o obj/BaseAsciiMap.o -c BaseAsciiMap.cpp -DVERSION="\"0.0.1\""
g++ -O4 -pipe -Wall -I../include -I. -D__ZLIB_AVAILABLE__ -D_FILE_OFFSET_BITS=64 -D__STDC_LIMIT_MACROS -o obj/BaseQualityHelper.o -c BaseQualityHelper.cpp -DVERSION="\"0.0.1\""
g++ -O4 -pipe -Wall -I../include -I. -D__ZLIB_AVAILABLE__ -D_FILE_OFFSET_BITS=64 -D__STDC_LIMIT_MACROS -o obj/BaseUtilities.o -c BaseUtilities.cpp -DVERSION="\"0.0.1\""
g++ -O4 -pipe -Wall -I../include -I. -D__ZLIB_AVAILABLE__ -D_FILE_OFFSET_BITS=64 -D__STDC_LIMIT_MACROS -o obj/BasicHash.o -c BasicHash.cpp -DVERSION="\"0.0.1\""
g++ -O4 -pipe -Wall -I../include -I. -D__ZLIB_AVAILABLE__ -D_FILE_OFFSET_BITS=64 -D__STDC_LIMIT_MACROS -o obj/BgzfFileType.o -c BgzfFileType.cpp -DVERSION="\"0.0.1\""
g++ -O4 -pipe -Wall -I../include -I. -D__ZLIB_AVAILABLE__ -D_FILE_OFFSET_BITS=64 -D__STDC_LIMIT_MACROS -o obj/BgzfFileTypeRecovery.o -c BgzfFileTypeRecovery.cpp -DVERSION="\"0.0.1\""
g++ -O4 -pipe -Wall -I../include -I. -D__ZLIB_AVAILABLE__ -D_FILE_OFFSET_BITS=64 -D__STDC_LIMIT_MACROS -o obj/CharBuffer.o -c CharBuffer.cpp -DVERSION="\"0.0.1\""
g++ -O4 -pipe -Wall -I../include -I. -D__ZLIB_AVAILABLE__ -D_FILE_OFFSET_BITS=64 -D__STDC_LIMIT_MACROS -o obj/Chromosome.o -c Chromosome.cpp -DVERSION="\"0.0.1\""
g++ -O4 -pipe -Wall -I../include -I. -D__ZLIB_AVAILABLE__ -D_FILE_OFFSET_BITS=64 -D__STDC_LIMIT_MACROS -o obj/Cigar.o -c Cigar.cpp -DVERSION="\"0.0.1\""
g++ -O4 -pipe -Wall -I../include -I. -D__ZLIB_AVAILABLE__ -D_FILE_OFFSET_BITS=64 -D__STDC_LIMIT_MACROS -o obj/CigarRoller.o -c CigarRoller.cpp -DVERSION="\"0.0.1\""
g++ -O4 -pipe -Wall -I../include -I. -D__ZLIB_AVAILABLE__ -D_FILE_OFFSET_BITS=64 -D__STDC_LIMIT_MACROS -o obj/Error.o -c Error.cpp -DVERSION="\"0.0.1\""
g++ -O4 -pipe -Wall -I../include -I. -D__ZLIB_AVAILABLE__ -D_FILE_OFFSET_BITS=64 -D__STDC_LIMIT_MACROS -o obj/FileType.o -c FileType.cpp -DVERSION="\"0.0.1\""
g++ -O4 -pipe -Wall -I../include -I. -D__ZLIB_AVAILABLE__ -D_FILE_OFFSET_BITS=64 -D__STDC_LIMIT_MACROS -o obj/FortranFormat.o -c FortranFormat.cpp -DVERSION="\"0.0.1\""
g++ -O4 -pipe -Wall -I../include -I. -D__ZLIB_AVAILABLE__ -D_FILE_OFFSET_BITS=64 -D__STDC_LIMIT_MACROS -o obj/GenomeSequence.o -c GenomeSequence.cpp -DVERSION="\"0.0.1\""
g++ -O4 -pipe -Wall -I../include -I. -D__ZLIB_AVAILABLE__ -D_FILE_OFFSET_BITS=64 -D__STDC_LIMIT_MACROS -o obj/GenotypeLists.o -c GenotypeLists.cpp -DVERSION="\"0.0.1\""
g++ -O4 -pipe -Wall -I../include -I. -D__ZLIB_AVAILABLE__ -D_FILE_OFFSET_BITS=64 -D__STDC_LIMIT_MACROS -o obj/glfHandler.o -c glfHandler.cpp -DVERSION="\"0.0.1\""
g++ -O4 -pipe -Wall -I../include -I. -D__ZLIB_AVAILABLE__ -D_FILE_OFFSET_BITS=64 -D__STDC_LIMIT_MACROS -o obj/GzipFileType.o -c GzipFileType.cpp -DVERSION="\"0.0.1\""
In file included from GzipFileType.cpp:18:
GzipFileType.h: In constructor ‘GzipFileType::GzipFileType()’:
GzipFileType.h:43: error: ‘NULL’ was not declared in this scope
GzipFileType.h: In member function ‘virtual bool GzipFileType::operator==(void*)’:
GzipFileType.h:56: error: ‘NULL’ was not declared in this scope
GzipFileType.h: In member function ‘virtual bool GzipFileType::operator!=(void*)’:
GzipFileType.h:65: error: ‘NULL’ was not declared in this scope
GzipFileType.h: In member function ‘virtual int GzipFileType::close()’:
GzipFileType.h:74: error: ‘NULL’ was not declared in this scope
GzipFileType.h: In member function ‘virtual bool GzipFileType::isOpen()’:
GzipFileType.h:96: error: ‘NULL’ was not declared in this scope
make[1]: *** [obj/GzipFileType.o] Error 1
make: *** [general] Error 2

I am running MAC OS X 10.6

Thanks
-Kasthuri