[ELDK] error: 'errno' undeclared

Alberto Ciampini a.ciampini at sicep.it
Wed Sep 22 10:27:30 CEST 2010


Il 22/09/2010 10:20, Stefano Babic ha scritto:
> Alberto Ciampini wrote:
>
> Hi Alberto,
>
>    
>>>> i have a strange issue when cross compiling for arm: if i try to use
>>>> errno (or build programs that uses it), i get (for example):
>>>>
>>>> cmem.c:116: error: 'errno' undeclared (first use in this function)
>>>> cmem.c:116: error: (Each undeclared identifier is reported only once
>>>> cmem.c:116: error: for each function it appears in.)
>>>>
>>>>          
>>> I cannot confirm this issue, I can compile clean for ARM (you miss to
>>> say which version of ELDK you are using. Let's say, we are using
>>> ELDK-4.2).
>>>
>>>        
>> sorry, i forgot that.... yes it's 4.2
>>
>> $ more eldk/version
>> ELDK version 4.2
>> arm: Build 2008-11-24
>>
>>
>>      
> Ok. Please do not drop the list as CC: to let other people to see the
> results of the discussion.
>    

oops.... sorry!! :-[


>>> The errno should be in the libc, and in the include path you find the
>>> extern reference.
>>>
>>>        
>> maybe the problem is that it doesn't find the extern reference??
>>      
> However, I see in arm/usr/include/errno.h:
>
> 46 #ifndef errno
> 47 extern int errno;
> 48 #endif
>
> If you do not set yourself errno with something like "#define errno
> ...", the reference should be find.
>    

that's weird!!
this is the content of my arm/usr/include/errno.h

#include <asm-generic/errno.h>


(just that line)


>> hmm.... it doesn't compile either.... same error:
>>
>> $ arm-linux-gcc -Wall -o testerrno testerrno.c
>> testerrno.c: In function 'main':
>> testerrno.c:17: error: 'errno' undeclared (first use in this function)
>> testerrno.c:17: error: (Each undeclared identifier is reported only once
>> testerrno.c:17: error: for each function it appears in.)
>>      
> It seems your ELDK installation has problems. Have you tried with a
> fresh installed ELDK ?

i'll try!! thanks again!! :-)


-- 
alberto ciampini
a.ciampini at sicep.it


************************************************************************
Le informazioni contenute nella presente comunicazione sono destinate
esclusivamente alle persone o alla Società sopraindicati. La diffusione,
distribuzione e/o copiatura del documento trasmesso da parte di
qualsiasi soggetto diverso dal destinatario è proibita, sia ai sensi
dell'art. 616 c.p. , che ai sensi del D.Lgs. n. 196/2003. Se avete
ricevuto questo messaggio per errore, vi preghiamo di distruggerlo e di
avvisare immediatamente il mittente.
************************************************************************
The information in this e-mail is confidential and may also be legally
privileged. It is intended for the addressee only. Access to this e-mail
by anyone else is unauthorised. It is not to be relied upon by any
person other than the addressee, except with our prior written approval.
If no such approval is given, we will not accept any liability (in
negligence or otherwise) arising from any third party acting.
Unauthorised recipients are required to maintain confidentiality. If
you have received this e-mail in error please notify us immediately,
destroy any copies and delete it from your computer system. Any use,
dissemination, forwarding, printing or copying of this e-mail is
prohibited.
************************************************************************



More information about the eldk mailing list