List Info

Thread: Error compiling SimpleServer 1.07




Error compiling SimpleServer 1.07
country flaguser name
United Kingdom
2007-09-07 09:56:02
I'm trying to compile SimpleServer 1.07 against yaz version
3.0.10 on a 
solaris 2.9 system. Both the yaz and perl installations are
in 
non-standard places, but I edited the $yazconf value in
Makefile.PL to 
reflect this.

I had managed to install SimpleServer 1.05 ok against yaz
version 2.1.48 
on the same machine.

I get the following error when running 'make':



gcc -c  -I/home/project/yaz-3.0.10/local/include
-DYAZ_HAVE_XML2=1 
-DYAZ_HAVE_XSLT=1 -I/usr/include/libxml2 
-fno-strict-aliasing -pipe 
-I/usr/local/include -D_LARGEFILE_SOURCE
-D_FILE_OFFSET_BITS=64 -O 
-DVERSION="1.07" 
-DXS_VERSION="1.07" -fPIC 
"-I/home/project/perl5.8.8/lib/5.8.8/sun4-solaris/CORE&
quot;   SimpleServer.c
SimpleServer.xs: In function `apt2perl':
SimpleServer.xs:428: parse error before `*'
SimpleServer.xs:431: `c' undeclared (first use in this
function)
SimpleServer.xs:431: (Each undeclared identifier is reported
only once
SimpleServer.xs:431: for each function it appears in.)
SimpleServer.xs:432: `son' undeclared (first use in this
function)
*** Error code 1
make: Fatal error: Command failed for target
`SimpleServer.o'



Any ideas?

Best wishes,

-- 
---------------------------------
Phil Cross
Senior Technical Researcher
Institute for Learning and Research Technology
University of Bristol
8 - 10 Berkeley Square
Bristol, BS8 1HH
Tel: +44 (0)117 928 7067
Fax: +44 (0)117 928 7112
E-mail: phil.crossbristol.ac.uk
URL: http://www.ilrt.bris.ac.uk/aboutus/staff?search=cmpac
-----------------------------------


_______________________________________________
Net-z3950 mailing list
Net-z3950lists.indexdata.dk
http://lists.indexdata.dk/cgi-bin/mailman/listinfo/n
et-z3950

Error compiling SimpleServer 1.07
user name
2007-09-07 11:27:17
Phil Cross writes:
 > I'm trying to compile SimpleServer 1.07 against yaz
version 3.0.10 on a 
 > solaris 2.9 system. Both the yaz and perl
installations are in 
 > non-standard places, but I edited the $yazconf value
in Makefile.PL to 
 > reflect this.
 > 
 > I had managed to install SimpleServer 1.05 ok against
yaz version 2.1.48 
 > on the same machine.
 > 
 > I get the following error when running 'make':
 > 
 > 
 > 
 > gcc -c  -I/home/project/yaz-3.0.10/local/include
-DYAZ_HAVE_XML2=1 
 > -DYAZ_HAVE_XSLT=1 -I/usr/include/libxml2 
-fno-strict-aliasing -pipe 
 > -I/usr/local/include -D_LARGEFILE_SOURCE
-D_FILE_OFFSET_BITS=64 -O 
 > -DVERSION="1.07" 
-DXS_VERSION="1.07" -fPIC 
 >
"-I/home/project/perl5.8.8/lib/5.8.8/sun4-solaris/CORE&
quot;   SimpleServer.c
 > SimpleServer.xs: In function `apt2perl':
 > SimpleServer.xs:428: parse error before `*'
 > SimpleServer.xs:431: `c' undeclared (first use in this
function)
 > SimpleServer.xs:431: (Each undeclared identifier is
reported only once
 > SimpleServer.xs:431: for each function it appears
in.)
 > SimpleServer.xs:432: `son' undeclared (first use in
this function)
 > *** Error code 1
 > make: Fatal error: Command failed for target
`SimpleServer.o'

Yeesh!  The line in question is a simple declaration:
	Z_ComplexAttribute *c = elem->value.complex;
This in a function that's already been happily slinging
around other
YAZ types such as Z_AttributesPlusTerm and
Z_AttributeElement.  That
should be working just fine.

All I can think of is that the assert() on the previous line
-- which
I think is new in SimpleServer 10.7 -- might be getting
expanded in
some screwy way on Solaris.  I know it's a long-shot but
it's all I've
got.

If you take a look at the output of

 gcc -E  -I/home/project/yaz-3.0.10/local/include
-DYAZ_HAVE_XML2=1 
 -DYAZ_HAVE_XSLT=1 -I/usr/include/libxml2 
-fno-strict-aliasing -pipe 
 -I/usr/local/include -D_LARGEFILE_SOURCE
-D_FILE_OFFSET_BITS=64 -O 
 -DVERSION="1.07" 
