[Expat-bugs] [ expat-Bugs-1597115 ] 'make check' for expat-2.0.0 fails

SourceForge.net noreply at sourceforge.net
Wed Nov 22 00:24:52 CET 2006


Bugs item #1597115, was opened at 2006-11-15 18:53
Message generated for change (Comment added) made by sergeiste
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=110127&aid=1597115&group_id=10127

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: Build control
Group: None
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Sergei (sergeiste)
Assigned to: Greg Stein (gstein)
Summary: 'make check' for expat-2.0.0 fails

Initial Comment:
Hello,

I am trying to build expat-2.0.0 in the framework of
my

http://appsfromscratch.berlios.de/

project and 'make check' fails with this screen
output:

"
gcc -I./lib -I. -g -O2 -Wall -Wmissing-prototypes -Wstrict-prototypes -fexceptions -DHAVE_EXPAT_CONFIG_H   -o tests/runtests.o -c tests/runtests.c
gcc -I./lib -I. -g -O2 -Wall -Wmissing-prototypes -Wstrict-prototypes -fexceptions -DHAVE_EXPAT_CONFIG_H   -o tests/chardata.o -c tests/chardata.c
gcc -I./lib -I. -g -O2 -Wall -Wmissing-prototypes -Wstrict-prototypes -fexceptions -DHAVE_EXPAT_CONFIG_H   -o tests/minicheck.o -c tests/minicheck.c
/bin/sh ./libtool --silent --mode=link gcc -I./lib -I. -g -O2 -Wall -Wmissing-prototypes -Wstrict-prototypes -fexceptions -DHAVE_EXPAT_CONFIG_H    -o tests/runtests tests/runtests.o tests/chardat
a.o tests/minicheck.o libexpat.la
g++    -c -o tests/runtestspp.o tests/runtestspp.cpp
tests/runtests.c: In function 'void test_line_number_after_parse()':
tests/runtests.c:410: error: 'XML_Size' was not declared in this scope
tests/runtests.c:410: error: expected `;' before 'lineno'
tests/runtests.c:414: error: 'lineno' was not declared in this scope
tests/runtests.c: In function 'void test_column_number_after_parse()':
tests/runtests.c:428: error: 'XML_Size' was not declared in this scope
tests/runtests.c:428: error: expected `;' before 'colno'
tests/runtests.c:432: error: 'colno' was not declared in this scope
tests/runtests.c: In function 'void test_line_number_after_error()':
tests/runtests.c:514: error: 'XML_Size' was not declared in this scope
tests/runtests.c:514: error: expected `;' before 'lineno'
tests/runtests.c:518: error: 'lineno' was not declared in this scope
tests/runtests.c: In function 'void test_column_number_after_error()':
tests/runtests.c:534: error: 'XML_Size' was not declared in this scope
tests/runtests.c:534: error: expected `;' before 'colno'
tests/runtests.c:538: error: 'colno' was not declared in this scope
make: *** [tests/runtestspp.o] Error 1
".

My system is:

Linux comp.home.net 2.6.12-27mdk-i686-up-4GB #1 Tue Sep 26 12:41:29 MDT 2006 i686 AMD Athlon(tm) XP 1900+ unknown GNU/Linux


----------------------------------------------------------------------

Comment By: Sergei (sergeiste)
Date: 2006-11-22 01:24

Message:
Logged In: YES 
user_id=1270005
Originator: YES

Regarding "Well, if nobody objects then I intend to close this issue as
fixed" - is there a ready
to use tarball to be downloaded in which the problem is hopefully fixed ?

If yes, I'd prefer to check it first.

----------------------------------------------------------------------

Comment By: Karl Waclawek (kwaclaw)
Date: 2006-11-21 15:53

Message:
Logged In: YES 
user_id=290026
Originator: NO

Well, if nobody objects then I intend to close this issue as fixed.

----------------------------------------------------------------------

Comment By: Karl Waclawek (kwaclaw)
Date: 2006-11-17 21:24

Message:
Logged In: YES 
user_id=290026
Originator: NO

Well, I just tried this on Fedora Core 4 with an up-to-date CVS checkout:

First I uninstalled Expat and all header files I could find.
Then I ran:

  ./buildconf.sh
  ./configure --prefix=/home/kwaclaw/expat_test
  make
  make check

