Building MMEX on Ubuntu 20.04: wxWidgets_LIBRARIES not found by cmake

Money Manager Ex Development related posts
(http://github.moneymanagerex.org/)

Moderator: Renato

Post Reply
jensb
New MMEX User
Posts: 10
Joined: Sat Mar 19, 2022 6:05 pm
Are you a spam bot?: No

Building MMEX on Ubuntu 20.04: wxWidgets_LIBRARIES not found by cmake

Post by jensb »

Hello all,
I'm trying to build mmex on Ubuntu 20.04, which only ships with wxWidgets-3.0, which crashes in WebView often.

To keep things simple I compiled wxWidgets-3.1.5 from source as described here: https://docs.codelite.org/build/build_wx_widgets/ and took care to remove all development headers from wx-3.0. This went successfully as it seems:

Code: Select all

$ wx-config
Default config is gtk3-unicode-3.1
Default config will be used for output
However, when building mmex, the libraries aren't found:

Code: Select all

$ cmake ..
-- The C compiler identification is GNU 9.4.0
-- The CXX compiler identification is GNU 9.4.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Found Git: /usr/bin/git (found version "2.25.1") 
-- Found compile cache tool: /usr/bin/ccache (found version "3.7.7")
CMake Error at /usr/share/cmake-3.22/Modules/FindPackageHandleStandardArgs.cmake:230 (message):
  Could NOT find wxWidgets (missing: wxWidgets_LIBRARIES) (Required is at
  least version "2.9.2")
Call Stack (most recent call first):
  /usr/share/cmake-3.22/Modules/FindPackageHandleStandardArgs.cmake:594 (_FPHSA_FAILURE_MESSAGE)
  /usr/share/cmake-3.22/Modules/FindwxWidgets.cmake:1025 (find_package_handle_standard_args)
  CMakeLists.txt:296 (find_package)
The same error occurs when explicitly specifying where the `wx-config` script is located:

Code: Select all

src/moneymanagerex/build$ cmake -DCMAKE_CXX_FLAGS="-w" -DwxWidgets_CONFIG_EXECUTABLE=/usr/local/bin/wx-config -DCMAKE_BUILD_TYPE=Debug ..
CMake Error at /usr/share/cmake-3.22/Modules/FindPackageHandleStandardArgs.cmake:230 (message):
  Could NOT find wxWidgets (missing: wxWidgets_LIBRARIES) (Required is at
  least version "2.9.2")
Call Stack (most recent call first):
  /usr/share/cmake-3.22/Modules/FindPackageHandleStandardArgs.cmake:594 (_FPHSA_FAILURE_MESSAGE)
  /usr/share/cmake-3.22/Modules/FindwxWidgets.cmake:1025 (find_package_handle_standard_args)
  CMakeLists.txt:296 (find_package)
At this point I'm lost. Any help would be appreciated!
whall3y
MMEX Developer
Posts: 226
Joined: Fri Aug 21, 2020 5:44 pm
Are you a spam bot?: No

Re: Building MMEX on Ubuntu 20.04: wxWidgets_LIBRARIES not found by cmake

Post by whall3y »

I trust you are following the instructions here: https://github.com/moneymanagerex/money ... ssues/4154

Might be worth asking questions here: https://github.com/moneymanagerex/money ... ssues/4154
jensb
New MMEX User
Posts: 10
Joined: Sat Mar 19, 2022 6:05 pm
Are you a spam bot?: No

Re: Building MMEX on Ubuntu 20.04: wxWidgets_LIBRARIES not found by cmake

Post by jensb »

whall3y wrote: Sat Mar 26, 2022 7:45 pm I trust you are following the instructions here: https://github.com/moneymanagerex/money ... ssues/4154

Might be worth asking questions here: https://github.com/moneymanagerex/money ... ssues/4154
Hello,
thanks for following up.

The above issue is about SuSE, and packaging, but not CMake issues.
It contains a lot of cmake output, and a link to an Ubuntu package for 18.04, but no hints how to compile it.

My problem seems to be that `cmake` doesn't find wxWidgets, neither when using Ubuntu packages, nor when self compiling.
But I don't know where to start looking for the root cause.

I would like to get a stable build system running so I can start thinkering with the code ...
jensb
New MMEX User
Posts: 10
Joined: Sat Mar 19, 2022 6:05 pm
Are you a spam bot?: No

Re: Building MMEX on Ubuntu 20.04: wxWidgets_LIBRARIES not found by cmake

Post by jensb »

I got it to work via help by "Kenny D" on Slack: https://moneymanagerex.slack.com/archiv ... =C1FL7FJR4

Next step: get VS Code configured. https://code.visualstudio.com/docs/cpp/cmake-linux
PMaff
Super MMEX User
Posts: 54
Joined: Sun Aug 11, 2019 1:57 pm
Are you a spam bot?: No

Re: Building MMEX on Ubuntu 20.04: wxWidgets_LIBRARIES not found by cmake

Post by PMaff »

jensb wrote: Sat Mar 26, 2022 9:33 pm I got it to work via help by "Kenny D" on Slack: https://moneymanagerex.slack.com/archiv ... =C1FL7FJR4

Next step: get VS Code configured. https://code.visualstudio.com/docs/cpp/cmake-linux
Did you try the build instructions here:
https://github.com/moneymanagerex/money ... r/BUILD.md
?

There is also a section with pointer to wxWidget build.
Some hints and things that I encountered are also described here:
https://github.com/moneymanagerex/money ... 1104336216
jensb
New MMEX User
Posts: 10
Joined: Sat Mar 19, 2022 6:05 pm
Are you a spam bot?: No

Re: Building MMEX on Ubuntu 20.04: wxWidgets_LIBRARIES not found by cmake

Post by jensb »

Thank you - yes, the BUILD.md was the first thing I found. Unfortunately it still referred to wxWidgetgs-3.0 which crashed here when displaying HTML reports (known bug).
Then I tried to install wxWidgets-3.1 using the codelite repo, which resulted in dependancy hell with other programs built on wxWidgets. No go.
Then I tried to compile wxSidgets-3.1 from source, and removed all references to it in the package manager. That worked, finally (see Slack).

I looked around in the source, but decided I'm simply not C++ savvy enough to modify anything non-trivial.
So I plan to implement my wishilst* as external scripts first, see what works, and put them on Github.

* 1) automatic category assignment based on keywords, not payees, see https://github.com/moneymanagerex/money ... ssues/4268
2) automatic recurring download of transactions via standardized online API (FinTS in Europe), see https://github.com/moneymanagerex/money ... 1107906725
3) import of transactions from MacOS based iFinance software which I've been using since 2004
PMaff
Super MMEX User
Posts: 54
Joined: Sun Aug 11, 2019 1:57 pm
Are you a spam bot?: No

