LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian
User Name
Password
Debian This forum is for the discussion of Debian Linux.

Notices

Reply
 
Search this Thread
Old 10-06-2012, 12:11 PM   #1
Weapon S
Member
 
Registered: May 2011
Location: Netherlands
Distribution: Debian
Posts: 147
Blog Entries: 1

Rep: Reputation: 12
[squeeze]Found error in standard header?! (bits/errno.h)


While building Allegro 4.4, it complained about a superfluous #endif on line 49 of a system header. What a cryptic error! Internet had no answer. Me delves into all the source and cmake scripts of the library. No progress.
Me resumes staring at alleged point of error.

/usr/include/bits/errno.h (start@20)
Code:
#ifdef _ERRNO_H

# undef EDOM
# undef EILSEQ
# undef ERANGE
# include <linux/errno.h>

/* Linux has no ENOTSUP error code.  */
# define ENOTSUP EOPNOTSUPP

/* Older Linux versions also had no ECANCELED error code.  */
# ifndef ECANCELED
#  define ECANCELED	125
# endif

/* Support for error codes [Some binary representations of those codes]
#  define EOWNERDEAD		130
#  define ENOTRECOVERABLE	131
# endif

# ifndef __ASSEMBLER__
/* Function to get address of global `errno' variable.  */
extern int *__errno_location (void) __THROW __attribute__ ((__const__));

#  if !defined _LIBC || defined _LIBC_REENTRANT
/* When using threads, errno is a per-thread value.  */
#   define errno (*__errno_location ())
#  endif
# endif /* !__ASSEMBLER__ */
#endif /* _ERRNO_H */
Except for binary representations, this is exactly what was there. There really was a superfluous #endif on line 38!

Remove binary code, add comment ending, remove #endif. IT WORKED @~~~~0

I can only imagine that this is a deprecated header, or this weird beginning of /usr/include/errorno.h (which is includer of other header) does some voodoo: (the comment shouldn't matter, should it?)
Code:
#ifndef	__need_Emath
# define _ERRNO_H	1
# include <features.h>
#endif

__BEGIN_DECLS

/* Get the error number constants from the system-specific file.
   This file will test __need_Emath and _ERRNO_H.  */
#include <bits/errno.h>
#undef	__need_Emath

#ifdef	_ERRNO_H
If someone can confirm that this header is deprecated, I'd appreciate it. Something needs fixing.

Last edited by Weapon S; 10-06-2012 at 12:14 PM.
 
Old 10-07-2012, 04:59 AM   #2
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2014.08, Slack14.1 DebWheezy, +50+ other Linux OS, for test only.
Posts: 13,940

Rep: Reputation: 2602Reputation: 2602Reputation: 2602Reputation: 2602Reputation: 2602Reputation: 2602Reputation: 2602Reputation: 2602Reputation: 2602Reputation: 2602Reputation: 2602
? A buggy version of allegro-4.4 ?

cd allgro-4.4.2/ && mkdir build && cd build/ && cmake ../ && make
http://garr.dl.sourceforge.net/proje...o-4.4.2.tar.gz

I got no errors on any OS, including Debian Squeeze 32bits and 64bits.


The headers /usr/include/bits/errno.h, /usr/include/linux/errno.h
are provided by package 'libc6-dev'.

.

Last edited by knudfl; 10-07-2012 at 05:03 AM.
 
Old 10-07-2012, 07:38 AM   #3
Weapon S
Member
 
Registered: May 2011
Location: Netherlands
Distribution: Debian
Posts: 147
Blog Entries: 1

Original Poster
Rep: Reputation: 12
Thanks for trying that. Would you indulge me and have a look at your /usr/include/bits/errno.h, specifically around line 38? I have heard of another user on Ubuntu having the same problem as I did.
I don't know how high the chances are there actually is a mirror that provides faulty files. (But then again the number of files stored over the years is very big.)
-----
GAH. How stupid of me! "Binary codes"? Corrupted file is more like it.

Last edited by Weapon S; 10-07-2012 at 03:21 PM.
 
Old 10-12-2012, 11:33 AM   #4
Weapon S
Member
 
Registered: May 2011
Location: Netherlands
Distribution: Debian
Posts: 147
Blog Entries: 1

Original Poster
Rep: Reputation: 12
Nailed it

It was memory corruption leading to disk errors. Very small chance such files are distributed defective.
 
  


Reply

Tags
gcc, header, squeeze


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
configure: error: Header file pcap.h not found; when tried installing ethereal networ ssangeetha Linux - Software 6 05-02-2013 12:28 PM
Coexistence of 64/32 bits libs in Squeeze... Alexvader Debian 3 03-25-2011 01:27 PM
error: Standard C Math Library not found. banso_boy Linux - Newbie 10 04-24-2008 10:30 AM
compilation error in standard header fpos.h in gcc 3.2.2 ghorab Linux - General 6 12-10-2005 03:26 AM


All times are GMT -5. The time now is 08:47 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration