Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: MythTV: Dev

Mac OS X build error "ld: -L <blank>"

 

 

MythTV dev RSS feed   Index | Next | Previous | View Threaded


ctreleaven at cogeco

Mar 27, 2012, 6:33 AM

Post #1 of 8 (610 views)
Permalink
Mac OS X build error "ld: -L <blank>"

I'm trying to create a MacPorts port* of MythTV for OS X using
0.25-rc but it is failing while building a couple of the myth
libraries (libmythservicecontracts and libmythbase).

For example -
>ccache g++ -headerpad_max_install_names -m32 -L/opt/local/lib -arch
>i386 -F/System/Library/Frameworks -Wl,-dynamic,-search_paths_first
>-arch i386 -single_module -dynamiclib -compatibility_version 0.25
>-current_version 0.25.0 -install_name
> /opt/local/lib/libmythbase-0.25.0.dylib -o
>libmythbase-0.25.0.25.0.dylib mthread.o mthreadpool.o mythsocket.o
>mythsocketthread.o msocketdevice.o mythdbcon.o mythdb.o
>oldsettings.o mythobservable.o mythevent.o httpcomms.o mcodecs.o
>mythdirs.o mythsignalingtimer.o lcddevice.o mythstorage.o
>remotefile.o mythcorecontext.o mythsystem.o mythlocale.o
>storagegroup.o mythcoreutil.o mythdownloadmanager.o
>mythtranslation.o unzip.o iso639.o iso3166.o mythmedia.o
>mythmiscutil.o mythhdd.o mythcdrom.o dbutil.o mythhttppool.o
>mythhttphandler.o logging.o referencecounter.o
>mythcommandlineparser.o filesysteminfo.o hardwareprofile.o
>serverpool.o msocketdevice_unix.o system-unix.o mythcdrom-darwin.o
>bonjourregister.o moc_httpcomms.o moc_mythsignalingtimer.o
>moc_lcddevice.o moc_logging.o moc_mythsystem.o
>moc_mythdownloadmanager.o moc_mythmedia.o moc_mythcdrom.o
>moc_mythhttphandler.o moc_referencecounter.o moc_filesysteminfo.o
>moc_hardwareprofile.o moc_serverpool.o moc_system-unix.o
>moc_bonjourregister.o -framework IOKit -lcrypto -lmp3lame
>-L/opt/local/lib -lm
>-L/opt/local/var/macports/build/_Users_craigtreleaven_MacPortsTemp_Myth.25/mythtv/work/mythtv-0.25-rc
>-lfreetype -lz -lbz2 -F/Developer/FireWireSDK26/Examples/Framework
>-framework AVCVideoServices -L -lQtSql_debug -lQtXml_debug
>-lQtGui_debug -lQtNetwork_debug -lQtCore_debug
>ld: -L must be immediately followed by a directory path (no space)
>collect2: ld returned 1 exit status
>make[2]: *** [libmythbase-0.25.0.25.0.dylib] Error 1

I *think* there is a section of mythtv's configure that creates
"LATE_LIBS" (line 4957-4992) but I could be entirely wrong. I don't
know much about the build process.

I've been comparing my results to the osx buildbot and I can't seem
what I'm failing to do or doing differently.

Craig
* I'm trying to 'scratch my itch' for functional Perl and Python
bindings on OS X. I hope to install the binding dependencies with
MacPorts and build with the bindings installed in the normal spots
rather than in the .app bundle. If I can get this to work, I'll
certainly share.
_______________________________________________
mythtv-dev mailing list
mythtv-dev [at] mythtv
http://www.mythtv.org/mailman/listinfo/mythtv-dev


jyavenard at gmail

Mar 27, 2012, 9:14 AM

Post #2 of 8 (592 views)
Permalink
Re: Mac OS X build error "ld: -L <blank>" [In reply to]

Hi

On Wednesday, 28 March 2012, Craig Treleaven <ctreleaven [at] cogeco> wrote:

