sarah-walker-pcem / pcem

PCem
http://pcem-emulator.co.uk
GNU General Public License v2.0
1.52k stars 208 forks source link

[git] Cannot build pcem from git: Could NOT find wxWidgets #133

Closed FredBezies closed 2 years ago

FredBezies commented 2 years ago

Describe the bug Hello.

I'm trying to build pcem using git code and after migrating from meson to cmake on Archlinux.

Here is my cmake line:

cmake -G "Ninja" -DCMAKE_BUILD_TYPE=Release -DUSE_NETWORKING=ON -DUSE_PCAP_NETWORKING=ON -DUSE_ALSA=ON -DPLUGIN_ENGINE=ON ..

To Reproduce Steps to reproduce the behavior:

  1. Grab latest git code
  2. Use cmake line from details
  3. Wait a little...

Expected behavior Build process going on.

Error log:

CMake Error at /usr/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:230 (message):
  Could NOT find wxWidgets (missing: wxWidgets_LIBRARIES
  wxWidgets_INCLUDE_DIRS)
Call Stack (most recent call first):
  /usr/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:594 (_FPHSA_FAILURE_MESSAGE)
  /usr/share/cmake/Modules/FindwxWidgets.cmake:1025 (find_package_handle_standard_args)
  CMakeLists.txt:114 (find_package)
michael-manley commented 2 years ago

Is this package installed? https://archlinux.org/packages/extra/x86_64/wxgtk3/

FredBezies commented 2 years ago

Is this package installed? https://archlinux.org/packages/extra/x86_64/wxgtk3/

Yes, it is as a dependency from another package.

pacman -Qi wxgtk3 | grep Installed
Installed Size  : 15,08 MiB
Install Reason  : Installed as a dependency for another package
michael-manley commented 2 years ago

This isn't a PCem bug more like a CMake/Arch bug

I see they call the wx-config app wx-config-gtk3, CMake won't see that.

You can try -DWX_CONFIG=wx-config-gtk3 if that dont work you can symlink /usr/bin/wx-config-gtk3 to /usr/bin/wx-config

FredBezies commented 2 years ago

Thanks for the feedback. I try downgrading cmake to the previous version, but still the same bug with both cmake 3.23.1-1 and 3.23.0-1.

Last time I build successfully was right before you switch from meson to cmake. Adding -DWX_CONFIG=wx-config-gtk3 doesn't work :(

I tried to push a modified version of wxgtk3 with the missing /usr/bin/wx-config but it was conflicting with all the other wxgtk packages.

Adding a symlink is not the right way to go. As the maintainer of pcem-git on AUR, I need to find a way to fix wxgtk cmake detection.

A long way to go :(

michael-manley commented 2 years ago

@FredBezies Ok looking into the code, its actually an environment varable, so its

export WX_CONFIG=wx-config-gtk3

image

FredBezies commented 2 years ago

@FredBezies Ok looking into the code, its actually an environment varable, so its

export WX_CONFIG=wx-config-gtk3

It fixes the building bug, but I have a coredump while using it. Bug report coming soon.