Sorry John,

The problem was solved for samtools and bcftools under OSX/macports but not for 
htslib 1.3 where building still leads to

gcc: error: -compatibility_version only allowed with -dynamiclib
make: *** [libhts.dylib] Error 1

 after editing Makefile 

...
libhts.dylib: $(LIBHTS_OBJS)
        $(CC) -Wl,-export_dynamic -install_name 
$(libdir)/libhts.$(LIBHTS_SOVERSION).dylib -current_version $(NUMERIC_VERSION) 
-compatibility_version $(LIBHTS_SOVERSION) $(LDFLAGS) -o $@ $(LIBHTS_OBJS) -lz 
$(LIBS)
        ln -sf $@ libhts.$(LIBHTS_SOVERSION).dylib
…

And I do not find editable parts in config.mk(.in) for dynamic

Any new saving tip?

make
gcc -g -O2 -I.  -c -o kfunc.o kfunc.c
gcc -g -O2 -I.  -c -o knetfile.o knetfile.c
gcc -g -O2 -I.  -c -o kstring.o kstring.c
gcc -g -O2 -I.  -c -o bgzf.o bgzf.c
gcc -g -O2 -I.  -c -o faidx.o faidx.c
gcc -g -O2 -I.  -c -o hfile.o hfile.c
gcc -g -O2 -I.  -c -o hfile_net.o hfile_net.c
echo '#define HTS_VERSION "1.3"' > version.h
gcc -g -O2 -I.  -c -o hts.o hts.c
gcc -g -O2 -I.  -c -o md5.o md5.c
gcc -g -O2 -I.  -c -o regidx.o regidx.c
gcc -g -O2 -I.  -c -o sam.o sam.c
gcc -g -O2 -I.  -c -o synced_bcf_reader.o synced_bcf_reader.c
gcc -g -O2 -I.  -c -o vcf_sweep.o vcf_sweep.c
gcc -g -O2 -I.  -c -o tbx.o tbx.c
gcc -g -O2 -I.  -c -o vcf.o vcf.c
gcc -g -O2 -I.  -c -o vcfutils.o vcfutils.c
gcc -g -O2 -I.  -c -o cram/cram_codecs.o cram/cram_codecs.c
gcc -g -O2 -I.  -c -o cram/cram_decode.o cram/cram_decode.c
gcc -g -O2 -I.  -c -o cram/cram_encode.o cram/cram_encode.c
gcc -g -O2 -I.  -c -o cram/cram_external.o cram/cram_external.c
gcc -g -O2 -I.  -c -o cram/cram_index.o cram/cram_index.c
gcc -g -O2 -I.  -c -o cram/cram_io.o cram/cram_io.c
gcc -g -O2 -I.  -c -o cram/cram_samtools.o cram/cram_samtools.c
gcc -g -O2 -I.  -c -o cram/cram_stats.o cram/cram_stats.c
gcc -g -O2 -I.  -c -o cram/files.o cram/files.c
gcc -g -O2 -I.  -c -o cram/mFILE.o cram/mFILE.c
gcc -g -O2 -I.  -c -o cram/open_trace_file.o cram/open_trace_file.c
gcc -g -O2 -I.  -c -o cram/pooled_alloc.o cram/pooled_alloc.c
gcc -g -O2 -I.  -c -o cram/rANS_static.o cram/rANS_static.c
gcc -g -O2 -I.  -c -o cram/sam_header.o cram/sam_header.c
gcc -g -O2 -I.  -c -o cram/string_alloc.o cram/string_alloc.c
gcc -g -O2 -I.  -c -o cram/thread_pool.o cram/thread_pool.c
gcc -g -O2 -I.  -c -o cram/vlen.o cram/vlen.c
gcc -g -O2 -I.  -c -o cram/zfio.o cram/zfio.c
ar -rc libhts.a kfunc.o knetfile.o kstring.o bgzf.o faidx.o hfile.o hfile_net.o 
hts.o md5.o regidx.o sam.o synced_bcf_reader.o vcf_sweep.o tbx.o vcf.o 
vcfutils.o cram/cram_codecs.o cram/cram_decode.o cram/cram_encode.o 
cram/cram_external.o cram/cram_index.o cram/cram_io.o cram/cram_samtools.o 
cram/cram_stats.o cram/files.o cram/mFILE.o cram/open_trace_file.o 
cram/pooled_alloc.o cram/rANS_static.o cram/sam_header.o cram/string_alloc.o 
cram/thread_pool.o cram/vlen.o cram/zfio.o 
ranlib libhts.a
gcc -Wl,-export_dynamic -install_name 
/Users/splaisan/Downloads/htslib-1.3/lib/libhts.1.dylib -current_version 1.3 
-compatibility_version 1   -o libhts.dylib kfunc.o knetfile.o kstring.o bgzf.o 
faidx.o hfile.o hfile_net.o hts.o md5.o regidx.o sam.o synced_bcf_reader.o 
vcf_sweep.o tbx.o vcf.o vcfutils.o cram/cram_codecs.o cram/cram_decode.o 
cram/cram_encode.o cram/cram_external.o cram/cram_index.o cram/cram_io.o 
cram/cram_samtools.o cram/cram_stats.o cram/files.o cram/mFILE.o 
cram/open_trace_file.o cram/pooled_alloc.o cram/rANS_static.o cram/sam_header.o 
cram/string_alloc.o cram/thread_pool.o cram/vlen.o cram/zfio.o  -lz  
gcc: error: -compatibility_version only allowed with -dynamiclib
make: *** [libhts.dylib] Error 1

I looked for Makefile and 

On 16 Feb 2016, at 11:44, Stephane Plaisance <[email protected]> 
wrote:
> I get the following on OSX 10.10.5 
[...]
> 
> gcc: error: unrecognized command line option '-rdynamic'

See https://sourceforge.net/p/samtools/mailman/message/34699333/ ; most GCC 
compiler drivers understand this option, but apparently not the MacPorts one 
you have on OS X.

We will add to the configure script to detect whether this option will be 
accepted, but in the meantime the previous response shows you how to work 
around this and build samtools successfully.

   John

-- 
The Wellcome Trust Sanger Institute is operated by Genome Research 
Limited, a charity registered in England with number 1021457 and a 
company registered in England with number 2742969, whose registered 
office is 215 Euston Road, London, NW1 2BE. 
------------------------------------------------------------------------------
Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
http://pubads.g.doubleclick.net/gampad/clk?id=272487151&iu=/4140
_______________________________________________
Samtools-help mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/samtools-help

Reply via email to