-DXS_VERSION="1.07" -fPIC 
 "-I/home/project/perl5.8.8/lib/5.8.8/sun4-solaris/CORE
"   SimpleServer.c

(i.e. the same command-line that was run to compile, but
using -E
instead of -c) then that might give you a clue.  If not,
email it to
me and I'll take a look.

 _/|_	
____________________________________________________________
_______
/o ) /  Mike Taylor    <mikeindexdata.com>    http://www.miketaylor.or
g.uk
)_v__/  "I have challenged the entire quality
assurance team to a
	 Bat-Leth contest.  They will not concern us again."
-- Klingon
	 Programming Mantra


_______________________________________________
Net-z3950 mailing list
Net-z3950lists.indexdata.dk
http://lists.indexdata.dk/cgi-bin/mailman/listinfo/n
et-z3950

Re: Error compiling SimpleServer 1.07
country flaguser name
Denmark
2007-09-07 16:55:08
Mike Taylor wrote:
> Phil Cross writes:
>  > I'm trying to compile SimpleServer 1.07 against
yaz version 3.0.10 on a 
>  > solaris 2.9 system. Both the yaz and perl
installations are in 
>  > non-standard places, but I edited the $yazconf
value in Makefile.PL to 
>  > reflect this.
>  > 
>  > I had managed to install SimpleServer 1.05 ok
against yaz version 2.1.48 
>  > on the same machine.
>  > 
>  > I get the following error when running 'make':
>  > 
>  > 
>  > 
>  > gcc -c  -I/home/project/yaz-3.0.10/local/include
-DYAZ_HAVE_XML2=1 
>  > -DYAZ_HAVE_XSLT=1 -I/usr/include/libxml2 
-fno-strict-aliasing -pipe 
>  > -I/usr/local/include -D_LARGEFILE_SOURCE
-D_FILE_OFFSET_BITS=64 -O 
>  > -DVERSION="1.07" 
-DXS_VERSION="1.07" -fPIC 
>  >
"-I/home/project/perl5.8.8/lib/5.8.8/sun4-solaris/CORE&
quot;   SimpleServer.c
>  > SimpleServer.xs: In function `apt2perl':
>  > SimpleServer.xs:428: parse error before `*'
>  > SimpleServer.xs:431: `c' undeclared (first use in
this function)
>  > SimpleServer.xs:431: (Each undeclared identifier
is reported only once
>  > SimpleServer.xs:431: for each function it appears
in.)
>  > SimpleServer.xs:432: `son' undeclared (first use
in this function)
>  > *** Error code 1
>  > make: Fatal error: Command failed for target
`SimpleServer.o'
> 
> Yeesh!  The line in question is a simple declaration:
> 	Z_ComplexAttribute *c = elem->value.complex;
> This in a function that's already been happily slinging
around other
> YAZ types such as Z_AttributesPlusTerm and
Z_AttributeElement.  That
> should be working just fine.
> 
> All I can think of is that the assert() on the previous
line -- which
> I think is new in SimpleServer 10.7 -- might be getting
expanded in
A statement before a declaration is a no-go on older
compilers. I can't 
see whether this was introduced in 1.0.6 or 1.0.7 because
there is no 
CVS tag for either version.

/ Adam

> some screwy way on Solaris.  I know it's a long-shot
but it's all I've
> got.
> 
> If you take a look at the output of
> 
>  gcc -E  -I/home/project/yaz-3.0.10/local/include
-DYAZ_HAVE_XML2=1 
>  -DYAZ_HAVE_XSLT=1 -I/usr/include/libxml2 
-fno-strict-aliasing -pipe 
>  -I/usr/local/include -D_LARGEFILE_SOURCE
-D_FILE_OFFSET_BITS=64 -O 
>  -DVERSION="1.07" 
-DXS_VERSION="1.07" -fPIC 
> 
"-I/home/project/perl5.8.8/lib/5.8.8/sun4-solaris/CORE&
quot;   SimpleServer.c
> 
> (i.e. the same command-line that was run to compile,
but using -E
> instead of -c) then that might give you a clue.  If
not, email it to
> me and I'll take a look.
> 
>  _/|_	
____________________________________________________________
_______
> /o ) /  Mike Taylor    <mikeindexdata.com>    http://www.miketaylor.or
g.uk
> )_v__/  "I have challenged the entire quality
assurance team to a
> 	 Bat-Leth contest.  They will not concern us
again." -- Klingon
> 	 Programming Mantra
> 
> 
> _______________________________________________
> Net-z3950 mailing list
> Net-z3950lists.indexdata.dk
> http://lists.indexdata.dk/cgi-bin/mailman/listinfo/n
et-z3950
> 
> 


_______________________________________________
Net-z3950 mailing list
Net-z3950lists.indexdata.dk
http://lists.indexdata.dk/cgi-bin/mailman/listinfo/n
et-z3950

Re: Error compiling SimpleServer 1.07
user name
2007-09-10 06:21:44
Adam Dickmeiss writes:
 > >  > I'm trying to compile SimpleServer 1.07
against yaz version
 > >  > 3.0.10 on a solaris 2.9 system.
 > >  > [...]
 > >  > I had managed to install SimpleServer 1.05
ok against yaz
 > >  > version 2.1.48 on the same machine.
 > >  > 
 > >  > I get the following error when running
'make':
 > >  > [...]
 > >  > SimpleServer.xs: In function `apt2perl':
 > >  > SimpleServer.xs:428: parse error before
