Re: Help building Gstreamer 1.10 [PATCH ATTACHED]

On 11/02/17 16:01, Sam Thursfield wrote:
Autotools is a pretty hairy codebase, so
while a fix would be welcome, make sure you don't get eaten by dragons
along th way :-)
I had to dig rather deep into autotools and make and ended up debugging
g-ir-scanner a litte, a little further and I would probably have lost my
Anyway, I am trying to be a little more verbose below, so others might
find it useful when they have a similar problem and maybe can save them
selves a little time.

First, here is a little summary of whats happening:

1. The make build tries to build the GstBase-1.0.gir target.
2. The GstBase-1.0.gir target executes g-ir-scanner
3. g-ir-scanner calls the libtool wrapper script
4. the libtools wrapper script calls gcc
5. gcc fails with a link error

I played a little with g-ir-scanner until I got it to not remove the
temporary files[1] and then I was able to execute the libtool command
manually to see what change was required until it did not fail anymore.
It turns out that the problem
is caused by the link directory option ('-L/opt/gnome-build/lib'), which
appeared before the -L options for other directories, by moving it
behind the other -L options I was able to solve the problem (e.g. behind
all of -L/CHECKOUTDIR/gstreamer/gst/.libs -L. ./.libs/
-L../../../gst). The following gist shows this a little more clearly:

So the next question is what is causing the -L/opt/gnome-build/lib
option to appear before the other -L options for source and build
directories. My guess was that g-ir-scanner is somehow passing the -L
options in the wrong order to the libtool script. Actually now that I
know what the problem is, I see that this was already obvious in the
error message that I posted in the first mail of this thread.

Emmenuelle Bassi pointed me to [2], which prepares all the
arguments to send to libtool. After debugging that script a little I
found that the issue can be solved by delaying the adding of LDFLAGS to
args until the internal link flags have been added to args. I have added
a corresponding bug in bugzilla and provided a patch.

Could someone please review this and tell me if this is a sane solution?


/opt/gnome-build/ is my jhbuild prefix where the compiled modules are
being installed

[1]: by passing it the environment variable GI_SCANNER_DEBUG=save-temps,
thanks to Emmenuele Bassi for pointing this out

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]