LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices



Reply
 
Search this Thread
Old 11-14-2012, 03:16 AM   #1
cov
Member
 
Registered: Apr 2005
Location: Durban
Posts: 382

Rep: Reputation: 30
cpp sanity check fails.


I've just used git to download the source for Libredwg.

I've used the autogen script to generate a 'configure' script, which, when I run it, gives the following error:

Code:
configure: error: C preprocessor "/lib/cpp" fails sanity check
The config.log file has a number of very similar errors.

Code:
| 		     Syntax error
configure:7083: gcc -E  conftest.c
In file included from conftest.c:10:0:
/usr/include/limits.h:125:26: error: no include path in which to search for limits.h
configure:7083: $? = 1
configure: failed program was:
| /* confdefs.h */
| #define PACKAGE_NAME "LibreDWG"
| #define PACKAGE_TARNAME "libredwg"
| #define PACKAGE_VERSION "0.4-dev"
| #define PACKAGE_STRING "LibreDWG 0.4-dev"
| #define PACKAGE_BUGREPORT "libredwg@gnu.org"
| #define PACKAGE_URL ""
| /* end confdefs.h.  */
As far as I can tell I have all the correct glibc libraries and dev libraries installed (on a Mint Ubuntu derivative).

I'm also reasonably sure that I compiled this code successfully previously, in which case the git update may have introduced a bug. Is this likely? How do I fix it?
 
Old 11-14-2012, 07:19 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: 14,284

Rep: Reputation: 2664Reputation: 2664Reputation: 2664Reputation: 2664Reputation: 2664Reputation: 2664Reputation: 2664Reputation: 2664Reputation: 2664Reputation: 2664Reputation: 2664
Quote:
/usr/include/limits.h:125:26: error:
no include path in which to search for limits.h
"/usr/include/limits.h" is provided by 'libc6-dev'.


Quote:
configure: error: C preprocessor "/lib/cpp" fails sanity check
The g++ compiler must be installed to have a fully working gcc (cpp) :
sudo apt-get install g++
Also required for libredwg : swig texinfo

Example : No issues with 'libredwg', Ubuntu 12.04 - 32bits. ( gcc-4.6.3 ).

.

Last edited by knudfl; 11-14-2012 at 07:20 AM.
 
Old 11-14-2012, 09:02 AM   #3
cov
Member
 
Registered: Apr 2005
Location: Durban
Posts: 382

Original Poster
Rep: Reputation: 30
Hi Knudfi,

Many thanks for your reply.

Code:
 sudo apt-get install g++
[sudo] password for dave: 
Reading package lists... Done
Building dependency tree       
Reading state information... Done
g++ is already the newest version.
g++ set to manually installed.
0 upgraded, 0 newly installed, 0 to remove and 3 not upgraded.
 
Old 11-14-2012, 09:25 AM   #4
cov
Member
 
Registered: Apr 2005
Location: Durban
Posts: 382

Original Poster
Rep: Reputation: 30
Swig & texinfo are installed:

Code:
 sudo apt-get install swig texinfo
Reading package lists... Done
Building dependency tree       
Reading state information... Done
swig is already the newest version.
texinfo is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 3 not upgraded.
limits.h is present, too:

Code:
ls -l /usr/include/limits.h 
-rw-r--r-- 1 root root 4596 2012-09-21 09:01 /usr/include/limits.h
 
Old 11-14-2012, 11:12 AM   #5
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2014.08, Slack14.1 DebWheezy, +50+ other Linux OS, for test only.
Posts: 14,284

Rep: Reputation: 2664Reputation: 2664Reputation: 2664Reputation: 2664Reputation: 2664Reputation: 2664Reputation: 2664Reputation: 2664Reputation: 2664Reputation: 2664Reputation: 2664
'libredwg' test 2 : Ubuntu 12.10, 32bits , gcc-4.7.2 : No errors.
Additional requirement was : python-all-dev

Which OS is it about ? I'd guess it has some name.
Please show the output from the commands ..
1) gcc --version
2) uname -m
3) cat /etc/issue

.
 
Old 11-14-2012, 12:35 PM   #6
cov
Member
 
Registered: Apr 2005
Location: Durban
Posts: 382

Original Poster
Rep: Reputation: 30
Thanks for going to this trouble.

python-all-dev is installed.

As I mentioned, the OS a Ubuntu derivative called Mint.

Code:
gcc --versiongcc (Ubuntu/Linaro 4.6.1-9ubuntu3) 4.6.1
Code:
uname -m
x86_64
Code:
cat /etc/issue
Linux Mint 12 Lisa \n \l
 
Old 11-14-2012, 05:29 PM   #7
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2014.08, Slack14.1 DebWheezy, +50+ other Linux OS, for test only.
Posts: 14,284

Rep: Reputation: 2664Reputation: 2664Reputation: 2664Reputation: 2664Reputation: 2664Reputation: 2664Reputation: 2664Reputation: 2664Reputation: 2664Reputation: 2664Reputation: 2664
OK, the 64bits Linux Mint 12 Lisa.

I can have a look at Mint 12 - 64bits later.
( No errors on a 64bits Ubuntu 12.04 )

Hints : May be reinstall the gcc packages ( + libtool ):
sudo apt-get install --reinstall \
libtool cpp-4.6 libgcc1 gcc-4.6 g++-4.6