and I had no problems.

Maybe you try CVS and see how it goes.

----------------------------------------------------------------------

Comment By: Sergei (sergeiste)
Date: 2006-11-17 19:42

Message:
Logged In: YES 
user_id=1270005
Originator: YES

Regarding

"For anyone who is impatient I can only recommend to follow
the advice
(found through Google) to copy the headers to the install location first,
and then
make check should work
"

I do not think it will be the case for me - because my tool does not run
with root
privileges and by default does not install into system location. It's the
intent of
my tool, I am developing to be able to try the versions I like and not to
screw up.

So, if the existing build mechanism is unable to find the required *.h
file(s) under

/AppsFromScratchWD/build/expat-2.0.0

(the build directory), why does anybody think it will find them under

/AppsFromScratchWD/install/expat-2.0.0

which is the install directory ?

----------------------------------------------------------------------

Comment By: Karl Waclawek (kwaclaw)
Date: 2006-11-17 18:55

Message:
Logged In: YES 
user_id=290026
Originator: NO

You are correct, obviously.
But in this case the issue was to find out if the Expat code or test code
was in error
or just make check. I am pretty sure the code is correct, but the proof
would be to run
make install first.

I any case, I will have to leave the final decision which solution is best
to our
Make experts. For anyone who is impatient I can only recommend to follow
the advice
(found through Google) to copy the headers to the install location first,
and then
make check should work.

Karl

----------------------------------------------------------------------

Comment By: Steve Kelem (skelem)
Date: 2006-11-17 18:46

Message:
Logged In: YES 
user_id=177313
Originator: NO

Changing the build order to
make
make install
make check

is counter-intuitive and dangerous.  The idea behind doing the check first
is to make sure that the software is going to work before installing it. 
I've messed up installation of a software package enough times by
"assuming it will all work" and installing before really checking out a
package. I found that I've messed up the whole company, having them lose
hours of work.

Get "make check" to work before the installation of the software.

----------------------------------------------------------------------

Comment By: Karl Waclawek (kwaclaw)
Date: 2006-11-17 02:35

Message:
Logged In: YES 
user_id=290026
Originator: NO

Obviously, there is an issue with make check.
Asking why there is an issue really doesn't help resolving it.

It is also not clear which is the best solution.
I am not a Unix/Make expert and our Make authorities
are "asleep", as I already said.

Fred and Greg - this means you!

----------------------------------------------------------------------

Comment By: Sergei (sergeiste)
Date: 2006-11-17 02:07

Message:
Logged In: YES 
user_id=1270005
Originator: YES

Regarding

"
In the Makefile, change

CPPFLAGS = 

to

CPPFLAGS = $(INCLUDES) $(DEFS)
"

- why doesn't 'configure' generate the correct 'Makefile' in the first
place ?

----------------------------------------------------------------------

Comment By: Karl Waclawek (kwaclaw)
Date: 2006-11-16 21:05

Message:
Logged In: YES 
user_id=290026
Originator: NO

Could anyone try the suggestion made in bug# 1557638?
(See previous post)

----------------------------------------------------------------------

Comment By: Steve Kelem (skelem)
Date: 2006-11-16 20:30

Message:
Logged In: YES 
user_id=177313
Originator: NO

In the Makefile, change

CPPFLAGS = 

to

CPPFLAGS = $(INCLUDES) $(DEFS)

----------------------------------------------------------------------

Comment By: Karl Waclawek (kwaclaw)
Date: 2006-11-16 20:18

Message:
Logged In: YES 
user_id=290026
Originator: NO

No expat_external.h is used, it is included from within expat.h,
as I already said before.

----------------------------------------------------------------------

Comment By: Sergei (sergeiste)
Date: 2006-11-16 19:17

Message:
Logged In: YES 
user_id=1270005
Originator: YES

Regarding

"
I already answered this: Using an older version of expat_external.h
explains your errors. It's not too difficult to find yourself.
"

- no, the problem is that 'expat_external.h' is NOT used at all.

This is the list of files included into the problematic
'tests/runtests.c':

#include <expat_config.h>
#include <assert.h>
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include "expat.h"
#include "chardata.h"
#include "minicheck.h"
#include <proto/expat.h>
"

