Opened 14 years ago

Closed 14 years ago

#7519 closed defect (invalid)

Mac OS X 10.6.1 compile missing symbols related to mysql

Reported by: astralbodies@… Owned by: Nigel
Priority: critical Milestone: 0.22
Component: Ports - OSX Version: head
Severity: medium Keywords:
Cc: Ticket locked: yes

Description

When compiling trunk & release-0-22-fixes I get the following exception during compilation:

g++ -F/System/Library/Frameworks -L/usr/lib -L/Users/aaron/tmp/mythtv/.osx-packager/build/lib -fno-exceptions -Xarch_i386 -mmacosx-version-min=10.4 -arch i386 -single_module -dynamiclib -compatibility_version 4.5 -current_version 4.5.3 -install_name /Users/aaron/tmp/mythtv/.osx-packager/build/lib/libQtSql.4.dylib -o libQtSql.4.5.3.dylib .obj/release-shared/qsqlquery.o .obj/release-shared/qsqldatabase.o .obj/release-shared/qsqlfield.o .obj/release-shared/qsqlrecord.o .obj/release-shared/qsqldriver.o .obj/release-shared/qsqldriverplugin.o .obj/release-shared/qsqlerror.o .obj/release-shared/qsqlresult.o .obj/release-shared/qsqlindex.o .obj/release-shared/qsqlcachedresult.o .obj/release-shared/qsql_mysql.o .obj/release-shared/qsqlquerymodel.o .obj/release-shared/qsqltablemodel.o .obj/release-shared/qsqlrelationaldelegate.o .obj/release-shared/qsqlrelationaltablemodel.o .obj/release-shared/moc_qsqldriver.o .obj/release-shared/moc_qsqldriverplugin.o .obj/release-shared/moc_qsql_mysql.o .obj/release-shared/moc_qsqlquerymodel.o .obj/release-shared/moc_qsqltablemodel.o .obj/release-shared/moc_qsqlrelationaltablemodel.o -L/Users/aaron/tmp/mythtv/.osx-packager/build/lib/mysql -L/Users/aaron/tmp/mythtv/.osx-packager/src/qt-mac-opensource-src-4.5.3/lib -F/System/Library/Frameworks -L/usr/lib -L/Users/aaron/tmp/mythtv/.osx-packager/build/lib -L/Users/aaron/tmp/mythtv/.osx-packager/build/lib/mysql -lmysqlclient -lQtCore -L/Users/aaron/tmp/mythtv/.osx-packager/src/qt-mac-opensource-src-4.5.3/lib -lz -lm -framework ApplicationServices? ld: warning: in /Users/aaron/tmp/mythtv/.osx-packager/build/lib/mysql/libmysqlclient.dylib, file is not of required architecture Undefined symbols:

"_mysql_close", referenced from:

QMYSQLDriver::close() in qsql_mysql.o QMYSQLDriver::open(QString const&, QString const&, QString const&, QString const&, int, QString const&)in qsql_mysql.o QMYSQLDriver::open(QString const&, QString const&, QString const&, QString const&, int, QString const&)in qsql_mysql.o

"_mysql_server_init", referenced from:

qLibraryInit() in qsql_mysql.o

"_mysql_stmt_param_count", referenced from:

QMYSQLResult::prepare(QString const&) in qsql_mysql.o QMYSQLResult::prepare(QString const&) in qsql_mysql.o QMYSQLResult::exec() in qsql_mysql.o QMYSQLResult::exec() in qsql_mysql.o

(undefined symbols continue - attached full log of compilation)

I've attempted this on a iMac 24" Core 2 Duo running Max OS X 10.6.1. I also tried switching it to Qt 4.5.3 with the same results.

Attachments (3)

mythtv error.txt.zip (96.3 KB) - added by astralbodies@… 14 years ago.
Full log of compilation
osx-packager-32-bit.patch (1.1 KB) - added by mythtv@… 14 years ago.
Force 32-bit compilation
mythtv-build-trunk-111309.txt.zip (317.1 KB) - added by astralbodies@… 14 years ago.
Build against trunk w/firewire issue

