Re: [ptxdist] gobject-introspection: syntax error, unexpected typedef-names

2016-09-09 Thread Roland Hieber

On 09.09.2016 08:38, Michael Olbrich wrote:

I don't know how to find out the minimum required kernel version for a
compiled glibc but I looked at the configure options used for
OSELAS.Toolchain-2016.06.0. The minimum required kernel version is set to
3.18 :-/.


OK, I tried building on kernel 4.6.0 from jessie-backports. The FATAL 
errors are gone but, the syntax errors in the g-i compile stage are 
still being thrown:


  .../sysroot-target/usr/include/glib-2.0/gio/gio-autocleanups.h:106:
  syntax error, unexpected typedef-name, expecting identifier or '(' in
  'typedef GProxy *GProxy_autoptr;' at 'GProxy_autoptr'

...although they don't seem to affect the build, since g-i now 
targetinstalls correctly :)



You could hack ./platform-arm-hf/sysroot-cross/bin/qemu-cross to add '-r
3.18' to the qemu command-line. That may help, but could cause other issues
later, but probably not for the g-i stuff.


Uhh, that seems more like a dirty hack than a real fix to me ;-) I'll 
rather compile with a newer host kernel.


Thanks!

 - Roland

___
ptxdist mailing list
ptxdist@pengutronix.de

Re: [ptxdist] gobject-introspection: syntax error, unexpected typedef-names

2016-09-09 Thread Michael Olbrich
On Thu, Sep 08, 2016 at 03:15:26PM +0200, Roland Hieber wrote:
> On 05.09.2016 15:07, Michael Olbrich wrote:
> > This may be a glibc issue: When executed like this, then the target glibc
> > will see your host kernel version. What toolchain are you using? The
> > minimum kernel version for the glibc is selected at build time and verified
> > at runtime. So your host kernel may indeed be to old for the target
> > toolchain...
> 
> I'm using 
> OSELAS.Toolchain-2016.06.0/arm-v7a-linux-gnueabihf/gcc-5.4.0-glibc-2.23-binutils-2.26-kernel-4.6-sanitized.
> I recently talked with Jan Lübbe on this, and as far as I understood g-i
> seems to take the target kernel version as the minimum supported version,
> also when building host-g-i. My target kernel is 4.7, my host kernel is
> 3.14.
> 
> Is there any way to find out the minimum required kernel version for the
> compiled glibc? I would be able to try kernel 4.6 from jessie-backports on
> my host system, but if it is really like mentioned above, 4.6 would probably
> not help much…?

I don't know how to find out the minimum required kernel version for a
compiled glibc but I looked at the configure options used for
OSELAS.Toolchain-2016.06.0. The minimum required kernel version is set to
3.18 :-/.

You could hack ./platform-arm-hf/sysroot-cross/bin/qemu-cross to add '-r
3.18' to the qemu command-line. That may help, but could cause other issues
later, but probably not for the g-i stuff.

Btw, that script is generated in rules/host-qemu.make if you want to create
a more permanent solution.

Michael

-- 
Pengutronix e.K.   | |
Industrial Linux Solutions | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0|
Amtsgericht Hildesheim, HRA 2686   | Fax:   +49-5121-206917- |

___
ptxdist mailing list
ptxdist@pengutronix.de

Re: [ptxdist] gobject-introspection: syntax error, unexpected typedef-names

2016-09-05 Thread Michael Olbrich
On Fri, Sep 02, 2016 at 05:17:08PM +0200, Roland Hieber wrote:
> On 02.09.2016 11:17, Michael Olbrich wrote:
> > I don't think the Kernel Version matters. I think the errors are caused by
> > a broken cross ldd. Please test check if .../sysroot-cross/bin/qemu/ldd
> > works correctly for target binaries. If not, then please send this file,
> > it's a shell script.
> 
> The ldd script only prints "FATAL: kernel too old" and exits with return
> code 1 when called on platform/root/bin/sh.  I have attached the script.
> The error actually comes from the call to qemu-cross in line 116, which I
> can reproduce:
> 
> $ ./sysroot-cross/bin/qemu-cross -E \
>   LD_TRACE_LOADED_OBJECTS=1,LD_WARN=,LD_BIND_NOW=,LD_VERBOSE= \
>   root/bin/sh
> FATAL: kernel too old

This may be a glibc issue: When executed like this, then the target glibc
will see your host kernel version. What toolchain are you using? The
minimum kernel version for the glibc is selected at build time and verified
at runtime. So your host kernel may indeed be to old for the target
toolchain...

Michael

-- 
Pengutronix e.K.   | |
Industrial Linux Solutions | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0|
Amtsgericht Hildesheim, HRA 2686   | Fax:   +49-5121-206917- |

___
ptxdist mailing list
ptxdist@pengutronix.de

Re: [ptxdist] gobject-introspection: syntax error, unexpected typedef-names

2016-09-02 Thread Roland Hieber

On 02.09.2016 11:17, Michael Olbrich wrote:

I don't think the Kernel Version matters. I think the errors are caused by
a broken cross ldd. Please test check if .../sysroot-cross/bin/qemu/ldd
works correctly for target binaries. If not, then please send this file,
it's a shell script.


The ldd script only prints "FATAL: kernel too old" and exits with return 
code 1 when called on platform/root/bin/sh.  I have attached the script. 
 The error actually comes from the call to qemu-cross in line 116, 
which I can reproduce:


$ ./sysroot-cross/bin/qemu-cross -E \
  LD_TRACE_LOADED_OBJECTS=1,LD_WARN=,LD_BIND_NOW=,LD_VERBOSE= \
  root/bin/sh
FATAL: kernel too old

I'm currently rebuilding my project in a new, clean directory to see if 
the error goes away.


 - Roland