Re: Building MMEX on Ubuntu 20.04: wxWidgets_LIBRARIES not found by cmake

Post by PMaff »

jensb wrote: Sun Apr 24, 2022 7:54 pm Thank you - yes, the BUILD.md was the first thing I found. Unfortunately it still referred to wxWidgetgs-3.0 which crashed here when displaying HTML reports (known bug).
Then I tried to install wxWidgets-3.1 using the codelite repo, which resulted in dependancy hell with other programs built on wxWidgets. No go.
Then I tried to compile wxSidgets-3.1 from source, and removed all references to it in the package manager. That worked, finally (see Slack).

I looked around in the source, but decided I'm simply not C++ savvy enough to modify anything non-trivial.
So I plan to implement my wishilst* as external scripts first, see what works, and put them on Github.

* 1) automatic category assignment based on keywords, not payees, see https://github.com/moneymanagerex/money ... ssues/4268
2) automatic recurring download of transactions via standardized online API (FinTS in Europe), see https://github.com/moneymanagerex/money ... 1107906725
3) import of transactions from MacOS based iFinance software which I've been using since 2004
1) did you use:
https://github.com/moneymanagerex/money ... r/BUILD.md
?
There should be no wxWidget 3.0.* there but wxWidget 3.1.5.
If that is not true please just show me the text so that we can correct that.

2) If you were able to compile wxWidget 3.1.5 what does

Code: Select all

wx-config --list
on the command line say?

Normally the compilation of mmex 1.5.14 stable version with wxWidget 3.1.5 is quite easy.
If all fails try the 20.04 version here:
https://moneymanagerex.org/docs/downloads/latest/

Edit: maybe @Renato can move that into the Linux section?
User avatar
Renato
MVP MMEX User
Posts: 399
Joined: Mon Apr 25, 2011 7:36 pm
Are you a spam bot?: No
Location: near Zurich

Re: Building MMEX on Ubuntu 20.04: wxWidgets_LIBRARIES not found by cmake

Post by Renato »

@PMaff write: Edit: maybe @Renato can move that into the Linux section?
.... unfortunately the move does not work in this forum, otherwise I would have already moved some posts :roll:
regards Renato use MMEX since 2009, now with Windows 11
Post Reply