> I've been comparing my results to the osx buildbot and I can't seem what
I'm failing to do or doing differently.
>

The issue is a bug in Qt in that is simplifies to much libraries being
added, if it was added earlier, the new line is simplified so you can end
up with empty configuration.

The issue is also with how myth create/call qmake, it's just not portable
on a mac.

I wish you good luck however, it has taken me 2 weeks to get a build script
that work reliably with Xcode 4/llvm and using per-build version of Qt.

What you're attempting to do isn't for the faint hearted.


> Craig
> * I'm trying to 'scratch my itch' for functional Perl and Python bindings
on OS X. I hope to install the binding dependencies with MacPorts and
build with the bindings installed in the normal spots rather than in the
.app bundle. If I can get this to work, I'll certainly share.

I am planning to work on this later. I was overseas the past 10 days. So if
you just wait a bit, you may get something that works.


ctreleaven at cogeco

Mar 28, 2012, 2:10 PM

Post #3 of 8 (574 views)
Permalink
Re: Mac OS X build error "ld: -L <blank>" [In reply to]

At 3:14 AM +1100 3/28/12, Jean-Yves Avenard wrote:
>On Wednesday, 28 March 2012, Craig Treleaven
><<mailto:ctreleaven [at] cogeco>ctreleaven [at] cogeco> wrote:
>
>> I've been comparing my results to the osx buildbot and I can't
>>seem what I'm failing to do or doing differently.
>>
>
>The issue is a bug in Qt in that is simplifies to much libraries
>being added, if it was added earlier, the new line is simplified so
>you can end up with empty configuration.
>
>The issue is also with how myth create/call qmake, it's just not
>portable on a mac.
>
>I wish you good luck however, it has taken me 2 weeks to get a build
>script that work reliably with Xcode 4/llvm and using per-build
>version of Qt.
>
>What you're attempting to do isn't for the faint hearted.
>
> > Craig
>> * I'm trying to 'scratch my itch' for functional Perl and Python
>>bindings on OS X. I hope to install the binding dependencies with
>>MacPorts and build with the bindings installed in the normal spots
>>rather than in the .app bundle. If I can get this to work, I'll
>>certainly share.
>
>I am planning to work on this later. I was overseas the past 10
>days. So if you just wait a bit, you may get something that works.
>

J-Y, you say there is a bug in QT. I've searched their bug database
but I can't find anything specific to the problem I'm having. I'm
using QT 4.7.4, if that makes a difference. In
osx-packager-qtsdk.pl, I see you've referenced a number of bugs.
AFAIK, none of them seems specific to this issue.

I really don't understand where I'm going off the rails. I've
carefully compared the processes used by OS X buildbot AND at
osx-packager.pl. osx-packager.pl puts more stuff in environment
variables while the buildbot passes more on the command line to
mythtv/configure. I can reconcile the LDFLAGS v. --extra-libs and
--extra-ldflags. But I don't see where the blank -L is being
generated. The build log output generated is quite detailed; could
some kind soul have a look and point me in the right direction?

http://dl.dropbox.com/u/26787680/0.25%20macports%20build%20fail%202012Mar28.txt

Craig


jyavenard at gmail

Mar 28, 2012, 3:00 PM

Post #4 of 8 (573 views)
Permalink
Re: Mac OS X build error "ld: -L <blank>" [In reply to]

Hi

On Thursday, 29 March 2012, Craig Treleaven <ctreleaven [at] cogeco> wrote:

