Hi,
On 06 Jun 2018, at 20:16, Jan Rovins <[email protected]> wrote:
> I have been trying out a recent T2 build of generic minimal using a Ubuntu
> 16.04.4 build host.
>
> There were some minor adjustments made on the host to get zstd working when
> running T2, but I am also running into trouble when trying to build glibc &
> glibc32.
>
> For glibc it seems that the line:
>
> [[ "$arch_target" = i*86-* ]] &&
> GCC_WRAPPER_INSERT="${GCC_WRAPPER_INSERT/-Os/-O2}"
>
> is no longer doing the trick, because I kept getting the error "glibc can not
> be compiled without optimization" and the only way I could get rid of that
> was to add -02 directly to CFLAGS.
>
>
> Also, GCC v8.1 was giving out extra warnings which was causing the build to
> fail because of the -Werror setting, so I had to also set CFLAGS to ignore
> some warnings to get it to build.
that is strange, I built various builds of t2 over the last weeks.
It sound like maybe the wrappers do not work in your setup? As I remember we
should probably generically remove -Werror, too?
From your log:
x86_64-t2-linux-gnu-gcc is
/opt/T2/t2-trunk/build/x86_64-9.0-svn-generic-x86-64-haswell-cross-linux/TOOLCHAIN/tools.cross/wrapper/x86_64-t2-linux-gnu-gcc
Old Command: x86_64-t2-linux-gnu-gcc --version
ENVPREFIX = 'CMD'
OTHERS = ''
INSERT = ''
REMOVE = ''
APPEND = ''
FILTER = ''
Copy: —version
I remember I saw something like this once, somewhere. Do not really recall when
and where that was though.
Maybe bash version related? There was a reason we did not yet update bash,
because the latest major version had too many strange and stray regressions, …
:-/
René
> I was able to get glibc to build by doing the following:
>
> ===================================================================
> --- package/base/glibc/glibc.conf (revision 46806)
> +++ package/base/glibc/glibc.conf (working copy)
> @@ -50,6 +50,16 @@
> var_insert GCC_WRAPPER_INSERT ' ' '-O'
> var_remove SYSGCC_WRAPPER_INSERT ' ' '-O0'
>
> +# JLR Needed to add 02 to CFLAGS to get rid of complaint about not compiling
> without optmazation
> +#var_append CFLAGS ' ' "-O2"
> +
> +# JLR Kluge to work on Ubuntu host
> +# Gcc 8 was kicking out too many warnings ...
> +#var_append confopt " " "--disable-werror"
> +# These are the specific warnings that needed to be disabled.
> +var_append CFLAGS ' ' "-O2 -Wno-stringop-truncation -Wno-format-overflow
> -Wno-format-truncation -Wno-restrict -Wno-attributes -Wno-overflow"
> +
> +
> [[ "$arch_target" = i*86-* ]] &&
> GCC_WRAPPER_INSERT="${GCC_WRAPPER_INSERT/-Os/-O2}"
>
> # for valgrind, sigh
> @@ -75,6 +85,7 @@
> configprefix='CFLAGS="$CFLAGS -g -DNDEBUG=1"'
> configscript="../configure"
>
> +echo " build ${arch_build}, host = ${arch_target}"
> var_append confopt " " "--with-gnu-binutils --build=${arch_build}
> --host=${arch_target}"
>
> # toolchain needs some guidance when we do not yet have a compiler
> ==============================================
>
> Now that I have gotten past glibc, I am stuck at glibc32 errors:
>
> <stdin>: In function 'dummy':
> <stdin>:5:72: error: invalid application of 'sizeof' to incomplete type
> 'struct La_i86_regs'
> In file included from ../sysdeps/nptl/libc-lockP.h:24,
> from ../sysdeps/nptl/libc-lock.h:184,
> from ../include/link.h:52,
> from <stdin>:1:
> <stdin>:6:70: error: invalid use of undefined type 'struct La_i86_regs'
> <stdin>:7:70: error: invalid use of undefined type 'struct La_i86_regs'
> <stdin>:8:70: error: invalid use of undefined type 'struct La_i86_regs'
> <stdin>:9:70: error: invalid use of undefined type 'struct La_i86_regs'
> <stdin>:10:70: error: invalid use of undefined type 'struct La_i86_regs'
> <stdin>:11:73: error: invalid application of 'sizeof' to incomplete type
> 'struct La_i86_retval'
> In file included from ../sysdeps/nptl/libc-lockP.h:24,
> from ../sysdeps/nptl/libc-lock.h:184,
> from ../include/link.h:52,
> from <stdin>:1:
> <stdin>:12:71: error: invalid use of undefined type 'struct La_i86_retval'
> <stdin>:13:71: error: invalid use of undefined type 'struct La_i86_retval'
> <stdin>:14:71: error: invalid use of undefined type 'struct La_i86_retval'
> <stdin>:15:71: error: invalid use of undefined type 'struct La_i86_retval'
> <stdin>:16:72: error: invalid use of undefined type 'struct La_i86_retval'
> <stdin>:17:72: error: invalid use of undefined type 'struct La_i86_retval'
> ../Makerules:281: recipe for target
> '/opt/T2/t2-trunk/src.glibc32.x86_64.20180606.140021.7492.ubu-bld-4/glibc-2.26/objdir/link-defines.h'
> failed
>
>
> It seems that the struct La_i86_retval gets defined if it is not a 64-bit
> build, but some part of my build is still going down the 64-bit path when
> trying to build the 32-bit lib. so the struct La_i86_retval is missing.
>
> I tried adding some extra -m32 and -march=i686 to GCC_WRAPPER_INSERT and
> CFLAGS but that did not help.
>
> I am attaching the glibc32 Error Log.
>
>
> Thanks,
>
--
ExactCODE GmbH, Lietzenburger Str. 42, DE-10789 Berlin
DE Legal: Amtsgericht Berlin (Charlottenburg) HRB 105123B, Tax-ID#: DE251602478
Managing Director: René Rebe
http://exactcode.com | http://exactscan.com | http://ocrkit.com |
http://t2-project.org | http://rene.rebe.de
-----------------------------------------------------------
If you wish to unsubscribe from this mailing, send mail to
[email protected] with a subject of: unsubscribe t2