MapServer going mobile on Zaurus
blaise
bpicinbono at WORLDONLINE.FR
Thu Mar 24 22:22:53 PST 2005
Le vendredi 25 Mars 2005 05:32, blaise a écrit :
> Hi,
> I would have like to post this on the devel list but I can't. (I'm often
> lost with sucribtion proccess...sorry)
>
> Well, I hope I'm close to it. I got a Zaurus sl-5500 recently to try to put
> MapServer inside.
>.........
>.........
> MapServer finds the libs at configure and build time. I am still missing
> the libtiff devel package, but I should get it or I will try to build it.
> The configure pass seems to go smoothly, I can join the output if needed;
> but I get a strange kind of errors at build :
>
> ./libmap.a(mapstring.o): In function 'trimLeft':
> mapstring.o(.text+0x258): undefined reference to '__ctype_b'
> ./libmap.a(mapstring.o): In function 'MSEncodeUrl':
> mapstring.o(.text+0x98c): undefined reference to '__ctype_b'
> ./libmap.a(mapstring.o): In function 'hash':
> maphash.o(.text+0x98): undefined reference to '__ctype_tolower'
> collect2: ld returned 1 exit status
> make: *** [shp2img] Error 1
>
Now it build fine !
I found a trick in a kind of RedHat bugzilla. But fully applied, it gave other
errors, so I just kept what was needed... I'ld like to know it what I did
could corrupt MapServer :
In both files mapstrinc.c and maphash.c, I added a line at the very begining,
just after this one :
#include <ctype.h>
For mapstring.c, I added this line :
__const unsigned short int *__ctype_b;
and for maphash.c, this one :
__const __int32_t *__ctype_tolower;
Can this mess up MapServer ?
This is the trick (and warnings) from RedHat (not at all related to
MapServer) :
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Customer Fix
-------------
We used a brute force approach. Make the following code into
a .c file, and include it in your program. At the start of
main(), call ctSetup().
Make sure you compile statically or else the dynamic loader will
cause problems.
I've seen others use macros, but this worked good enough for us...
#include <ctype.h>
__const unsigned short int *__ctype_b;
__const __int32_t *__ctype_tolower;
__const __int32_t *__ctype_toupper;
void ctSetup()
{
__ctype_b = *(__ctype_b_loc());
__ctype_toupper = *(__ctype_toupper_loc());
__ctype_tolower = *(__ctype_tolower_loc());
}
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
A / Will the dynamic loader (?) cause problem ?
B / They are talking about puting that in a start script. If MapServer don't
run into troubles with this fix, would it be better to put it in a start
script ? and then, where ?
Now I can't wait, I'm going to install Apache, a browser and custom the Itasca
demo :p
Blaise
More information about the MapServer-users
mailing list