tech-pkg archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: scanner problem with packages depending on devel/gobject-introspection



> On Jul 31, 2018, at 10:25 PM, Brook Milligan <brook%nmsu.edu@localhost> wrote:
> 
> I am running into problems building packages that depend on devel/glib2.  One example is devel/gobject-introspection.  When the scanner is run during the build it cannot find some of the glib2 header files, one example of which is include/glib/glib-2.0/glib/gmacros.h.  All the normal compiling and linking seems to work fine, so the problem is apparently limited to the scanner.  The following patch (and a similar one for tests/offsets/Makefile.in) fixes the problem.
> 
> --- Makefile.in.orig    2017-10-02 12:22:46.000000000 +0000
> +++ Makefile.in
> @@ -978,6 +978,9 @@ INTROSPECTION_SCANNER = \
> INTROSPECTION_SCANNER_ARGS = \
>     --verbose \
>     -I$(top_srcdir) \
> +    -I@BUILDLINK_DIR@/include/glib/glib-2.0 \
> +    -I@BUILDLINK_DIR@/include/glib/gio-unix-2.0 \
> +    -I@BUILDLINK_DIR@/lib/glib-2.0/include \
>     --add-include-path=$(srcdir) \
>     --add-include-path=$(top_srcdir)/gir \
>     --add-include-path=$(builddir) \
> 
> Additionally, the same problem crops up with, for example, devel/atk and I expect it will happen with other packages that depend on devel/glib2.  There must be some systematic problem rather than a need to patch all the depending packages.
> 
> The system in question is running CentOS.

To add some more details, here is a bit more information.

First, I should have said that the problem is with g-ir-scanner (part of devel/gobject-introspection) creating *.gir files.

Second, here is an example of a failing command during the build of devel/atk:

make[3]: Entering directory `/scratch/brook/NetBSD/pkgsrc/pkgsrc-2017Q4/devel/atk/work/atk-2.26.1/atk'
CPPFLAGS="-I/usr/include -I/home/brook/work/pkg-2017Q4/include -DG_DISABLE_SINGLE_INCLUDES -DATK_DISABLE_SINGLE_INCLUDES" CFLAGS="-O2 -D_FORTIFY_SOURCE=2 -I/usr/include -I/home/brook/work/pkg-2017Q4/include -Wall" LDFLAGS="-L/scratch/brook/pkg-2017Q4/gcc7/bin/../lib/gcc/x86_64-redhat-linux/7.2.0 -Wl,-R/scratch/brook/pkg-2017Q4/gcc7/bin/../lib/gcc/x86_64-redhat-linux/7.2.0 -L/home/brook/work/pkg-2017Q4/gcc7/lib64 -Wl,-R/home/brook/work/pkg-2017Q4/gcc7/lib64 -L/usr/lib64 -Wl,-R/usr/lib64 -L/home/brook/work/pkg-2017Q4/lib -Wl,-R/home/brook/work/pkg-2017Q4/lib" CC="cc" PKG_CONFIG="/scratch/brook/NetBSD/pkgsrc/pkgsrc-2017Q4/devel/atk/work/.tools/bin/pkg-config" DLLTOOL="false" CC="cc" /home/brook/work/pkg-2017Q4/bin/g-ir-scanner   --namespace=Atk --nsversion=1.0 --libtool="/bin/sh ../libtool"  --include=GObject-2.0    --library=libatk-1.0.la --pkg-export=atk --warn-all --c-include="atk/atk.h" --cflags-begin -I.. -I.. -DGLIB_DISABLE_DEPRECATION_WARNINGS -DATK_DISABLE_DEPRECATIO_WARNINGS -DATK_COMPILATION -DATK_LOCALEDIR="\"/home/brook/work/pkg-2017Q4/share/locale\"" -I/home/brook/work/pkg-2017Q4/include/glib/glib-2.0 -I/home/brook/work/pkg-2017Q4/lib/glib-2.0/include -I/home/brook/work/pkg-2017Q4/include -fvisibility=hidden --cflags-end  atkaction.h atkcomponent.h atkdocument.h atkeditabletext.h atkgobjectaccessible.h atkhyperlink.h atkhyperlinkimpl.h atkhypertext.h atknoopobject.h atknoopobjectfactory.h atkobject.h atkobjectfactory.h atkplug.h atkimage.h atkrange.h atkregistry.h atkrelation.h atkrelationtype.h atkrelationset.h atkselection.h atksocket.h atkstate.h atkstateset.h atkstreamablecontent.h atktable.h atktablecell.h atktext.h atkutil.h atkmisc.h atkvalue.h atkwindow.h atkaction.c atkcomponent.c atkdocument.c atkeditabletext.c atkgobjectaccessible.c atkhyperlink.c atkhyperlinkimpl.c atkhypertext.c atkimage.c atknoopobject.c atknoopobjectfactory.c atkobject.c atkobjectfactory.c atkplug.c atkprivate.h atkprivate.c atkrange.c atkregistry.c atkrelation.c atkrelationset.c atkselection.c atksocket.c atkstate.c atkstateset.c atkstreamablecontent.c atktable.c atktablecell.c atktext.c atkutil.c atkmisc.c atkvalue.c atkversion.c atkwindow.c atkversion.h atk-enum-types.c atk-enum-types.h libatk-1.0.la Makefile --output Atk-1.0.gir
In file included from /scratch/brook/NetBSD/pkgsrc/pkgsrc-2017Q4/devel/atk/work/atk-2.26.1/atk/atkaction.h:27:0,
                 from /scratch/brook/NetBSD/pkgsrc/pkgsrc-2017Q4/devel/atk/work/atk-2.26.1/atk/g-ir-cpp-e8gpts.c:4:
/scratch/brook/NetBSD/pkgsrc/pkgsrc-2017Q4/devel/atk/work/atk-2.26.1/atk/atkobject.h:27:10: fatal error: glib-object.h: No such file or directory
 #include <glib-object.h>
         ^~~~~~~~~~~~~~~
compilation terminated.
Caught exception: <class 'distutils.errors.CompileError'> CompileError(DistutilsExecError("command 'cc' failed with exit status 1",),)

Adding the value of ${INTROSPECTION_CFLAGS}, which includes paths to the glib-2.0 directory with the missing file, to the definition of CFLAGS (which shows up in the command line) does not help.

Is it possible that the buildlink machinery is messing with this command line?

Any ideas?

Thanks for your help.

Cheers,
Brook



Home | Main Index | Thread Index | Old Index