hdhomerun_config_gui_20200521 on OS X

Want to write your own code to work with a HDHomeRun or work with the HDHomeRun DVR? We are happy to help with concepts, APIs, best practices.
Post Reply
PVR4Me
Posts: 280
Joined: Wed Oct 04, 2006 7:26 am
Location: near Toronto, Canada

hdhomerun_config_gui_20200521 on OS X

Post by PVR4Me »

Hi:

I contribute a bit to the MacPorts project. I wanted to update the long-out-date HDHomerun software in preparation for V31 of MythTV. I'm able to build libhdhomerun 20200521 with no problem so I thought I would try to build the GUI using OSX/hdhomerun_config_gui.xcodeproj. The build is failing as follows:

Code: Select all

/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -x c++ -arch x86_64 -fmessage-length=0 -fdiagnostics-show-note-include-stack -fmacro-backtrace-limit=0 -stdlib=libc++ -Wno-trigraphs -fpascal-strings -Os -Wno-missing-field-initializers -Wno-missing-prototypes -Wno-return-type -Wno-non-virtual-dtor -Wno-overloaded-virtual -Wno-exit-time-destructors -Wno-missing-braces -Wparentheses -Wswitch -Wno-unused-function -Wno-unused-label -Wno-unused-parameter -Wno-unused-variable -Wunused-value -Wno-empty-body -Wno-uninitialized -Wno-unknown-pragmas -Wno-shadow -Wno-four-char-constants -Wno-conversion -Wno-constant-conversion -Wno-int-conversion -Wno-bool-conversion -Wno-enum-conversion -Wno-shorten-64-to-32 -Wno-newline-eof -Wno-c++11-extensions -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk -fasm-blocks -fstrict-aliasing -Wdeprecated-declarations -Winvalid-offsetof -mmacosx-version-min=10.10 -g -fvisibility=hidden -fvisibility-inlines-hidden -Wno-sign-conversion -I/opt/local/var/macports/build/_Users_craigtreleaven_mp_macports-ports_multimedia_hdhomerun_gui/hdhomerun_gui/work/hdhomerun_config_gui/OSX/build/hdhomerun_config_gui.build/Release/hdhomerun_config_gui.build/hdhomerun_config_gui.hmap -I/opt/local/var/macports/build/_Users_craigtreleaven_mp_macports-ports_multimedia_hdhomerun_gui/hdhomerun_gui/work/hdhomerun_config_gui/OSX/build/Release/include -I/opt/local/var/macports/build/_Users_craigtreleaven_mp_macports-ports_multimedia_hdhomerun_gui/hdhomerun_gui/work/hdhomerun_config_gui/OSX/../../libhdhomerun -I/Library/Frameworks/Cairo.framework/Headers -I/Library/Frameworks/GLib.framework/Headers -I/Library/Frameworks/Gtk.framework/Headers -I/opt/local/var/macports/build/_Users_craigtreleaven_mp_macports-ports_multimedia_hdhomerun_gui/hdhomerun_gui/work/hdhomerun_config_gui/OSX/build/hdhomerun_config_gui.build/Release/hdhomerun_config_gui.build/DerivedSources/x86_64 -I/opt/local/var/macports/build/_Users_craigtreleaven_mp_macports-ports_multimedia_hdhomerun_gui/hdhomerun_gui/work/hdhomerun_config_gui/OSX/build/hdhomerun_config_gui.build/Release/hdhomerun_config_gui.build/DerivedSources -F/opt/local/var/macports/build/_Users_craigtreleaven_mp_macports-ports_multimedia_hdhomerun_gui/hdhomerun_gui/work/hdhomerun_config_gui/OSX/build/Release -F/Library/Frameworks -MMD -MT dependencies -MF /opt/local/var/macports/build/_Users_craigtreleaven_mp_macports-ports_multimedia_hdhomerun_gui/hdhomerun_gui/work/hdhomerun_config_gui/OSX/build/hdhomerun_config_gui.build/Release/hdhomerun_config_gui.build/Objects-normal/x86_64/support.d --serialize-diagnostics /opt/local/var/macports/build/_Users_craigtreleaven_mp_macports-ports_multimedia_hdhomerun_gui/hdhomerun_gui/work/hdhomerun_config_gui/OSX/build/hdhomerun_config_gui.build/Release/hdhomerun_config_gui.build/Objects-normal/x86_64/support.dia -c /opt/local/var/macports/build/_Users_craigtreleaven_mp_macports-ports_multimedia_hdhomerun_gui/hdhomerun_gui/work/hdhomerun_config_gui/src/support.cpp -o /opt/local/var/macports/build/_Users_craigtreleaven_mp_macports-ports_multimedia_hdhomerun_gui/hdhomerun_gui/work/hdhomerun_config_gui/OSX/build/hdhomerun_config_gui.build/Release/hdhomerun_config_gui.build/Objects-normal/x86_64/support.o
/opt/local/var/macports/build/_Users_craigtreleaven_mp_macports-ports_multimedia_hdhomerun_gui/hdhomerun_gui/work/hdhomerun_config_gui/src/support.cpp:15:10: fatal error: 'gtk/gtk.h' file not found
#include <gtk/gtk.h>
         ^
