[Zoo-discuss] Problems building zoo kernel

Gérald Fenoy gerald.fenoy at geolabs.fr
Wed Oct 3 02:18:35 PDT 2012


Hi Farkas,
sorry for late reply.

Thanks for notifying the double target which explain why I got the error message when trying to compile again the same tree… This is now fixed in trunk.

Personally I am using the Microsoft Visual Express Edition 2010 and SDKs 7.0A or 7.1. I saw that you used 6.0A but this should not cause issue I guess.

To compile the curl library I used the following command:

cd winbuild
copy ..\..\zlib-1.2.7\*.h ..\..\deps\include
nmake /f Makefile.vc mode=dll WITH_ZLIB=dll VC=10 ENALE_IDN=yes

In your case I guess that you should use VC=9 .

Note that I built zlib first using the following command:

cd zlib-1.2.7
cmake . -DCMAKE_BUILD_TYPE=Release
nmake

To build the libxml2 I used the following command:

cd \MMBK\SRCS\libxml2-2.8.0\win32\
cscript configure.js compiler=msvc zlib=yes python=yes
mkdir include
mkdir bin.msvc
copy \MMBK\SRCS\zlib-1.2.7\zconf.h include
copy \MMBK\SRCS\zlib-1.2.7\zlib.h include
copy D:\MMBK\SRCS\libiconv-win32-1.14\libiconv-win32-1.14\iconv.h include
copy \MMBK\SRCS\libiconv-win32-1.14\obj\libiconv-win32-1.14\Release_Win32\libiconv-win32-1.14.lib bin.mscv
nmake

Note that one more time I built the libiconv first. For this you can follow instructions from [1]

I hope that this will answer your question and will help you to go further.

Hope to hear back from you,
Best regards,

[1] http://www.codeproject.com/Articles/302012/How-to-Build-libiconv-with-Microsoft-Visual-Studio

Gérald Fenoy
gerald.fenoy at geolabs.fr


Le 1 oct. 2012 à 18:15, Farkas H <farkas.dus at gmail.com> a écrit :

