mailing list of musl libc
 help / color / mirror / code / Atom feed
* alltypes.h error: conflicting types for 'size_t'
@ 2018-11-13 20:56 Daniel G.
  2018-11-14  0:14 ` Szabolcs Nagy
  0 siblings, 1 reply; 4+ messages in thread
From: Daniel G. @ 2018-11-13 20:56 UTC (permalink / raw)
  To: musl

Hi all,

I'm building a multilib cross-compiler toolchain based in musl. And this is
roughly the plan:

linux-4.18.16
gmp-6.1.2 / mpfr-4.0.1 / mpc-1.1.0
binutils-2.31.1
gcc-8.2.0 First Pass
musl-1.1.20 (git source)
gcc-8.2.0 Second Pass

During the second pass of gcc a make error occurs for the
all-target-libgcc, and it seems to be related to the mussl
include/bits/alltypes.h, due to a conflicting types for 'size_t'. As a
consequence, generic-morestack.c can't compile (I guess)

At the end of this mail you can find the output of the make process.

I would appreciate any help to solve this issue.

Thank you in advance for your cooperation.

================
Daniel Gutiérrez

----------------------------------------------------------------------

root [ /mnt/clfs_MUSL/sources/gcc-8.2.0/build ]# make all-target-libgcc
make[1]: Entering directory '/mnt/clfs_MUSL/sources/gcc-8.2.0/build/intl'
make[1]: Nothing to be done for 'all'.
make[1]: Leaving directory '/mnt/clfs_MUSL/sources/gcc-8.2.0/build/intl'
make[1]: Entering directory
'/mnt/clfs_MUSL/sources/gcc-8.2.0/build/libiberty'
make[2]: Entering directory
'/mnt/clfs_MUSL/sources/gcc-8.2.0/build/libiberty/testsuite'
make[2]: Nothing to be done for 'all'.
make[2]: Leaving directory
'/mnt/clfs_MUSL/sources/gcc-8.2.0/build/libiberty/testsuite'
make[1]: Entering directory
'/mnt/clfs_MUSL/sources/gcc-8.2.0/build/build-x86_64-cross-linux-gnu/libiberty'
make[1]: Entering directory
'/mnt/clfs_MUSL/sources/gcc-8.2.0/build/libbacktrace'
make[1]: Leaving directory
'/mnt/clfs_MUSL/sources/gcc-8.2.0/build/libiberty'

make  all-am
make[2]: Entering directory
'/mnt/clfs_MUSL/sources/gcc-8.2.0/build/libbacktrace'
make[2]: Entering directory
'/mnt/clfs_MUSL/sources/gcc-8.2.0/build/build-x86_64-cross-linux-gnu/libiberty/testsuite'
make[2]: Nothing to be done for 'all'.
make[2]: Leaving directory
'/mnt/clfs_MUSL/sources/gcc-8.2.0/build/build-x86_64-cross-linux-gnu/libiberty/testsuite'
true  DO=all multi-do # make
make[2]: Leaving directory
'/mnt/clfs_MUSL/sources/gcc-8.2.0/build/libbacktrace'
make[1]: Leaving directory
'/mnt/clfs_MUSL/sources/gcc-8.2.0/build/libbacktrace'
make[1]: Leaving directory
'/mnt/clfs_MUSL/sources/gcc-8.2.0/build/build-x86_64-cross-linux-gnu/libiberty'
make[1]: Entering directory
'/mnt/clfs_MUSL/sources/gcc-8.2.0/build/libdecnumber'
make[1]: Nothing to be done for 'all'.
make[1]: Leaving directory
'/mnt/clfs_MUSL/sources/gcc-8.2.0/build/libdecnumber'
make[1]: Entering directory
'/mnt/clfs_MUSL/sources/gcc-8.2.0/build/lto-plugin'

make  all-am
make[1]: Entering directory '/mnt/clfs_MUSL/sources/gcc-8.2.0/build/libcpp'
test -f config.h || (rm -f stamp-h1 && make stamp-h1)
make[1]: Entering directory
'/mnt/clfs_MUSL/sources/gcc-8.2.0/build/fixincludes'
make[1]: Leaving directory '/mnt/clfs_MUSL/sources/gcc-8.2.0/build/libcpp'
make[2]: Entering directory
'/mnt/clfs_MUSL/sources/gcc-8.2.0/build/lto-plugin'
make[1]: Nothing to be done for 'all'.
make[1]: Leaving directory
'/mnt/clfs_MUSL/sources/gcc-8.2.0/build/fixincludes'
make[2]: Leaving directory
'/mnt/clfs_MUSL/sources/gcc-8.2.0/build/lto-plugin'
make[1]: Leaving directory
'/mnt/clfs_MUSL/sources/gcc-8.2.0/build/lto-plugin'
make[1]: Entering directory
'/mnt/clfs_MUSL/sources/gcc-8.2.0/build/build-x86_64-cross-linux-gnu/fixincludes'
make[1]: Nothing to be done for 'all'.
make[1]: Leaving directory
'/mnt/clfs_MUSL/sources/gcc-8.2.0/build/build-x86_64-cross-linux-gnu/fixincludes'
make[1]: Entering directory
'/mnt/clfs_MUSL/sources/gcc-8.2.0/build/build-x86_64-cross-linux-gnu/libcpp'
test -f config.h || (rm -f stamp-h1 && make stamp-h1)
make[1]: Leaving directory
'/mnt/clfs_MUSL/sources/gcc-8.2.0/build/build-x86_64-cross-linux-gnu/libcpp'
make[1]: Entering directory '/mnt/clfs_MUSL/sources/gcc-8.2.0/build/gcc'
make[1]: Leaving directory '/mnt/clfs_MUSL/sources/gcc-8.2.0/build/gcc'

Checking multilib configuration for libgcc...
make[1]: Entering directory
'/mnt/clfs_MUSL/sources/gcc-8.2.0/build/x86_64-unknown-linux-gnu/libgcc'
# If this is the top-level multilib, build all the other
# multilibs.

CONFIG_FILES= CONFIG_HEADERS=auto-target.h:../../../libgcc/config.in
/bin/bash ./config.status
/mnt/clfs_MUSL/sources/gcc-8.2.0/build/./gcc/xgcc
-B/mnt/clfs_MUSL/sources/gcc-8.2.0/build/./gcc/
-B/cross-tools/x86_64-unknown-linux-gnu/bin/
-B/cross-tools/x86_64-unknown-linux-gnu/lib/ -isystem
/cross-tools/x86_64-unknown-linux-gnu/include -isystem
/cross-tools/x86_64-unknown-linux-gnu/sys-include    -g -O2 -O2  -g -O2
-DIN_GCC  -DCROSS_DIRECTORY_STRUCTURE  -W -Wall -Wno-narrowing
-Wwrite-strings -Wcast-qual -Wstrict-prototypes -Wmissing-prototypes
-Wold-style-definition  -isystem ./include   -fpic -mlong-double-80
-DUSE_ELF_SYMVER  -g -DIN_LIBGCC2 -fbuilding-libgcc -fno-stack-protector
-fpic -mlong-double-80 -DUSE_ELF_SYMVER  -I. -I. -I../.././gcc
-I../../../libgcc -I../../../libgcc/. -I../../../libgcc/../gcc
-I../../../libgcc/../include -I../../../libgcc/config/libbid
-DENABLE_DECIMAL_BID_FORMAT -DHAVE_CC_TLS  -DUSE_TLS -o generic-morestack.o
-MT generic-morestack.o -MD -MP -MF generic-morestack.dep  -c
../../../libgcc/generic-morestack.c -fvisibility=hidden -DHIDE_EXPORTS
/mnt/clfs_MUSL/sources/gcc-8.2.0/build/./gcc/xgcc
-B/mnt/clfs_MUSL/sources/gcc-8.2.0/build/./gcc/
-B/cross-tools/x86_64-unknown-linux-gnu/bin/
-B/cross-tools/x86_64-unknown-linux-gnu/lib/ -isystem
/cross-tools/x86_64-unknown-linux-gnu/include -isystem
/cross-tools/x86_64-unknown-linux-gnu/sys-include    -g -O2 -O2  -g -O2
-DIN_GCC  -DCROSS_DIRECTORY_STRUCTURE  -W -Wall -Wno-narrowing
-Wwrite-strings -Wcast-qual -Wstrict-prototypes -Wmissing-prototypes
-Wold-style-definition  -isystem ./include   -fpic -mlong-double-80
-DUSE_ELF_SYMVER  -g -DIN_LIBGCC2 -fbuilding-libgcc -fno-stack-protector
-fpic -mlong-double-80 -DUSE_ELF_SYMVER  -I. -I. -I../.././gcc
-I../../../libgcc -I../../../libgcc/. -I../../../libgcc/../gcc
-I../../../libgcc/../include -I../../../libgcc/config/libbid
-DENABLE_DECIMAL_BID_FORMAT -DHAVE_CC_TLS  -DUSE_TLS -o
generic-morestack-thread.o -MT generic-morestack-thread.o -MD -MP -MF
generic-morestack-thread.dep  -c ../../../libgcc/generic-morestack-thread.c
-fvisibility=hidden -DHIDE_EXPORTS

make[2]: Entering directory
'/mnt/clfs_MUSL/sources/gcc-8.2.0/build/x86_64-unknown-linux-gnu/libgcc'

In file included from
/mnt/clfs_MUSL/sources/gcc-8.2.0/build/gcc/include-fixed/stdio.h:36,
                 from ../../../libgcc/../gcc/tsystem.h:87,
                 from ../../../libgcc/generic-morestack.c:30:
/mnt/clfs_MUSL/tools/include/bits/alltypes.h:136:24: error: conflicting
types for 'size_t'
 typedef unsigned _Addr size_t;
                        ^~~~~~
In file included from ../../../libgcc/../gcc/tsystem.h:44,
                 from ../../../libgcc/generic-morestack.c:30:
/mnt/clfs_MUSL/sources/gcc-8.2.0/build/gcc/include/stddef.h:216:23: note:
previous declaration of 'size_t' was here
 typedef __SIZE_TYPE__ size_t;
                       ^~~~~~
In file included from
/mnt/clfs_MUSL/sources/gcc-8.2.0/build/gcc/include-fixed/stdio.h:36,
                 from ../../../libgcc/../gcc/tsystem.h:87,
                 from ../../../libgcc/generic-morestack-thread.c:27:
/mnt/clfs_MUSL/tools/include/bits/alltypes.h:136:24: error: conflicting
types for 'size_t'
 typedef unsigned _Addr size_t;
                        ^~~~~~
In file included from ../../../libgcc/../gcc/tsystem.h:44,
                 from ../../../libgcc/generic-morestack-thread.c:27:
/mnt/clfs_MUSL/sources/gcc-8.2.0/build/gcc/include/stddef.h:216:23: note:
previous declaration of 'size_t' was here
 typedef __SIZE_TYPE__ size_t;
                       ^~~~~~
if [ -z "32" ]; then \
  true; \
else \
  rootpre=`${PWDCMD-pwd}`/; export rootpre; \
  srcrootpre=`cd ../../../libgcc; ${PWDCMD-pwd}`/; export srcrootpre; \
  lib=`echo "${rootpre}" | sed -e 's,^.*/\([^/][^/]*\)/$,\1,'`; \
  compiler="/mnt/clfs_MUSL/sources/gcc-8.2.0/build/./gcc/xgcc
-B/mnt/clfs_MUSL/sources/gcc-8.2.0/build/./gcc/
-B/cross-tools/x86_64-unknown-linux-gnu/bin/
-B/cross-tools/x86_64-unknown-linux-gnu/lib/ -isystem
/cross-tools/x86_64-unknown-linux-gnu/include -isystem
/cross-tools/x86_64-unknown-linux-gnu/sys-include   "; \
  for i in `${compiler} --print-multi-lib 2>/dev/null`; do \
    dir=`echo $i | sed -e 's/;.*$//'`; \
    if [ "${dir}" = "." ]; then \
      true; \
    else \
      if [ -d ../${dir}/${lib} ]; then \
        flags=`echo $i | sed -e 's/^[^;]*;//' -e 's/@/ -/g'`; \
        if (cd ../${dir}/${lib}; make
"AR=/cross-tools/x86_64-unknown-linux-gnu/bin/ar" "AR_FLAGS=rc"
"CC=/mnt/clfs_MUSL/sources/gcc-8.2.0/build/./gcc/xgcc
-B/mnt/clfs_MUSL/sources/gcc-8.2.0/build/./gcc/
-B/cross-tools/x86_64-unknown-linux-gnu/bin/
-B/cross-tools/x86_64-unknown-linux-gnu/lib/ -isystem
/cross-tools/x86_64-unknown-linux-gnu/include -isystem
/cross-tools/x86_64-unknown-linux-gnu/sys-include   " "CFLAGS=-g -O2"
"DESTDIR=" "EXTRA_OFILES=" "HDEFINES=" "INSTALL=/usr/bin/install -c"
"INSTALL_DATA=/usr/bin/install -c -m 644" "INSTALL_PROGRAM=/usr/bin/install
-c" "LDFLAGS=" "LOADLIBES="
"RANLIB=/cross-tools/x86_64-unknown-linux-gnu/bin/ranlib" "SHELL=/bin/bash"
"prefix=/cross-tools" "exec_prefix=/cross-tools" "libdir=/cross-tools/lib"
"libsubdir=/cross-tools/lib/gcc/x86_64-unknown-linux-gnu/8.2.0"
"tooldir=/cross-tools/x86_64-unknown-linux-gnu" \
                        CFLAGS="-g -O2 ${flags}" \
                        CCASFLAGS=" ${flags}" \
                        FCFLAGS=" ${flags}" \
                        FFLAGS=" ${flags}" \
                        ADAFLAGS=" ${flags}" \
                        prefix="/cross-tools" \
                        exec_prefix="/cross-tools" \
                        GOCFLAGS="-O2 -g ${flags}" \
                        CXXFLAGS="-g -O2 -D_GNU_SOURCE ${flags}" \
                        LIBCFLAGS="-g -O2 ${flags}" \
                        LIBCXXFLAGS="-g -O2 -D_GNU_SOURCE
-fno-implicit-templates ${flags}" \
                        LDFLAGS=" ${flags}" \
                        MULTIFLAGS="${flags}" \
                        DESTDIR="" \
                        INSTALL="/usr/bin/install -c" \
                        INSTALL_DATA="/usr/bin/install -c -m 644" \
                        INSTALL_PROGRAM="/usr/bin/install -c" \
                        INSTALL_SCRIPT="/usr/bin/install -c" \
                        all); then \
          true; \
        else \
          exit 1; \
        fi; \
      else true; \
      fi; \
    fi; \
  done; \
fi
config.status: creating auto-target.h
config.status: auto-target.h is unchanged
config.status: executing default commands

/mnt/clfs_MUSL/sources/gcc-8.2.0/build/./gcc/nm -pg morestack_s.o | gawk
'NF == 3 && $2 !~ /^[UN]$/ && $3 !~ /.*_compat/ && $3 !~ /.*@.*/ { print
"\t.hidden", $3 }' > morestack.visT
make[3]: Entering directory
'/mnt/clfs_MUSL/sources/gcc-8.2.0/build/x86_64-unknown-linux-gnu/32/libgcc'
../../../libgcc/shared-object.mk:14: recipe for target
'generic-morestack-thread.o' failed
make[1]: *** [generic-morestack-thread.o] Error 1
make[1]: *** Waiting for unfinished jobs....

../../../libgcc/generic-morestack.c: In function '__splitstack_setcontext':
../../../libgcc/generic-morestack.c:1021:32: warning: cast from pointer to
integer of different size [-Wpointer-to-int-cast]
   __morestack_initial_sp.len = (size_t) context[INITIAL_SP_LEN];
                                ^
mv -f morestack.visT morestack.vis
../../../libgcc/shared-object.mk:14: recipe for target
'generic-morestack.o' failed
make[1]: *** [generic-morestack.o] Error 1

# If this is the top-level multilib, build all the other
# multilibs.
CONFIG_FILES= CONFIG_HEADERS=auto-target.h:../../../../libgcc/config.in
/bin/bash ./config.status
# Early copyback; see "all" above for the rationale.  The
# early copy is necessary so that the gcc -B options find
dest=../../.././gcc/include/tmp$$-unwind.h; \
cp unwind.h $dest; \
chmod a+r $dest; \
sh ../../../../libgcc/../move-if-change $dest
../../.././gcc/include/unwind.h

# the right startup files when linking shared libgcc.
/bin/bash ../../../../libgcc/../mkinstalldirs ../../.././gcc/32
parts="crtbegin.o crtbeginS.o crtbeginT.o crtend.o crtendS.o crtprec32.o
crtprec64.o crtprec80.o crtfastmath.o"; \
for file in $parts; do                                  \
  rm -f ../../.././gcc/32/$file;                \
  /usr/bin/install -c -m 644 $file ../../.././gcc/32/;  \
  case $file in                                         \
    *.a)                                                \
      /cross-tools/x86_64-unknown-linux-gnu/bin/ranlib
../../.././gcc/32/$file ;;      \
  esac;                                                 \
done
config.status: creating auto-target.h
config.status: auto-target.h is unchanged
config.status: executing default commands

# @multilib_flags@ is still needed because this may use
# /mnt/clfs_MUSL/sources/gcc-8.2.0/build/./gcc/xgcc
# -B/mnt/clfs_MUSL/sources/gcc-8.2.0/build/./gcc/
# -B/cross-tools/x86_64-unknown-linux-gnu/bin/
# -B/cross-tools/x86_64-unknown-linux-gnu/lib/ -isystem
# /cross-tools/x86_64-unknown-linux-gnu/include -isystem
# /cross-tools/x86_64-unknown-linux-gnu/sys-include    and -O2  -g -O2
# -DIN_GCC  -DCROSS_DIRECTORY_STRUCTURE  -W -Wall -Wno-narrowing
# -Wwrite-strings -Wcast-qual -Wstrict-prototypes -Wmissing-prototypes
# -Wold-style-definition  -isystem ./include   -fpic -mlong-double-80
# -DUSE_ELF_SYMVER  -g -DIN_LIBGCC2 -fbuilding-libgcc -fno-stack-protector
# directly.
# @multilib_dir@ is not really necessary, but sometimes it has
# more uses than just a directory name.
/bin/bash ../../../../libgcc/../mkinstalldirs 32
/mnt/clfs_MUSL/sources/gcc-8.2.0/build/./gcc/xgcc
-B/mnt/clfs_MUSL/sources/gcc-8.2.0/build/./gcc/
-B/cross-tools/x86_64-unknown-linux-gnu/bin/
-B/cross-tools/x86_64-unknown-linux-gnu/lib/ -isystem
/cross-tools/x86_64-unknown-linux-gnu/include -isystem
/cross-tools/x86_64-unknown-linux-gnu/sys-include    -O2  -g -O2 -DIN_GCC
-DCROSS_DIRECTORY_STRUCTURE  -W -Wall -Wno-narrowing -Wwrite-strings
-Wcast-qual -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition
-isystem ./include   -fpic -mlong-double-80 -DUSE_ELF_SYMVER  -g
-DIN_LIBGCC2 -fbuilding-libgcc -fno-stack-protector  -shared -nodefaultlibs
-Wl,--soname=libgcc_s.so.1 -Wl,--version-script=libgcc.map -o
32/libgcc_s.so.1.tmp -g -O2 -m32 -B./ _muldi3_s.o _negdi2_s.o _lshrdi3_s.o
_ashldi3_s.o _ashrdi3_s.o _cmpdi2_s.o _ucmpdi2_s.o _clear_cache_s.o
_trampoline_s.o __main_s.o _absvsi2_s.o _absvdi2_s.o _addvsi3_s.o
_addvdi3_s.o _subvsi3_s.o _subvdi3_s.o _mulvsi3_s.o _mulvdi3_s.o
_negvsi2_s.o _negvdi2_s.o _ctors_s.o _ffssi2_s.o _ffsdi2_s.o _clz_s.o
_clzsi2_s.o _clzdi2_s.o _ctzsi2_s.o _ctzdi2_s.o _popcount_tab_s.o
_popcountsi2_s.o _popcountdi2_s.o _paritysi2_s.o _paritydi2_s.o
_powisf2_s.o _powidf2_s.o _powixf2_s.o _powitf2_s.o _mulhc3_s.o _mulsc3_s.o
_muldc3_s.o _mulxc3_s.o _multc3_s.o _divhc3_s.o _divsc3_s.o _divdc3_s.o
_divxc3_s.o _divtc3_s.o _bswapsi2_s.o _bswapdi2_s.o _clrsbsi2_s.o
_clrsbdi2_s.o _fixunssfsi_s.o _fixunsdfsi_s.o _fixunsxfsi_s.o _fixsfdi_s.o
_fixdfdi_s.o _fixxfdi_s.o _fixunssfdi_s.o _fixunsdfdi_s.o _fixunsxfdi_s.o
_floatdisf_s.o _floatdidf_s.o _floatdixf_s.o _floatundisf_s.o
_floatundidf_s.o _floatundixf_s.o _divdi3_s.o _moddi3_s.o _divmoddi4_s.o
_udivdi3_s.o _umoddi3_s.o _udivmoddi4_s.o _udiv_w_sdiv_s.o cpuinfo_s.o
tf-signs_s.o sfp-exceptions_s.o addtf3_s.o divtf3_s.o eqtf2_s.o getf2_s.o
letf2_s.o multf3_s.o negtf2_s.o subtf3_s.o unordtf2_s.o fixtfsi_s.o
fixunstfsi_s.o floatsitf_s.o floatunsitf_s.o fixtfdi_s.o fixunstfdi_s.o
floatditf_s.o floatunditf_s.o extendsftf2_s.o extenddftf2_s.o
extendxftf2_s.o trunctfsf2_s.o trunctfdf2_s.o trunctfxf2_s.o
enable-execute-stack_s.o unwind-dw2_s.o unwind-dw2-fde-dip_s.o
unwind-sjlj_s.o unwind-c_s.o emutls_s.o libgcc.a -lc && rm -f
32/libgcc_s.so && if [ -f 32/libgcc_s.so.1 ]; then mv -f 32/libgcc_s.so.1
32/libgcc_s.so.1.backup; else true; fi && mv 32/libgcc_s.so.1.tmp
32/libgcc_s.so.1 && (echo "/* GNU ld script"; echo "   Use the shared
library, but some functions are only in"; echo "   the static library.
*/"; echo "GROUP ( libgcc_s.so.1 -lgcc )" ) > 32/libgcc_s.so
# Now that we have built all the objects, we need to copy
# them back to the GCC directory.  Too many things (other
# in-tree libraries, and DejaGNU) know about the layout
# of the build tree, for now.

make install-leaf DESTDIR=../../.././gcc \
  slibdir= libsubdir= MULTIOSDIR=32
make[4]: Entering directory
'/mnt/clfs_MUSL/sources/gcc-8.2.0/build/x86_64-unknown-linux-gnu/32/libgcc'
/bin/bash ../../../../libgcc/../mkinstalldirs ../../.././gcc/32
/usr/bin/install -c -m 644 libgcc_eh.a ../../.././gcc/32/
chmod 644 ../../.././gcc/32/libgcc_eh.a
/cross-tools/x86_64-unknown-linux-gnu/bin/ranlib
../../.././gcc/32/libgcc_eh.a
/bin/bash ../../../../libgcc/../mkinstalldirs ../../.././gcc/32;
/usr/bin/install -c -m 644 32/libgcc_s.so.1
../../.././gcc/32/libgcc_s.so.1; rm -f ../../.././gcc/32/libgcc_s.so;
/usr/bin/install -c -m 644 32/libgcc_s.so ../../.././gcc/32/libgcc_s.so
/bin/bash ../../../../libgcc/../mkinstalldirs ../../.././gcc/32
/usr/bin/install -c -m 644 libgcc.a ../../.././gcc/32/
chmod 644 ../../.././gcc/32/libgcc.a
/cross-tools/x86_64-unknown-linux-gnu/bin/ranlib ../../.././gcc/32/libgcc.a
/usr/bin/install -c -m 644 libgcov.a ../../.././gcc/32/
chmod 644 ../../.././gcc/32/libgcov.a
/cross-tools/x86_64-unknown-linux-gnu/bin/ranlib
../../.././gcc/32/libgcov.a
parts="crtbegin.o crtbeginS.o crtbeginT.o crtend.o crtendS.o crtprec32.o
crtprec64.o crtprec80.o crtfastmath.o"; \
for file in $parts; do                                  \
  rm -f ../../.././gcc/32/$file;                \
  /usr/bin/install -c -m 644 $file ../../.././gcc/32/;  \
  case $file in                                         \
    *.a)                                                \
      /cross-tools/x86_64-unknown-linux-gnu/bin/ranlib
../../.././gcc/32/$file ;;      \
  esac;                                                 \
done

make[4]: Leaving directory
'/mnt/clfs_MUSL/sources/gcc-8.2.0/build/x86_64-unknown-linux-gnu/32/libgcc'
make[3]: Leaving directory
'/mnt/clfs_MUSL/sources/gcc-8.2.0/build/x86_64-unknown-linux-gnu/32/libgcc'
make[2]: Leaving directory
'/mnt/clfs_MUSL/sources/gcc-8.2.0/build/x86_64-unknown-linux-gnu/libgcc'
make[1]: Leaving directory
'/mnt/clfs_MUSL/sources/gcc-8.2.0/build/x86_64-unknown-linux-gnu/libgcc'
Makefile:13129: recipe for target 'all-target-libgcc' failed
make: *** [all-target-libgcc] Error 2 



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: alltypes.h error: conflicting types for 'size_t'
  2018-11-13 20:56 alltypes.h error: conflicting types for 'size_t' Daniel G.
@ 2018-11-14  0:14 ` Szabolcs Nagy
  2018-11-14  1:26   ` Rich Felker
  0 siblings, 1 reply; 4+ messages in thread
From: Szabolcs Nagy @ 2018-11-14  0:14 UTC (permalink / raw)
  To: musl; +Cc: Daniel G.

* Daniel G. <audobra@gmail.com> [2018-11-13 21:56:00 +0100]:
> /mnt/clfs_MUSL/sources/gcc-8.2.0/build/./gcc/xgcc
> -B/mnt/clfs_MUSL/sources/gcc-8.2.0/build/./gcc/
> -B/cross-tools/x86_64-unknown-linux-gnu/bin/
> -B/cross-tools/x86_64-unknown-linux-gnu/lib/ -isystem
> /cross-tools/x86_64-unknown-linux-gnu/include -isystem
> /cross-tools/x86_64-unknown-linux-gnu/sys-include    -g -O2 -O2  -g -O2
> -DIN_GCC  -DCROSS_DIRECTORY_STRUCTURE  -W -Wall -Wno-narrowing
> -Wwrite-strings -Wcast-qual -Wstrict-prototypes -Wmissing-prototypes
> -Wold-style-definition  -isystem ./include   -fpic -mlong-double-80
> -DUSE_ELF_SYMVER  -g -DIN_LIBGCC2 -fbuilding-libgcc -fno-stack-protector
> -fpic -mlong-double-80 -DUSE_ELF_SYMVER  -I. -I. -I../.././gcc
> -I../../../libgcc -I../../../libgcc/. -I../../../libgcc/../gcc
> -I../../../libgcc/../include -I../../../libgcc/config/libbid
> -DENABLE_DECIMAL_BID_FORMAT -DHAVE_CC_TLS  -DUSE_TLS -o generic-morestack.o
> -MT generic-morestack.o -MD -MP -MF generic-morestack.dep  -c
> ../../../libgcc/generic-morestack.c -fvisibility=hidden -DHIDE_EXPORTS
>
...
> In file included from
> /mnt/clfs_MUSL/sources/gcc-8.2.0/build/gcc/include-fixed/stdio.h:36,
>                  from ../../../libgcc/../gcc/tsystem.h:87,
>                  from ../../../libgcc/generic-morestack.c:30:
> /mnt/clfs_MUSL/tools/include/bits/alltypes.h:136:24: error: conflicting
> types for 'size_t'
>  typedef unsigned _Addr size_t;
>                         ^~~~~~
> In file included from ../../../libgcc/../gcc/tsystem.h:44,
>                  from ../../../libgcc/generic-morestack.c:30:
> /mnt/clfs_MUSL/sources/gcc-8.2.0/build/gcc/include/stddef.h:216:23: note:
> previous declaration of 'size_t' was here
>  typedef __SIZE_TYPE__ size_t;
>                        ^~~~~~

it is not ideal that both musl and gcc headers get
included with the typedefs, but i don't see why
they are in conflict:

both typedefs should expand to 'unsigned long'
(if not then something is very wrong)

you can try to rerun that build command with -E
instead of -c to see the actual size_t definitions
after macro expansion.

(i assume multilib breaks it somehow, but i don't
see how)

> ../../../libgcc/shared-object.mk:14: recipe for target
> 'generic-morestack.o' failed
> make[1]: *** [generic-morestack.o] Error 1


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: alltypes.h error: conflicting types for 'size_t'
  2018-11-14  0:14 ` Szabolcs Nagy
