Hi, I am in theprocess of upgrading gstreamer related packages from 1.6.3 to 
1.8.2.
When compiling the gstreamer package, it fails due to the use of a 
gstreamer-uninstalled.pc package.
This is the error:
libtool: link: ( cd ".libs" && rm -f "libgstbase-1.0.la" && cp -pR 
"../libgstbase-1.0.la" "libgstbase-1.0.la" )
PKG_CONFIG_PATH="../../../pkgconfig:/mingw64/lib/pkgconfig" 
GI_SCANNER_DISABLE_CACHE=yes\
        GST_PLUGIN_SYSTEM_PATH_1_0="" GST_PLUGIN_PATH_1_0="" 
GST_REGISTRY_UPDATE=no \
        D:/msys64/mingw64/bin/g-ir-scanner -v --namespace GstBase \
        --nsversion=1.0 \
        --warn-all \
        --identifier-prefix=Gst \
        --symbol-prefix=gst \
        -I../../../../gstreamer-1.8.2 \
        -I../../../../gstreamer-1.8.2/libs \
        -I../../.. \
        -I../../../libs \
        --c-include "gst/base/base.h" \
        --add-include-path=../../../gst \
        --library-path=../../../gst \
        --library=libgstbase-1.0.la \
        --include=Gst-1.0 \
        --libtool="/bin/sh ../../../libtool" \
        --pkg gstreamer-1.0 \
        --pkg-export gstreamer-base-1.0 \
        --add-init-section="extern void gst_init(gint*,gchar**); 
gst_init(NULL,NULL);" \
        --output GstBase-1.0.gir \
        ../../../../gstreamer-1.8.2/libs/gst/base/base.h 
../../../../gstreamer-1.8.2/libs/gst/base/gstadapter.h 
../../../../gstreamer-1.8.2/libs/gst/base/gstbaseparse.h 
../../../../gstreamer-1.8.2/libs/gst/base/gstbasesink.h 
../../../../gstreamer-1.8.2/libs/gst/base/gstbasesrc.h 
../../../../gstreamer-1.8.2/libs/gst/base/gstbasetransform.h 
../../../../gstreamer-1.8.2/libs/gst/base/gstbitreader.h 
../../../../gstreamer-1.8.2/libs/gst/base/gstbytereader.h 
../../../../gstreamer-1.8.2/libs/gst/base/gstbytewriter.h 
../../../../gstreamer-1.8.2/libs/gst/base/gstcollectpads.h 
../../../../gstreamer-1.8.2/libs/gst/base/gstdataqueue.h 
../../../../gstreamer-1.8.2/libs/gst/base/gstflowcombiner.h 
../../../../gstreamer-1.8.2/libs/gst/base/gstpushsrc.h 
../../../../gstreamer-1.8.2/libs/gst/base/gstqueuearray.h 
../../../../gstreamer-1.8.2/libs/gst/base/gsttypefindhelper.h \
        ../../../../gstreamer-1.8.2/libs/gst/base/gstadapter.c 
../../../../gstreamer-1.8.2/libs/gst/base/gstbaseparse.c 
../../../../gstreamer-1.8.2/libs/gst/base/gstbasesink.c 
../../../../gstreamer-1.8.2/libs/gst/base/gstbasesrc.c 
../../../../gstreamer-1.8.2/libs/gst/base/gstbasetransform.c 
../../../../gstreamer-1.8.2/libs/gst/base/gstbitreader.c 
../../../../gstreamer-1.8.2/libs/gst/base/gstbytereader.c 
../../../../gstreamer-1.8.2/libs/gst/base/gstbytewriter.c 
../../../../gstreamer-1.8.2/libs/gst/base/gstcollectpads.c 
../../../../gstreamer-1.8.2/libs/gst/base/gstdataqueue.c 
../../../../gstreamer-1.8.2/libs/gst/base/gstflowcombiner.c 
../../../../gstreamer-1.8.2/libs/gst/base/gstpushsrc.c 
../../../../gstreamer-1.8.2/libs/gst/base/gstqueuearray.c 
../../../../gstreamer-1.8.2/libs/gst/base/gsttypefindhelper.c
g-ir-scanner: link: D:/msys64/usr/bin/sh ../../../libtool --mode=link --tag=CC 
x86_64-w64-mingw32-gcc -o 
D:/M/mingw-w64-gstreamer/src/build-x86_64-w64-mingw32/libs/gst/base/tmp-introspectjaycxc/GstBase-1.0.exe
 -Wl,--export-all-symbols -D_FORTIFY_SOURCE=2 -D__USE_MINGW_ANSI_STDIO=1 
