Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

STAR-2.4.0d does not build on OS X #2

Closed
lgautier opened this issue Sep 30, 2014 · 3 comments
Closed

STAR-2.4.0d does not build on OS X #2

lgautier opened this issue Sep 30, 2014 · 3 comments

Comments

@lgautier
Copy link

make STARforMac

ends with:

bamRemoveDuplicates.cpp:23:25: warning: comparison of integers of different signs: 'int' and 'unsigned int' [-Wsign-compare]
        for (int ii=0;ii<la;ii++) {
                      ~~^~~
bamRemoveDuplicates.cpp:74:41: error: arithmetic on a pointer to void
    uint32* pa2=(uint32*) *(uint32**) (a+8);
                                       ~^
bamRemoveDuplicates.cpp:77:41: error: arithmetic on a pointer to void
    uint32* pb2=(uint32*) *(uint32**) (b+8);
                                       ~^
bamRemoveDuplicates.cpp:106:18: warning: comparison of integers of different signs: 'int' and 'unsigned int' [-Wsign-compare]
        for (; ii<pa2[5]; ii+=2) {
               ~~^~~~~~~
2 warnings and 2 errors generated.
make: *** [bamRemoveDuplicates.o] Error 1
@alexdobin
Copy link
Owner

Hi Laurent,

I have pushed the fix into the master branch - could you please test it and let me know if it works. I will make a tag after that. Apparently your compiler on Mac has stricter rules for poitner arithmetic than gcc.

Cheers
Alex

@lgautier
Copy link
Author

lgautier commented Oct 2, 2014

Thanks.

On OS X, clang is the compiler behind g++.

The fix lets the build progress a little further, but it is still failing:

g++ -c -D'COMPILE_FOR_MAC' -I ./Mac_Include/ -O3 -pipe -std=c++0x -Wall -Wextra -fopenmp -D'COMPILATION_TIME_PLACE="Thu Oct 2 15:26:00 EDT 2014 :/Users/foo/STAR-master"'   bam_cat.c
clang: warning: treating 'c' input as 'c++' when in C++ mode, this behavior is deprecated
clang: warning: argument unused during compilation: '-fopenmp'
g++ -o STAR -D'COMPILE_FOR_MAC' -I ./Mac_Include/ -O3 -pipe -std=c++0x -Wall -Wextra -fopenmp -D'COMPILATION_TIME_PLACE="Thu Oct 2 15:26:00 EDT 2014 :/Users/foo/STAR-master"'   -pthread -Lhtslib -Bstatic -lhts -Bdynamic -lz PackedArray.o SuffixArrayFuns.o STAR.o Parameters.o InOutStreams.o SequenceFuns.o Genome.o Transcript.o Stats.o ReadAlign.o ReadAlign_storeAligns.o ReadAlign_stitchPieces.o ReadAlign_multMapSelect.o ReadAlign_mapOneRead.o readLoad.o ReadAlignChunk.o ReadAlignChunk_processChunks.o ReadAlignChunk_mapChunk.o OutSJ.o outputSJ.o blocksOverlap.o ThreadControl.o sysRemoveDir.o ReadAlign_maxMappableLength2strands.o binarySearch2.o ReadAlign_outputAlignments.o ReadAlign_outputTranscriptSAM.o ReadAlign_outputTranscriptSJ.o ReadAlign_outputTranscriptCIGARp.o ReadAlign_createExtendWindowsWithAlign.o ReadAlign_assignAlignToWindow.o ReadAlign_oneRead.o ReadAlign_stitchWindowSeeds.o ReadAlign_chimericDetection.o stitchWindowAligns.o extendAlign.o stitchAlignToTranscript.o alignSmithWaterman.o genomeGenerate.o TimeFunctions.o ErrorWarning.o loadGTF.o streamFuns.o stringSubstituteAll.o Transcriptome.o Transcriptome_quantAlign.o ReadAlign_quantTranscriptome.o sjdbLoadFromStream.o sjdbPrepare.o sjdbBuildIndex.o mapThreadsSpawn.o Parameters_openReadsFiles.cpp Parameters_closeReadsFiles.cpp BAMoutput.o BAMfunctions.o ReadAlign_alignBAM.o BAMbinSortByCoordinate.o signalFromBAM.o bamRemoveDuplicates.o bam_cat.o
ld: library not found for -lgomp

@lgautier
Copy link
Author

lgautier commented Oct 2, 2014

The work around was to force the use of gcc.

If gcc 4.9 was installed with homebrew (currently the default/latest), one can edit the Makefile from CC := g++ to CC := g++-4.9.

The build is completing with that change.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants