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

Missing wxWidgets_LIBRARIES #1947

Closed
2 of 9 tasks
DrCox1911 opened this issue Jan 22, 2019 · 9 comments
Closed
2 of 9 tasks

Missing wxWidgets_LIBRARIES #1947

DrCox1911 opened this issue Jan 22, 2019 · 9 comments
Assignees
Labels
doc documentation related linux related to Linux platforms
Milestone

Comments

@DrCox1911
Copy link

Describe the bug
I can't build MMEX v.1.3.3 on Ubuntu Budgie 18.10 because of missing wxWidget libraries.
I installed all wxWidget packets from my distro ppa but still get the following error when trying to build it:

/opt/moneymanagerex/build$ sudo cmake -DCMAKE_BUILD_TYPE=Release ..
CMake Error at /usr/share/cmake-3.12/Modules/FindPackageHandleStandardArgs.cmake:137 (message):
  Could NOT find wxWidgets (missing: wxWidgets_LIBRARIES core qa html xml aui
  adv stc webview base) (Required is at least version "2.9.2")
Call Stack (most recent call first):
  /usr/share/cmake-3.12/Modules/FindPackageHandleStandardArgs.cmake:378 (_FPHSA_FAILURE_MESSAGE)
  util/FindwxWidgets.cmake:997 (find_package_handle_standard_args)
  CMakeLists.txt:242 (FIND_PACKAGE)


-- Configuring incomplete, errors occurred!

Your OS:

  • Windows
  • Mac OSX
  • Linux
  • Android -> please report bugs to moneymanagerex/android-money-manager-ex repo!

MMEX version:

  • 1.4.x
  • 1.3.x
  • 1.2.x
  • 1.1 or older
  • development version (git master branch)
@slodki slodki added the linux related to Linux platforms label Jan 22, 2019
@slodki slodki added this to backlog in Build tools & CI Feb 3, 2019
@CrysK
Copy link

CrysK commented Feb 6, 2019

Same problem here, at Ubuntu 18.04.1 LTS

@slodki slodki self-assigned this Feb 20, 2019
@slodki slodki added this to the v1.3.3 milestone Feb 20, 2019
@slodki
Copy link
Contributor

slodki commented Feb 20, 2019

You can use Snap Store to install MMEX 1.3.3.

@slodki
Copy link
Contributor

slodki commented Mar 3, 2019

Ubuntu build instructions for v1.3.x updated and tested.

@slodki slodki closed this as completed Mar 3, 2019
@slodki slodki added the doc documentation related label Mar 3, 2019
@slodki slodki moved this from backlog to released in Build tools & CI Mar 3, 2019
@ghost
Copy link

ghost commented Apr 25, 2019

I had the same issue in Ubuntu bionic with current master branch. To understand why this fails, go to util/FindwxWidgets.cmake:164 and uncomment the debug messages, then run cmake again.

In my case I get:
util/FindwxWidgets.cmake(170): wxWidgets not found due to following missing libraries: wx_gtk2u_webview-3.0

Ubuntu bionic doesn't ship wx_gtk2u_webview-3.0 library (it does however include wx_gtk3u_webview-3.0), but wx-config is telling cmake to use it (check the output of /usr/bin/wx-config --debug=no --libs webview). The issue for me was that wx-config was set to gtk2, but I also have installed gtk3.

You can change the wx-config symlink to the gtk3 one running:
sudo update-alternatives --config wx-config
and selecting the right option.
For some reason, the gtk3 one has a lower priority on Ubuntu =/. If you don't want to change the wx-config default system-wide, you can also tell cmake to use a specific version just for this project, on Ubuntu 18.04 this would be:

cmake .. -DwxWidgets_CONFIG_EXECUTABLE=/usr/lib/x86_64-linux-gnu/wx/config/gtk3-unicode-3.0

@slodki , given that in the instructions you expect gtk3 to be installed, wouldn't it make sense to check that wx-config --selected-config returns gtk3 version? maybe a better error message.

@slodki
Copy link
Contributor

slodki commented Apr 28, 2019

There is an official way to select a build of wxWidgets installed from wx-config:

If multiple builds of wxWidgets are available, you can use the options
--prefix, --host, --toolkit, --unicode, --static, --universal or --version
to select from them. The --selected-config option shows the name of the
current configuration and --list shows available alternatives which match
specified criteria. The --utility option returns the correct version of
UTIL to use with the selected build. The --linkdeps option returns only
static libraries for your makefile link rule dependencies.

You can list available versions with wx-config --list command then pass selected version to CMake with cmake -DwxWidgets_CONFIG_OPTIONS=--toolkit=gtk3 ..

No need to mess with update-alternatives or manually call config script.

@iosabi MMEX can be build with different wxW versions and gtk3 is not required. I've already added detailed error message about missing components to FindwxWidgets.cmake but for Windows only. There is no easy way to diagnose exact missing component for a Unix environment (wx-config tool operates on set of libraries).

@slodki
Copy link
Contributor

slodki commented Apr 28, 2019

@iosabi Can you test changes from #2159?

@ghost
Copy link

ghost commented Apr 28, 2019

I tried 6d43186 and without passing any options to cmake I get:

CMake Error at /usr/share/cmake-3.10/Modules/FindPackageHandleStandardArgs.cmake:137 (message):
  Could NOT find wxWidgets (missing: webview) (found suitable version
  "3.0.4", minimum required is "2.9.2")

Passing either wxWidgets_CONFIG_EXECUTABLE or wxWidgets_CONFIG_OPTIONS as you suggested will solve this problem... however I'm not sure the error message makes a lot of sense with that commit: It says that a module is missing but that also found a suitable version 3.0.4 which is higher than the minimum required. At least now googling for that error message will reference this bug which explains the solution.

@slodki
Copy link
Contributor

slodki commented Apr 28, 2019

(found suitable version "3.0.4", minimum required is "2.9.2")

... should be better but this is not generated by FindwxWidgets.cmake

There is more use-cases like missing unidentified component (how to print it's name?) or optional components silently ignored. I don't know if this should be merged in upsream CMake version.

@Fenrihr
Copy link

Fenrihr commented Apr 21, 2020

I found the solution (for me) in the Dockerfile for Archlinux of MoneyManagerEx 1.4.0 branch:

# fix broken wxgtk3
sudo ln -sf /usr/bin/wx-config{-gtk3,} || true

OS: Manajaro Linux (Archlinux) 19.0.2
MMX Version: 1.3.4

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
doc documentation related linux related to Linux platforms
Projects
Development

No branches or pull requests

4 participants