1 error generated.
If I'm reading this right (which is not a given), the build is looking for a GTK framework. In MacPorts, we have ports for GTK2 or GTK3 but they are installed as libs (default to /opt/local/lib/...).

Is there a simple solution to allow me to build using MacPorts? Maybe a setting to pass to xcode.build?

Thanks,

Craig

PVR4Me
Posts: 280
Joined: Wed Oct 04, 2006 7:26 am
Location: near Toronto, Canada

Re: hdhomerun_config_gui_20200521 on OS X

Post by PVR4Me »

Correction, there are two errors reported. Here is the other one:

Code: Select all

CompileC build/hdhomerun_config_gui.build/Release/hdhomerun_config_gui.build/Objects-normal/x86_64/interface.o /opt/local/var/macports/build/_Users_craigtreleaven_mp_macports-ports_multimedia_hdhomerun_gui/hdhomerun_gui/work/hdhomerun_config_gui/src/interface.cpp normal x86_64 c++ com.apple.compilers.llvm.clang.1_0.compiler
    cd /opt/local/var/macports/build/_Users_craigtreleaven_mp_macports-ports_multimedia_hdhomerun_gui/hdhomerun_gui/work/hdhomerun_config_gui/OSX
    export LANG=en_US.US-ASCII
    /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -x c++ -arch x86_64 -fmessage-length=0 -fdiagnostics-show-note-include-stack -fmacro-backtrace-limit=0 -stdlib=libc++ -Wno-trigraphs -fpascal-strings -Os -Wno-missing-field-initializers -Wno-missing-prototypes -Wno-return-type -Wno-non-virtual-dtor -Wno-overloaded-virtual -Wno-exit-time-destructors -Wno-missing-braces -Wparentheses -Wswitch -Wno-unused-function -Wno-unused-label -Wno-unused-parameter -Wno-unused-variable -Wunused-value -Wno-empty-body -Wno-uninitialized -Wno-unknown-pragmas -Wno-shadow -Wno-four-char-constants -Wno-conversion -Wno-constant-conversion -Wno-int-conversion -Wno-bool-conversion -Wno-enum-conversion -Wno-shorten-64-to-32 -Wno-newline-eof -Wno-c++11-extensions -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk -fasm-blocks -fstrict-aliasing -Wdeprecated-declarations -Winvalid-offsetof -mmacosx-version-min=10.10 -g -fvisibility=hidden -fvisibility-inlines-hidden -Wno-sign-conversion -I/opt/local/var/macports/build/_Users_craigtreleaven_mp_macports-ports_multimedia_hdhomerun_gui/hdhomerun_gui/work/hdhomerun_config_gui/OSX/build/hdhomerun_config_gui.build/Release/hdhomerun_config_gui.build/hdhomerun_config_gui.hmap -I/opt/local/var/macports/build/_Users_craigtreleaven_mp_macports-ports_multimedia_hdhomerun_gui/hdhomerun_gui/work/hdhomerun_config_gui/OSX/build/Release/include -I/opt/local/var/macports/build/_Users_craigtreleaven_mp_macports-ports_multimedia_hdhomerun_gui/hdhomerun_gui/work/hdhomerun_config_gui/OSX/../../libhdhomerun -I/Library/Frameworks/Cairo.framework/Headers -I/Library/Frameworks/GLib.framework/Headers -I/Library/Frameworks/Gtk.framework/Headers -I/opt/local/var/macports/build/_Users_craigtreleaven_mp_macports-ports_multimedia_hdhomerun_gui/hdhomerun_gui/work/hdhomerun_config_gui/OSX/build/hdhomerun_config_gui.build/Release/hdhomerun_config_gui.build/DerivedSources/x86_64 -I/opt/local/var/macports/build/_Users_craigtreleaven_mp_macports-ports_multimedia_hdhomerun_gui/hdhomerun_gui/work/hdhomerun_config_gui/OSX/build/hdhomerun_config_gui.build/Release/hdhomerun_config_gui.build/DerivedSources -F/opt/local/var/macports/build/_Users_craigtreleaven_mp_macports-ports_multimedia_hdhomerun_gui/hdhomerun_gui/work/hdhomerun_config_gui/OSX/build/Release -F/Library/Frameworks -MMD -MT dependencies -MF /opt/local/var/macports/build/_Users_craigtreleaven_mp_macports-ports_multimedia_hdhomerun_gui/hdhomerun_gui/work/hdhomerun_config_gui/OSX/build/hdhomerun_config_gui.build/Release/hdhomerun_config_gui.build/Objects-normal/x86_64/interface.d --serialize-diagnostics /opt/local/var/macports/build/_Users_craigtreleaven_mp_macports-ports_multimedia_hdhomerun_gui/hdhomerun_gui/work/hdhomerun_config_gui/OSX/build/hdhomerun_config_gui.build/Release/hdhomerun_config_gui.build/Objects-normal/x86_64/interface.dia -c /opt/local/var/macports/build/_Users_craigtreleaven_mp_macports-ports_multimedia_hdhomerun_gui/hdhomerun_gui/work/hdhomerun_config_gui/src/interface.cpp -o /opt/local/var/macports/build/_Users_craigtreleaven_mp_macports-ports_multimedia_hdhomerun_gui/hdhomerun_gui/work/hdhomerun_config_gui/OSX/build/hdhomerun_config_gui.build/Release/hdhomerun_config_gui.build/Objects-normal/x86_64/interface.o
