Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Widgets are no longer working in Ubuntu 20.04 #749

Closed
mvandam opened this issue May 6, 2020 · 36 comments
Closed

Widgets are no longer working in Ubuntu 20.04 #749

mvandam opened this issue May 6, 2020 · 36 comments

Comments

@mvandam
Copy link

mvandam commented May 6, 2020

I recently installed GDL on Ubuntu 20.04. Whenever I try to launch widgets, I get the error message:
PLplot installation lacks the requested driver: wxwidgets

This used to work fine previously.

I have wxwidgets installed:
/usr/share/doc/libwxgtk3.0-gtk3-0v5
/usr/share/doc/libwxgtk3.0-gtk3-dev

Thanks a lot!

@mvandam
Copy link
Author

mvandam commented May 6, 2020

I should point out that I downloaded and installed GDL in the following way
sudo apt install gnudatalanguage

@alaingdl
Copy link
Contributor

alaingdl commented May 6, 2020

Just finishing compiling on u2004 the GIT version on a VM with single core :((

"test_widgets.pro" is OK for me but large amount of messages

now try the install way. I just suspect a package is missing

@alaingdl
Copy link
Contributor

alaingdl commented May 6, 2020

yes, I also have a trouble with the install version.

I suspected libplplotwxwidgets1 but it is already install

the complied version give better outputs

A.

GDL> test_widgets

*** PLPLOT ERROR, ABORTING OPERATION ***
wxPLDevice::SetDC The DC must be set before initialisation. The device is outputting to a separate viewer, aborting operation

*** PLPLOT ERROR, ABORTING OPERATION ***
error in plD_tidy_wxwidgets., aborting operation

*** PLPLOT ERROR, ABORTING OPERATION ***
wxPLDevice::SetDC The DC must be set before initialisation. The device is outputting to a separate viewer, aborting operation

*** PLPLOT ERROR, ABORTING OPERATION ***
error in plD_tidy_wxwidgets., aborting operation
% TEST_WIDGETS: can't make a CW_Bgroup widget
% TEST_WIDGETS: can't make a CW_Bgroup widget
Widget 432 is realized now.

@alaingdl
Copy link
Contributor

alaingdl commented May 6, 2020

could check wheter you have

$ dpkg -l 'plplot'

ii plplot-driver-wxwidgets:amd64 5.15.0+dfsg-12ubuntu1 amd64 Scientific plotting library (wxWidgets driver)

@mvandam
Copy link
Author

mvandam commented May 6, 2020

I was missing this plplot-driver-wxwidgets. I have now installed it and I get a whole lot of different messages, e.g.,

wxPLDevice::SetDC The DC must be set before initialisation. The device is outputting to a separate viewer, aborting operation

*** PLPLOT ERROR, ABORTING OPERATION ***
error in plD_tidy_wxwidgets., aborting operation

*** PLPLOT ERROR, ABORTING OPERATION ***
wxPLDevice::SetDC The DC must be set before initialisation. The device is outputting to a separate viewer, aborting operation

*** PLPLOT ERROR, ABORTING OPERATION ***
error in plD_tidy_wxwidgets., aborting operation

*** PLPLOT ERROR, ABORTING OPERATION ***
wxPLDevice::SetDC The DC must be set before initialisation. The device is outputting to a separate viewer, aborting operation

*** PLPLOT ERROR, ABORTING OPERATION ***
error in plD_tidy_wxwidgets., aborting operation
% Compiled module: XMANAGER.

@mvandam
Copy link
Author

mvandam commented May 6, 2020

When you say the compiled version gives better outputs, are do you mean I need to download the source from github and compile it myself? Thanks!

@alaingdl
Copy link
Contributor

alaingdl commented May 6, 2020

Yes. the problem is you not only need to download the Git version but also before you need to add a lot of packages !

$ sudo bash
# apt-get install cmake libgsl0-dev libplplot-dev libncurses-dev zlib1g-dev libpng-dev xorg-dev libreadline-dev
# apt-get install libnetcdf-dev libfftw3-dev libeigen3-dev libhdf4-alt-dev libhdf5-dev pslib-dev libgraphicsmagick++-dev libudunits2-dev plplot-driver-xwin libproj-dev
# apt-get install libwxgtk3.0-gtk3-dev
# apt-get install libgeotiff-dev libeccodes-dev libglpk-dev

assuming you already have git & gcc/g++
back to user world

$ git clone https://github.com/gnudatalanguage/gdl
$ cd gdl
$ mkdir build
$ cd build
$ cmake .. -DGRIB=off -DPYTHON=off
$ make -j 4 (or 8 or more ... up to you ;)

@mvandam
Copy link
Author

mvandam commented May 7, 2020

Thanks for the detailed instructions. On one machine, I succeed until the last step:

marcos@HP-Z820:~/Downloads/gdl/build$ make -j 4
[ 15%] Built target antlr
[ 15%] Linking CXX executable gdl
/usr/bin/ld: /usr/lib/x86_64-linux-gnu/libgtk-3.so.0: undefined reference to g_mount_operation_set_is_tcrypt_system_volume' /usr/bin/ld: /usr/lib/x86_64-linux-gnu/libgtk-3.so.0: undefined reference to g_mount_operation_set_pim'
/usr/bin/ld: /usr/lib/x86_64-linux-gnu/libSM.so: undefined reference to uuid_generate@UUID_1.0' /usr/bin/ld: /usr/lib/x86_64-linux-gnu/libgtk-3.so.0: undefined reference to g_mount_operation_set_is_tcrypt_hidden_volume'
/usr/bin/ld: /usr/lib/x86_64-linux-gnu/libSM.so: undefined reference to `uuid_unparse_lower@UUID_1.0'
collect2: error: ld returned 1 exit status
make[2]: *** [src/CMakeFiles/gdl.dir/build.make:2401: src/gdl] Error 1
make[1]: *** [CMakeFiles/Makefile2:166: src/CMakeFiles/gdl.dir/all] Error 2
make: *** [Makefile:141: all] Error 2

@mvandam
Copy link
Author

mvandam commented May 7, 2020

On the other machine, I fail here:
Make Deprecation Warning at CMakeLists.txt:22 (cmake_policy):
The OLD behavior for policy CMP0026 will be removed from a future version
of CMake.

The cmake-policies(7) manual explains that the OLD behaviors of all
policies are deprecated and that a policy should be set to OLD only under
specific short-term circumstances. Projects should be ported to the NEW
behavior and not rely on setting a policy to OLD.

-- INFO: will use GNU extensions for STDIO (useful for compressed I/O) since it seems accepted by your c++ compiler.
-- INFO: We prefer to use Readline than Editline.
Feedback welcome on OSX Readline ...
Use fuzzy detection for PLplot lib. (e.g. in /usr/lib)
-- Warning, if you have plplot version > 5.11 and wxWidgets enabled, please read carefully file README
-- Using a plplot library without private functions - workarounds will be used.
-- INFO: We prefer to use GraphicsMagick than ImageMagick
-- WARNING: Dynamic drivers may have to be disabled in plplot.
To make plplot work with ImageMagick:
use -DENABLE_DYNDRIVERS=OFF cmake option when compiling plplot or
use -DMAGICK=OFF here to not use ImageMagick in GDL.
-- Could NOT find wxWidgets (missing: wxWidgets_LIBRARIES wxWidgets_INCLUDE_DIRS)
CMake Error at CMakeLists.txt:604 (message):
wxWidgets are required but were not found.

Use -DWXWIDGETSDIR=DIR to specify the wxWidgets directory tree.

Use -DWXWIDGETS=OFF to not use it.

(suitable Debian/Ubuntu package: libwxgtk2.8-dev)

(suitable Fedora/CentOS package: wxGTK-devel)

-- Configuring incomplete, errors occurred!
See also "/home/marcos/Downloads/gdl/build/CMakeFiles/CMakeOutput.log".
See also "/home/marcos/Downloads/gdl/build/CMakeFiles/CMakeError.log".

Interestingly, I have
dpkg -l 'plplot'
dpkg-query: no packages found matching plplot
sudo apt install plplot-driver-wxwidgets
Reading package lists... Done
Building dependency tree
Reading state information... Done
plplot-driver-wxwidgets is already the newest version (5.15.0+dfsg-12ubuntu1).

@maynardGK
Copy link
Contributor

I don't have your Linux system but did find that using gtk3 (from gtk2) was a problem - probably in Manjaro - that I had to bring in the gtk2 version as there were other dependencies which used it.
Just, keep that in mind. Or, maybe I had the issue in suse:

$ grep gtk CMakeCache.txt
FIND_PACKAGE_MESSAGE_DETAILS_wxWidgets:INTERNAL=[-L/usr/lib64;-pthread;;;-lwx_baseu-3.0;-lwx_gtk2u_core-3.0;-lwx_gtk2u_adv-3.0][/usr/lib64/wx/include/gtk2-unicode-3.0;/usr/include/wx-3.0][v3.0.3()

@mvandam
Copy link
Author

mvandam commented May 7, 2020

I get the values:

FIND_PACKAGE_MESSAGE_DETAILS_wxWidgets:INTERNAL=[-L/usr/lib/x86_64-linux-gnu;-pthread;;;-lwx_baseu-3.0;-lwx_gtk3u_core-3.0;-lwx_gtk3u_adv-3.0][/usr/lib/x86_64-linux-gnu/wx/include/gtk3-unicode-3.0;/usr/include/wx-3.0][v3.0.4()]

How do I force the use of gtk2?

@alaingdl
Copy link
Contributor

alaingdl commented May 7, 2020

concerning $ dpkg -l 'plplot' you should have * inside ! $ dpkg -l '*plplot*'
Take care some names are just "links" to real packages (eg libplplotwxwidgets1 & plplot-driver-wxwidgets)

Why do you have 15% ? if you stop and restart after adding a package, it migth be a good idea to fully clean up all under build (this is why I used to do with a build/)

I have up to now no idea why it's failed. I have exactly the same values for FIND_PACKAGE_MESSAGE_DETAILS_wxWidgets

Do you have /usr/lib/x86_64-linux-gnu/libSM.so.6 -> libSM.so.6.0.1 ??
Missing symbol for you is apparently present for me
grep uuid_unparse_lower /usr/lib/x86_64-linux-gnu/libSM.so.6
Fichier binaire /usr/lib/x86_64-linux-gnu/libSM.so.6 correspondant

@maynardGK
Copy link
Contributor

maynardGK commented May 7, 2020

I get the values:

FIND_PACKAGE_MESSAGE_DETAILS_wxWidgets:INTERNAL=[-L/usr/lib/x86_64-linux-gnu;-pthread;;;-lwx_baseu-3.0;-lwx_gtk3u_core-3.0;-lwx_gtk3u_adv-3.0][/usr/lib/x86_64-linux-gnu/wx/include/gtk3-unicode-3.0;/usr/include/wx-3.0][v3.0.4()]

How do I force the use of gtk2?

If you still have the gtk2 package available, you can install gtk2 next to gtk3 without issue.
Then, you would remove the gtk3 version of wxWidgets and install the gtk2 version.
Before you do that, you should try to compile an updated plplot, using gtk3 only (I don't know how to specify gtk2 over gtk3), manually to /usr/local/usr (many fewer options are needed for GDL usage:

cmake -DCMAKE_INSTALL_PREFIX=/usr/local \
-DENABLE_DYNDRIVERS=ON \
 -DDEFAULT_NO_CAIRO_DEVICES=ON -DDEFAULT_NO_QT_DEVICES=ON \
-DDEFAULT_NO_BINDINGS=ON -DENABLE_cxx=ON -DENABLE_wxwidgets=ON \
-DOLD_WXWIDGETS=ON  \
-DPLD_pdf=OFF -DPLD_psttf=OFF

Your issue may be that plplot was built without the -DOLD_WXWIDGETS=ON flag. In that case,
simply compiling plplot as above, with gtk3 to /usr/local might fix it without tracking back to gtk2.

@mvandam
Copy link
Author

mvandam commented May 7, 2020

concerning $ dpkg -l 'plplot' you should have * inside ! $ dpkg -l 'plplot'
Take care some names are just "links" to real packages (eg libplplotwxwidgets1 & plplot-driver-wxwidgets)

Why do you have 15% ? if you stop and restart after adding a package, it migth be a good idea to fully clean up all under build (this is why I used to do with a build/)

I have up to now no idea why it's failed. I have exactly the same values for FIND_PACKAGE_MESSAGE_DETAILS_wxWidgets

Do you have /usr/lib/x86_64-linux-gnu/libSM.so.6 -> libSM.so.6.0.1 ??
Missing symbol for you is apparently present for me
grep uuid_unparse_lower /usr/lib/x86_64-linux-gnu/libSM.so.6
Fichier binaire /usr/lib/x86_64-linux-gnu/libSM.so.6 correspondant

Yes, I have the same settings.
/usr/lib/x86_64-linux-gnu/libSM.so.6 -> libSM.so.6.0.1
grep uuid_unparse_lower /usr/lib/x86_64-linux-gnu/libSM.so.6
Binary file /usr/lib/x86_64-linux-gnu/libSM.so.6 matches

I am now rebuilding from scratch each time by deleting all of the files in the build the directory.

@mvandam
Copy link
Author

mvandam commented May 7, 2020

I followed the instructions for compiling the latest version of plplot using the DOLD_WIDGETS=ON flag and then built GDL again, and now everything seems to work with this version. (I am still having issues with running GDL on the other computer because it can't find wxwidgets, but I will try to resolve them later). Thanks a lot for your help! I will summarize the procedure below, for anyone who has the same issue.

@mvandam
Copy link
Author

mvandam commented May 7, 2020

sudo bash
apt-get install cmake libgsl0-dev libplplot-dev libncurses-dev zlib1g-dev libpng-dev xorg-dev libreadline-dev
apt-get install libnetcdf-dev libfftw3-dev libeigen3-dev libhdf4-alt-dev libhdf5-dev pslib-dev libgraphicsmagick++-dev libudunits2-dev plplot-driver-xwin libproj-dev
apt-get install libwxgtk3.0-gtk3-dev
apt-get install libgeotiff-dev libeccodes-dev libglpk-dev
exit

Download pltplot (I used 5.15) from sourceforge.net. Unpack and install as follows:
mkdir build
cd build
cmake -DCMAKE_INSTALL_PREFIX=/usr/local \
-DENABLE_DYNDRIVERS=ON \
-DDEFAULT_NO_CAIRO_DEVICES=ON -DDEFAULT_NO_QT_DEVICES=ON \
-DDEFAULT_NO_BINDINGS=ON -DENABLE_cxx=ON -DENABLE_wxwidgets=ON \
-DOLD_WXWIDGETS=ON \
-DPLD_pdf=OFF -DPLD_psttf=OFF ..

make
sudo make install

Download the latest version of gdl:
git clone https://github.com/gnudatalanguage/gdl
cd gdl
mkdir build
cd build
cmake .. -DGRIB=off -DPYTHON=off
make -j 4 (or 8 or more ... up to you ;)
sudo make install

Remove the package version of gdl if installed:
sudo apt remove gnudatalanguage

Now it works! Note: I had issues with this installation on a machine that had anaconda installed as user. I got around them by doing:

sudo cmake .. -DGRIB=off -DPYTHON=off
sudo make -j 4
sudo make install

@mvandam mvandam closed this as completed May 7, 2020
@alaingdl
Copy link
Contributor

alaingdl commented May 7, 2020

Great ! Bravo ! Since I succeed using the default packages and not you, maybe we can compare the lists of packages we have ?

@mvandam
Copy link
Author

mvandam commented May 7, 2020

Great ! Bravo ! Since I succeed using the default packages and not you, maybe we can compare the lists of packages we have ?

OK, please let me know how you would like to proceed. I am happy to send you whatever you need.

@alaingdl
Copy link
Contributor

alaingdl commented May 7, 2020

list generated by $ LC_ALL=C apt list --installed > list_all_U2004.txt
is here

I think you just need to report the diff

@mvandam
Copy link
Author

mvandam commented May 7, 2020

list_all_U2004.txt

@alaingdl
Copy link
Contributor

alaingdl commented May 7, 2020

thanks ! than much differences ! I did not expected that much differences :(

on your side I saw gcc/g++ 8 and 9
which compiler is really detected on you side ? on my side, it is gcc version 9.3.0 (Ubuntu 9.3.0-10ubuntu2)

@mvandam
Copy link
Author

mvandam commented May 8, 2020

It is also gcc-9.3.0 for me.

@GillesDuvert
Copy link
Contributor

Hello, thanks to you all for being so reactive.
I'm polishing those days a new version of the GDL widgets (still based on wxWidgets of course) that is way more compatible with IDL's, especially in terms of shapes, sizes, frames, scrolling and positioning. Normally this should be independent from the troubles you describe here, that seem to be due primarily to side-effects of some unnecessary complication in the packaging of the plplot library.
Then the discussion switched to how to compile GDL from scratch, which is another topic.

Still, I am worried by this issue with GTK 2 vs. GTK3 in the basic ubuntu (debian) install of gnudatalanguage, because 'plplot-driver-wxwidgets...12ubuntu1' is linked with the GTK3 wxWidgets library. So everything should have worked fine, but did not.
I see one problem first: our (GDL) compilation procedure does not FORCE the packager to add the plplot driver in the list of dependencies of the gnudatalanguage package. How to do that?

Second, the origin of the message

*** PLPLOT ERROR, ABORTING OPERATION ***
wxPLDevice::SetDC The DC must be set before initialisation. The device is outputting to a separate viewer, aborting operation

is cured in GDL from from some time already, at least in the current 1.0rc . We see every days obscure packages being updated to new versions, so why not gdl in ubuntu?

@alaingdl
Copy link
Contributor

alaingdl commented May 8, 2020

the packaged version in u2004 is :
GDL> !gd
{ 0.9.9 Jan 25 2020 1579906800}
(but the exact pull date from Git is unclear !)
and http://manpages.ubuntu.com/manpages/focal/man1/gdl.1.html

Reading that man page, we can see we have to update it !

@maynardGK
Copy link
Contributor

Note that the issue was resolved using gtk3, it was the old_wxwidgets flag that the OP needed in a custom plplot build. I suggested gtk2 - that is how my suse system is set up (after trying gtk3 and regressing) - but I don't know now why I switch it in.

@GillesDuvert
Copy link
Contributor

My point is, how exactly do we insure distributors (ubuntu, debian..) provide all the needed dependencies in a single install package (I see that Mageia has 'Meta-Packages' that insure up-to date install of all packages needed). People need the files in gdl/resources, under Debian they are packaged separately; We need the plplot drivers (especially the wx one), and the plplot color files (even if do not use them), etc.. We must have an install script that insure that all these dependencies are fulfilled, because otherwise it would need a very devoted packager to look to it.

@alaingdl
Copy link
Contributor

in #749 (comment) we have mention of

/usr/bin/ld: /usr/lib/x86_64-linux-gnu/libSM.so: undefined reference to `uuid_generate@UUID_1.0'
/usr/bin/ld: /usr/lib/x86_64-linux-gnu/libSM.so: undefined reference to `uuid_unparse_lower@UUID_1.0'

I also had that problem at the final linking when an Anaconda environment is present in the PATH. Usually Anaconda (python) related paths are prepended to other paths, then libs. are detected in Anaconda instead of the system. Please check before compilation that you have a clean env. (PATH) without Anaconda.

@emtilt
Copy link

emtilt commented May 28, 2020

I'm having the same problems described in this thread, but I don't fully understand some of this conversation. I'm not used to using GDL, and am unfamiliar with how it works -- I need to run some legacy code with widget GUIs and am having problems with widgets errors, e.g.,

*** PLPLOT ERROR, ABORTING OPERATION ***
wxPLDevice::SetDC The DC must be set before initialisation. The device is outputting to a separate viewer, aborting operation

*** PLPLOT ERROR, ABORTING OPERATION ***
error in plD_tidy_wxwidgets., aborting operation

*** PLPLOT ERROR, ABORTING OPERATION ***
error in plD_tidy_wxwidgets., aborting operation
% Warning: Keyword parameter NO_RELEASE not supported in call to: WIDGET_BUTTON. Ignored.

(gdl:29048): Gtk-CRITICAL **: 17:16:13.635: gtk_box_gadget_distribute: assertion 'size >= 0' failed in GtkRadioButton

...among other widget- and gtk-related errors, if I allow the code to proceed.

I installed on Ubuntu 20.04, and it sounds like that might be the issue? Attempting to update GDL via sudo apt-get install gnudatalanguage yields gnudatalanguage is already the newest version (0.9.9-12build1). Is the version on the Ubuntu repository gonna get updated? Alternately, is there a straightforward guide to getting GDL working on a current Ubunutu distribution?

The other (seemingly) relevant packages I have...
Running dpkg -l '*plplot*' yields

Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name                          Version               Architecture Description
+++-=============================-=====================-============-================================================
ii  libplplot-data                5.15.0+dfsg-12ubuntu1 all          Scientific plotting library (data files)
ii  libplplot17:amd64             5.15.0+dfsg-12ubuntu1 amd64        Scientific plotting library
ii  libplplotcxx15:amd64          5.15.0+dfsg-12ubuntu1 amd64        Scientific plotting library (C++ binding)
ii  libplplotwxwidgets1:amd64     5.15.0+dfsg-12ubuntu1 amd64        Scientific plotting library (wxWidgets bindings)
un  plplot-bin                    <none>                <none>       (no description available)
un  plplot-driver-cairo           <none>                <none>       (no description available)
un  plplot-driver-gd              <none>                <none>       (no description available)
un  plplot-driver-qt              <none>                <none>       (no description available)
ii  plplot-driver-wxwidgets:amd64 5.15.0+dfsg-12ubuntu1 amd64        Scientific plotting library (wxWidgets driver)
ii  plplot-driver-xwin:amd64      5.15.0+dfsg-12ubuntu1 amd64        Scientific plotting library (X11 driver)
un  plplot-tcl                    <none>                <none>       (no description available)
un  plplot12-driver-wxwidgets     <none>                <none>       (no description available)
un  plplot12-driver-xwin          <none>                <none>       (no description available)

Running dpkg -l '*wx*' yields

Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name                             Version               Architecture Description
+++-================================-=====================-============-===========================================================================
ii  libplplotwxwidgets1:amd64        5.15.0+dfsg-12ubuntu1 amd64        Scientific plotting library (wxWidgets bindings)
un  libwxbase3.0-0                   <none>                <none>       (no description available)
ii  libwxbase3.0-0v5:amd64           3.0.4+dfsg-15build1   amd64        wxBase library (runtime) - non-GUI support classes of wxWidgets toolkit
ii  libwxbase3.1-0-unofficial:amd64  3.1.3-1.focal         amd64        wxBase library (runtime) - non-GUI support classes of wxWidgets toolkit
ii  libwxbase3.1-0-unofficial3:amd64 3.1.3-1.focal         amd64        wxBase library (runtime) - non-GUI support classes of wxWidgets toolkit
ii  libwxbase3.1-dev                 3.1.3-1.focal         amd64        wxBase library (development) - non-GUI support classes of wxWidgets toolkit
ii  libwxbase3.1unofficial3-dev      3.1.3-1.focal         amd64        wxBase library (development) - non-GUI support classes of wxWidgets toolkit
ii  libwxgtk3.0-gtk3-0v5:amd64       3.0.4+dfsg-15build1   amd64        wxWidgets Cross-platform C++ GUI toolkit (GTK 3 runtime)
ii  libwxgtk3.1-0-unofficial3:amd64  3.1.3-1.focal         amd64        wxWidgets Cross-platform C++ GUI toolkit (GTK+ runtime)
ii  libwxgtk3.1unofficial3-dev       3.1.3-1.focal         amd64        wxWidgets Cross-platform C++ GUI toolkit (GTK+ development)
ii  plplot-driver-wxwidgets:amd64    5.15.0+dfsg-12ubuntu1 amd64        Scientific plotting library (wxWidgets driver)
un  plplot12-driver-wxwidgets        <none>                <none>       (no description available)
ii  wx-common                        3.1.3-1.focal         amd64        wxWidgets Cross-platform C++ GUI toolkit (common support files)
un  wx3.1-doc                        <none>                <none>       (no description available)
ii  wx3.1-headers                    3.1.3-1.focal         amd64        wxWidgets Cross-platform C++ GUI toolkit (header files)

@mvandam
Copy link
Author

mvandam commented May 28, 2020 via email

@emtilt
Copy link

emtilt commented May 28, 2020

I've been trying that, but I'm getting stuck on compiling GDL. It ends with these errors:

-- Looking for plGetDrvDir in /usr/local/lib/libplplot.so;/usr/local/lib/libplplotcxx.so
-- Looking for plGetDrvDir in /usr/local/lib/libplplot.so;/usr/local/lib/libplplotcxx.so - found
-- WARNING: Dynamic drivers may have to be disabled in plplot.
To make plplot work with ImageMagick:
use -DENABLE_DYNDRIVERS=OFF cmake option when compiling plplot or
use -DMAGICK=OFF here to not use ImageMagick in GDL.
-- Could NOT find wxWidgets (missing: wxWidgets_LIBRARIES wxWidgets_INCLUDE_DIRS) 
CMake Error at CMakeLists.txt:561 (message):
  wxWidgets are required but were not found.

  Use -DWXWIDGETSDIR=DIR to specify the wxWidgets directory tree.

  Use -DWXWIDGETS=OFF to not use it.

  (suitable Debian/Ubuntu package: libwxgtk2.8-dev)

  (suitable Fedora/CentOS package: wxGTK-devel)


-- Configuring incomplete, errors occurred!
See also "/home/emtilt/gdl/build/CMakeFiles/CMakeOutput.log".
See also "/home/emtilt/gdl/build/CMakeFiles/CMakeError.log".

@maynardGK
Copy link
Contributor

maynardGK commented May 29, 2020

I've been trying that, but I'm getting stuck on compiling GDL. It ends with these errors:

-- Looking for plGetDrvDir in /usr/local/lib/libplplot.so;/usr/local/lib/libplplotcxx.so
-- Looking for plGetDrvDir in /usr/local/lib/libplplot.so;/usr/local/lib/libplplotcxx.so - found

This is a positive message ... indicating the main plplot library is found. If it is found in local/lib
then that is even better, indicating that you've built plplot on your system; do check now, that in this build you have set OLD_WXWIDGETS=ON on the cmake command line.

The following lines are ancient, irrelevant - not true!

-- WARNING: Dynamic drivers may have to be disabled in plplot.
To make plplot work with ImageMagick:
use -DENABLE_DYNDRIVERS=OFF cmake option when compiling plplot or
use -DMAGICK=OFF here to not use ImageMagick in GDL.

==================
The next sequence indicates that wxWidgets is not a part of the path, and so your build will not find the wxWidgets libraries that are needed to run widgets. If plplot was built with widgets they should be there, but if plplot could not find wxwidgets then it would probably build anyway without you noticing. So check the build of plplot (or re-do it) if there is a wxWidgets that it found.
(there will be a library plplotwxWidgets.so in /lib).

-- Could NOT find wxWidgets (missing: wxWidgets_LIBRARIES wxWidgets_INCLUDE_DIRS)
CMake Error at CMakeLists.txt:561 (message):
wxWidgets are required but were not found.

Use -DWXWIDGETSDIR=DIR to specify the wxWidgets directory tree.

Use -DWXWIDGETS=OFF to not use it.

(suitable Debian/Ubuntu package: libwxgtk2.8-dev)

(suitable Fedora/CentOS package: wxGTK-devel)

-- Configuring incomplete, errors occurred!
See also "/home/emtilt/gdl/build/CMakeFiles/CMakeOutput.log".
See also "/home/emtilt/gdl/build/CMakeFiles/CMakeError.log".

GDL needs libplplotwxwidgets only to put plots on widgets (WIDGET_DRAW) but for all other widgets it accesses the raw wxWidget libraries.

@emtilt
Copy link

emtilt commented May 29, 2020

Ah, you're right, thanks for the help. Plplot isn't finding wxWidgets. Unfortunately, I haven't managed to get it to do so. I think my wxWidgets isn't installed properly or something, because it seems like wx-config isn't finding a config. I'll keep fiddling, I guess. I may just have to give up on GDL -- I've spent much of a day trying to just get a working installation, and I don't seem any closer.

EDIT: Well, I got it to compile and get wxWidgets working by compiling wxWidgets from source. I could never get it working with the packages. No idea why. However, I'm not managing to get plots in widget-based windows now. I don't think I'm going to be getting this working.

@maynardGK
Copy link
Contributor

If a widget-based plot is your favorite property, then you want to try it
with the variable GDL_USE_WX" set in the invoking shell.

 GDL_USE_WX="YES" : setting this variable, the device 'X' or 'WIN' will actually be a wxWidgets device,

@emtilt
Copy link

emtilt commented May 29, 2020

Thanks for the suggestion! It didn't get the piece of old widget-based software that I needed working, unfortunately, but I''ll keep that trick in mind.

Now that I have GDL working, I think this may be a broader problem with the old code (ltools for FUSE data, last modified in 2007 or so) I'm trying to run rather than GDL itself. I haven't used IDL in about a decade, so I don't much remember how it works, but this code did work then. However, I had someone test it for me on IDL 8.5 in Windows 10, and it didn't work there either, so I suspect some aspect of how it displays plots in widgets is no longer compatible with modern IDL/GDL. Dunno, I have no idea how to debug the problem, and the code throws no errors when it runs!

@maynardGK
Copy link
Contributor

I can load the software directories ok; is there a single data set or image I can use as a test example, without becoming expert in FUSE data?

@emtilt
Copy link

emtilt commented May 29, 2020

Turns out I just didn't understand old color tables. I got it working thanks to further discussion here: https://github.com/orgs/gnudatalanguage/teams/gdlteam/discussions/10?from_comment=1

However, thanks a lot for your willingness to help (as well as that of @mvandam), too, as I never would have gotten GDL working in the first place without it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants