[mythtv] Ticket #3062: Freebsd compatibility patches

usleepless at gmail.com usleepless at gmail.com
Fri Mar 9 16:12:24 UTC 2007


Isaac, List,

On 3/4/07, Isaac Richards <ijr at case.edu> wrote:
> On Friday 16 February 2007 8:52:50 pm Isaac Richards wrote:
> > On Wednesday 14 February 2007 9:15:21 pm Nigel Pearson wrote:
> > > [much discussion on programs/mythbackend/mainserver.cpp locking deleted]
> > >
> > > > Actually, looking at it again, I see what the problem on freebsd
> > > > could be.
> > > > Easy enough to fix properly, without breaking the lock or just
> > > > disabling it..
> > > > =)
> > > >
> > > > Isaac
> > >
> > > Sorry to hassle you, Myth(ical) boss-man,
> > > but did you make any progress on this?
> > >
> > > Any psuedo-code that usleep could test?
> >
> > Sorry, I've been out of town for work.  I still have a few thousand emails
> > to read.  Basically, just need to move the socket's lock into the worker's
> > run() function (before processing) instead of readyRead(), and add the
> > readyReadLock to customEvent()'s 'sendstuff' clause.  I think. =)
> 
> Patch attached.  I've only tested it for a couple hours, but I'm fairly sure
> it's working as intended.  Once I get some other confirmation that it works,
> I'll commit it.

i hope some other linux folks are willing to test your patch so it can be committed.

currently, i am trying to get mythtv-svn building on Freebsd-i386 and amd64 ( 64 bits ).

there are a couple of problems:

in configure:
  toupper() fails the way it is on fbsd: it turns RPZA into RP]A, ZMBV into ]MBV. every codec with a Z in it is mangled. this makes the build fail. is it possible to have a specific workaround for solaris? ( "tr" is called the way it is because of solaris, see definition of toupper() in configure ).
  if i create a patch, should it be posted to this ticket? or should i create a new one?

in configure:
  has_library() calls sed with curly braces. freebsd-sed errors on these. are these braces necessary (for certain platforms)?
  if i create a patch, should it be posted to this ticket? or should i create a new one?

in configure:
  when testing for 64-bits, "$cc -dumpmachine" is called. there is a bug on fbsd for cc which doesn't support "-dumpmachine". strange enough c++ DOES support "-dumpmachine". changing "$cc -dumpmachine" to "$cxx -dumpmachine" solves the problem.
  if i create a patch, should it be posted to this ticket? or should i create a new one?

mmx:
  when i build mythtv-svn on amd64-64, i get errors on all mmx-asm. so i configure with --disable-mmx. but resample.c includes resample_mmx.c when the platform is x86_32. imho the #define should read: #ifdef X86_32 && MMX
  if i create a patch, should it be posted to this ticket? or should i create a new one?

dsputil.c:
  on fbsd-amd64-64 it gives a mysterious error message in ff_check_alignment():

dsputil.c: In function `ff_check_alignment':
dsputil.c:3826: error: unrecognizable insn:
(insn 64 10 12 0 (set (reg:SI 0 ax [61])
        (subreg:SI (plus:DI (subreg:DI (reg:SI 7 sp) 0)
                (const_int -4 [0xfffffffffffffffc])) 0)) -1 (nil)
    (nil))
dsputil.c:3826: internal compiler error: in extract_insn, at recog.c:2083

changing the type of "aligned" from "int" to "long" solves the problem. this is on gcc3.4.6.

thanks for the help so far,

regards,

usleep


More information about the mythtv-dev mailing list