|
Message-ID: <20181113205600.GA16442@daniel-HP> Date: Tue, 13 Nov 2018 21:56:00 +0100 From: "Daniel G." <audobra@...il.com> To: musl@...ts.openwall.com Subject: alltypes.h error: conflicting types for 'size_t' 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
Powered by blists - more mailing lists
Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.