Download all attachments as: .zip

Change History (19)

Changed 14 years ago by astralbodies@…

Attachment: mythtv error.txt.zip added

Full log of compilation

comment:1 Changed 14 years ago by mythtv@…

These problems appear to be the result of Xcode 3.2.x on Mac OS 10.6.x generating "native" binaries unless explicitly told otherwise. Where "native" is 64-bit on systems equipped with Core2 processors and 32-bit on systems equipped with Core processors.

Qt is configured in such a way as to always produce 32-bit binaries regardless of the "native" format. Therefore, on Core2 equipped systems, the 32-bit Qt libraries are unable to link against the 64-bit MySQL libraries. Hence the "libmysqlclient.dylib, file is not of required architecture" error.

The attached patch forces 32-bit compilation for all dependencies. Using this patch, along with uncommenting the various lines highlighted within "osx-packager.pl" as being necessary for compilation on Mac OS 10.6, I have been able to build and run SVN revision 22777 on Mac OS 10.6.1, using Xcode 3.2.1, on a Core2 Duo Macbook 2,1.

Changed 14 years ago by mythtv@…

Attachment: osx-packager-32-bit.patch added

Force 32-bit compilation

comment:2 Changed 14 years ago by anonymous

Thanks that worked! Got past that error and now I'm reaching libmythsoundtouch -

