On 6/7/2018 3:39 AM, René Rebe wrote:
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?
Probably a good idea, based on the amount of new warnings that GCC 8.X seems to 
generate.

 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, … 
:-/
Thanks for the hint, I will try downgrading bash on the Ubuntu build server, it currently has bash v4.3.48 and T2 wants v4.2-053.

If that doesn't work, I will be back asking for more hints about wrapper 
debugging.

Jan

        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,


----------------------------------------------------------- 
If you wish to unsubscribe from this mailing, send mail to
[email protected] with a subject of: unsubscribe t2

Reply via email to