#!/bin/bash
# Copyright (C) 1996-2016 Free Software Foundation, Inc.
# This file is part of the GNU C Library.

# The GNU C Library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2.1 of the License, or (at your option) any later version.

# The GNU C Library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
# Lesser General Public License for more details.

# You should have received a copy of the GNU Lesser General Public
# License along with the GNU C Library; if not, see
# .


# This is the `ldd' command, which lists what shared libraries are
# used by given dynamically-linked executables.  It works by invoking the
# run-time dynamic linker as a command and setting the environment
# variable LD_TRACE_LOADED_OBJECTS to a non-empty value.

# We should be able to find the translation right at the beginning.
TEXTDOMAIN=libc
TEXTDOMAINDIR=/usr/share/locale

RTLDLIST="/opt/OSELAS.Toolchain-2016.06.0/arm-v7a-linux-gnueabihf/gcc-5.4.0-glibc-2.23-binutils-2.26-kernel-4.6-sanitized/sysroot-arm-v7a-linux-gnueabihf/lib/ld-linux-armhf.so.3"
warn=
bind_now=
verbose=

while test $# -gt 0; do
  case "$1" in
  --vers | --versi | --versio | --version)
echo 'ldd (GNU libc) 2.23'
printf $"Copyright (C) %s Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
" "2016"
printf $"Written by %s and %s.
" "Roland McGrath" "Ulrich Drepper"
exit 0
;;
  --h | --he | --hel | --help)
echo $"Usage: ldd [OPTION]... FILE...
  --help  print this help and exit
  --version   print version information and exit
  -d, --data-relocs   process data relocations
  -r, --function-relocs   process data and function relocations
  -u, --unusedprint unused direct dependencies
  -v, --verbose   print all information
"
printf $"For bug reporting instructions, please see:\\n%s.\\n" \
  ""
exit 0
;;
  -d | --d | --da | --dat | --data | --data- | --data-r | --data-re | \
  --data-rel | --data-relo | --data-reloc | --data-relocs)
warn=yes
shift
;;
  -r | --f | --fu | --fun | --func | --funct | --functi | --functio | \
  --function | --function- | --function-r | --function-re | --function-rel | \
  --function-relo | --function-reloc | --function-relocs)
warn=yes
bind_now=yes
shift
;;
  -v | --verb | --verbo | --verbos | --verbose)
verbose=yes
shift
;;
  -u | --u | --un | --unu | --unus | --unuse | --unused)
unused=yes
shift
;;
  --v | --ve | --ver)
echo >&2 $"ldd: option \`$1' is ambiguous"
exit 1
;;
  --)   # Stop option processing.
shift; break
;;
  -*)
echo >&2 'ldd:' $"unrecognized option" "\`$1'"
echo >&2 $"Try \`ldd --help' for more information."
exit 1
;;
  *)
break
;;
  esac
done

nonelf ()
{
  # Maybe extra code for non-ELF binaries.
  return 1;
}

add_env="LD_TRACE_LOADED_OBJECTS=1 LD_WARN=$warn LD_BIND_NOW=$bind_now"
add_env="$add_env LD_VERBOSE=$verbose"
if test "$unused" = yes; then
  add_env="$add_env LD_DEBUG=\"$LD_DEBUG${LD_DEBUG:+,}unused\""
fi

# The following command substitution is needed to make ldd work in SELinux
# environments where the RTLD might not have permission to write to the
# terminal.  The extra "x" character prevents the shell from trimming trailing
# newlines from command substitution results.  This function is defined as a
# subshell compound list (using "(...)") to prevent parameter assignments from
# affecting the calling shell execution environment.
try_trace() (
  output=$(eval 
/home/rhieber/Projects/OSELAS.BSP-MyPlatform/platform-myplatform/sysroot-cross/bin/qemu-cross
 -E "${add_env// /,}" '"$@"' 2>&1; rc=$?; printf 'x'; exit $rc)
  rc=$?
  printf '%s' "${output%x}"
  return $rc
)

case $# in
0)
  

Re: [ptxdist] gobject-introspection: syntax error, unexpected typedef-names

2016-09-02 Thread Michael Olbrich
On Thu, Sep 01, 2016 at 07:21:04PM +0200, Roland Hieber wrote:
> I'm trying to compile {host-}gobject-introspection on ptxdist-2016-08.0 on a
> Debian jessie. The compile target fails with various syntax errors like
> these (full build log is attached):
> 
> > .../sysroot-target/usr/include/glib-2.0/glib/glib-autocleanups.h:88:
> > syntax error, unexpected typedef-name, expecting identifier or '(' in
> > 'typedef GVariantType *GVariantType_autoptr;' at
> > 'GVariantType_autoptr'
> 
> The host-target seems to build though, and the host package is (apparently)
> installed correctly into platform/sysroot-host.  However, the same error
> messages in the target package seem to fail the build.
> 
> Also the autogen.sh lines in host-gobject-introspection.extract.post stage
> look strange to me.
> 
> Also, when building without -je1 -ji1 (see second attachment), I get
> additional warnings "FATAL: kernel too old".  (Does that refer to the Linux
> kernel?  I'm running 3.16.0-4-amd64, but I'm not sure if I'm able to upgrade
> that...)

I don't think the Kernel Version matters. I think the errors are caused by
a broken cross ldd. Please test check if .../sysroot-cross/bin/qemu/ldd
works correctly for target binaries. If not, then please send this file,
it's a shell script.

Michael


-- 
Pengutronix e.K.   | |
Industrial Linux Solutions | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0|
Amtsgericht Hildesheim, HRA 2686   | Fax:   +49-5121-206917- |

___
ptxdist mailing list
ptxdist@pengutronix.de