g++ -c -pipe -march=nocona -fomit-frame-pointer -O3 -m32 -Wall -Wno-switch -Wpointer-arith -Wredundant-decls -Wno-non-virtual-dtor -funit-at-a-time -DSTDC_CONSTANT_MACROS -Wno-long-double -fPIC -DPIC -w -fPIC -arch i386 -DUSING_APPLEREMOTE -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -DALLOW_SSE2 -I/Users/aaron/tmp/mythtv/.osx-packager/build/mkspecs/macx-g++ -I. -I/Users/aaron/tmp/mythtv/.osx-packager/build/include -I/usr/include -I/Users/aaron/tmp/mythtv/.osx-packager/build -I../../libs/libavcodec -I../.. -o AAFilter.o AAFilter.cpp cc1plus: error: unrecognized command line option "-Wno-long-double" make[2]: * [AAFilter.o] Error 1 make[1]: * [sub-libmythsoundtouch-make_default] Error 2 make[1]: * Waiting for unfinished jobs.... gcc -c -pipe -march=nocona -fomit-frame-pointer -O3 -I/Users/aaron/tmp/mythtv/.osx-packager/build/include -D_ISOC99_SOURCE -std=c99 -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -pipe -force_cpusubtype_ALL -Wno-sign-compare -Wall -Wno-switch -Wdisabled-optimization -Wpointer-arith -Wredundant-decls -Wno-pointer-sign -Wcast-qual -Wwrite-strings -Wundef -fno-math-errno -m32 -w -arch i386 -DUSING_APPLEREMOTE -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -DHAVE_AV_CONFIG_H -D_LARGEFILE_SOURCE -I/Users/aaron/tmp/mythtv/.osx-packager/build/mkspecs/macx-g++ -I. -I.. -I../.. -o intfloat_readwrite.o intfloat_readwrite.c gcc -c -pipe -march=nocona -fomit-frame-pointer -O3 -I/Users/aaron/tmp/mythtv/.osx-packager/build/include -D_ISOC99_SOURCE -std=c99 -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -pipe -force_cpusubtype_ALL -Wno-sign-compare -Wall -Wno-switch -Wdisabled-optimization -Wpointer-arith -Wredundant-decls -Wno-pointer-sign -Wcast-qual -Wwrite-strings -Wundef -fno-math-errno -m32 -w -arch i386 -DUSING_APPLEREMOTE -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -DHAVE_AV_CONFIG_H -D_LARGEFILE_SOURCE -I/Users/aaron/tmp/mythtv/.osx-packager/build/mkspecs/macx-g++ -I. -I.. -I../.. -o lfg.o lfg.c gcc -c -pipe -march=nocona -fomit-frame-pointer -O3 -I/Users/aaron/tmp/mythtv/.osx-packager/build/include -D_ISOC99_SOURCE -std=c99 -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -pipe -force_cpusubtype_ALL -Wno-sign-compare -Wall -Wno-switch -Wdisabled-optimization -Wpointer-arith -Wredundant-decls -Wno-pointer-sign -Wcast-qual -Wwrite-strings -Wundef -fno-math-errno -m32 -w -arch i386 -DUSING_APPLEREMOTE -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -DHAVE_AV_CONFIG_H -D_LARGEFILE_SOURCE -I/Users/aaron/tmp/mythtv/.osx-packager/build/mkspecs/macx-g++ -I. -I.. -I../.. -o lls.o lls.c gcc -c -pipe -march=nocona -fomit-frame-pointer -O3 -I/Users/aaron/tmp/mythtv/.osx-packager/build/include -D_ISOC99_SOURCE -std=c99 -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -pipe -force_cpusubtype_ALL -Wno-sign-compare -Wall -Wno-switch -Wdisabled-optimization -Wpointer-arith -Wredundant-decls -Wno-pointer-sign -Wcast-qual -Wwrite-strings -Wundef -fno-math-errno -m32 -w -arch i386 -DUSING_APPLEREMOTE -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -DHAVE_AV_CONFIG_H -D_LARGEFILE_SOURCE -I/Users/aaron/tmp/mythtv/.osx-packager/build/mkspecs/macx-g++ -I. -I.. -I../.. -o log.o log.c gcc -c -pipe -march=nocona -fomit-frame-pointer -O3 -I/Users/aaron/tmp/mythtv/.osx-packager/build/include -D_ISOC99_SOURCE -std=c99 -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -pipe -force_cpusubtype_ALL -Wno-sign-compare -Wall -Wno-switch -Wdisabled-optimization -Wpointer-arith -Wredundant-decls -Wno-pointer-sign -Wcast-qual -Wwrite-strings -Wundef -fno-math-errno -m32 -w -arch i386 -DUSING_APPLEREMOTE -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -DHAVE_AV_CONFIG_H -D_LARGEFILE_SOURCE -I/Users/aaron/tmp/mythtv/.osx-packager/build/mkspecs/macx-g++ -I. -I.. -I../.. -o lzo.o lzo.c gcc -c -pipe -march=nocona -fomit-frame-pointer -O3 -I/Users/aaron/tmp/mythtv/.osx-packager/build/include -D_ISOC99_SOURCE -std=c99 -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -pipe -force_cpusubtype_ALL -Wno-sign-compare -Wall -Wno-switch -Wdisabled-optimization -Wpointer-arith -Wredundant-decls -Wno-pointer-sign -Wcast-qual -Wwrite-strings -Wundef -fno-math-errno -m32 -w -arch i386 -DUSING_APPLEREMOTE -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -DHAVE_AV_CONFIG_H -D_LARGEFILE_SOURCE -I/Users/aaron/tmp/mythtv/.osx-packager/build/mkspecs/macx-g++ -I. -I.. -I../.. -o mathematics.o mathematics.c gcc -c -pipe -march=nocona -fomit-frame-pointer -O3 -I/Users/aaron/tmp/mythtv/.osx-packager/build/include -D_ISOC99_SOURCE -std=c99 -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -pipe -force_cpusubtype_ALL -Wno-sign-compare -Wall -Wno-switch -Wdisabled-optimization -Wpointer-arith -Wredundant-decls -Wno-pointer-sign -Wcast-qual -Wwrite-strings -Wundef -fno-math-errno -m32 -w -arch i386 -DUSING_APPLEREMOTE -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -DHAVE_AV_CONFIG_H -D_LARGEFILE_SOURCE -I/Users/aaron/tmp/mythtv/.osx-packager/build/mkspecs/macx-g++ -I. -I.. -I../.. -o md5.o md5.c gcc -c -pipe -march=nocona -fomit-frame-pointer -O3 -I/Users/aaron/tmp/mythtv/.osx-packager/build/include -D_ISOC99_SOURCE -std=c99 -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -pipe -force_cpusubtype_ALL -Wno-sign-compare -Wall -Wno-switch -Wdisabled-optimization -Wpointer-arith -Wredundant-decls -Wno-pointer-sign -Wcast-qual -Wwrite-strings -Wundef -fno-math-errno -m32 -w -arch i386 -DUSING_APPLEREMOTE -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -DHAVE_AV_CONFIG_H -D_LARGEFILE_SOURCE -I/Users/aaron/tmp/mythtv/.osx-packager/build/mkspecs/macx-g++ -I. -I.. -I../.. -o mem.o mem.c gcc -c -pipe -march=nocona -fomit-frame-pointer -O3 -I/Users/aaron/tmp/mythtv/.osx-packager/build/include -D_ISOC99_SOURCE -std=c99 -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -pipe -force_cpusubtype_ALL -Wno-sign-compare -Wall -Wno-switch -Wdisabled-optimization -Wpointer-arith -Wredundant-decls -Wno-pointer-sign -Wcast-qual -Wwrite-strings -Wundef -fno-math-errno -m32 -w -arch i386 -DUSING_APPLEREMOTE -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -DHAVE_AV_CONFIG_H -D_LARGEFILE_SOURCE -I/Users/aaron/tmp/mythtv/.osx-packager/build/mkspecs/macx-g++ -I. -I.. -I../.. -o random_seed.o random_seed.c gcc -c -pipe -march=nocona -fomit-frame-pointer -O3 -I/Users/aaron/tmp/mythtv/.osx-packager/build/include -D_ISOC99_SOURCE -std=c99 -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -pipe -force_cpusubtype_ALL -Wno-sign-compare -Wall -Wno-switch -Wdisabled-optimization -Wpointer-arith -Wredundant-decls -Wno-pointer-sign -Wcast-qual -Wwrite-strings -Wundef -fno-math-errno -m32 -w -arch i386 -DUSING_APPLEREMOTE -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -DHAVE_AV_CONFIG_H -D_LARGEFILE_SOURCE -I/Users/aaron/tmp/mythtv/.osx-packager/build/mkspecs/macx-g++ -I. -I.. -I../.. -o rational.o rational.c gcc -c -pipe -march=nocona -fomit-frame-pointer -O3 -I/Users/aaron/tmp/mythtv/.osx-packager/build/include -D_ISOC99_SOURCE -std=c99 -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -pipe -force_cpusubtype_ALL -Wno-sign-compare -Wall -Wno-switch -Wdisabled-optimization -Wpointer-arith -Wredundant-decls -Wno-pointer-sign -Wcast-qual -Wwrite-strings -Wundef -fno-math-errno -m32 -w -arch i386 -DUSING_APPLEREMOTE -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -DHAVE_AV_CONFIG_H -D_LARGEFILE_SOURCE -I/Users/aaron/tmp/mythtv/.osx-packager/build/mkspecs/macx-g++ -I. -I.. -I../.. -o rc4.o rc4.c gcc -c -pipe -march=nocona -fomit-frame-pointer -O3 -I/Users/aaron/tmp/mythtv/.osx-packager/build/include -D_ISOC99_SOURCE -std=c99 -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -pipe -force_cpusubtype_ALL -Wno-sign-compare -Wall -Wno-switch -Wdisabled-optimization -Wpointer-arith -Wredundant-decls -Wno-pointer-sign -Wcast-qual -Wwrite-strings -Wundef -fno-math-errno -m32 -w -arch i386 -DUSING_APPLEREMOTE -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -DHAVE_AV_CONFIG_H -D_LARGEFILE_SOURCE -I/Users/aaron/tmp/mythtv/.osx-packager/build/mkspecs/macx-g++ -I. -I.. -I../.. -o sha1.o sha1.c gcc -c -pipe -march=nocona -fomit-frame-pointer -O3 -I/Users/aaron/tmp/mythtv/.osx-packager/build/include -D_ISOC99_SOURCE -std=c99 -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -pipe -force_cpusubtype_ALL -Wno-sign-compare -Wall -Wno-switch -Wdisabled-optimization -Wpointer-arith -Wredundant-decls -Wno-pointer-sign -Wcast-qual -Wwrite-strings -Wundef -fno-math-errno -m32 -w -arch i386 -DUSING_APPLEREMOTE -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -DHAVE_AV_CONFIG_H -D_LARGEFILE_SOURCE -I/Users/aaron/tmp/mythtv/.osx-packager/build/mkspecs/macx-g++ -I. -I.. -I../.. -o tree.o tree.c gcc -c -pipe -march=nocona -fomit-frame-pointer -O3 -I/Users/aaron/tmp/mythtv/.osx-packager/build/include -D_ISOC99_SOURCE -std=c99 -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -pipe -force_cpusubtype_ALL -Wno-sign-compare -Wall -Wno-switch -Wdisabled-optimization -Wpointer-arith -Wredundant-decls -Wno-pointer-sign -Wcast-qual -Wwrite-strings -Wundef -fno-math-errno -m32 -w -arch i386 -DUSING_APPLEREMOTE -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -DHAVE_AV_CONFIG_H -D_LARGEFILE_SOURCE -I/Users/aaron/tmp/mythtv/.osx-packager/build/mkspecs/macx-g++ -I. -I.. -I../.. -o utils.o utils.c rm -f libmythavutil-0.22.0.22.0.dylib libmythavutil-0.22.dylib libmythavutil-0.22.0.dylib libmythavutil-0.22.0.22.dylib g++ -headerpad_max_install_names -Wl,-search_paths_first -Wl,-dynamic,-search_paths_first -F/System/Library/Frameworks -L/usr/lib -L/Users/aaron/tmp/mythtv/.osx-packager/build/lib -m32 -arch i386 -single_module -dynamiclib -compatibility_version 0.22 -current_version 0.22.0 -install_name libmythavutil-0.22.0.dylib -o libmythavutil-0.22.0.22.0.dylib adler32.o aes.o avstring.o base64.o crc.o des.o fifo.o integer.o intfloat_readwrite.o lfg.o lls.o log.o lzo.o mathematics.o md5.o mem.o random_seed.o rational.o rc4.o sha1.o tree.o utils.o -L/usr/lib -L/Users/aaron/tmp/mythtv/.osx-packager/build/lib ln -s libmythavutil-0.22.0.22.0.dylib libmythavutil-0.22.dylib ln -s libmythavutil-0.22.0.22.0.dylib libmythavutil-0.22.0.dylib ln -s libmythavutil-0.22.0.22.0.dylib libmythavutil-0.22.0.22.dylib make: * [sub-libs-make_default-ordered] Error 2 [osx-pkg] Failed system call: " /usr/bin/make -j3 " with error code 2 Died at ./osx-packager.pl line 1000.

