Menu

SAGA build on Linux problem

MacPgmr
2013-06-24
2024-06-28
1 2 > >> (Page 1 of 2)
  • MacPgmr

    MacPgmr - 2013-06-24

    I thought I could save some time by installing Johan's (see mailing list) recent build of SAGA on Ubuntu 12.04, but when I try to run saga_cmd, it just outputs nonsense to the terminal:

    E
    E

    t

    Inconsistency detected by ld.so: dl-close.c: 759: _dl_close: Assertion `map->l_init_called' failed!

    saga_cmd itself looks okay and the size is similar to what I see on OS X:

    109864 Jun 18 16:45 /usr/bin/saga_cmd

    Perhaps the wxWidgets version is out of date? It looks like this:

    5930680 Jun 10 23:51 libwx_gtk2u_core-2.9.so.3.0.0

    But shouldn't it be using 2.9.4? That's what I've been using on OS X since Sept.

    Any ideas? Or should I just try building wxWidgets and SAGA myself?

    Thanks.

    -Phil

     
  • man_e

    man_e - 2013-06-24

    Hi Phil,

    the current trunk version of SAGA requires at least wxWidgets 2.9.4. There was a major change in the internal string handling after the 2.9.3 release. Due to the changes made SAGA cannot be built against wxWidgets 2.9.3 and older. The results are corrupted messages like the ones you are describing.
    On the SAGA repository page there are the 2.9.3 packages listed, so Johan might have built SAGA against them.

    As far as I know there are other repositories with wxWidgets 2.9.4 packages for Ubuntu available. I don't know any address at the moment.
    You can install these packages and build SAGA as usual.

    Regards,
    Manfred

     
  • MacPgmr

    MacPgmr - 2013-06-25

    Maybe someone should update the wiki for Linux.

    I was unable to find any wxWidgets 2.9.4 package for Ubuntu, so I wasted a few hours building both wxWidgets and SAGA, only to get this error when running either saga_cmd or saga_gui:

    Segmentation fault (core dumped)

    Is SAGA broken on Ubuntu?

    Thanks.

    -Phil

     
  • Volker Wichmann

    Volker Wichmann - 2013-06-25

    Feel free to improve the wiki, I've just updated the version number from 2.9 to 2.9.4

    2.9.4 packages for ubuntu 12.04 can be found here: http://codelite.org/LiteEditor/WxWidgets29Binaries

    We encounter no problems running SAGA onm 12.04 systems.

     
  • MacPgmr

    MacPgmr - 2013-06-25

    Actually, I tried the codelist site yesterday, but apt-get install gave a lot of errors about packages not found. Did you try it?

    Please indicate how you built wxWidgets. This is what I used:

    ../configure --enable-unicode --enable-debug --enable-shared --with-gtk2

    It built and installed okay, but that may not mean much.

    I also had to install gtk2 since that does not appear to be standard with Ubuntu.

    apt-get install libgtk2.0-dev

    SAGA:

    configure --enable-unicode

    although it looks like that switch is no longer recognized.

    I also tried to rip out most of the files that Johan's PPA installed. They were not even installed in the same place as what SAGA's make install uses (/usr/bin instead of /usr/local/bin and /usr/lib instead of /usr/local/lib). But doing so didn't seem to make any difference.

    Thanks.

    -Phil

     
  • MacPgmr

    MacPgmr - 2013-06-26

    I've narrowed the problems to 7 modules:

    If these are present, immediate seg fault:

    libgarden_3d_viewer.so
    libgeostatistics_kriging.so
    libpointcloud_viewer.so
    libtin_viewer.so

    If these are present, this error is output to console:

    "Inconsistency detected by ld.so: dl-close.c: 759: _dl_close: Assertion `map->l_init_called' failed!"

    libio_shapes_dxf.so
    libta_lighting.so
    libta_morphometry.so

    Any idea on what these have in common?

    Without these 7 modules, both saga_cm and saga_gui run fine.

    Thanks.

    -Phil

     
  • Volker Wichmann

    Volker Wichmann - 2013-06-26

    Regarding the first four modules: these use libsaga_gdi in order to open graphical dialogs.

    The other three modules have nothing special, AFAIK.

    I just asked my colleague, we also get the "Inconsistency detected by ld.so: dl-close.c ..." message, but it seems that this has no further impacts.

     
  • MacPgmr

    MacPgmr - 2013-07-01

    I just asked my colleague, we also get the "Inconsistency detected by ld.so: dl-close.c ..." message, but it seems that this has no further impacts.

    Here's an impact: Since this error message is output to stderr, any program that shells to saga_cmd and looks for stderr as an indication that an error has occurred, will fail as a result of this error message on Linux. So either the user of the shelling software will need to delete these 3 modules... or else somebody needs to eliminate the error message.

    Thanks.

    -Phil

     
  • Volker Wichmann

    Volker Wichmann - 2013-07-02

    Sorry, I don't have the time (right now) to have a more detailed look at this problem. But I feel that the problem is not related to SAGA itself but to a dependency of us. Ubuntu modifies libGTK, actually forking it to their needs. This causes problems for libraries which build on top of libGTK like wxWidgets, which we are using. WxWidgets and SAGA 2.1.0 run on a lot of linux distributions without problem (including previous ubuntu releases), and this is what me makes believe that there is something wrong generally. Would be great if you could dig into this problem and provide a solution. But in general, I think a calling application should rely on the return code of the application called, not on the error log.

     
  • man_e

    man_e - 2013-07-10

    Hi Angelos,

    I don't have any problems building SAGA on Fedora with wxWidgets 2.9.4 unicode packages. Since the error occurs in the string class, it could be a different configuration used to build wxWidgets? It seems the wxWidgets package you are using was built with the stl option enabled (guess from error log). I don't know if SAGA can be build with against this packages with the stl option enabled, but this would my guess why the build fails.

    Regards,
    Manfred

     
  • Johan Van de Wauw

    Just want to point out that in the mean time my packages have shifted towards wxwidgets 2.9.4 (and for svn builds im experimenting with 2.9.5) and the problem was fixed.

    Apart from that, feel free to mail me if there are errors with the saga builds on linux, I'm not checking the forums regularly;

     
  • Alessandro Samuel-Rosa

    Hi all,

    Did anyone get to solve this issue?

     
  • Volker Wichmann

    Volker Wichmann - 2013-10-03

    Sorry, there are so many issues in this thread - which one do you refer to?

     
  • Johan Van de Wauw

    There is a solution here: https://sourceforge.net/p/saga-gis/bugs/171/ which I also applied to my ppa with saga binaries for ubuntu.

     
  • Anand Mahesh

    Anand Mahesh - 2024-06-18

    Hey,

    I'm trying to compile saga for linux so that i can use the python bindings for linux. I'm a bit new to this and im unable to get the desired results with the given instructions. can i please get some help on this? i dont mind helping out in return if needed

     
  • Volker Wichmann

    Volker Wichmann - 2024-06-24

    Hi,

    this is a very old thread. Which instructions to build SAGA did you follow?

    The approach described here should work out of the box.

    If it does not work for you, please provide more information on what actually fails.

    Best regards,
    Volker

     
  • Anand Mahesh

    Anand Mahesh - 2024-06-27

    Hello,

    I have mode some progress since my last post here and I have built a dockerfile which compiles saga gis for cmd use without gui on an ubuntu base image. i would like to know what additional steps i would need to perform to compile the python bindings as well.

     
  • Volker Wichmann

    Volker Wichmann - 2024-06-27

    Hi,

    installing Python (the "python-dev-is-python3" package) as dependency should be all that is needed. cmake will then detect that Python is available and automatically build the Python interface.

     
  • Anand Mahesh

    Anand Mahesh - 2024-06-27

    Respected Sir,

    I have updated my dockerfile as per your instructions. the build runs successfully. but i am not aware of where the python binding exists and how i can run the command

    from PySAGA import saga_api
    
     
  • Volker Wichmann

    Volker Wichmann - 2024-06-27

    This is more a "how to use" Docker question. A simple way to check if everything works would be to open a shell in the container, e.g.

    docker exec -it containername /bin/bash
    

    Then you can start the python console and verify the PySAGA installation, e.g.

    $ python
    
    >>> from PySAGA import saga_api
    >>> saga_api.SAGA_API_Get_Version()
    

    ... just like you would do it on any non-dockerized system.

    Of course you could also run scripts (using PySAGA) from your Dockerfile with something like

    CMD ["python myscript.py"]
    
     
  • Anand Mahesh

    Anand Mahesh - 2024-06-27

    Respected Sir.

    I apologize for the lack of proper communication from my end. i had done these steps when i posted the message. i was unable to import PySAGA

     
  • Anand Mahesh

    Anand Mahesh - 2024-06-27

    Respected Sir,

    Adding to the previous message. i would like to note that i had explored the contents of the docker container and had seen how saga_api was being imported in windows. there was a path that needed to be added to sys.path. is there a requirement to do such a thing in linux as well?

     
  • Volker Wichmann

    Volker Wichmann - 2024-06-27

    Usually this is not required on Linux as the system is configured to find these paths. What is the error message you get when you import PySAGA?

    Most likely the required "_saga_api.so" file can not be found. Check if it is available and on which path, e.g.

    /usr/lib64/python3.9/site-packages/PySAGA/_saga_api.so
    

    Then check if this path is known to Python:

    $ python
    >>> import site
    >>> print(site.getsitepackages())
    
     
  • Anand Mahesh

    Anand Mahesh - 2024-06-27

    Respected Sir,

    the output for the requested command happens to be

    ['/usr/local/lib/python3.10/dist-packages', '/usr/lib/python3/dist-packages', '/usr/lib/python3.10/dist-packages']
    

    I would also like to note that i have nothing in site-packages. the dir is missing. i would also like to note that i am using python 3.10 and i have pip installed.

     
1 2 > >> (Page 1 of 2)

Log in to post a comment.