Help with QT-based port?

Craig Treleaven ctreleaven at cogeco.ca
Thu Mar 29 07:55:31 PDT 2012


At 8:47 AM -0500 3/29/12, Ryan Schmidt wrote:
>On Mar 28, 2012, at 19:14, Craig Treleaven wrote:
>
>>  I've run into a wall trying to port MythTV.  The linker barfs complaining:
>>>  ld: -L must be immediately followed by a directory path (no space)
>>
>>  Debug-level log from my most recent attempt is here:
>> 
>>http://dl.dropbox.com/u/26787680/0.25%20macports%20build%20fail%202012Mar28.txt
>
>I do agree with the error message... the log shows these arguments 
>being used on a g++ invocation:
>
>-L -lQtGui_debug
>
>Perhaps some directory name variable is not being set and is therefore empty.
>
>
>>  Portfile in development* is here:
>>  http://dl.dropbox.com/u/26787680/Portfile
>
>
>>  fetch.type          git
>>
>>  git.branch          92f7d1f51c
>
>Does the 0.25-rc tarball posted on github not work? This is hundreds 
>of MB and takes a long time to fetch, which happens every time I 
>clean and try again, which is something I do often when 
>troubleshooting and/or developing a port, which makes it hard to 
>work on the port.

Sorry, I'm branch new to developing a port.  Exactly, what should I 
do to use the tarball?  I agree that the git clone is quite slow.

>
>>  license             GPL
>
>Can you be more specific about what version(s) of the GPL?

Need to research this.  First, though, I want to get a working build!  ;)

>
>>  maintainers         ctreleaven openmaintainer
>
>Since you are not a committer, the maintainers line should contain 
>your actual (obfuscated) email address:
>
>maintainers         cogeco.ca:ctreleaven openmaintainer

Noted, thanks.

>
>>  pre-configure       { append worksrcpath "/mythtv" }
>
>
>This is an odd way of setting worksrcpath, and fails if you ask 
>MacPorts to break the installation into separate steps, as in:
>
>$ cd mythtv
>$ sudo port configure
>$ sudo port build
>
>So you simply want:
>
>worksrcdir          ${name}-${version}/mythtv

Will correct.

>You'll also want to remove the version line; the github.setup line 
>sets the version for you.
>
>
>>  configure.env-append    MACOSX_DEPLOYMENT_TARGET="10.5" \
>>                    	CFLAGS="-m32" \
>>                    	CPPFLAGS="-m32" \
>>                    	CXXFLAGS="-m32" \
>>                    	LDFLAGS="-m32 -F/System/Library/Frameworks 
>>-L/usr/lib -L${prefix}/lib" \
>>                    	ECXXFLAGS="-m32"
>
>I wouldn't think you'd need to specify -m32 everywhere, since 
>MacPorts already sets -arch i386 everywhere for you, which should be 
>the same thing.

I'm copying the existing build processes.  Eventually, I want to 
install some optional Perl and Python dependencies and I believe one 
of them fails in a 64 bit environment.  If I can get 32 bit working, 
I'll go on and try 64 bit.

>Note that MacPorts has special variables for most of these env vars, 
>which you should set or append to, instead of manually appending to 
>the environment:
>
>macosx_deployment_target
>configure.cflags
>configure.cppflags
>configure.cxxflags
>configure.ldflags

Found those later, I'll change.

>I'm surprised you need to specify -L/usr/lib, since /usr/lib is a 
>standard library directory that should be searched anyway. Or are 
>you just trying to force that /usr/lib is searched before 
>${prefix}/lib? If so, I'd be curious to know why, since that's the 
>opposite of what we usually want.
>

Ignorance on my part.  I'll fix.

>It is a problem that the port is building using "gcc" and "g++"; see:
>
>https://trac.macports.org/wiki/UsingTheRightCompiler

Sorry, I've read the page but I don't understand the problem.  My 
output includes the following:
CXX='ccache /usr/bin/g++-4.2'
CC='ccache /usr/bin/gcc-4.2'

Is this a problem?

>
>It appears to be compiling its own version of libavcodec. The 
>version that the ffmpeg port provides is not sufficient?

Correct.  Myth compiles its own version of ffmpeg because there is 
too much variability in arguments that various versions of ffmpeg 
accept.  For each major MythTV version, they resync ffmpeg.

>
>See output of "port lint --nitpick" for some whitespace nits.

Will do.

>
>Finally, I fail with:
>
>dvdnav/dvdnav.c: In function 'dvdnav_open':
>dvdnav/dvdnav.c:79: error: 'DVDNAV_SVN_REV' undeclared (first use in 
>this function)
>dvdnav/dvdnav.c:79: error: (Each undeclared identifier is reported only once
>dvdnav/dvdnav.c:79: error: for each function it appears in.)
>

Strange.

>
>>  *Needs qt4-mac +mysql5.  Takes 1 hour plus to build the 
>>dependencies on my quad-core MBP.
>
>Admittedly I have not done this yet. Guess I'd better get started.

In specifying the port dependency, how does one check that a 
particular variant is present?

Also, some more searching suggests that qt ver 4.6.3 might work where 
the default 4.7.4 doesn't.  How does one get a list of the versions 
of a port that may be installed?

Many thanks for the feedback.

Craig
-- 
--
Craig Treleaven, CA -- Clearview Consulting
(905) 829-2054  ctreleaven at cogeco.ca


More information about the macports-dev mailing list