@ 2018-11-14  1:26   ` Rich Felker
  2018-11-14 13:57     ` Szabolcs Nagy
  0 siblings, 1 reply; 4+ messages in thread
From: Rich Felker @ 2018-11-14  1:26 UTC (permalink / raw)
  To: musl, Daniel G.

On Wed, Nov 14, 2018 at 01:14:55AM +0100, Szabolcs Nagy wrote:
> * Daniel G. <audobra@gmail.com> [2018-11-13 21:56:00 +0100]:
> > /mnt/clfs_MUSL/sources/gcc-8.2.0/build/./gcc/xgcc
> > -B/mnt/clfs_MUSL/sources/gcc-8.2.0/build/./gcc/
> > -B/cross-tools/x86_64-unknown-linux-gnu/bin/
> > -B/cross-tools/x86_64-unknown-linux-gnu/lib/ -isystem
> > /cross-tools/x86_64-unknown-linux-gnu/include -isystem
> > /cross-tools/x86_64-unknown-linux-gnu/sys-include    -g -O2 -O2  -g -O2
> > -DIN_GCC  -DCROSS_DIRECTORY_STRUCTURE  -W -Wall -Wno-narrowing
> > -Wwrite-strings -Wcast-qual -Wstrict-prototypes -Wmissing-prototypes
> > -Wold-style-definition  -isystem ./include   -fpic -mlong-double-80
> > -DUSE_ELF_SYMVER  -g -DIN_LIBGCC2 -fbuilding-libgcc -fno-stack-protector
> > -fpic -mlong-double-80 -DUSE_ELF_SYMVER  -I. -I. -I../.././gcc
> > -I../../../libgcc -I../../../libgcc/. -I../../../libgcc/../gcc
> > -I../../../libgcc/../include -I../../../libgcc/config/libbid
> > -DENABLE_DECIMAL_BID_FORMAT -DHAVE_CC_TLS  -DUSE_TLS -o generic-morestack.o
> > -MT generic-morestack.o -MD -MP -MF generic-morestack.dep  -c
> > ../../../libgcc/generic-morestack.c -fvisibility=hidden -DHIDE_EXPORTS
> >
> ....
> > In file included from
> > /mnt/clfs_MUSL/sources/gcc-8.2.0/build/gcc/include-fixed/stdio.h:36,
> >                  from ../../../libgcc/../gcc/tsystem.h:87,
> >                  from ../../../libgcc/generic-morestack.c:30:
> > /mnt/clfs_MUSL/tools/include/bits/alltypes.h:136:24: error: conflicting
> > types for 'size_t'
> >  typedef unsigned _Addr size_t;
> >                         ^~~~~~
> > In file included from ../../../libgcc/../gcc/tsystem.h:44,
> >                  from ../../../libgcc/generic-morestack.c:30:
> > /mnt/clfs_MUSL/sources/gcc-8.2.0/build/gcc/include/stddef.h:216:23: note:
> > previous declaration of 'size_t' was here
> >  typedef __SIZE_TYPE__ size_t;
> >                        ^~~~~~
> 
> it is not ideal that both musl and gcc headers get
> included with the typedefs, but i don't see why
> they are in conflict:
> 
> both typedefs should expand to 'unsigned long'
> (if not then something is very wrong)
> 
> you can try to rerun that build command with -E
> instead of -c to see the actual size_t definitions
> after macro expansion.
> 
> (i assume multilib breaks it somehow, but i don't
> see how)