/opt/local/var/macports/build/_Users_craigtreleaven_mp_macports-ports_multimedia_hdhomerun_gui/hdhomerun_gui/work/hdhomerun_config_gui/src/interface.cpp:15:10: fatal error: 'gdk/gdkkeysyms.h' file not found
#include <gdk/gdkkeysyms.h>
         ^
1 error generated.[/i]
Craig

jasonl
Expert
Posts: 15247
Joined: Sun Oct 28, 2007 9:23 pm

Re: hdhomerun_config_gui_20200521 on OS X

Post by jasonl »

It's GTK2. I don't know how MacPorts does things, but on Linux, it requires the development version of the packages (libgtk2-dev, gtk2-devel, or some similar name depending on the distro) to be installed as those provides the headers needed to build software against them, while the main packages are just the binaries. If MacPorts supplies the headers in the main packages then the package alone might be enough.

PVR4Me
Posts: 280
Joined: Wed Oct 04, 2006 7:26 am
Location: near Toronto, Canada

Re: hdhomerun_config_gui_20200521 on OS X

Post by PVR4Me »

Thanks for the quick reply (on your holiday weekend too, I guess).

I'll install GTK2. MacPorts does supply the headers for all installed packages ("ports"). From some spleunking, it appears that ffmpeg is also required. Any particular version or configuration? Are there any other dependencies that I need to install?