> J-Y, you say there is a bug in QT. I've searched their bug database but
I can't find anything specific to the problem I'm having. I'm using QT
4.7.4, if that makes a difference. In osx-packager-qtsdk.pl, I see you've
referenced a number of bugs. AFAIK, none of them seems specific to this
issue.
> I really don't understand where I'm going off the rails. I've carefully
compared the processes used by OS X buildbot AND at osx-packager.pl.
osx-packager.pl puts more stuff in environment variables while the buildbot
passes more on the command line to mythtv/configure. I can reconcile the
LDFLAGS v. --extra-libs and --extra-ldflags. But I don't see where the
blank -L is being generated. The build log output generated is quite
detailed; could some kind soul have a look and point me in the right
direction?
>
http://dl.dropbox.com/u/26787680/0.25%20macports%20build%20fail%202012Mar28.txt
> Craig
>

I'm not going to spend any time debugging the old packager. It is my
intention to drop it as soon as 0.25 is released.


nigel at ind

Mar 29, 2012, 2:53 PM

Post #5 of 8 (570 views)
Permalink
Re: Mac OS X build error "ld: -L <blank>" [In reply to]

On 28/03/2012, at 12:33 AM, Craig Treleaven wrote:


>> -L/opt/local/var/macports/build/_Users_craigtreleaven_MacPortsTemp_Myth.25/mythtv/work/mythtv-0.25-rc -lfreetype -lz -lbz2 -F/Developer/FireWireSDK26/Examples/Framework -framework AVCVideoServices -L -lQtSql_debug -lQtXml_debug -lQtGui_debug -lQtNetwork_debug -lQtCore_debug ld: -L must be immediately followed by a directory path (no space)
>> collect2: ld returned 1 exit status
>> make[2]: *** [libmythbase-0.25.0.25.0.dylib] Error 1
>
> I *think* there is a section of mythtv's configure that creates "LATE_LIBS" (line 4957-4992) but I could be entirely wrong.


That sounds like a good hunch. If $QMAKE_LIBDIR_QT was somehow empty
(e.g. whitespace), it might do what you are seeing.


I would try removing that block, or just going into src/mythtv and
looking at config.mak and the values of LATE_LIBS or EXTRA_LIBS.

--
Nigel Pearson, nigel [at] ind|"It'll be safe in here."
Telstra Net. Eng., Sydney, Australia |"Yes. Shielded by the
Office: 8576 5449 Fax: 9298 9033 | power of my intense
Mobile: 0408 664435 Home: 9792 6998 | disinterest"





_______________________________________________
mythtv-dev mailing list
mythtv-dev [at] mythtv
http://www.mythtv.org/mailman/listinfo/mythtv-dev


ctreleaven at cogeco

Apr 7, 2012, 7:04 AM

Post #6 of 8 (535 views)
Permalink
Re: Mac OS X build error "ld: -L <blank>" [In reply to]

At 8:53 AM +1100 3/30/12, Nigel Pearson wrote:
>On 28/03/2012, at 12:33 AM, Craig Treleaven wrote:
> >>
>-L/opt/local/var/macports/build/_Users_craigtreleaven_MacPortsTemp_Myth.25/mythtv/work/mythtv-0.25-rc
>-lfreetype -lz -lbz2 -F/Developer/FireWireSDK26/Examples/Framework
>-framework AVCVideoServices -L -lQtSql_debug -lQtXml_debug
>-lQtGui_debug -lQtNetwork_debug -lQtCore_debug ld: -L must be
>immediately followed by a directory path (no space)
> >> collect2: ld returned 1 exit status
> >> make[2]: *** [libmythbase-0.25.0.25.0.dylib] Error 1

Still wandering around in the weeds here. I've noted that the OSX
Buildbot and successful runs of osx-packager.pl create a different
mythtv/libs/Makefile. The top of the file looks like this:

# Makefile for building: libs
# Generated by qmake (2.01a) (Qt 4.6.3) on: Wed Mar 21 21:12:43 2012
# Project: libs.pro
# Template: subdirs
# Command: /Users/mythbuild/myth25/.osx-packager/build/bin/qmake
-macx QMAKE=qmake -o Makefile libs.pro

I get:

