cjcliffe / CubicSDR

Cross-Platform Software-Defined Radio Application
http://www.cubicsdr.com
GNU General Public License v2.0
2.02k stars 249 forks source link

Building on MacOSX (Ventura) - CMake warning #986

Open oxoocoffee opened 1 year ago

oxoocoffee commented 1 year ago

Hello,

I am attempting to build CubicSDR-0.2.7 using cmake version 3.25.1 . After installing brew packages

I did try to run came from build/ I got this warning

-- Found OpenGL: /Library/Developer/CommandLineTools/SDKs/MacOSX13.1.sdk/System/Library/Frameworks/OpenGL.framework
CMake Warning (dev) at /opt/homebrew/Cellar/cmake/3.25.1/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:438 (message):
  The package name passed to `find_package_handle_standard_args` (LIQUID)
  does not match the name of the calling package (Liquid).  This can lead to
  problems in calling code that expects `find_package` result variables
  (e.g., `_FOUND`) to follow a certain pattern.
Call Stack (most recent call first):
  cmake/Modules/FindLiquid.cmake:20 (find_package_handle_standard_args)
  CMakeLists.txt:171 (find_package)
This warning is for project developers.  Use -Wno-dev to suppress it.

So I adjusted cmake/Modules/FindLiquid.cmake and changed it from

find_package_handle_standard_args ( LIQUID DEFAULT_MSG LIQUID_LIBRARIES LIQUID_INCLUDES)

to

find_package_handle_standard_args (Liquid DEFAULT_MSG LIQUID_LIBRARIES LIQUID_INCLUDES)

This cleared the warning. Also did fixed few other warnings as well. Here is output from make and build