Craig

nickk
Silicondust
Posts: 15908
Joined: Tue Jan 13, 2004 9:39 am

Re: hdhomerun_config_gui_20200521 on OS X

Post by nickk »

hdhomerun_config_gui isn't a player - it doesn't use ffmpeg

PVR4Me
Posts: 280
Joined: Wed Oct 04, 2006 7:26 am
Location: near Toronto, Canada

Re: hdhomerun_config_gui_20200521 on OS X

Post by PVR4Me »

Hi:

I'm confused. I'm starting with the dist file from:

https://download.silicondust.com/hdhome ... 200521.tgz

Even though the filename says 20200521, none of the files inside have a modification date after 2016?!? (The libhdhomerun tarball does include some recently modified files, as expected.)

Using what amounts to the standard unix build process ('./configure ; make ; sudo make install'), the project builds and installs successfully. On running, a simple window pops up showing my two (old) HDHomerun units. I can select either tuner on either device and then get signal strength and whatnot on expected channels. With a good channel, the "View" button is available. Clicking that launches VLC and indeed I can watch TV.

That dist file also includes an Xcode project file. It expects Cairo, GLib and others to be installed as frameworks which is not how MacPorts builds these libraries. Thus I can't get a successful build using Xcode.

Am I starting with the right snapshot? If the "Linux" build process works OK on the Mac, is there any reason I can't make that available through MacPorts?

Thanks,

Craig

nickk
Silicondust
Posts: 15908
Joined: Tue Jan 13, 2004 9:39 am

Re: hdhomerun_config_gui_20200521 on OS X

Post by nickk »

We haven't been able to compile hdhomerun_config_gtk since Apple blocked the use of x86/x64 multi-architecture libraries.

Nick

jasonl
Expert
Posts: 15247
Joined: Sun Oct 28, 2007 9:23 pm

Re: hdhomerun_config_gui_20200521 on OS X

Post by jasonl »

2016 sounds about right. Most of it dates back to 2008. The Xcode stuff is set up the way it is because Silicondust built all the GTK stuff and when you ran the Mac installer it installed it, and that's just the way it was all designed to work to provide a functioning system to the average Mac user who didn't have MacPorts or other fancy package management systems. There's no particular reason to do it that way when you do have a fancy package management system available that can do all the hard work for you just by telling it what your dependencies are. Build it whatever way makes the most sense for that system.

I can't speak for Silicondust in approving you to publish it, but I will point out a few things:
  1. It's licensed GPLv3. You've already been granted permission by the license to compile and redistribute it as long as you comply with the terms of the license, which mostly means providing source code and licensing any modifications you make as GPLv3.
  2. The software is already packaged and available in basically every Linux distribution out there, so there's ample precedent out there that this is something that is acceptable.
  3. Silicondust has always been very welcoming to the open-source community and has almost never asked anyone to stop doing anything except when it was causing performance issues for services provided by Silicondust, e.g. applications that were hammering the guide data servers scraping data, and even then Silicondust created a new method for those applications to retrieve the same data in a way that did not cause performance issues.

PVR4Me
Posts: 280
Joined: Wed Oct 04, 2006 7:26 am
Location: near Toronto, Canada

Re: hdhomerun_config_gui_20200521 on OS X

Post by PVR4Me »

Thanks for the detailed post. I don't think I would call MacPorts "fancy" but some of us like it. ;) As you say, this is not the way that an "average" user would access an HDHomerun box but there is a group of us running MythTV on the Mac (or other DVR solutions) that might possibly be interested. I was more concerned that maybe the web page link was erroneously pointing to an older tarball.

I'll muddle away at it.

Craig

Post Reply