# Makefile for building: libs
# Generated by qmake (2.01a) (Qt 4.7.4) on: Thu Apr 5 08:50:33 2012
# Project: libs.pro
# Template: subdirs
# Command: /opt/local/bin/qmake QMAKE=qmake -o Makefile libs.pro

Aside from the Qt version difference, note that in my case qmake is
missing the -macx flag. In turn, the same flag is then missing on
all the calls to qmake in each of the subdirectories under libs where
my link failure, above, happens.

I really don't follow how the -macx flag gets there in the working
cases and why it is not there in my case. Suggestions, pointers?

Thanks,

Craig
_______________________________________________
mythtv-dev mailing list
mythtv-dev [at] mythtv
http://www.mythtv.org/mailman/listinfo/mythtv-dev


jyavenard at gmail

Apr 7, 2012, 7:48 AM

Post #7 of 8 (526 views)
Permalink
Re: Mac OS X build error "ld: -L <blank>" [In reply to]

On 8 April 2012 00:04, Craig Treleaven <ctreleaven [at] cogeco> wrote:
> I really don't follow how the -macx flag gets there in the working cases and
> why it is not there in my case.  Suggestions, pointers?

you shouldn't use the buildbot as a comparison point. Its aim is only
to test that myth compiles okay on a mac. Nothing more. It doesn't
attempt to build an application bundle etc..

-macx is only there to tell qmake what type of make to generate,
either a makefile, or an xcode project.

You don't need to specify -macx is you've changed the default makespecs

go into the mkspecs file, and see what default is linked to.
if it is to macx-g++
then you don't need to specify -macx

And FWIW, it would be much easier (and faster) to try to compile using
the new buildscript. Not having to build Qt will save you *a lot* of
time
_______________________________________________
mythtv-dev mailing list
mythtv-dev [at] mythtv
http://www.mythtv.org/mailman/listinfo/mythtv-dev


ctreleaven at cogeco

Apr 7, 2012, 2:24 PM

Post #8 of 8 (528 views)
Permalink
Re: Mac OS X build error "ld: -L <blank>" [In reply to]

At 12:48 AM +1000 4/8/12, Jean-Yves Avenard wrote:
>On 8 April 2012 00:04, Craig Treleaven <ctreleaven [at] cogeco> wrote:
>> I really don't follow how the -macx flag gets there in the working cases and
>> why it is not there in my case. Suggestions, pointers?
>
>you shouldn't use the buildbot as a comparison point. Its aim is only
>to test that myth compiles okay on a mac. Nothing more. It doesn't
>attempt to build an application bundle etc..
>
>-macx is only there to tell qmake what type of make to generate,
>either a makefile, or an xcode project.
>
>You don't need to specify -macx is you've changed the default makespecs
>
>go into the mkspecs file, and see what default is linked to.
>if it is to macx-g++
>then you don't need to specify -macx
>
>And FWIW, it would be much easier (and faster) to try to compile using
>the new buildscript. Not having to build Qt will save you *a lot* of
>time

Thanks J-Y. What I'm trying to do is make a better OSX _backend_.
The existing .app bundles are great for the frontend but less than
wonderful for the backend. Having to specify paths that 'reach into'
the .app bundle; perl/python bindings issues, other weirdness.

Also, MacPorts has the ability to install startup items, create a
mythtv user, configure logging, etc that would make the Mac backend
install process way less painful. MacPorts also serves pre-compiled
binaries whenever possible. (The sucky part is that Qt would have to
be compiled--the config we need isn't the default build at MacPorts.)

I'm close to getting a basic build done. I just don't know enough
about ./configure, make, qmake and Qt configs to figure out where the
blank -L's are coming from. I can't even easily do a search and
replace to get rid of them since qmake is run early during the build
phase for the libs and whatnot and generates them anew.

Craig
_______________________________________________
mythtv-dev mailing list
mythtv-dev [at] mythtv
http://www.mythtv.org/mailman/listinfo/mythtv-dev

MythTV dev RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.