dholm / homebrew-sdr

Homebrew formulas for software defined radio
76 stars 41 forks source link

error: unknown type name 'wxGLAttributes' / 'wxGLContextAttrs' #35

Open AlmightyOatmeal opened 5 years ago

AlmightyOatmeal commented 5 years ago
╭─jamie@BeefCurtainMoses  ~
╰─$ brew upgrade cubicsdr
Updating Homebrew...
==> Upgrading 1 outdated package:
dholm/sdr/cubicsdr HEAD-239f392 -> HEAD-239f392
==> Upgrading dholm/sdr/cubicsdr
==> Cloning https://github.com/cjcliffe/CubicSDR.git
Updating /Users/jamie/Library/Caches/Homebrew/cubicsdr--git
==> Checking out branch master
Already on 'master'
Your branch is up to date with 'origin/master'.
HEAD is now at b27a889 Fix #689: Wrong setAudioSampleRate code, thanks @GkvJeep
==> cmake .. -DCMAKE_C_FLAGS_RELEASE=-DNDEBUG -DCMAKE_CXX_FLAGS_RELEASE=-DNDEBUG -DCMAKE_INSTALL_PREFIX=/usr/local/Cellar/cubicsdr/HEAD-b27a889 -DCMAKE_BUILD_TYPE=R
==> make
Last 15 lines from /Users/jamie/Library/Logs/Homebrew/cubicsdr/02.make:
In file included from /tmp/cubicsdr-20181118-13847-1jfxkgi/src/AppFrame.h:21:
/tmp/cubicsdr-20181118-13847-1jfxkgi/src/visual/GainCanvas.h:24:40: error: unknown type name 'wxGLAttributes'
    GainCanvas(wxWindow *parent, const wxGLAttributes& dispAttrs);
                                       ^
In file included from /tmp/cubicsdr-20181118-13847-1jfxkgi/src/BookmarkMgr.cpp:5:
/tmp/cubicsdr-20181118-13847-1jfxkgi/src/CubicSDR.h:74:5: error: unknown type name 'wxGLContextAttrs'
    wxGLContextAttrs* GetContextAttributes();
    ^
/tmp/cubicsdr-20181118-13847-1jfxkgi/src/CubicSDR.h:191:5: error: unknown type name 'wxGLContextAttrs'
    wxGLContextAttrs *m_glContextAttributes = nullptr;
    ^
15 errors generated.
make[2]: *** [CMakeFiles/CubicSDR.dir/src/BookmarkMgr.cpp.o] Error 1
make[1]: *** [CMakeFiles/CubicSDR.dir/all] Error 2
make: *** [all] Error 2

If reporting this issue please do so at (not Homebrew/brew or Homebrew/core):
https://github.com/dholm/homebrew-sdr/issues

These open issues may also help:
cubicsdr install fail " unknown type freqdem" https://github.com/dholm/homebrew-sdr/issues/11
Install of CubicSDR (still) fails on OS X 10.11.6 iMac 7,1 https://github.com/dholm/homebrew-sdr/issues/27
╭─jamie@BeefCurtainMoses  ~
╰─$ brew info wxmac
wxmac: stable 3.0.4 (bottled), HEAD
Cross-platform C++ GUI toolkit (wxWidgets for macOS)
https://www.wxwidgets.org
/usr/local/Cellar/wxmac/3.0.3.1_1 (810 files, 23.7MB)
  Poured from bottle on 2018-02-14 at 18:05:21
/usr/local/Cellar/wxmac/3.0.4_1 (813 files, 23.8MB)
  Poured from bottle on 2018-08-20 at 09:53:09
From: https://github.com/Homebrew/homebrew-core/blob/master/Formula/wxmac.rb
==> Dependencies
Required: jpeg ✔, libpng ✔, libtiff ✔
==> Options
--with-static
    build static libraries
--with-stl
    use standard C++ classes for everything
--HEAD
    Install HEAD version
==> Analytics
install: 15,962 (30 days), 56,239 (90 days), 234,323 (365 days)
install_on_request: 1,094 (30 days), 4,004 (90 days), 16,515 (365 days)
build_error: 0 (30 days)
╭─jamie@BeefCurtainMoses  ~
╰─$ brew --version
Homebrew 1.8.2
Homebrew/homebrew-core (git revision 50c4a; last commit 2018-11-17)
Homebrew/homebrew-cask (git revision 8b54f; last commit 2018-11-18)
╭─jamie@BeefCurtainMoses  ~
╰─$ sw_vers
ProductName:    Mac OS X
ProductVersion: 10.14.1
BuildVersion:   18B75
╭─jamie@BeefCurtainMoses  ~
╰─$ system_profiler SPHardwareDataType
Hardware:

    Hardware Overview:

      Model Name: MacBook Pro
      Model Identifier: MacBookPro9,1
      Processor Name: Intel Core i7
      Processor Speed: 2.3 GHz
      Number of Processors: 1
      Total Number of Cores: 4
      L2 Cache (per Core): 256 KB
      L3 Cache: 6 MB
      Memory: 16 GB
      Boot ROM Version: 222.0.0.0.0
      SMC Version (system): 2.1f175
      Serial Number (system): <CENSORED>
      Hardware UUID: <CENSORED>
      Sudden Motion Sensor:
          State: Enabled
budrick commented 5 years ago

I ran into this the other day. This because more recent versions of CubicSDR depend on the wxWidgets (wxmac) development release (currently 3.1.2), and not the stable 3.0.4 that's in homebrew-core.

Because Homebrew doesn't allow dev releases in homebrew-core There's not any one fool-proof fix. All of these ones have tradeoffs:

So far I've chosen to build wxwidgets and Cubic both outside of Homebrew, but leave the other dependencies in homebrew. Again not the best, but I can get a packaged application that way at least. But even that has its problems to work around.