Menu

Compiling on Linux (Xenial)

Help
2016-05-15
2016-05-16
  • Matt Considine

    Matt Considine - 2016-05-15

    Hi,
    I'm not sure if this question should go to the development list or not, so apologies if this is put here in error.

    I am trying to compile from source on Linux Xenial (32 bit) and running into a problem. All the dependencies are available and the cmake stage works fine. During "make" however, I get the following :

    /home/matt/Downloads/gnudatalanguage/gdl/src/gdlpsstream.cpp:159:272: warning: format ‘%ld’ expects argument of type ‘long int’, but argument 4 has type ‘PLINT {aka int}’ [-Wformat=]
    [ 46%] Building CXX object src/CMakeFiles/gdl.dir/gdlpython.cpp.o
    [ 46%] Building CXX object src/CMakeFiles/gdl.dir/gdlsvgstream.cpp.o
    [ 47%] Building CXX object src/CMakeFiles/gdl.dir/gdlwidget.cpp.o
    /home/matt/Downloads/gnudatalanguage/gdl/src/gdlwidget.cpp: In constructor ‘GDLWidgetTable::GDLWidgetTable(WidgetIDT, EnvT, DByteGDL, DStringGDL, DByteGDL, DByteGDL, DStringGDL, int, DLongGDL, DStringGDL, bool, DByteGDL, DStringGDL, DStringGDL, bool, bool, bool, bool, DLongGDL, DStringGDL, BaseGDL, DLong, DLong, DStringGDL, DULong)’:
    /home/matt/Downloads/gnudatalanguage/gdl/src/gdlwidget.cpp:1510:67: error: ‘class gdlGrid’ has no member named ‘GetColumnWidth’
    for (SizeT i=0; i< numCols ; ++i) fullsizex+=(i<grid_ncols)?grid->GetColumnWidt
    ^
    /home/matt/Downloads/gnudatalanguage/gdl/src/gdlwidget.cpp:1515:58: error: ‘class gdlGrid’ has no member named ‘GetColumnWidth’
    for (SizeT i=0; i< grid_ncols ; ++i) visiblesizex+=grid->GetColumnWidth(i);
    ^
    /home/matt/Downloads/gnudatalanguage/gdl/src/gdlwidget.cpp:1529:62: error: ‘class gdlGrid’ has no member named ‘GetColumnWidth’
    for (SizeT i=0; i< x_scroll_size ; ++i) scr_sizex+=grid->GetColumnWidth(i);
    ^
    /home/matt/Downloads/gnudatalanguage/gdl/src/gdlwidget.cpp:1551:28: error: ‘class gdlGrid’ has no member named ‘GetColumnWidth’
    grid->SetScrollLineX(grid->GetColumnWidth(0));
    ^
    src/CMakeFiles/gdl.dir/build.make:1214: recipe for target 'src/CMakeFiles/gdl.dir/gdlwidget.cpp.o' failed
    make[2]: [src/CMakeFiles/gdl.dir/gdlwidget.cpp.o] Error 1
    CMakeFiles/Makefile2:124: recipe for target 'src/CMakeFiles/gdl.dir/all' failed
    make[1]:
    [src/CMakeFiles/gdl.dir/all] Error 2
    Makefile:138: recipe for target 'all' failed
    make:
    ** [all] Error 2
    matt@matt-Studio-1749:~/Downloads/gnudatalanguage/gdl/build$

    It is not the first warning that I am concerned about but the "'class gdlGrid' has no member" part. That would suggest some code is either not present (hard for me to believe) or has not been properly compiled in. Yet there are no errors up to this point and the ony warnings related to "int" datatypes or deprecated Numpy API calls.

    Does anyone have any suggestions as to how to fix this? I've searched the discussion archive and do not find any issue related to this.

    Thanks in advance,
    Matt

     
    • giloo

      giloo - 2016-05-16

      Hello,
      This is a bug. Indeed I was not aware that GetColumnWidth has been obsoleted at some point. On my 3.1 it still passes. I've patched the cvs version which should compile now. Thanks for the report.

       
  • Matt Considine

    Matt Considine - 2016-05-15

    I am now guessing this has something to do with the version of wxWidgets being called. The cmake routine seems to want to take the default (v 3.1) even though the older v 2.8 has been built, installed and referenced on the cmake command line. But looking at the resulting Cmake cache file still shows references to 3.1 libraries.

     
    • GregJung

      GregJung - 2016-05-16

      Hi Matt,
      You should be able to get there with your Linux system, now the wxwidgets code is a mixture of wx on gtk, plplot wxWidgets driver, and the GDL code. wx(gtk) is a slow-moving target and any version should work, but plplot/wxwidgets has gone through a metamorphosis of sorts in the past few years. The default build of plplot should be version 5.11.1 but the GDLwidget code is not caught up with the plplot re-work and you should use plplot built using Cmake option -DOLD_WXWIDGETS=ON.
      Actually since in linux, the shared libraries can be located off the path, you can leave whatever system installation alone and make a custom plplot build. Building plplot will take only a few seconds of computer time.

         cmake -DCMAKE_INSTALL_PREFIX=/d/bld/gdl/plplotlinux  \
      -DENABLE_DYNDRIVERS=OFF -DDEFAULT_NO_CAIRO_DEVICES=ON \
      -DDEFAULT_NO_QT_DEVICES=ON \
      -DDEFAULT_NO_BINDINGS=ON -DENABLE_cxx=ON \
      -DENABLE_wxwidgets=ON -DOLD_WXWIDGETS=ON \
      -DWITH_FREETYPE=OFF \
      -DPLD_pdf=OFF -DPLD_psttf=OFF \
      /d/bld/sources/plplot-5.11.1 >& cmake.out
      

      That's about as minimal as you can make it, then for the GDL build script:
      from the build directory (ie /d/bld/gdl/build)

      cmake -DPLPLOTDIR=/d/bld/gdl/plplotlinux /d/bld/sources/gdl-cvs \
        >& cmake.out
      

      When built this way the plplotlinux directory is hardwired into the program code and so
      moving things around would require a rebuild. I have safely used NTFS files from Linux so /d/ means the same on the linux side as in the MSYS shell. Going the other way, I found a product that works but it brought my system down.

      Greg

       

      Last edit: GregJung 2016-05-16
  • GregJung

    GregJung - 2016-05-16

    Before you get to the above problem you are getting compilation errors which I can't explain.

    Building GDL will be much faster when python is not involved (The python headers get inserted.). Until you are ready to run it from python, I'd recommend optioning that off.

    excerpting the gdlGrid definition:

    $ grep -n -A10 "class gdlGrid" /f/gdl/src/*
    grep: /f/gdl/src/antlr: Is a directory
    grep: /f/gdl/src/dll: Is a directory
    /f/gdl/src/gdlwidget.hpp:1160:class gdlGrid : public wxGrid
    /f/gdl/src/gdlwidget.hpp-1161-{
    /f/gdl/src/gdlwidget.hpp-1162-  wxWindowID GDLWidgetTableID;
    /f/gdl/src/gdlwidget.hpp-1163-public:
    /f/gdl/src/gdlwidget.hpp-1164-  gdlGrid(wxWindow* container, wxWindowID id,
    /f/gdl/src/gdlwidget.hpp-1165-      const wxPoint& pos = wxDefaultPosition,
    /f/gdl/src/gdlwidget.hpp-1166-      const wxSize& size = wxDefaultSize,
    /f/gdl/src/gdlwidget.hpp-1167-      long style = 0,
    /f/gdl/src/gdlwidget.hpp-1168-      const wxString& name = wxPanelNameStr):
    /f/gdl/src/gdlwidget.hpp-1169-  wxGrid( container, id, pos, size, style, name )
    /f/gdl/src/gdlwidget.hpp-1170-  , GDLWidgetTableID(id)
    
    $ grep -n GetColumnWidth /f/gdl/src/*
    grep: /f/gdl/src/antlr: Is a directory
    grep: /f/gdl/src/dll: Is a directory
    Binary file /f/gdl/src/gdl matches
    /f/gdl/src/gdlwidget.cpp:1510:for (SizeT i=0; i< numCols ; ++i) fullsizex+=(i<grid_ncols)?grid->GetColumnWidth(i):grid->GetDefaultColSize();
    /f/gdl/src/gdlwidget.cpp:1515:for (SizeT i=0; i< grid_ncols ; ++i) visiblesizex+=grid->GetColumnWidth(i);
    /f/gdl/src/gdlwidget.cpp:1529:    for (SizeT i=0; i< x_scroll_size ; ++i) scr_sizex+=grid->GetColumnWidth(i);
    /f/gdl/src/gdlwidget.cpp:1551:grid->SetScrollLineX(grid->GetColumnWidth(0));
    /f/gdl/src/gdlwidget.cpp:1942:DFloatGDL* GDLWidgetTable::GetColumnWidth(DLongGDL* selection){
    /f/gdl/src/gdlwidget.hpp:979:  DFloatGDL* GetColumnWidth(DLongGDL* selection=NULL);
    
     

Log in to post a comment.