- there is NO 'expat_external.h' in the list, that's what I wrote earlier
and that's
why I'm saying that 'tests/runtests.c' cannot be compiled by
construction.

If you still think whatever (old, new, right, wrong) 'expat_external.h' is
included into
'tests/runtests.c', could you please explain me how ?

I.e. through which include file from the above list, or at which line
number of
'tests/runtests.c' ?



----------------------------------------------------------------------

Comment By: Karl Waclawek (kwaclaw)
Date: 2006-11-16 18:46

Message:
Logged In: YES 
user_id=290026
Originator: NO

I already answered this: Using an older version of expat_external.h
explains your errors. It's not too difficult to find yourself.

----------------------------------------------------------------------

Comment By: Sergei (sergeiste)
Date: 2006-11-16 07:01

Message:
Logged In: YES 
user_id=1270005
Originator: YES

Could you please answer one simple question: "from which file XML_Size is
supposed to get value ?".

It's a simple question - isn't it ?

----------------------------------------------------------------------

Comment By: Karl Waclawek (kwaclaw)
Date: 2006-11-16 05:24

Message:
Logged In: YES 
user_id=290026
Originator: NO

When we released Expat 2.0 make check worked for us.
So, your issue is not an issue with Expat, but maybe with make check.
As I already said, it's likely picking up the headers of an installed
version
and if an older version is installed, its likely using revision 1.4 or
older of expat_external.h, which would explain your errors.
expat_external.h is included by expat.h, btw.

However, if you run make install first, then make check should succeed.
Or you copy the header file to the install location first.

----------------------------------------------------------------------

Comment By: Sergei (sergeiste)
Date: 2006-11-16 04:12

Message:
Logged In: YES 
user_id=1270005
Originator: YES

I don't quite get the explanations.

The essence of my tool is that it builds and installs everything in local
directories,
e.g. for 'expat' they are:

/maxtor5/sergei/AppsFromScratchWD/build/expat-2.0.0
/maxtor5/sergei/AppsFromScratchWD/install/expat-2.0.0

, so why should 'expat' behave differently than other libs/apps ?

I mean, the whole point of 'make check' is that everything should be
checked in
local directory.

Could you please specifically address the issue of 'lib/expat_external.h'
?

Here are my points:

1) compilation fails because XML_Size is undefined - see the above
"
tests/runtests.c:410: error: 'XML_Size' was not declared in this scope
".

Is this correct - (YES/NO) ?

2) output of "grep '#include '
/maxtor5/sergei/AppsFromScratchWD/build/expat-2.0.0/tests/runtests.c":

"
#include <expat_config.h>
#include <assert.h>
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include "expat.h"
#include "chardata.h"
#include "minicheck.h"
#include <proto/expat.h>
";

3) output of "grep -r XML_Size
/maxtor5/sergei/AppsFromScratchWD/build/expat-2.0.0 | grep "\.h" | grep -v
"\.html" | grep typedef":

"
/maxtor5/sergei/AppsFromScratchWD/build/expat-2.0.0/amiga/include/libraries/expat.h:typedef
unsigned long XML_Size;
/maxtor5/sergei/AppsFromScratchWD/build/expat-2.0.0/lib/expat_external.h:typedef
unsigned __int64 XML_Size;
/maxtor5/sergei/AppsFromScratchWD/build/expat-2.0.0/lib/expat_external.h:typedef
unsigned long long XML_Size;
/maxtor5/sergei/AppsFromScratchWD/build/expat-2.0.0/lib/expat_external.h:typedef
unsigned long XML_Size;
"

- of the above the file of potential interest for me is

/maxtor5/sergei/AppsFromScratchWD/build/expat-2.0.0/lib/expat_external.h

- because the other one,

/maxtor5/sergei/AppsFromScratchWD/build/expat-2.0.0/amiga/include/libraries/expat.h

appears to be amiga-specific - not my case.

So, I draw the conclusion that 'lib/expat_external.h' the file of
interest.

Is this correct (YES/NO) ?

4) if '3)' is correct, then 'tests/runtests.c' cannot be compiled by
definition -
its list of include files (see '2)', here is is again):


"
#include <expat_config.h>
#include <assert.h>
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include "expat.h"
#include "chardata.h"
#include "minicheck.h"
#include <proto/expat.h>
"

, and there is no 'lib/expat_external.h' in the above list.

