|
04-11-2024, 15:42
|
#1
|
Registered User
Join Date: Oct 2024
Posts: 13
|
Build problem on MacOS: "Could NOT find wxWidgets (missing: wxWidgets_LIBRARIES...)
Hi
I'm on MacOs 14.5 (M2) and trying to compile OpenCPN using these instructions:
https://opencpn-manuals.github.io/ma...v/mac-osx.html
I'm running into the following problem, that I've not been able to work around.
```
ci/generic-build-macos.sh
...
-- Could NOT find wxWidgets (missing: wxWidgets_LIBRARIES wxWidgets_INCLUDE_DIRS)
-- Could not find wxWidgets webview add-on
-- Could NOT find wxWidgets (missing: wxWidgets_LIBRARIES wxWidgets_INCLUDE_DIRS)
CMake Error at CMakeLists.txt:672 (message):
Cannot find wxWidgets, giving up.
-- Configuring incomplete, errors occurred!
```
I do have wxwidgets 3.2.6. installed (using brew):
```
% brew info wxwidgets
==> wxwidgets: stable 3.2.6 (bottled), HEAD
Cross-platform C++ GUI toolkit
https://www.wxwidgets.org
Installed
/opt/homebrew/Cellar/wxwidgets/3.2.6 (836 files, 25.7MB) *
Poured from bottle using the formulae.brew.sh API on 2024-11-04 at 11:41:02
From: https://github.com/Homebrew/homebrew...w/wxwidgets.rb
```
Any help much appreciated.
|
|
|
04-11-2024, 16:37
|
#2
|
Registered User
Join Date: Mar 2012
Location: Boston, MA
Boat: 1981 Bristol 32 Sloop
Posts: 17,996
|
Re: Build problem on MacOS: "Could NOT find wxWidgets (missing: wxWidgets_LIBRARIES..
Quinton, I did not realize you are MacOS.
I am familiar with Windows, but I wonder if you have wxwidgets on your computer and
does the environment provide the appropriate paths to it?
I am going to ask Jon Gough if he has built using MacOS.
|
|
|
04-11-2024, 17:04
|
#3
|
Registered User
Join Date: Aug 2024
Location: San Diego
Boat: Hunter 34
Posts: 3
|
Re: Build problem on MacOS: "Could NOT find wxWidgets (missing: wxWidgets_LIBRARIES..
Brew does not install things natively where they are expected to live, so when you go to compile, it isn't finding the files it expects (usually they end up under /opt/homebrew).
This post on Stack Overflow may be helpful to get it installed in a matter that would facilitate running the build in a way that CMake expects..
https://stackoverflow.com/questions/...dgets-on-a-mac
|
|
|
04-11-2024, 17:32
|
#4
|
Registered User
Join Date: Oct 2024
Posts: 13
|
Re: Build problem on MacOS: "Could NOT find wxWidgets (missing: wxWidgets_LIBRARIES..
Quote:
Originally Posted by rgleason
Quinton, I did not realize you are MacOS.
I am familiar with Windows, but I wonder if you have wxwidgets on your computer and
does the environment provide the appropriate paths to it?
I am going to ask Jon Gough if he has built using MacOS.
|
Thanks!
Yes, as I mentioned, wxwidgets is installed (using brew). wxwidgets provides a script called wx-config that identifies the locations of all it's libraries, include files etc. As far as I can gather, cmake is supposed to call wx-config, and set wxWidgets_LIBRARIES and wxWidgets_INCLUDE_DIRS accordingly. But something seems to be going wrong in that process. I'm not enough of a cmake expert to figure out exactly where it's going wrong.
Code:
% wx-config --libs
-L/opt/homebrew/lib -framework IOKit -framework Carbon -framework Cocoa -framework QuartzCore -framework AudioToolbox -framework System -framework OpenGL -lwx_osx_cocoau_xrc-3.2 -lwx_osx_cocoau_html-3.2 -lwx_osx_cocoau_qa-3.2 -lwx_osx_cocoau_core-3.2 -lwx_baseu_xml-3.2 -lwx_baseu_net-3.2 -lwx_baseu-3.2
% wx-config --cppflags
-I/opt/homebrew/lib/wx/include/osx_cocoa-unicode-3.2 -I/opt/homebrew/include/wx-3.2 -D_FILE_OFFSET_BITS=64 -DWXUSINGDLL -D__WXMAC__ -D__WXOSX__ -D__WXOSX_COCOA__
|
|
|
04-11-2024, 17:50
|
#5
|
Marine Service Provider
Join Date: Mar 2008
Posts: 7,613
|
Re: Build problem on MacOS: "Could NOT find wxWidgets (missing: wxWidgets_LIBRARIES..
Quinton...
There is nice GUI interface for CMake available for most platforms. It is called, reasonably enough, "CMake-GUI" You probably can find this on brew. I use it regularly when starting a new bare-metal build.
CMake-gui gives a much more intuitive and useful view of the CMake process. In there you will find an option to set the location of "wx-config" directly. This will then allow CMake to find the required wxWidgets headers and libs.
Good luck
Dave
|
|
|
04-11-2024, 19:15
|
#6
|
Registered User
Join Date: Oct 2024
Posts: 13
|
Re: Build problem on MacOS: "Could NOT find wxWidgets (missing: wxWidgets_LIBRARIES..
Quote:
Originally Posted by bdbcat
Quinton...
There is nice GUI interface for CMake available for most platforms. It is called, reasonably enough, "CMake-GUI" You probably can find this on brew. I use it regularly when starting a new bare-metal build.
CMake-gui gives a much more intuitive and useful view of the CMake process. In there you will find an option to set the location of "wx-config" directly. This will then allow CMake to find the required wxWidgets headers and libs.
Good luck
Dave
|
Thanks Dave
That did the trick. The locatino of wx-config was set to something really weird. I'll try to debug the scripts to figure out where the incorrect setting came from, and fix them if possible.
I've now moved onto the next build problem. For some reason cmake is trying to use MacOSX13.1.sdk, while on my system I have MacOSX12.3.sdk, MacOSX14.5.sdk and MacOSX15.1.sdk. I have no idea why MacOSX13.1.sdk is missing rom my system, or why cmake is trying to use it (other than Murphy's lay :-).
Anyhow, in the mean time I'm hacking away trying to make it all work. cmake-gui is a very useful debugging tool, as you mentioned. I'll add it to the documentation, as well as how to install it on macosx - it's not totally intuitive.
Code:
CMake Error in libs/IXWebSocket/CMakeLists.txt:
Imported target "ZLIB::ZLIB" includes non-existent path
"/Library/Developer/CommandLineTools/SDKs/MacOSX13.1.sdk/usr/include"
in its INTERFACE_INCLUDE_DIRECTORIES. Possible reasons include:
* The path was deleted, renamed, or moved to another location.
* An install or uninstall procedure did not complete successfully.
* The installation package was faulty and references files it does not
provide.
|
|
|
04-11-2024, 21:25
|
#7
|
Registered User
Join Date: May 2013
Location: NSW, Australia
Boat: Richter 42
Posts: 1,079
|
Re: Build problem on MacOS: "Could NOT find wxWidgets (missing: wxWidgets_LIBRARIES..
I don't build on macOS, I can test on it in a limited way using a virtual machine. For this platform I let circleci build the plugins and install the *.gz file if I have not put the xml in the plugins repository.
Sorry I cannot be of much help on this one.
|
|
|
04-11-2024, 21:57
|
#8
|
Registered User
Join Date: Oct 2024
Posts: 13
|
Re: Build problem on MacOS: "Could NOT find wxWidgets (missing: wxWidgets_LIBRARIES..
Quote:
Originally Posted by jongough
I don't build on macOS, I can test on it in a limited way using a virtual machine. For this platform I let circleci build the plugins and install the *.gz file if I have not put the xml in the plugins repository.
Sorry I cannot be of much help on this one.
|
Thanks Jon
When you say you let circleci build the plugins, how do I do that?
I've tried running ci/universal-build-macos.sh (for opencpn) and ci/circleci-build-macos-universal.sh (for weather_routing_pi).
Neither of those worked first time, but I have the plugin building now at least. For opencpn, I'm still stuck on the same old:
Code:
Imported target "ZLIB::ZLIB" includes non-existent path
"/Library/Developer/CommandLineTools/SDKs/MacOSX13.1.sdk/usr/include"
|
|
|
04-11-2024, 22:25
|
#9
|
Registered User
Join Date: May 2013
Location: NSW, Australia
Boat: Richter 42
Posts: 1,079
|
Re: Build problem on MacOS: "Could NOT find wxWidgets (missing: wxWidgets_LIBRARIES..
Circleci is used to build all the FE2 based plugins as neither travis nor appveyor are used anymore by this process.
If you have a macOS environment you 'should' be able to build an FE2 (this is the underlying build process for some of the plugins based on testplugin_pi) plugin by using a command prompt, set the environment variables used in the circleci.yml file and then issue/run each of the commands in the "steps:" part, ignoring those that make no sense for you environment, i.e. 'checkout', restore_cache and save_cache.
The macOS case is not covered, but there are examples in the root directory of testplugin_pi for building plugins, i.e.:
- bld.bat
- build-local-package-example.sh
- build.sh
- run-circleci-local.txt
|
|
|
04-11-2024, 23:30
|
#10
|
Registered User
Join Date: Oct 2024
Posts: 13
|
Re: Build problem on MacOS: "Could NOT find wxWidgets (missing: wxWidgets_LIBRARIES..
Quote:
Originally Posted by jongough
Circleci is used to build all the FE2 based plugins as neither travis nor appveyor are used anymore by this process.
If you have a macOS environment you 'should' be able to build an FE2 (this is the underlying build process for some of the plugins based on testplugin_pi) plugin by using a command prompt, set the environment variables used in the circleci.yml file and then issue/run each of the commands in the "steps:" part, ignoring those that make no sense for you environment, i.e. 'checkout', restore_cache and save_cache.
The macOS case is not covered, but there are examples in the root directory of testplugin_pi for building plugins, i.e.:
- bld.bat
- build-local-package-example.sh
- build.sh
- run-circleci-local.txt
|
Great! Thanks Jon. I’ll try that in the (Hawaii) morning.
|
|
|
05-11-2024, 08:47
|
#11
|
Registered User
Join Date: Mar 2012
Location: Boston, MA
Boat: 1981 Bristol 32 Sloop
Posts: 17,996
|
Re: Build problem on MacOS: "Could NOT find wxWidgets (missing: wxWidgets_LIBRARIES..
Quinton,
To get setup for Cloud services and CI:
1. You should sign up for a free opensource circleci account if possible (things have changed a bit since I did it.) https://circleci.com/ Let us know how this has changed.
2. A free opensource Cloudsmith account. See email I sent about this.
3. Send me an email with your username for Cloudsmith and I will make you a member of the OpenCPN Plugin Team which enables you to push builds to the Cloudsmith OpenCPN Plugins repository (well actually to circleci to build, then circleci deploies to cloudsmith here https://cloudsmith.io/~opencpn/repos/ , as well as to your own repository.
You have to set up the proper authorization keys to get the whole build chain to work.
The developer plugin manual has some of this (in the ShipDriver Frontend)
To find this, go to the OpenCPN wiki https://opencpn.org/wiki/dokuwiki/do...manual_plugins
At the bottom " Github Opencpn-Developer Documentation is now hosted on the github opencpn-manual account"
Developer Manual https://opencpn-manuals.github.io/ma...hisManual.html
Then find "Plugin Development" in the index, then see "Testplugin Template" and "Shipdriver Template"
The Testplugin Template Documentation is a work in progress, you are using the Testplugin Template which is the older template. Shipdriver Template Documentation has the CI details for Circleci and Cloudsmith so go to
CI Configuration https://opencpn-manuals.github.io/ma...Configure.html
You will be able to find your way from there I think.
Best
Rick
|
|
|
|
Thread Tools |
Search this Thread |
|
|
Display Modes |
Rate This Thread |
Linear Mode
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
|
Advertise Here
Recent Discussions |
|
|
|
|
|
|
|
|
|
|
|
|
Vendor Spotlight |
|
|
|
|
|