`*'
 > >  > SimpleServer.xs:431: `c' undeclared (first
use in this function)
 > >  > SimpleServer.xs:431: (Each undeclared
identifier is reported only once
 > >  > SimpleServer.xs:431: for each function it
appears in.)
 > >  > SimpleServer.xs:432: `son' undeclared
(first use in this function)
 > >  > *** Error code 1
 > >  > make: Fatal error: Command failed for
target `SimpleServer.o'
 >
 > A statement before a declaration is a no-go on older
compilers.

D'oh!

Adam's right.  This is a dumb mistake, which slipped through
the gaps
because GCC's default configuration is to be
"helpful" by allowing you
to write non-standard C code without getting warnings.

I fixed this and made a new SimpleServer release 1.08.  I've
uploaded
it to CPAN but since it usually takes a few hours to appear
on there,
in the mean time you can download it from a temporary
location:
	http://www.miketaylor.org.uk/tmp/Net-Z3950-Si
mpleServer-1.08.tar.gz

Enjoy.

 _/|_	
____________________________________________________________
_______
/o ) /  Mike Taylor    <mikeindexdata.com>    http://www.miketaylor.or
g.uk
)_v__/  "Actually, it's a bacteria-run planet, but
mammals are better
	 at public relations" -- Dave Unwin.


_______________________________________________
Net-z3950 mailing list
Net-z3950lists.indexdata.dk
http://lists.indexdata.dk/cgi-bin/mailman/listinfo/n
et-z3950

Re: Error compiling SimpleServer 1.07
user name
2007-09-10 09:59:32
Phil Cross writes:
 > Actually I'm still getting the same error for the
other statement 
 > mentioned in the initial error output - for
 > 
 > Z_StringOrNumeric *son
 > 
 > Fresh error message:
 > 
 > SimpleServer.xs: In function `apt2perl':
 > SimpleServer.xs:430: parse error before `*'
 > SimpleServer.xs:433: `son' undeclared (first use in
this function)
 > SimpleServer.xs:433: (Each undeclared identifier is
reported only once
 > SimpleServer.xs:433: for each function it appears
in.)
 > *** Error code 1
 > make: Fatal error: Command failed for target
`SimpleServer.o'
 > 
 > Is this the same problem?

Argh!

It is indeed the same problem.  I have now fixed this
instance of it,
too, and released SimpleServer 1.09 containing the fix.  It
will
shortly appear on CPAN; until then, you can get it from
	http://www.miketaylor.org.uk/tmp/Net-Z3950-Si
mpleServer-1.09.tar.gz

A hint to everyone else out there who devlops
"portable" Perl modules
using GCC: build your makefiles using:
	perl Makefile.PL
OPTIMIZE="-Wdeclaration-after-statement"

This will ensure that the warning option is passed through
the
invocations of GCC, so that it will let you know if you do
something
that was not standard in 1990.  (Sun's compiler has
evidently not yet
caught up with the 1999 C standard.)

 _/|_	
____________________________________________________________
_______
/o ) /  Mike Taylor    <mikeindexdata.com>    http://www.miketaylor.or
g.uk
)_v__/  "Thinking that we're getting older and wiser,
when we're just
	 getting old" -- Dave Gilmour, "Near The
End"


_______________________________________________
Net-z3950 mailing list
Net-z3950lists.indexdata.dk
http://lists.indexdata.dk/cgi-bin/mailman/listinfo/n
et-z3950

Re: Error compiling SimpleServer 1.07
user name
2007-09-10 12:00:45
Phil Cross writes:
 > Brilliant - that works fine.
 > Many thanks.
 > Phil

Our pleasure -- all included in the service 

 _/|_	
____________________________________________________________
_______
/o ) /  Mike Taylor    <mikeindexdata.com>    http://www.miketaylor.or
g.uk
)_v__/  "Light-speed isn't fast enough.  We'll have to
go straight to
	 ... Ludicrous Speed!" -- Dark Helmet,
"Spaceballs"


_______________________________________________
Net-z3950 mailing list
Net-z3950lists.indexdata.dk
http://lists.indexdata.dk/cgi-bin/mailman/listinfo/n
et-z3950

[1-6]

about | contact  Other archives ( Real Estate discussion Medical topics )