Is there an error in the chain of reasoning I gave ? If yes, where is it
?



----------------------------------------------------------------------

Comment By: Karl Waclawek (kwaclaw)
Date: 2006-11-15 20:49

Message:
Logged In: YES 
user_id=290026
Originator: NO

To be more precise - make check is probably picking up the wrong
header files, that is the installed ones instead of the new ones.
You could fake it by copying the new header files over the installed
ones.

Karl

----------------------------------------------------------------------

Comment By: Karl Waclawek (kwaclaw)
Date: 2006-11-15 20:28

Message:
Logged In: YES 
user_id=290026
Originator: NO

Well, it seems to me that make check is picking up the installed version
of Expat,
which in your case is probably the one coming with your Linux
installation.

If you know how to write Make files, maybe you have a look and tell me how
to fix this.
I am the Windows guy around here, and the Linux guys are all asleep.

Karl

----------------------------------------------------------------------

Comment By: Sergei (sergeiste)
Date: 2006-11-15 20:20

Message:
Logged In: YES 
user_id=1270005
Originator: YES

"Well, have you tried it with make install first?" - No, I haven't.

The point of my tool is that it runs commands for me.

I can change order of make targets, i.e. I can make it

make
make install
make check

, but at the moment I'm in the middle of long build, so I'd prefer not to
interfere with the process.

----------------------------------------------------------------------

Comment By: Karl Waclawek (kwaclaw)
Date: 2006-11-15 20:06

Message:
Logged In: YES 
user_id=290026
Originator: NO

Well, have you tried it with make install first?

----------------------------------------------------------------------

Comment By: Sergei (sergeiste)
Date: 2006-11-15 19:34

Message:
Logged In: YES 
user_id=1270005
Originator: YES

Quick 'grep -r' shows:


/maxtor5/sergei/AppsFromScratchWD/build/expat-2.0.0/lib/expat_external.h:typedef
unsigned __int64 XML_Size;
/maxtor5/sergei/AppsFromScratchWD/build/expat-2.0.0/lib/expat_external.h:typedef
unsigned long long XML_Size;
/maxtor5/sergei/AppsFromScratchWD/build/expat-2.0.0/lib/expat_external.h:typedef
unsigned long XML_Size;


, i.e. apparently 'tests/runtests.c' whose compilation fails apparently
needs'lib/expat_external.h'
to be included in order to make XML_Size defined/declared.

----------------------------------------------------------------------

Comment By: Sergei (sergeiste)
Date: 2006-11-15 19:20

Message:
Logged In: YES 
user_id=1270005
Originator: YES

Regarding "What happens if you run make install first?" - I assumed
standard

./configure
make
make check
make install

sequence, i.e. I didn't run 'make install' before 'make check'.

Shouldn't stuff be installed only after it is checked ?

----------------------------------------------------------------------

Comment By: Karl Waclawek (kwaclaw)
Date: 2006-11-15 19:07

Message:
Logged In: YES 
user_id=290026
Originator: NO

What happens if you run make install first?

----------------------------------------------------------------------

Comment By: Sergei (sergeiste)
Date: 2006-11-15 18:55

Message:
Logged In: YES 
user_id=1270005
Originator: YES

Compiler info:

"
[3] 18:53 sergei at comp.home.net:/maxtor5/sergei/AppsFromScratchWD> gcc -v
Using built-in specs.
Target: i586-mandriva-linux-gnu
Configured with: ../configure --prefix=/usr --libexecdir=/usr/lib
--with-slibdir=/lib --mandir=/usr/share/man --infodir=/usr/share/info
--enable-shared --enable-threads=posix --disable-checking
--enable-languages=c,c++,ada,f95,objc,java --host=i586-mandriva-linux-gnu
--with-system-zlib --enable-long-long --enable-__cxa_atexit
--enable-clocale=gnu --disable-libunwind-exceptions --enable-java-awt=gtk
--with-java-home=/usr/lib/jvm/java-1.4.2-gcj-1.4.2.0/jre
--enable-gtk-cairo --disable-libjava-multilib
Thread model: posix
gcc version 4.0.1 (4.0.1-5mdk for Mandriva Linux release 2006.0)
".

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=110127&aid=1597115&group_id=10127


More information about the Expat-bugs mailing list