[Mapserver-users] Re: Mapscript perl

Joe Bussell joe at otsys.com
Wed Aug 27 13:01:18 EDT 2003


Greetings Roberto,
    I have taken the liberty of recasting this information request into 
the waters of the group.  I do so in the hope that any useful 
information which would come from this exchange would be known to all.

    It has been some time since I did my cygwin build.  Several things 
have changed since then.  It is my belief, certainly my hope, that the 
terrible hacks that I made to get Perl Mapscript to compile would cease 
to be required as the products mature.  I think that you are on the 
right track with compiling without the modifications to the Makefile 
that I suggested.  It may be the case that you have a working solution.

    Did you migrate the dll that you successfully created to another 
machine?  I ask this because I suspect that the cygwin.dll may be 
missing from the target box.  Cygwin compiles its guts into anything you 
build there.

    Could you provide the results of ldd on the resulting dll?  This 
should clarify where the references are and if there is any dependancy 
that was not apparent (such as to cygwin.dll).

    If anyone knows more about this please let me know.

Cordially,

Joe Bussell
www.trafficdodger.com


Roberto Bellasio wrote:
> Dear Mr. Bussel,
> I read with interest your suggestions about how to build Perl
> Mapscript under Cygwin. I followed your suggestion till point 8
> (mapscript compilation), where I get som problems.
> Inside the Makefile I indicated g++ as the linker (I found 2 LD
> inside the Makefile, and I indicated g++ for each of them), and I
> have modified the LDLOADLIBS as you suggest. At this point I did
> not find perlld.exe under /usr/local/bin, but I find perlld
> (without any extension) under /usr/bin. This last file does not
> have "driver_name" inside. Instead I found $CC = 'gcc' and I
> modified it in $CC = 'g++', but it does not seem to have any
> effect.
> If I proceed anyway with the compilation, I get the following
> messages, and a final error.
> 
> ---Start---
> gcc -c  -I/cygdrive/e/programmi/mapserver-4.0 -I/usr/local/include -I/usr/local/include -I/usr/local/include -DPERL_USE_SAFE_PUTENV -fno-strict-aliasing -DUSEIMPORTLIB -O3   -DVERSION=\"\" -DXS_VERSION=\"\"  "-I/usr/lib/perl5/5.8.0/cygwin-multi-64int/CORE"  -DIGNORE_MISSING_DATA -DUSE_EPPL -DUSE_PROJ -DUSE_PROJ_API_H -DUSE_GD_WBMP -DUSE_GD_FT -DUSE_GDAL mapscript_wrap.c
> cc1: warning: changing search order for system directory "/usr/local/include"
> cc1: warning:   as it has already been specified as a non-system directory
> mapscript_wrap.c: In function `SWIG_ConvertPtr':
> mapscript_wrap.c:394: warning: cast to pointer from integer of different size
> mapscript_wrap.c:415: warning: cast to pointer from integer of different size
> mapscript_wrap.c:418: warning: cast to pointer from integer of different size
> mapscript_wrap.c:421: warning: cast to pointer from integer of different size
> Running Mkbootstrap for mapscript ()
> chmod 644 mapscript.bs
> rm -f blib/arch/auto/mapscript/mapscript.dll
> LD_RUN_PATH="/cygdrive/e/programmi/mapserver-4.0:/usr/local/lib:/usr/lib:/lib" g++  -s -L/usr/local/lib mapscript_wrap.o  -o blib/arch/auto/mapscript/mapscript.dll  /usr/lib/perl5/5.8.0/cygwin-multi-64int/CORE/libperl.dll.a -L/cygdrive/e/programmi/mapserver-4.0 -lmap -lgd -L/usr/local/lib -lgd -L/usr/local/lib -lfreetype -lz -L/lib -lz -L/usr/local/lib -lfreetype -lz -L/lib -lz -L/usr/local/lib -lproj -L/usr/local/lib -lgdal.1.1 -lm -lstdc++ `/usr/local/bin/gdal-config --libs`
> /lib/libcygwin.a(libcmain.o)(.text+0x7c): undefined reference to `_WinMain at 16'
> collect2: ld returned 1 exit status
> make: *** [blib/arch/auto/mapscript/mapscript.dll] Error 1
> ---End---
> 
> I do not know if the warning messages are important or not, since
> I do not know the c language.
> 
> If I compile the dll without modifying the Makefile, the
> compilation succeeds, but the resulting dll cannot be used under
> Win32.
> 
> I'm wondering if you have any suggestion to solve the problem.
> 
> Thank you in advance for your time.
> 
> 
> Best regards,
> Roberto Bellasio
> 
> 





More information about the mapserver-users mailing list