comment:3 Changed 14 years ago by mythtv@…

I'm sorry, I cannot see the details of the error in all that output. Are you sure that you removed any remnants of any previous build attempts?

The steps I use are as follows (from the directory containing the "osx-packager.pl" script:

  • Enter the packaging temporary directory:
    • cd .osx-packager
  • Remove the "build" directory:
    • rm -rf build
  • Remove the "tmp" directory:
    • rm -rf tmp
  • Enter the "src" directory:
    • cd src
  • Remove all subdirectories except "myth-svn":
    • rm -rf faad2-2.7
    • rm -rf flac-1.1.4
    • rm -rf freetype-2.1.10
    • rm -rf lame-3.96.1
    • rm -rf libdvdcss-1.2.9
    • rm -rf libexif-0.6.17
    • rm -rf libogg-1.1.2
    • rm -rf libvorbis-1.1.1
    • rm -rf mysql-5.0.85
    • rm -rf qt-mac-opensource-src-4.5.2
    • rm -rf taglib-1.5
  • Enter the "myth-svn" directory:
    • cd myth-svn
  • Perform a make distclean within the "mythtv directory:
    • cd mythtv; make distclean; cd ..
  • Perform a make distclean within the "mythplugins directory:
    • cd mythplugins; make distclean; cd ..
  • Change back to the directory containing osx-packager.pl:
    • cd ../../..
  • Run "osx-packager.pl" script:
    • ./osx-packager.pl

comment:4 Changed 14 years ago by astralbodies@…

I believe I had deleted the entire .osx-packager subdirectory when I re-ran. I ended up deleting the subdirectory again and am running the script off of trunk instead of the 22 fixes branch. I'll post my results back here as soon as it completes along with a full transcript if I run into issues. Appreciate the help!

Item of note - the first time I ran it against the fixes branch, I did get a .app bundle that ran on my Mac but I didn't have any sound from the S/PDIF optical connector. I figured it was because of a missing plugin of some sort.

comment:5 Changed 14 years ago by astralbodies@…

Looks like I had success with the build! I'm apparently missing the Firewire SDK since I installed Xcode from the iPhone SDK installer and not from the Snow Leopard disc.

Also, I did try rebuilding against the 22 fixes branch and got the same failure. I'll have to rebuild my backend because trunk has 2 schema changes and won't load against it.

Changed 14 years ago by astralbodies@…

Build against trunk w/firewire issue

comment:6 Changed 14 years ago by Jeff Gibbons <mythtv@…>

You can build on Leopard and then run on Snow Leopard. I have successfully done this with both release-0-21-fixes and release-0-22-fixes. I haven't tried trunk.

But see my ticket #7582 for an easily fixed fatal problem in mythbackend.

comment:7 Changed 14 years ago by anonymous

  • currently must add #include <qsize.h> to util-opengl.h (as of 11/22/09) before trunk will build
  • osx-packager.pl tries to pull mysql-5.0.85 which no longer is available -change to 5.0.88
  • the above patches for 32-bit compilation are critical because MythFrontEnd, like thousands of other Mac apps, uses Apple's Carbon API calls (that descend from the original 1980s Mac platform) and Apple chose not to support that API for use by 64-bit applications and instead emphasize it's somewhat redundant Cocoa API (that desceind from the original 1980s NeXT platform). Further,
  • MythTV use of qt-opensource-mac (32 bit) should be replaced with the new Cocoa-native version of "Qt for Mac" (32-bit) ( http://qt.nokia.com/products/platform/qt-for-mac ) because Nokia likely will or has discontinue(d) qt-opensource-mac. Simply transitioning to Cocoa-native Qt will not fully permit 64-bit Myth applications though.
  • It's important to complete the transition to 64-bit because Apple has only been selling 64-bit compatible Macs since October 2008 and starting with Mac OS X 10.6 Snow Leopard, the new system default will be 64-bit applications, so after a brief transition period, Apple has little incentive to continue paying to support 32-bit Carbon APIs. (Bear in mind that Apple makes most of its money from hardware, not software, sales --and 64-bit support in the applications is crucial to their customers realizing the full-value of the newer high-memory/cpu capacity Apple models.)
  • Thus to complete transition to 64-bit, aside from transition to Qt for Mac, as neil/astralbodies and others know, we need to fork the code so the Intel versions that make direct calls to 32-bit-only Carbon API (ie, to show/hide the Mac menu bar, etc..) instead call equivalent Cocoa or Quartz APIs (though it would be nice if the PowerPC version could remain indefinitely, especially in light of the three years of work they did on the DVD-hardware decode); however,
  • in Snow Leopard, there is a new Mac OS X API to allow general purpose code to run on the GPU (OpenCL) and to better exploit SMP (Grand Central Dispatch). But rather than re-factor the MythTV code to run in those APIs (thereby diverging significantly from the other platforms), it might make more sense to use another new feature of Snow Leopard, QuickTime X, that already exploits the former two technologies. (See also http://www.apple.com/macosx/technology/ ) In other words, while removing all 32-bit-only Carbon code from the Intel-only version of MythTV, MythTV could replace the video-decode + playback feature with calls to QuickTime X Internet Streaming, keeping the Qt-for-Mac on Cocoa code just for the non-playback UI. This might involve scaling the playback-window to inset within the Program Guide and rendering the !MythTV OSD (menu, guide, program-info but not closed-captioning) into the MPEG stream being fed to QuickTime X (using some kind of software-genlock/multiplexer ala Video LAN Client does).
  • Lastly, if there is any hope of EVENTUALLY getting CableCARD or Switched Video support inside of MythTV (to enable playback of encrypted digital cable channels), it will likely be Mac-only and involve routing the video streams coming in from future APIs that pull from CableCARD/Switched Video USB-devices and implement TiVo-like hardware encryption tied to the network adapter's MAC address and further encode the streams to require an HDCP playback device. Perhaps using !Quicktime X Internet Streaming as part of the transition to 64-bit native binaries would ease the transition to such future technologies. Further note that it might be possible for a third-party such as Elgato.com, or anyone else, to license CableCARD/Switched Video devices for use on Macs and export a post-DRM-only developer API using QuickTime plug-ins even if Apple does not. Such an effort would be decidedly non-GPL/open source like much of the rest of Mac OS X (CoreVideo?, CoreAudio?, etc..)

comment:8 Changed 14 years ago by anonymous

  • also, after building the Mac components, it is important to tar-chive or delete the .osx-packager directory; otherwise, when you launch the resulting Myth applications, they will (when LD debugging is enabled) print errors proclaiming that they may pull Qt libraries from their internal application bundles or from the .osx-packager or other locations and it's "undefined" as to which they might pull from. I suppose if you have any other instances of Qt's .dylib's laying around on your system, you should dispose of them in the same manner. The osx-packager.pl should prompt the user to scan for this and tar-chive them.
  • the mac port of MythFrontEnd? on 10.6 should detect its on a Mac, query the database for current playback video settings and prompt the user if it wants to initialize them to the most optimal profile (because there are only 2 or 3 different video chips used by the various Macs, as opposed to infinite hardware/X11 combinations for the other platforms.) Presently, the user is left to experiment and may get it wrong, without looking at the source code to find out what's been optimized. This needs to be done at runtime, but it is an osx-packager.pl type artifact (because osx-packager is selecting the ffmpeg, x264 build-settings, etc.) Not something anyone else could do.
  • finally, building MythBackEnd?.app on Snow Leopard with the above 32-bit patches creates a bundle, but launching the app results in "illegal instruction." If video is coming in from HDHomeRun or IPTV (and not Firewire), a possible workaround to not having MythBackEnd? running natively on Snow Leopard would be to run it under Linux in a VMware Fusion instance, mapping a folder on the Mac's HFS+ filesystem to Linux path /mnt/hfgs/xxx and registering both the pathname on the Mac side and the pathname on the Linux side (in that order) in the Default storage group using MythTV-Setup (so MythFrontEnd? can read from the Mac path directly without streaming from the VM, even though incoming video from HDHomeRun is still being written through the CPU-intensive HGFS fileshare from the Linux side); however, MythFrontEnd? performance during live video and playback-while-one-or-more-HD-streams-are-being-written-through-HGFS-from-the-virtual-machine side of the "shared folder" will result in some packet loss (jerky video and occasional audio buzzing live or in the recordings) due to all the overhead. Using an externally connected USB hard drive mapped exclusively to VMware Fusion "raw" disk mode might be a work-around, though MythFrontEnd? will only be able to access the mpegs on it by streaming them from the MythBackEnd? on the VM and so it starts to make sense to move the VM off the Mac entirely (ie, to an Atom machine or something). Using an external NAS (accessible from MythBackEnd? VM and from MythFrontEnd? on Mac OS X) might work, but that requires using the Mac's built-in 1000TX Ethernet and in the case of HDHomeRun, a separate (USB/PCIe-to-) Ethernet adapter would be needed (since a dual tuner HDHomeRun practically requires a dedicated 100TX connection and if it is connected to a 1000TX switch, the whole switch will simply slowdown to 100TX speeds whenever it is talking, which is often). In other words, it's kind of crucial to get MythBackEnd? running on Snow Leopard natively (and attach storage via normal USB2, FireWire? 800 or SATA3), to eliminate all the HGFS kernel overhead so recordings/live-TV work and to leave the Ethernet port free for HDHomeRun and/or IPTV.

comment:9 Changed 14 years ago by Brian K Boonstra <(myth) (at) (boonstra.org)>

Whoever you are, anonymous, this is all great stuff. I fear it may be buried and ignored here (left in a trouble ticket in the bugtracking system), so unless you object I will repost some of these comments you made elsewhere -- probably the mailing list, possibly the Wiki. Let me know who to credit, if you like.

With regard to the backend built on OSX failing to run -- do you happen to know if a 10.5-built backend will run on 10.6?

comment:10 Changed 14 years ago by anonymous

  • final note that Jeff Gibbons comment for # 7582 allows MythBackEnd to run properly on Snow Leopard. (#ifdef CONFIG_DARWIN around the offending code in main.cpp) It seems to consume under 10% of the CPU on a dual 2GHz Core2 iMac, which is 1/2 to 1/3 of what the equivalent Linux VM was doing (mainly due to HGFS overhead). This could probably be done on 10.5 and then the binary moved over to 10.6, but I didn't try it --so long as you apply nigel's 32-bit-only patch (really just those "extra flags" and uncomment the lines marked for 10.6-only) you don't need to deal with 10.5 anymore.

@Brian: yes, that's fine. I searched all over for the best place --the wikis are a mess. Hopefully the Elgato.com guys will get cracking to make some proprietary drivers we can drop into QuickTime X that work with the cable companies new Switched Video Tivo S3 adapters, HDCP and the fading CableCARD standard. But for now, everything has come together now for the maintainer to update the 32-bit osx-packager.pl (these comments are just stop gap until that happens) the latest trunk is running on OSX 10.6.2 right now (except I haven't explored why the live-video does not shrink down into the Program Guide yet and I haven't ever configured my AppleRemote? since I'm moving over to Macs after many years of Linux Myth).

Once the osx-packager.pl is working again you can gut the wiki, like the Windows port (which is also broken, btw --it references some site to download the unzip utility that no longer hosts it). From there, we would just need to make a conditional 32-bit/64-bit MythBackEnd/JobTools? (just by switching to Qt 4.6, which is not a recompile but also not weeks of code) and probably leave MythFrontEnd? alone (to preserve all of their hard work on the PowerPC DVD chip support, etc. and all the gorgeous hardware it supports) as 32-bit forever, forking off a new branch of to become the Cocoa version (Qt 4.6) that will later go on to become 64-bit (after removal of Carbon calls, decision to either go OpenCL+GCS or QuickTime X with software-genlock/OSD stream which is all fairly significant/months of part-time coding).

comment:11 Changed 14 years ago by Dibblah

Resolution: invalid
Status: newclosed

Discussion and compilation support on the mailing lists, please.

comment:12 Changed 14 years ago by astralbodies@…

The original reason for opening this ticket was to report a bug with a mythtv support Perl script for compilation, not just for compilation support.

comment:13 Changed 14 years ago by anonymous

I needed the supplied patch in order to successfully build on 10.6.2. I notice it hasn't been pushed into the the TRUNK yet. Also had to update the MySQL version to 5.0.88. Recommend that this ticket be reopened.

comment:14 Changed 14 years ago by Nigel

'The WIkis are a mess' ?
So, create a new page and link it to the other ones. e.g. add a section in http://www.mythtv.org/wiki/Myth_on_Mac_-_Build_status

comment:15 in reply to:  11 Changed 14 years ago by anonymous

Resolution: invalid
Status: closednew

Replying to Dibblah:

Discussion and compilation support on the mailing lists, please.

Er... This is a bug report relating to a script in SVN, with a patch that fixes the bug, that's been tested and seems to work... Why exactly does this need to be discussed on the mailing list?

comment:16 Changed 14 years ago by robertm

Resolution: invalid
Status: newclosed
Ticket locked: set

This ticket has become absolutely unreadable-- If one were to try to get any sort of information out of it, it would take tons of time reading, little of which is relevant to the purported fix itself. As such, this ticket is the poster child for why we don't want huge discussions within tickets. If you want it re-opened, please ask on the mailing list-- to the best of my knowledge nigel has already resolved the 10.6.2 compilation issues. If you disagree, open a new ticket with a patch against current trunk, and keep the random back-and forth on the mailing lists.

Note: See TracTickets for help on using tickets.