-D_POSIX_C_SOURCE -I/mingw64/include -march=x86-64 -mtune=generic -O2 -pipe 
-pipe 
tmp-introspectjaycxc/M/mingw-w64-gstreamer/src/build-x86_64-w64-mingw32/libs/gst/base/tmp-introspectjaycxc/GstBase-1.0.o
 -L. libgstbase-1.0.la -L../../../gst 
-L../../D/M/mingw-w64-gstreamer/src/build-x86_64-w64-mingw32/gst/.libs 
-LD:/msys64/mingw64/lib -lgio-2.0 -lgmodule-2.0 -pthread -lgstreamer-1.0 
-lgobject-2.0 -lglib-2.0 -lintl
../../../libtool: line 7537: cd: 
../../D/M/mingw-w64-gstreamer/src/build-x86_64-w64-mingw32/gst/.libs: No such 
file or directory
libtool:   error: cannot determine absolute directory name of 
'../../D/M/mingw-w64-gstreamer/src/build-x86_64-w64-mingw32/gst/.libs'


I have traced it down to the use of the gstreamer-1.0-uninstalled.pc file :
# the standard variables don't make sense for an uninstalled copy
prefix=
exec_prefix=
libdir=/D/M/mingw-w64-gstreamer/src/build-x86_64-w64-mingw32/gst/.libs
# includedir is builddir because it is used to find gstconfig.h in places
includedir=/D/M/mingw-w64-gstreamer/src/build-x86_64-w64-mingw32
toolsdir=/D/M/mingw-w64-gstreamer/src/build-x86_64-w64-mingw32/tools
pluginsdir=/D/M/mingw-w64-gstreamer/src/build-x86_64-w64-mingw32
girdir=/D/M/mingw-w64-gstreamer/src/build-x86_64-w64-mingw32/gst
completionsdir=/D/M/mingw-w64-gstreamer/src/build-x86_64-w64-mingw32/data/completions
helpersdir=/D/M/mingw-w64-gstreamer/src/build-x86_64-w64-mingw32/libs/gst/helpers
typelibdir=/D/M/mingw-w64-gstreamer/src/build-x86_64-w64-mingw32/gst

Name: GStreamer Uninstalled
Description: Streaming media framework, Not Installed
Version: 1.8.2
Requires: glib-2.0, gobject-2.0
Requires.private: gmodule-no-export-2.0
Libs: -L${libdir} -lgstreamer-1.0
Cflags: 
-I/D/M/mingw-w64-gstreamer/src/build-x86_64-w64-mingw32/../gstreamer-1.8.2 
-I/D/M/mingw-w64-gstreamer/src/build-x86_64-w64-mingw32/../gstreamer-1.8.2/libs 
-I/D/M/mingw-w64-gstreamer/src/build-x86_64-w64-mingw32 
-I/D/M/mingw-w64-gstreamer/src/build-x86_64-w64-mingw32/libs


Running pkgconf on it yields this:
$  pkg-config --libs gstreamer-1.0-uninstalled-LD:/msys64/mingw64/lib 
-LD:/M/mingw-w64-gstreamer/src/D/M/mingw-w64-gstreamer/src/build-x86_64-w64-mingw32/gst/.libs
 -lgstreamer-1.0 -lgobject-2.0 -lglib-2.0 -lintl

You can see that the second -L dir is messed up.
Same with --debug gives this (only significant output is kept):
Reading 'gstreamer-1.0-uninstalled' from file 
'D:/M/mingw-w64-gstreamer/src/build-x86_64-w64-mingw32/pkgconfig\gstreamer-1.0-uninstalled.pc'
Parsing package file 
'D:/M/mingw-w64-gstreamer/src/build-x86_64-w64-mingw32/pkgconfig\gstreamer-1.0-uninstalled.pc'
  line>
  line>prefix=
 Variable declaration, 'prefix' overridden with 'D:/M/mingw-w64-gstreamer/src'
  line>exec_prefix=
 Variable declaration, 'exec_prefix' has value ''
  line>libdir=/D/M/mingw-w64-gstreamer/src/build-x86_64-w64-mingw32/gst/.libs
 Variable declaration, 'libdir' has value 
'D:/M/mingw-w64-gstreamer/src/D/M/mingw-w64-gstreamer/src/build-x86_64-w64-mingw32/gst/.libs'
  line>


Further research shows that this is caused by pkg-config being compiled with 
ENABLE_DEFINE_PREFIX enabled.This will make pkg-config guess the prefix 
value.And if the the libdir starts with the original prefix (empty in my case) 
it will prepend the libdir with the guessed prefix. Net result is wacky!
Any suggestions on how to address this issue. Should pkg-config be compiled 
without 
ENABLE_DEFINE_PREFIX enabled ?
Cheers,Philippe.






------------------------------------------------------------------------------
_______________________________________________
Msys2-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/msys2-users

Reply via email to