Opened 13 years ago

Closed 13 years ago

#9400 closed Bug Report (Fixed)

MacOS X Compile failure

Reported by: Craig Treleaven <ctreleaven@…> Owned by: Nigel
Priority: minor Milestone: unknown
Component: Ports - OSX Version: 0.24-fixes
Severity: medium Keywords:
Cc: Ticket locked: no

Description

See attached build log. Fails as follows:

CC ffmpeg.o
ffmpeg.c: In function ‘getmaxrss’:
ffmpeg.c:3845: error: ‘struct rusage’ has no member named ‘ru_maxrss’
make[1]: *** [ffmpeg.o] Error 1
make[1]: *** Waiting for unfinished jobs....
make: *** [external/FFmpeg] Error 2
[osx-pkg] Failed system call: " /usr/bin/make -j3 " with error code 2
Died at ./osx-packager.pl line 1017.

My working copy of osx-packager.pl also attached with rudimentary support for syncing with git.

Attachments (3)

MacOS build fail 23Dec2010.txt (53.8 KB) - added by Craig Treleaven <ctreleaven@…> 13 years ago.
osx-packager_WCT_git.pl (41.8 KB) - added by Craig Treleaven <ctreleaven@…> 13 years ago.
osx-packager.pl build fail 02Jan2011.txt (29.7 KB) - added by Craig Treleaven <ctreleaven@…> 13 years ago.

Download all attachments as: .zip

Change History (7)

Changed 13 years ago by Craig Treleaven <ctreleaven@…>

Changed 13 years ago by Craig Treleaven <ctreleaven@…>

Attachment: osx-packager_WCT_git.pl added

comment:1 Changed 13 years ago by Nigel

On Mac OS X, /usr/include/sys/resource.h contains:

struct  rusage {
        struct timeval ru_utime;        /* user time used (PL) */
        struct timeval ru_stime;        /* system time used (PL) */
#if defined(_POSIX_C_SOURCE) && !defined(_DARWIN_C_SOURCE)
        long    ru_opaque[14];          /* implementation defined */
#else   /* (!_POSIX_C_SOURCE || _DARWIN_C_SOURCE) */
        /*
         * Informational aliases for source compatibility with programs
         * that need more information than that provided by standards,
         * and which do not mind being OS-dependent.
         */
        long    ru_maxrss;              /* max resident set size (PL) */

which, because _POSIX_C_SOURCE is defined, is half of the cause of this fault.
The other half is commit 8c6de4675, which enabled building the ffmpeg binary - we never used to compile it before.
Until someone researches the ffmpeg-user or ffmpeg-devel archives to find out the real story, it is simplest to just disable it on OS X:

% git diff
diff --git a/mythtv/configure b/mythtv/configure
index 7099422..c0e038c 100755
--- a/mythtv/configure
+++ b/mythtv/configure
@@ -3046,6 +3046,7 @@ case $target_os in
         enable  backend
         enable  darwin
         disable dvb
+        disable ffmpeg
         # Prevent linker problems on default Intel 10.5 XCode:
         ldver=$(ld -v 2>&1 | sed -e s/^[^-]*-//)
         osxver=$(uname -r | cut -c 1)
%

comment:2 Changed 13 years ago by Nigel

Changed 13 years ago by Craig Treleaven <ctreleaven@…>

comment:3 Changed 13 years ago by Craig Treleaven <ctreleaven@…>

I've been trying to test the fixes in "mythtv/master commit: 486dfa729" but the build keeps failing (verbose logs attached). Note that I tried a distclean before this run.

Also, tried to use the gitrev option to switch to the "OSX-fixes" branch. This branch doesn't exist in the Packaging repository and therefore osx-packager.pl dies trying to checkout a non-existent branch. Not sure if this is an ongoing issue or just a gotcha during development.

comment:4 Changed 13 years ago by Nigel

Resolution: Fixed
Status: newclosed

Commit 3ec48f2 should fix the originally reported fault, though I can only test on 10.6 these days.
That build error (Python related) is a new one to me. I will investigate/email in dev list.
I hadn't thought about creating an OSX-fixes in packaging (not enough cross-platform stuff in packaging to warrant it), but since it doesn't take up any extra space, I just created it. It should now work, but if not, run the script with --gitrev OSX-fixes to checkout mythtv, then with --nohead to skip Git checkouts and actually do the build.

Note: See TracTickets for help on using tickets.