> Hi Gérald,
> 
> thank you very much for updating the source code.
> 
> Compiling the source code of the zoo-kernel works fine.
> I got a few warning messages. The makefile.vc contains two rules for
> the target service_internal_java.obj.
> 
> Unfortunately I cannot link the .obj files because I didn't manage to
> build the required libraries.
> I was trying different ways, but I didn't manage it. Maybe it's a
> general problem with my setup?!
> I give you two examples [3], [4].
> 
> Does it make sense instead of building the required libraries, copying
> the necessary .lib files to the file-structure?
> I really appreciate any advice.
> 
> Hope to here back from you.
> 
> Thanks,
> Farkas
> 
> 
> [2]
> Curl: nmake /f Makefile.vc mode=dll
> idn_win32.obj : error LNK2019: unresolved external symbol _IdnToAscii
> referenced in function _curl_win32_idn_to_ascii
> idn_win32.obj : error LNK2019: unresolved external symbol
> _IdnToUnicode referenced in function _curl_win32_ascii_to_idn
> ..\builds\libcurl-release-dll-ipv6-sspi-winssl-obj-lib\libcurl.dll :
> fatal error LNK1120: 2 unresolved externals
> 
> [3]
> libxml2: nmake /f Makefile.msvc
> ..\include\libxml/nanoftp.h(34) : warning C4005: 'INVALID_SOCKET' :
> macro redefinition
>        C:\Program Files\Microsoft
> SDKs\Windows\v6.0A\include\winsock2.h(387) : see previous definition
> of 'INVALID_SOCKET'
> nanohttp.c
> ..\nanohttp.c(574) : error C2065: 'EINPROGRESS' : undeclared identifier
> ..\nanohttp.c(574) : error C2051: case expression not constant
> ..\nanohttp.c(581) : error C2065: 'ECONNRESET' : undeclared identifier
> ..\nanohttp.c(581) : error C2051: case expression not constant
> ..\nanohttp.c(922) : error C2065: 'EINPROGRESS' : undeclared identifier
> ..\nanohttp.c(922) : error C2051: case expression not constant
> 
> 
> 
> On 29 September 2012 16:19, Gérald Fenoy <gerald.fenoy at geolabs.fr> wrote:
>> Dear Farkas,
>> many thanks for your perseverance :)
>> 
>> First of all I would like to thanks specifically: Espen Messel, Knut Landmark and Bernd Härtwig for providing patches during their own testings in building ZOO-Kernel on Windows Platforms. I can applied their patches easily and they made my work easier by providing first feedbacks.
>> 
>> I would also like to thanks you Frakas for continuously ask for Windows support in ZOO-Project privately and even better using the ZOO-Discuss mailing list.
>> 
>> Anyway, I'm please to tell you that after long time I finally updated the SVN source tree on the official ZOO-Project SVN server to follow the developments I made some times ago. Nevertheless, as discussed with Angelos I was not able, before this morning, to run properly the Java Services but I finally succeed on that side of the ZOO-Kernel also and it successfully build (which was not the worth case finally) but *run* also successfully using the JDK-1.7.0_07.
>> 
>> About the specific requirements for running Java Services on windows platform, if you run ZOO-Kernel in 32 bits mode then ZOO-Kernel will have to fix the maximum size of the JVM to 512M (note that, following JNI instructions, we should be able togo until 1G and a bit more) using the -Xmx512M option to run initialize the JVM. Note that this will probably cause trouble to those which are requiring more than 512 M of memory to run their services, so mate we should think about a [jvm] section in main.cfg to setup all this. You will also need to define your PATH environment variable to add to it your local jdk setup, you never have to mode the jvm.dll to the  ZOO-Kernel directory else when initializing the JVM you will get error message mentioning: "Can't find dependent libraries ".
>> 
>> Note that now, you can also activate the ZOO-Kernel MapServer internal support which let you automatically publish results out of your services as WMS/WFS/WCS. As many knows on windows platforms you will need some specific parameters defined into the MapFile at the map level to define CONFIG options such as PROJ_LIB and GDAL-DATA. So to solve this issue, we added a dedicated [mapserver] section in the main.cfg which let you define all the specific options you need to set to make your MapServer setup working.
>> 
>> The tests I've run on Windows platforms was based on a ZOO-Kernel including the following support : Python, JavaScript, Java and MapServer and the tests runs successfully.
>> 
>> As you can see in the nmake.opt and following method used in GDAL and MapServer nmake.opt, we setup parameters to pass to your nmake command to add supports to your ZOO-Kernel. So, this way, Python, JavaScript, Java and MapServer are now optional and can be defined at compile time.
>> 
>> For instance, I personally used the following command line to compile the ZOO-Kernel on my windows platform:
>> 
>> nmake /f makefile.vc FCGI_DIR=\MMBK\SRCS\fcgi-2.4.1-SNAP-0311112127 INTL_DIR=\MMBK\SRCS\gettext-0.14.6\gettext-runtime\intl SSL_DIR=\MMBK\SRCS\openssl-1.0.1c CURL_DIR=D:\MMBK\SRCS\curl-7.27.0\builds\libcurl-release-dll-zlib-dll-ipv6-sspi-winssl XML2_DIR=\MMBK\SRCS\libxml2-2.8.0 ICONV_DIR=\MMBK\SRCS\libiconv-win32-1.14\libiconv-win32-1.14 PY_DIR=\MMBK\SRCS\Python-2.7.3 PY_LIBRARY=\MMBK\SRCS\Python-2.7.3\PCbuild\python27.lib MS_DIR=\MMBK\SRCS\mapserver-6.0.3 GDAL_DIR=\MMBK\SRCS\gdal-1.9.1 GD_DIR=\MMBK\SRCS\pierrejoye-gd-libgd-733361a31aab\src JS_DIR=\MMBK\SRCS\js-1.8.5\js\src JDK_DIR="c:\Program Files (x86)\Java\jdk1.7.0_07"
>> 
>> So to conclude, I think that you should start compiling the ZOO-Kernel again using the latest source code available in the official ZOO-Project SVN server and you should succeed.
>> 
>> Hope to hear back from you to know how it works on your side.
>> Best regards,
>> 
>> Gérald Fenoy
>> gerald.fenoy at geolabs.fr
>> 
>> 
>> Le 28 sept. 2012 à 16:49, Farkas H <farkas.dus at gmail.com> a écrit :
>> 
>>> Hi list,
>>> 
>>> I try to build the zoo kernel (Win7-64, MSVC9). Amongst others I got
>>> these warnings and error messages [1].
>>> It would be nice if someone could help me. I got stuck.
>>> I really appreciate any advice.
>>> 
>>> Thanks,
>>> Farkas
>>> 
>>> [1]
>>> K:\zooWPS\zoo-project\..\libs\fcgi\include\fcgio.h(53) : warning
>>> C4251: 'std::basic_streambuf<_Elem,_Traits>::_Mylock' : class
>>> 'std::_Mutex' needs to have dll-interface to be used by clients of
>>> class 'std::basic_streambuf<_Elem,_Traits>'
>>>       with
>>>       [
>>>           _Elem=char,
>>>           _Traits=std::char_traits<char>
>>>       ]
>>>       C:\Program Files (x86)\Microsoft Visual Studio
>>> 9.0\VC\INCLUDE\yvals.h(723) : see declaration of 'std::_Mutex'
>>> K:\zooWPS\zoo-project\..\libs\fcgi\include\fcgio.h(107) : warning
>>> C4996: 'std::basic_streambuf<_Elem,_Traits>::xsgetn': Function call
>>> with parameters that may be unsafe - this call relies on the caller to
>>> check that the passed values are correct. To disable this warning, use
>>> -D_SCL_SECURE_NO_WARNINGS. See documentation on how to use Visual C++
>>> 'Checked Iterators'
>>>       with
>>>       [
>>>           _Elem=char,
>>>           _Traits=std::char_traits<char>
>>>       ]
>>>       C:\Program Files (x86)\Microsoft Visual Studio
>>> 9.0\VC\INCLUDE\streambuf(323) : see declaration of
>>> 'std::basic_streambuf<_Elem,_Traits>::xsgetn'
>>>       with
>>>       [
>>>           _Elem=char,
>>>           _Traits=std::char_traits<char>
>>>       ]
>>> K:\zooWPS\zoo-project\..\libs\fcgi\include\fcgio.h(113) : warning
>>> C4275: non dll-interface class 'std::ios_base' used as base for
>>> dll-interface class 'std::basic_ios<_Elem,_Traits>'
>>>       with
>>>       [
>>>           _Elem=char,
>>>           _Traits=std::char_traits<char>
>>>       ]
>>>       C:\Program Files (x86)\Microsoft Visual Studio
>>> 9.0\VC\INCLUDE\xiosbase(195) : see declaration of 'std::ios_base'
>>> k:\zoowps\zoo-project\zoo-kernel\service.h(51) : warning C4005:
>>> 'SERVICE_PAUSED' : macro redefinition
>>>       C:\Program Files\Microsoft
>>> SDKs\Windows\v6.0A\include\winsvc.h(116) : see previous definition of
>>> 'SERVICE_PAUSED'
>>> k:\zoowps\zoo-project\zoo-kernel\service.h(154) : warning C4996:
>>> 'strdup': The POSIX name for this item is deprecated. Instead, use the
>>> ISO C++ conformant name: _strdup. See online help for details.
>>>       C:\Program Files (x86)\Microsoft Visual Studio
>>> 9.0\VC\INCLUDE\string.h(207) : see declaration of 'strdup'
>>> k:\zoowps\zoo-project\zoo-kernel\service.h(173) : warning C4996:
>>> 'stricmp': The POSIX name for this item is deprecated. Instead, use
>>> the ISO C++ conformant name: _stricmp. See online help for details.
>>>       C:\Program Files (x86)\Microsoft Visual Studio
>>> 9.0\VC\INCLUDE\string.h(215) : see declaration of 'stricmp'
>>> k:\zoowps\zoo-project\zoo-kernel\service.h(623) : warning C4996:
>>> 'strnicmp': The POSIX name for this item is deprecated. Instead, use
>>> the ISO C++ conformant name: _strnicmp. See online help for details.
>>>       C:\Program Files (x86)\Microsoft Visual Studio
>>> 9.0\VC\INCLUDE\string.h(217) : see declaration of 'strnicmp'
>>> zoo_loader.c(63) : warning C4005: 'FALSE' : macro redefinition
>>>       C:\Program Files\Microsoft
>>> SDKs\Windows\v6.0A\include\windef.h(68) : see previous definition of
>>> 'FALSE'
>>> zoo_loader.c(70) : warning C4996: 'dup2': The POSIX name for this item
>>> is deprecated. Instead, use the ISO C++ conformant name: _dup2. See
>>> online help for details.
>>>       C:\Program Files (x86)\Microsoft Visual Studio
>>> 9.0\VC\INCLUDE\io.h(309) : see declaration of 'dup2'
>>> zoo_loader.c(298) : error C3861: 'strtok_r': identifier not found
>>> zoo_loader.c(303) : error C3861: 'strtok_r': identifier not found
>>> zoo_loader.c(309) : error C3861: 'strtok_r': identifier not found
>>> zoo_loader.c(316) : error C3861: 'strtok_r': identifier not found
>>> _______________________________________________
>>> Zoo-discuss mailing list
>>> Zoo-discuss at lists.osgeo.org
>>> http://lists.osgeo.org/cgi-bin/mailman/listinfo/zoo-discuss
>> 
> _______________________________________________
> Zoo-discuss mailing list
> Zoo-discuss at lists.osgeo.org
> http://lists.osgeo.org/cgi-bin/mailman/listinfo/zoo-discuss



More information about the Zoo-discuss mailing list