|
From: Rainer H. <rh...@gw...> - 2012-12-18 17:23:22
|
Am 18.12.2012 12:12 (UTC+1) schrieb Volker Wichmann:
> On 12/17/2012 10:06 PM, Rainer Hurling wrote:
>> On 17.12.2012 20:28 (UTC+2), Volker Wichmann wrote:
>>> Hi,
>>
>> Hi Volker,
>
> Hi Rainer,
>
>>
>> thanks for the info. My following comments are from the point of view of
>> the FreeBSD port maintainer of SAGA GIS.
>>
>>> we are preparing to get 2.1.0 stable and finished. I think two things
>>> should it make into 2.1.0 regarding the build system on GNU/Linux.
>>> Currently you need to configure trunk with
>>>
>>> # ./configure --enable-unicode --enable-openmp
>>>
>>> The first one --enable-unicode is now obligatory as we don't support
>>> non-unicode builds anymore. So this should be hard-wired into the build
>>> system.
>>
>> I would be fine with this. The unicode version works well and there is
>> no need to build it without unicode on FreeBSD anymore.
>
> ok, then we can do it this way.
:)
>>> With the second one --enable-openmp I'm not sure. Building with openMP
>>> will be most likely the standard today, so we could simply make it
>>> dependent on the availability of GOMP on the build system (like we do
>>> for liblas for example). On the other hand it might be more obvious to
>>> explicitly enable it instead of using it by default if available.
>>> I don't know of the consequences for package builders either - is it
>>> still interesting to prepare separate packages for systems with and
>>> without GOMP support or can we simply assume that GOMP is always
>>> available nowadays?
>>
>> I would like to see openMP support continued as an option. On FreeBSD
>> one important goal for third party software is, that they should work on
>> as most as possible supported platforms (not only x86/amd64). And some
>> of these platforms have no SMP support until now.
>
> ok, do you agree with Ben's proposal to enable it by default, but to
> provide a --disable-openmp switch?
That's the best way for the next episode I think.
>>> What do you think?
>>
>> I am also interested in the state of work of the python bindings. Is
>> there any chance to get them into 2.1.0? Or do they work again and I
>> missed it?
>
> Olaf got them building and running under windows again (there was a
> commit some weeks ago). I haven't tried under Linux since then, and I
> think that the files saga_api_to_python_linux.sh and
> saga_api_to_python_linux.py need still to be updated to reflect:
> * wxGTK 2.9.4
> * Unicode
> * and probably openMP support (if I recall correctly, I completed a
> build of the bindings but couldn't try them as the SAGA API was build
> with openMP support and the bindings not)
Looking into saga_api_to_python_linux.sh it seems there is no need for
changes. The python script saga_api_to_python_linux.py needs something
like this:
--- saga_api_to_python_linux.py.orig 2012-12-18 18:10:36.000000000 +0100
+++ saga_api_to_python_linux.py 2012-12-18 18:13:55.000000000 +0100
@@ -8,15 +8,15 @@
],
include_dirs = [
- '/usr/local/lib/wx/include/gtk2-ansi-release-2.8',
- '/usr/local/include/wx-2.8',
+ '/usr/local/lib/wx/include/gtk2-ansi-release-2.9',
+ '/usr/local/include/wx-2.9',
'./'
],
libraries = [
'pthread',
- 'wx_base-2.8',
- 'wx_gtk2_core-2.8',
+ 'wx_baseu-2.9',
+ 'wx_gtk2u_core-2.9',
'saga_api',
# '/opt/gnome/lib/pangox-1.0'
],
@@ -60,7 +60,7 @@
setup(
name = 'SAGA Python API',
- version = '0.1',
+ version = '0.2',
description = '',
ext_modules = [module1]
)
wxGTK-2.9 and unicode should be considered by these changes. I have no
clue what args are needed to get openMP into it.
>>> Volker
>>
>> Some weeks ago I wrote you about some investigations in building trunk
>> with clang (instead of gcc). clang is the succeeding system (and ports)
>> compiler for FreeBSD (from version 10.0 and upwards). As far as I know
>> this is also the case for future versions of Mac OSX (and some Linuxes)?
>>
>> One interesting advantage of clang over gcc is, that it produces much
>> more and better warnings and error messages than gcc does. This really
>> helps the FreeBSD people (and others of course) in finding so far
>> unknown problems. The biggest disadvantages for me are, that until now
>> clang does not support openMP and Fortran.
>>
>> When I try to build trunk r1572 with clang, it gives me the following
>> error (besides more than 1800 warnings):
>>
>>
>> /bin/sh ../../../../libtool --tag=CXX --mode=compile c++
>> -DHAVE_CONFIG_H -I. -I../../../.. -fPIC -I../../../../src/saga_core
>> -I/usr/include/opencv -D_SAGA_LINUX -D_TYPEDEF_BYTE -D_TYPEDEF_WORD
>> -D_SAGA_UNICODE -O2 -pipe -I/usr/local/include -fno-strict-aliasing
>> -MT opencv_morphology.lo -MD -MP -MF .deps/opencv_morphology.Tpo -c -o
>> opencv_morphology.lo opencv_morphology.cpp
>> libtool: compile: c++ -DHAVE_CONFIG_H -I. -I../../../.. -fPIC
>> -I../../../../src/saga_core -I/usr/include/opencv -D_SAGA_LINUX
>> -D_TYPEDEF_BYTE -D_TYPEDEF_WORD -D_SAGA_UNICODE -O2 -pipe
>> -I/usr/local/include -fno-strict-aliasing -MT opencv_morphology.lo -MD
>> -MP -MF .deps/opencv_morphology.Tpo -c opencv_morphology.cpp -fPIC
>> -DPIC -o .libs/opencv_morphology.o
>> In file included from opencv_morphology.cpp:62:
>> In file included from ./opencv_morphology.h:73:
>> In file included from ./opencv.h:73:
>> In file included from ./MLB_Interface.h:66:
>> In file included from ../../../../src/saga_core/saga_api/saga_api.h:117:
>> In file included from
>> ../../../../src/saga_core/saga_api/module_library.h:77:
>> In file included from ../../../../src/saga_core/saga_api/module.h:76:
>> In file included from ../../../../src/saga_core/saga_api/parameters.h:77:
>> In file included from ../../../../src/saga_core/saga_api/grid.h:77:
>> In file included from ../../../../src/saga_core/saga_api/dataobject.h:84:
>> In file included from ../../../../src/saga_core/saga_api/mat_tools.h:77:
>> In file included from ../../../../src/saga_core/saga_api/geo_tools.h:77:
>> ../../../../src/saga_core/saga_api/api_core.h:438:60: warning:
>> comparison of unsigned expression >= 0 is always true
>> [-Wtautological-compare]
>> void * Get_Entry (size_t
>> Index) const { return( Index >= 0 && Index < m_nValues ? (char
>> *)m_Values + Index * m_Value_Size : NULL ); }
>>
>> ~~~~~ ^ ~
>> opencv_morphology.cpp:224:76: error: cannot pass object of non-POD type
>> 'const CSG_String' through variadic function; call will abort at runtime
>> [-Wnon-pod-varargs]
>> pOutput->Set_Name(CSG_String::Format(SG_T("%s [%s]"),
>> pInput->Get_Name(), Get_Name()));
>>
>> ^
>> 1 warning and 1 error generated.
>> *** [opencv_morphology.lo] Error code 1
>>
>
> Seems like this was just fixed by Olaf, see
>
> : fixing warnings as reported by clang compiler, thx to rainer hurling
> http://sourceforge.net/p/saga-gis/code-0/1573/
Wow, Olaf, that's great. I just tried r1574 and clang passed this step
now, but only gets one step further before the next error occurs. It's
pretty the same one, in the next opencv file:
/bin/sh ../../../../libtool --tag=CXX --mode=compile c++
-DHAVE_CONFIG_H -I. -I../../../.. -fPIC -I../../../../src/saga_core
-I/usr/include/opencv -D_SAGA_LINUX -D_TYPEDEF_BYTE -D_TYPEDEF_WORD
-D_SAGA_UNICODE -O2 -pipe -I/usr/local/include -fno-strict-aliasing
-MT opencv_svd.lo -MD -MP -MF .deps/opencv_svd.Tpo -c -o opencv_svd.lo
opencv_svd.cpp
libtool: compile: c++ -DHAVE_CONFIG_H -I. -I../../../.. -fPIC
-I../../../../src/saga_core -I/usr/include/opencv -D_SAGA_LINUX
-D_TYPEDEF_BYTE -D_TYPEDEF_WORD -D_SAGA_UNICODE -O2 -pipe
-I/usr/local/include -fno-strict-aliasing -MT opencv_svd.lo -MD -MP -MF
.deps/opencv_svd.Tpo -c opencv_svd.cpp -fPIC -DPIC -o .libs/opencv_svd.o
opencv_svd.cpp:170:76: error: cannot pass object of non-POD type 'const
CSG_String' through variadic function; call will abort at runtime
[-Wnon-pod-varargs]
pOutput->Set_Name(CSG_String::Format(SG_T("%s [%s]"),
pInput->Get_Name(), Get_Name()));
^
1 error generated.
*** [opencv_svd.lo] Error code 1
Stop in
/usr/ports/math/saga_svn/work/saga-gis/src/modules_images/modules_opencv/opencv.
And it's likely that there are some more of them? I found this code at
least in two more places in opencv_fourier.cpp:l145+146.
As I wrote before, clang produces many many warnings, see the attached
log file. Most of them should be harmless, but some may be relevant. I
have not enough skills to evaluate this. I would really appreciate it,
if you could have a look. Of course I would be pleased to test the
changes on FreeBSD with clang and gcc.
Thanks again and greetings from Göttingen,
Rainer
> Please try again,
> thanks and best regards,
> Volker
>
>
>>
>> If you and/or the other SAGA GIS core developers are interested in the
>> full log, I could provide it of course.
>>
>> Thanks for all your work so far,
>> Rainer
|