MBP ➜  build git:(master) ✗ cmake ..
-- The C compiler identification is AppleClang 14.0.0.14000029
-- The CXX compiler identification is AppleClang 14.0.0.14000029
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /Library/Developer/CommandLineTools/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: /Library/Developer/CommandLineTools/usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
64 bit compiler detected
-- Found OpenGL: /Library/Developer/CommandLineTools/SDKs/MacOSX13.1.sdk/System/Library/Frameworks/OpenGL.framework
-- Found Liquid: /opt/homebrew/lib/libliquid.dylib
-- Found wxWidgets: -L/opt/homebrew/lib;;;-framework IOKit;-framework Carbon;-framework Cocoa;-framework QuartzCore;-framework AudioToolbox;-framework System;-framework OpenGL;-lwx_osx_cocoau_gl-3.2;-lwx_osx_cocoau_core-3.2;-lwx_osx_cocoau_propgrid-3.2;-lwx_baseu-3.2 (found version "3.2.1")
-- Build type not specified: defaulting to release.
-- Copying /Users/oxoocoffee/projects/github/CubicSDR/font/*.fnt to directory /Users/oxoocoffee/projects/github/CubicSDR/build/arm64/fonts
-- Configuring file vera_sans_mono12.fnt
-- Configuring file vera_sans_mono16.fnt
-- Configuring file vera_sans_mono18.fnt
-- Configuring file vera_sans_mono24.fnt
-- Configuring file vera_sans_mono27.fnt
-- Configuring file vera_sans_mono32.fnt
-- Configuring file vera_sans_mono36.fnt
-- Configuring file vera_sans_mono48.fnt
-- Configuring file vera_sans_mono64.fnt
-- Configuring file vera_sans_mono72.fnt
-- Configuring file vera_sans_mono96.fnt
-- Copying /Users/oxoocoffee/projects/github/CubicSDR/font/*.png to directory /Users/oxoocoffee/projects/github/CubicSDR/build/arm64/fonts
-- Configuring file vera_sans_mono12_0.png
-- Configuring file vera_sans_mono16_0.png
-- Configuring file vera_sans_mono18_0.png
-- Configuring file vera_sans_mono24_0.png
-- Configuring file vera_sans_mono27_0.png
-- Configuring file vera_sans_mono32_0.png
-- Configuring file vera_sans_mono36_0.png
-- Configuring file vera_sans_mono48_0.png
-- Configuring file vera_sans_mono64_0.png
-- Configuring file vera_sans_mono72_0.png
-- Configuring file vera_sans_mono96_0.png
-- Copying /Users/oxoocoffee/projects/github/CubicSDR/icon/CubicSDR.ico to directory /Users/oxoocoffee/projects/github/CubicSDR/build/arm64
-- Configuring file CubicSDR.ico
-- Configuring done
-- Generating done
-- Build files have been written to: /Users/oxoocoffee/projects/github/CubicSDR/build
MBP ➜  build git:(master) ✗ make
[  2%] Building CXX object CMakeFiles/CubicSDR.dir/src/AppFrame.cpp.o
[  3%] Building CXX object CMakeFiles/CubicSDR.dir/external/rtaudio/RtAudio.cpp.o
[  3%] Building CXX object CMakeFiles/CubicSDR.dir/src/CubicSDR.cpp.o
[  4%] Building CXX object CMakeFiles/CubicSDR.dir/src/AppConfig.cpp.o
[  5%] Building CXX object CMakeFiles/CubicSDR.dir/src/FrequencyDialog.cpp.o
[  9%] Building CXX object CMakeFiles/CubicSDR.dir/src/DemodLabelDialog.cpp.o
[  9%] Building CXX object CMakeFiles/CubicSDR.dir/src/IOThread.cpp.o
[  9%] Building CXX object CMakeFiles/CubicSDR.dir/src/ModemProperties.cpp.o
[ 10%] Building CXX object CMakeFiles/CubicSDR.dir/src/BookmarkMgr.cpp.o
[ 11%] Building CXX object CMakeFiles/CubicSDR.dir/src/SessionMgr.cpp.o
[ 12%] Building CXX object CMakeFiles/CubicSDR.dir/src/sdr/SDRDeviceInfo.cpp.o
[ 13%] Building CXX object CMakeFiles/CubicSDR.dir/src/sdr/SDRPostThread.cpp.o
[ 14%] Building CXX object CMakeFiles/CubicSDR.dir/src/sdr/SDREnumerator.cpp.o
[ 16%] Building CXX object CMakeFiles/CubicSDR.dir/src/demod/DemodulatorPreThread.cpp.o
[ 17%] Building CXX object CMakeFiles/CubicSDR.dir/src/demod/DemodulatorThread.cpp.o
[ 18%] Building CXX object CMakeFiles/CubicSDR.dir/src/demod/DemodulatorWorkerThread.cpp.o
[ 19%] Building CXX object CMakeFiles/CubicSDR.dir/src/demod/DemodulatorInstance.cpp.o
[ 20%] Building CXX object CMakeFiles/CubicSDR.dir/src/demod/DemodulatorMgr.cpp.o
[ 21%] Building CXX object CMakeFiles/CubicSDR.dir/src/modules/modem/Modem.cpp.o
[ 22%] Building CXX object CMakeFiles/CubicSDR.dir/src/modules/modem/ModemAnalog.cpp.o
[ 24%] Building CXX object CMakeFiles/CubicSDR.dir/src/modules/modem/ModemDigital.cpp.o
[ 25%] Building CXX object CMakeFiles/CubicSDR.dir/src/modules/modem/analog/ModemAM.cpp.o
[ 26%] Building CXX object CMakeFiles/CubicSDR.dir/src/modules/modem/analog/ModemCW.cpp.o
[ 27%] Building CXX object CMakeFiles/CubicSDR.dir/src/modules/modem/analog/ModemDSB.cpp.o
[ 28%] Building CXX object CMakeFiles/CubicSDR.dir/src/modules/modem/analog/ModemFM.cpp.o
[ 29%] Building CXX object CMakeFiles/CubicSDR.dir/src/modules/modem/analog/ModemNBFM.cpp.o
[ 31%] Building CXX object CMakeFiles/CubicSDR.dir/src/modules/modem/analog/ModemFMStereo.cpp.o
[ 32%] Building CXX object CMakeFiles/CubicSDR.dir/src/modules/modem/analog/ModemIQ.cpp.o
[ 33%] Building CXX object CMakeFiles/CubicSDR.dir/src/modules/modem/analog/ModemLSB.cpp.o
[ 34%] Building CXX object CMakeFiles/CubicSDR.dir/src/modules/modem/analog/ModemUSB.cpp.o
[ 35%] Building CXX object CMakeFiles/CubicSDR.dir/src/audio/AudioThread.cpp.o
[ 36%] Building CXX object CMakeFiles/CubicSDR.dir/src/audio/AudioSinkThread.cpp.o
[ 37%] Building CXX object CMakeFiles/CubicSDR.dir/src/audio/AudioSinkFileThread.cpp.o
[ 39%] Building CXX object CMakeFiles/CubicSDR.dir/src/audio/AudioFile.cpp.o
[ 40%] Building CXX object CMakeFiles/CubicSDR.dir/src/audio/AudioFileWAV.cpp.o
[ 41%] Building CXX object CMakeFiles/CubicSDR.dir/src/util/Gradient.cpp.o
[ 43%] Building CXX object CMakeFiles/CubicSDR.dir/src/util/MouseTracker.cpp.o
[ 43%] Building CXX object CMakeFiles/CubicSDR.dir/src/util/Timer.cpp.o
[ 44%] Building CXX object CMakeFiles/CubicSDR.dir/src/util/GLExt.cpp.o
[ 45%] Building CXX object CMakeFiles/CubicSDR.dir/src/util/GLFont.cpp.o
[ 47%] Building CXX object CMakeFiles/CubicSDR.dir/src/util/DataTree.cpp.o
[ 48%] Building CXX object CMakeFiles/CubicSDR.dir/src/panel/ScopePanel.cpp.o
[ 49%] Building CXX object CMakeFiles/CubicSDR.dir/src/panel/SpectrumPanel.cpp.o
[ 50%] Building CXX object CMakeFiles/CubicSDR.dir/src/panel/WaterfallPanel.cpp.o
[ 51%] Building CXX object CMakeFiles/CubicSDR.dir/src/panel/MeterPanel.cpp.o
[ 52%] Building CXX object CMakeFiles/CubicSDR.dir/src/visual/ColorTheme.cpp.o
[ 54%] Building CXX object CMakeFiles/CubicSDR.dir/src/visual/PrimaryGLContext.cpp.o
[ 55%] Building CXX object CMakeFiles/CubicSDR.dir/src/visual/InteractiveCanvas.cpp.o
[ 56%] Building CXX object CMakeFiles/CubicSDR.dir/src/visual/MeterCanvas.cpp.o
[ 57%] Building CXX object CMakeFiles/CubicSDR.dir/src/visual/MeterContext.cpp.o
[ 58%] Building CXX object CMakeFiles/CubicSDR.dir/src/visual/TuningCanvas.cpp.o
[ 60%] Building CXX object CMakeFiles/CubicSDR.dir/src/visual/ModeSelectorCanvas.cpp.o
[ 60%] Building CXX object CMakeFiles/CubicSDR.dir/src/visual/TuningContext.cpp.o
[ 62%] Building CXX object CMakeFiles/CubicSDR.dir/src/visual/ModeSelectorContext.cpp.o
[ 63%] Building CXX object CMakeFiles/CubicSDR.dir/src/visual/ScopeCanvas.cpp.o
[ 64%] Building CXX object CMakeFiles/CubicSDR.dir/src/visual/ScopeContext.cpp.o
[ 65%] Building CXX object CMakeFiles/CubicSDR.dir/src/visual/SpectrumCanvas.cpp.o
[ 66%] Building CXX object CMakeFiles/CubicSDR.dir/src/visual/WaterfallCanvas.cpp.o
[ 67%] Building CXX object CMakeFiles/CubicSDR.dir/src/visual/GainCanvas.cpp.o
[ 68%] Building CXX object CMakeFiles/CubicSDR.dir/src/visual/ImagePanel.cpp.o
[ 70%] Building CXX object CMakeFiles/CubicSDR.dir/src/process/VisualProcessor.cpp.o
[ 71%] Building CXX object CMakeFiles/CubicSDR.dir/src/process/ScopeVisualProcessor.cpp.o
[ 72%] Building CXX object CMakeFiles/CubicSDR.dir/src/process/SpectrumVisualProcessor.cpp.o
[ 73%] Building CXX object CMakeFiles/CubicSDR.dir/src/process/FFTVisualDataThread.cpp.o
[ 74%] Building CXX object CMakeFiles/CubicSDR.dir/src/process/FFTDataDistributor.cpp.o
[ 75%] Building CXX object CMakeFiles/CubicSDR.dir/src/process/SpectrumVisualDataThread.cpp.o
[ 77%] Building CXX object CMakeFiles/CubicSDR.dir/src/ui/GLPanel.cpp.o
[ 78%] Building CXX object CMakeFiles/CubicSDR.dir/src/forms/SDRDevices/SDRDevices.cpp.o
[ 79%] Building CXX object CMakeFiles/CubicSDR.dir/src/forms/SDRDevices/SDRDevicesForm.cpp.o
[ 80%] Building CXX object CMakeFiles/CubicSDR.dir/src/forms/SDRDevices/SDRDeviceAdd.cpp.o
[ 81%] Building CXX object CMakeFiles/CubicSDR.dir/src/forms/SDRDevices/SDRDeviceAddForm.cpp.o
[ 82%] Building CXX object CMakeFiles/CubicSDR.dir/src/forms/Bookmark/BookmarkPanel.cpp.o
[ 83%] Building CXX object CMakeFiles/CubicSDR.dir/src/forms/Bookmark/BookmarkView.cpp.o
[ 85%] Building CXX object CMakeFiles/CubicSDR.dir/src/forms/Dialog/ActionDialogBase.cpp.o
[ 86%] Building CXX object CMakeFiles/CubicSDR.dir/src/forms/Dialog/ActionDialog.cpp.o
[ 87%] Building CXX object CMakeFiles/CubicSDR.dir/src/forms/Dialog/AboutDialogBase.cpp.o
[ 88%] Building CXX object CMakeFiles/CubicSDR.dir/src/forms/Dialog/AboutDialog.cpp.o
[ 89%] Building CXX object CMakeFiles/CubicSDR.dir/external/lodepng/lodepng.cpp.o
[ 90%] Building CXX object CMakeFiles/CubicSDR.dir/external/tinyxml/tinyxml.cpp.o
[ 91%] Building CXX object CMakeFiles/CubicSDR.dir/external/tinyxml/tinystr.cpp.o
[ 93%] Building CXX object CMakeFiles/CubicSDR.dir/external/tinyxml/tinyxmlparser.cpp.o
[ 94%] Building CXX object CMakeFiles/CubicSDR.dir/external/tinyxml/tinyxmlerror.cpp.o
[ 95%] Building CXX object CMakeFiles/CubicSDR.dir/external/cubicvr2/math/cubic_math.cpp.o
[ 96%] Building CXX object CMakeFiles/CubicSDR.dir/src/sdr/SoapySDRThread.cpp.o
[ 97%] Building CXX object CMakeFiles/CubicSDR.dir/src/ui/UITestCanvas.cpp.o
[ 98%] Building CXX object CMakeFiles/CubicSDR.dir/src/ui/UITestContext.cpp.o
[100%] Linking CXX executable arm64/CubicSDR
[100%] Built target CubicSDR

Bow when I start it I get this popup message.

No SoapySDR modules were found.

Am I missing something? Here is output from console. No SDR hardware was connected at this time since I am just trying to build it.

oxMBP ➜  arm64 git:(master) ✗ ./CubicSDR
Loading:: configuration file '/Users/oxoocoffee/Library/Application Support/CubicSDR/config.xml'

Audio Device #0 Apple Inc.: oxiphone Microphone
    Default Output? No
    Default Input? No
    Input channels: 1
    Output channels: 0
    Duplex channels: 0
    Native formats:
        32-bit float normalized between plus/minus 1.0.
    Supported sample rates:
        48000hz

Audio Device #1 Apple Inc.: External Microphone
    Default Output? No
    Default Input? Yes
    Input channels: 1
    Output channels: 0
    Duplex channels: 0
    Native formats:
        32-bit float normalized between plus/minus 1.0.
    Supported sample rates:
        44100hz
        48000hz
        88200hz
        96000hz

Audio Device #2 Apple Inc.: External Headphones
    Default Output? Yes
    Default Input? No
    Input channels: 0
    Output channels: 2
    Duplex channels: 0
    Native formats:
        32-bit float normalized between plus/minus 1.0.
    Supported sample rates:
        44100hz
        48000hz
        88200hz
        96000hz

Audio Device #3 Apple Inc.: MacBook Pro Microphone
    Default Output? No
    Default Input? No
    Input channels: 1
    Output channels: 0
    Duplex channels: 0
    Native formats:
        32-bit float normalized between plus/minus 1.0.
    Supported sample rates:
        44100hz
        48000hz
        88200hz
        96000hz

Audio Device #4 Apple Inc.: MacBook Pro Speakers
    Default Output? No
    Default Input? No
    Input channels: 0
    Output channels: 2
    Duplex channels: 0
    Native formats:
        32-bit float normalized between plus/minus 1.0.
    Supported sample rates:
        44100hz
        48000hz
        88200hz
        96000hz

Audio Device #5 Microsoft Corp.: Microsoft Teams Audio
    Default Output? No
    Default Input? No
    Input channels: 2
    Output channels: 2
    Duplex channels: 2
    Native formats:
        32-bit float normalized between plus/minus 1.0.
    Supported sample rates:
        48000hz

SDR enumerator starting.
SoapySDR init..
    API Version: v0.8.0
    ABI Version: v0.8
    Install root: /opt/homebrew
    Loading modules...
    Available factories...nullJust 'null' factory found.

Reporting enumeration complete.
SDR enumerator done.
Loaded font 'Bitstream Vera Sans Mono' from '/Users/oxoocoffee/projects/github/CubicSDR/build/arm64/fonts/vera_sans_mono12_0.png', parsed 255 characters.
Loaded font 'Bitstream Vera Sans Mono' from '/Users/oxoocoffee/projects/github/CubicSDR/build/arm64/fonts/vera_sans_mono16_0.png', parsed 255 characters.
Loaded font 'Bitstream Vera Sans Mono' from '/Users/oxoocoffee/projects/github/CubicSDR/build/arm64/fonts/vera_sans_mono18_0.png', parsed 255 characters.
Loaded font 'Bitstream Vera Sans Mono' from '/Users/oxoocoffee/projects/github/CubicSDR/build/arm64/fonts/vera_sans_mono24_0.png', parsed 255 characters.
Loaded font 'Bitstream Vera Sans Mono' from '/Users/oxoocoffee/projects/github/CubicSDR/build/arm64/fonts/vera_sans_mono27_0.png', parsed 255 characters.
Loaded font 'Bitstream Vera Sans Mono' from '/Users/oxoocoffee/projects/github/CubicSDR/build/arm64/fonts/vera_sans_mono32_0.png', parsed 255 characters.
Loaded font 'Bitstream Vera Sans Mono' from '/Users/oxoocoffee/projects/github/CubicSDR/build/arm64/fonts/vera_sans_mono36_0.png', parsed 255 characters.
Terminating SDR thread..
ERROR: thread '9SDRThread' has not terminated in time ! (> 3000 ms)

Cheers

mgiugliano commented 1 year ago

@oxoocoffee The homebrew procedure (https://github.com/cjcliffe/CubicSDR/wiki/Build-OSX---Homebrew) worked under macOs Ventura 13.1 (22C65) on an Intel Mac (16-inch, 2019). CubicSDR crashed once, but now it seems working.

oxoocoffee commented 1 year ago

I do not see latest version in home brew repo. That is why I attempted building from source. Who is maintaining brew package? Also I am on M1 not in Intel.

ackerthehacker2 commented 1 year ago

2.7 M1 on 13.2 built with warnings ..but working ...used homebrew too ... Use also might want to change the title from Venture to Ventura

From the wiki;

Dependencies via Homebrew: $ brew install rtl-sdr Build Module: $ cd ~/Dev Dev$ git clone https://github.com/pothosware/SoapyRTLSDR.git Dev$ cd SoapyRTLSDR SoapyRTLSDR$ mkdir build SoapyRTLSDR$ cd build build$ cmake .. -DCMAKE_BUILD_TYPE=Release build$ make build$ sudo make install build$ SoapySDRUtil --probe

luzpaz commented 7 months ago

macos label needed