[Asterisk-Dev] uClibc compile problem

fli4l-l00ser at gmx.net fli4l-l00ser at gmx.net
Wed Dec 8 13:20:39 MST 2004


Tilghman Lesher schrieb:

>On Wednesday 08 December 2004 13:11, fli4l-l00ser at gmx.net wrote:
>  
>
>>Tilghman Lesher schrieb:
>>    
>>
>>>On Wednesday 08 December 2004 12:31, Tilghman Lesher wrote:
>>>      
>>>
>>>>On Wednesday 08 December 2004 11:26, fli4l-l00ser at gmx.net wrote:
>>>>        
>>>>
>>>>>I have a problem with Asterisk and uClibc.
>>>>>
>>>>>I already got the current prebuilt uClibc from www.uclibc.org and
>>>>>compiled asterisk with this.
>>>>>
>>>>>This is the result:
>>>>>          
>>>>>
>>>><snip>
>>>>
>>>>        
>>>>
>>>>>dns.o(.text+0x2a): In function `ast_search_dns':
>>>>>/usr/src/asterisk/dns.c:174: undefined reference to `__res_ninit'
>>>>>dns.o(.text+0x51):/usr/src/asterisk/dns.c:175: undefined reference to
>>>>>`__res_nsearch'
>>>>>dns.o(.text+0x91):/usr/src/asterisk/dns.c:194: undefined reference to
>>>>>`__res_nclose'
>>>>>collect2: ld returned 1 exit status
>>>>>make: *** [asterisk] Error 1
>>>>>
>>>>>Is there someone outside who can help me with this problem?
>>>>>          
>>>>>
>>>>The symbol res_ninit is for some reason defined in your setup, but the
>>>>corresponding code doesn't exist.  This is circumventing the workaround
>>>>already present in the code.  Try editing dns.c:155 and change
>>>>#define HAS_RES_NINIT to #undef HAS_RES_NINIT
>>>>and recompile.
>>>>        
>>>>
>>>Actually, add a line at line 153 that says:
>>>#undef res_ninit
>>>and recompile.  That will make sure the substitute lock is still defined.
>>>      
>>>
>>Thanx Tilghman, i've done this. This is the result:
>>
>>    
>>
><snip>
>  
>
>>dns.o(.text+0x1eb): In function `ast_search_dns':
>>/usr/src/asterisk/dns.c:180: undefined reference to `__res_search'
>>collect2: ld returned 1 exit status
>>make: *** [asterisk] Error 1
>>    
>>
>
>Looks like you don't have the current version of uclibc, then, because
>res_search() has been included in their CVS as of Jan 24 2004.
>http://www.uclibc.org/cgi-bin/cvsweb/uClibc/libc/inet/resolv.c?view=log
>
>  
>
I only found this in the current version

/* vi: set sw=4 ts=4: */
/*
 * libresolv for uClibc
 *
 * Copyright (C) 2002 by Erik Andersen <andersen at uclibc.org>
 *
 * This program is free software; you can redistribute it and/or modify it
 * under the terms of the GNU Library General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or (at 
your
 * option) any later version.
 *
 * This program is distributed in the hope that it will be useful, but 
WITHOUT
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public 
License
 * for more details.
 *
 * You should have received a copy of the GNU Library General Public License
 * along with this program; if not, write to the Free Software Foundation,
 * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 *
 */

#include <features.h>

void __stub1(void)
{
    return;
}
link_warning (__stub1, "the `libresolv' library is a stub.  Do you 
really need it?")





More information about the asterisk-dev mailing list