It's a bug in the gcc build process if the gcc-provided headers get
used at all with musl. This might be multilib-dependent. I've not
tested with multilib since it definitely does not work with musl
anyway (gcc's multilib assumes the same include dir works for both of
the 'corresponding' 32- and 64-bit archs, which is not the case for
musl).

Rich


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: alltypes.h error: conflicting types for 'size_t'
  2018-11-14  1:26   ` Rich Felker
@ 2018-11-14 13:57     ` Szabolcs Nagy
  0 siblings, 0 replies; 4+ messages in thread
From: Szabolcs Nagy @ 2018-11-14 13:57 UTC (permalink / raw)
  To: musl; +Cc: Daniel G.

* Rich Felker <dalias@libc.org> [2018-11-13 20:26:14 -0500]:
> On Wed, Nov 14, 2018 at 01:14:55AM +0100, Szabolcs Nagy wrote:
> > * Daniel G. <audobra@gmail.com> [2018-11-13 21:56:00 +0100]:
> > > /mnt/clfs_MUSL/sources/gcc-8.2.0/build/./gcc/xgcc
> > > -B/mnt/clfs_MUSL/sources/gcc-8.2.0/build/./gcc/
> > > -B/cross-tools/x86_64-unknown-linux-gnu/bin/
> > > -B/cross-tools/x86_64-unknown-linux-gnu/lib/ -isystem
> > > /cross-tools/x86_64-unknown-linux-gnu/include -isystem
> > > /cross-tools/x86_64-unknown-linux-gnu/sys-include    -g -O2 -O2  -g -O2
> > > -DIN_GCC  -DCROSS_DIRECTORY_STRUCTURE  -W -Wall -Wno-narrowing
> > > -Wwrite-strings -Wcast-qual -Wstrict-prototypes -Wmissing-prototypes
> > > -Wold-style-definition  -isystem ./include   -fpic -mlong-double-80
> > > -DUSE_ELF_SYMVER  -g -DIN_LIBGCC2 -fbuilding-libgcc -fno-stack-protector
> > > -fpic -mlong-double-80 -DUSE_ELF_SYMVER  -I. -I. -I../.././gcc
> > > -I../../../libgcc -I../../../libgcc/. -I../../../libgcc/../gcc
> > > -I../../../libgcc/../include -I../../../libgcc/config/libbid
> > > -DENABLE_DECIMAL_BID_FORMAT -DHAVE_CC_TLS  -DUSE_TLS -o generic-morestack.o
> > > -MT generic-morestack.o -MD -MP -MF generic-morestack.dep  -c
> > > ../../../libgcc/generic-morestack.c -fvisibility=hidden -DHIDE_EXPORTS
> > >
> > ....
> > > In file included from
> > > /mnt/clfs_MUSL/sources/gcc-8.2.0/build/gcc/include-fixed/stdio.h:36,
> > >                  from ../../../libgcc/../gcc/tsystem.h:87,
> > >                  from ../../../libgcc/generic-morestack.c:30:
> > > /mnt/clfs_MUSL/tools/include/bits/alltypes.h:136:24: error: conflicting
> > > types for 'size_t'
> > >  typedef unsigned _Addr size_t;
> > >                         ^~~~~~
> > > In file included from ../../../libgcc/../gcc/tsystem.h:44,
> > >                  from ../../../libgcc/generic-morestack.c:30:
> > > /mnt/clfs_MUSL/sources/gcc-8.2.0/build/gcc/include/stddef.h:216:23: note:
> > > previous declaration of 'size_t' was here
> > >  typedef __SIZE_TYPE__ size_t;
> > >                        ^~~~~~
> > 
> > it is not ideal that both musl and gcc headers get
> > included with the typedefs, but i don't see why
> > they are in conflict:
> > 
> > both typedefs should expand to 'unsigned long'
> > (if not then something is very wrong)
> > 
> > you can try to rerun that build command with -E
> > instead of -c to see the actual size_t definitions
> > after macro expansion.
> > 
> > (i assume multilib breaks it somehow, but i don't
> > see how)
> 
> It's a bug in the gcc build process if the gcc-provided headers get
> used at all with musl. This might be multilib-dependent. I've not

i think the same happens in mcm when libgcc is built, because
of the -B.../gcc -I.../gcc cflags, gcc/include and gcc/ are
in the search path before the libc headers, but the typedefs
happen to not collide.

> tested with multilib since it definitely does not work with musl
> anyway (gcc's multilib assumes the same include dir works for both of
> the 'corresponding' 32- and 64-bit archs, which is not the case for
> musl).


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2018-11-14 13:57 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-11-13 20:56 alltypes.h error: conflicting types for 'size_t' Daniel G.
2018-11-14  0:14 ` Szabolcs Nagy
2018-11-14  1:26   ` Rich Felker
2018-11-14 13:57     ` Szabolcs Nagy

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/musl/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).