delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2014/02/06/14:39:43

X-Recipient: archive-cygwin AT delorie DOT com
DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id
:list-unsubscribe:list-subscribe:list-archive:list-post
:list-help:sender:message-id:date:from:reply-to:mime-version:to
:subject:references:in-reply-to:content-type
:content-transfer-encoding; q=dns; s=default; b=xu2iOx0T5AWVn4VU
74ZmONPUTVhnfbZgvkQITYdnzIy/cqawVB2BdKJQm/KrB0srclUxZuin7wCO/wXt
RTbJTl97aSSejjYhUkyYJ7ffBMtl2K/Kl82GaQ0pz5qpXXON7dVapr1/N7+NnlzS
XXV+q7pbgbDz7jMFRaMArX80j9E=
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id
:list-unsubscribe:list-subscribe:list-archive:list-post
:list-help:sender:message-id:date:from:reply-to:mime-version:to
:subject:references:in-reply-to:content-type
:content-transfer-encoding; s=default; bh=63FpgAtUht0zIC3M0zzwoW
GdSkg=; b=hL0ZmR06j9dUX31qIzwKn4oZQqLgPRVzXJ3IDrE/Rk6xZmviggmRnd
YOgZosS1a0rpHYNF6Nysd+HMSnYN6ZsKyywxaziVHtu7DG+0dvgQkB+cnHmSAUCo
nD32h7Iio1oN5I/Qg7IGXXcYvkArLfaG3M1jo3F2TAONqHSoGWl70=
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
Authentication-Results: sourceware.org; auth=none
X-Spam-SWARE-Status: No, score=-1.3 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.2
X-HELO: vms173023pub.verizon.net
Message-id: <52F3E4DA.40002@cygwin.com>
Date: Thu, 06 Feb 2014 14:39:06 -0500
From: "Larry Hall (Cygwin)" <reply-to-list-only-lh AT cygwin DOT com>
Reply-to: cygwin AT cygwin DOT com
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:24.0) Gecko/20100101 Thunderbird/24.3.0
MIME-version: 1.0
To: cygwin AT cygwin DOT com
Subject: Re: qsort_r and libc.a version?
References: <0C723FEB5B4E5642B25B451BA57E27307514F78A AT S1P5DAG3C DOT EXCHPROD DOT USA DOT NET>
In-reply-to: <0C723FEB5B4E5642B25B451BA57E27307514F78A@S1P5DAG3C.EXCHPROD.USA.NET>

On 2/6/2014 2:04 PM, Jim Garrison wrote:
> I tried to build libgit2 so I could try to build gitg but encountered
>
>      undefined reference to `qsort_r'
>
> GitHub has a closed issue for this
> https://github.com/libgit2/libgit2/issues/1606 saying that qsort_r was added
> to glibc in version 2.8, released in 2008.
>
> Since libc in Cygwin is part of the base package, how would I find out
> which upstream version it's based on?

Cygwin uses newlib for its C library.  From what I can see, qsort is there
but qsort_r isn't.

> There was a commit in libgit2 that was supposed to fix this :
>
> https://github.com/libgit2/libgit2/commit/0d77647adc1f76df66e437e6442d7f7706e2c38e#diff-bb2cd4651768482b99cb1c52d29ceffdR694
>
> but I don't know enough about Cygwin internals to determine why it still
> fails on Cygwin.

The problem with that patch is that it doesn't take Cygwin into account.
If you append a check for Cygwin there as well (i.e. defined(__CYGWIN__) )
then that should resolve the compile issue.

-- 
Larry

_____________________________________________________________________

A: Yes.
 > Q: Are you sure?
 >> A: Because it reverses the logical flow of conversation.
 >>> Q: Why is top posting annoying in email?

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019