Quote:
/usr/include/limits.h:125:26: error:
no include path in which to search for limits.h
Line 125, /usr/include/limits.h :
Seems to be about the "gcc limits.h"
( ? /usr/lib/gcc/x86_64-linux-gnu/4.6/include-fixed/limits.h ?
? /usr/include/c++/4.6/tr1/limits.h ? ).

.
 
Old 11-15-2012, 07:07 AM   #8
cov
Member
 
Registered: Apr 2005
Location: Durban
Posts: 382

Original Poster
Rep: Reputation: 30
Code:
sudo apt-get install --reinstall libtool cpp-4.6 libgcc1 gcc-4.6 g++-4.6
Reading package lists... Done
Building dependency tree       
Reading state information... Done
0 upgraded, 0 newly installed, 5 reinstalled, 0 to remove and 7 not upgraded.
Need to get 0 B/19.6 MB of archives.
After this operation, 0 B of additional disk space will be used.
E: Internal Error, No file name for libgcc1
Synaptic reports that libgcc1 is installed.
 
Old 11-15-2012, 08:45 AM   #9
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2014.08, Slack14.1 DebWheezy, +50+ other Linux OS, for test only.
Posts: 14,284

Rep: Reputation: 2664Reputation: 2664Reputation: 2664Reputation: 2664Reputation: 2664Reputation: 2664Reputation: 2664Reputation: 2664Reputation: 2664Reputation: 2664Reputation: 2664
Don't know what's happening. No issues here with libredwg / Mint 12, 64bits.

May be start from scratch in a new directory with :
git clone git://git.sv.gnu.org/libredwg.git

cd libredwg/ && chmod +x autogen.sh && ./autogen.sh &&
./configure --prefix=/usr/ --enable-trace && make

Or try out my result, libredwg-0.4.dev-mint12_amd64.deb
https://docs.google.com/open?id=0B7S...nY3Z3VpRXRMczg
$ sudo dpkg -i libredwg-0.4.dev-mint12_amd64.deb

.
 
Old 11-15-2012, 09:55 AM   #10
cov
Member
 
Registered: Apr 2005
Location: Durban
Posts: 382

Original Poster
Rep: Reputation: 30
Still not working.

I've included some more of the output from ./configure in case there's something relevant.


Code:
checking whether we are cross compiling... no
checking for dlltool... no
checking how to associate runtime and link libraries... printf %s\n
checking for ar... ar
checking for archiver @FILE support... @
checking for strip... strip
checking for ranlib... ranlib
checking command to parse /usr/bin/nm -B output from gcc object... ok
checking for sysroot... no
checking for mt... mt
checking if mt is a manifest tool... no
checking how to run the C preprocessor... /lib/cpp
configure: error: in `/home/dave/Documents/Projects/Programs/workspace/libredwg':
configure: error: C preprocessor "/lib/cpp" fails sanity check
 
Old 11-15-2012, 03:30 PM   #11
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2014.08, Slack14.1 DebWheezy, +50+ other Linux OS, for test only.
Posts: 14,284

Rep: Reputation: 2664Reputation: 2664Reputation: 2664Reputation: 2664Reputation: 2664Reputation: 2664Reputation: 2664Reputation: 2664Reputation: 2664Reputation: 2664Reputation: 2664
Probably reinstall some more of the compiler dependencies.

sudo apt-get install --reinstall libc6-dev linux-libc-dev

But then again, why build from source, when a package is available :
libredwg-0.4.dev-mint12_amd64.deb ( Link in post #9 ).

.
 
1 members found this post helpful.
Old 11-16-2012, 03:23 AM   #12
cov
Member
 
Registered: Apr 2005
Location: Durban
Posts: 382

Original Poster
Rep: Reputation: 30
Hi Knudfi,

Thanks very much for your efforts on this; they are much appreciated.

The reason I want to be able to compile the source is that I want to be able to use a step-through debugger to try to extract information from a dwg file, in particular a dwg CAD file from 2007 and later.

I am trying to follow the C code and work out how the file is read. The libredwg also segfaults with my files and I'd like to find out why that is.

So clearly a pre-compiled deb binary is not really going to be much use to me.
 
Old 11-18-2012, 01:43 PM   #13
cov
Member
 
Registered: Apr 2005
Location: Durban
Posts: 382

Original Poster
Rep: Reputation: 30
I have Installed and compiled the source on another machine, so I am able to pursue my project.

However it does concern me a little that I can't compile on this machine. I guess I'll have to see if it affects the capability of the machine to install other software and address it if it does.

In any case, thank you for your efforts on this; I do appreciate it.

Many thanks,

Dave Coventry
 
  


Reply


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
lib/cpp fails sanity check angelo_maci Linux - Newbie 3 03-17-2010 05:15 PM
CPP fails sanity check on debian grapnell Debian 14 08-16-2006 02:18 PM
cpp fails sanity check??? dinolinux Debian 2 07-30-2005 12:43 PM
cpp fails sanity check? linux-rulz Linux - Software 4 05-16-2005 05:00 AM
/lib/cpp fails sanity check? NonSumPisces Linux - Software 2 10-02-2004 08:46 AM


All times are GMT -5. The time now is 10:24 PM.

Main Menu
Advertisement
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