Dear James,

Thank you very much for your help! It appears indeed that strndup is not 
available on mac os x (10.6.8) and gcc i686-apple-darwin10-gcc-4.2.1. It was 
only added to OS X in version 10.7. But following your advice and by modifying 
a little bit the makefile, I've managed to reach the end of the installation 
process without any additional error.

Cheers,

Béatrice
 
Le Lundi 13 Juin 2016 12:51 CEST, James Bonfield <j...@sanger.ac.uk> a écrit: 
 
> Hello,
> 
> On Fri, Jun 10, 2016 at 04:44:15PM +0200, CHANE-WOON-MING B?atrice (VIE) 
> wrote:
> > I'm currently trying to install samtools-1.3.1 on an iMac 10.6.8. 
> > Everything seems to be ok after the "./configure" command, but I'm facing 
> > with the following make error and I didn't manage to find a related thread 
> > on the samtools-help list:
> ...
> > Undefined symbols:
> >   "_strndup", referenced from:
> >       _get_rg_line in bam_addrprg.o
> >       _confirm_rg in bam_addrprg.o
> >       _main_addreplacerg in bam_addrprg.o
> 
> Do you have a newer version of gcc or clang available?  According to

> the XOpen documentation strndup has been a standard function since
> 2006.
> 
> http://pubs.opengroup.org/onlinepubs/9699919799/functions/strdup.html
> 
> Your MacOS X 10.6.8 was released in 2011, but I assume came with an
> older compiler or at least a compiler that hadn't yet incorporated
> all of that XOpen specification.
> 
> If you don't have a newer compiler available, you can however just add
> a copy of strndup to one of your C and headers files.  Apple
> themselves seem to have a trivial copy here:
> 
> http://opensource.apple.com//source/gcc/gcc-5666.3/libiberty/strndup.c
> 
> James
> 
> PS.  However perhaps we should check for this in autoconf, or just use
> a workaround that doesn't require use of strndup.
> 
> -- 
> James Bonfield (j...@sanger.ac.uk) | Hora aderat briligi. Nunc et Slythia Tova
>                                   | Plurima gyrabant gymbolitare vabo;
>   A Staden Package developer:     | Et Borogovorum mimzebant undique formae,
> https://sf.net/projects/staden/   | Momiferique omnes exgrabure Rathi. 
> 
> 
> -- 
>  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. 
 
 
 
 

------------------------------------------------------------------------------
What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
patterns at an interface-level. Reveals which users, apps, and protocols are 
consuming the most bandwidth. Provides multi-vendor support for NetFlow, 
J-Flow, sFlow and other flows. Make informed decisions using capacity 
planning reports. https://ad.doubleclick.net/ddm/clk/305295220;132659582;e
_______________________________________________
Samtools-help mailing list
Samtools-help@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/samtools-help

Reply via email to