zhouwg / minigcc

customized toolchain for x86-ia32,learning and studying how Linaro create their various toolchain from scratch source code
GNU General Public License v2.0
0 stars 0 forks source link

build error after host OS updated #10

Closed zhouwg closed 3 years ago

zhouwg commented 3 years ago

Host OS:

wgzhou:$ cat /etc/issue Ubuntu 18.04.4 LTS \n \l


Target: x86-32


Kernel:

wgzhou:$ uname -r 5.4.0-53-generic


GCC:

wgzhou:$ gcc -v Using built-in specs. COLLECT_GCC=gcc COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/7/lto-wrapper OFFLOAD_TARGET_NAMES=nvptx-none OFFLOAD_TARGET_DEFAULT=1 Target: x86_64-linux-gnu Configured with: ../src/configure -v --with-pkgversion='Ubuntu 7.5.0-3ubuntu1~18.04' --with-bugurl=file:///usr/share/doc/gcc-7/README.Bugs --enable-languages=c,ada,c++,go,brig,d,fortran,objc,obj-c++ --prefix=/usr --with-gcc-major-version-only --program-suffix=-7 --program-prefix=x86_64-linux-gnu- --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --libdir=/usr/lib --enable-nls --enable-bootstrap --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new --enable-gnu-unique-object --disable-vtable-verify --enable-libmpx --enable-plugin --enable-default-pie --with-system-zlib --with-target-system-zlib --enable-objc-gc=auto --enable-multiarch --disable-werror --with-arch-32=i686 --with-abi=m64 --with-multilib-list=m32,m64,mx32 --enable-multilib --with-tune=generic --enable-offload-targets=nvptx-none --without-cuda-driver --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu Thread model: posix gcc version 7.5.0 (Ubuntu 7.5.0-3ubuntu1~18.04)


Desc:

wgzhou:$ pwd /wgzhou/develop/cdeos/toolchain/minigcc wgzhou:$ make prebuild wgzhou:$ make

if [ ! -f charset.o ]; then g++ -c -m32 -g -O2 -D_FILE_OFFSET_BITS=64 -DPLATFORM_PCLINUX -Wmissing-declarations -Wnested-externs -Wmissing-prototypes -I./ -I. -I../include -I./include -O2 -W -Wall -Wno-narrowing -Wwrite-strings -Wmissing-format-attribute -pedantic -Wno-long-long -fno-exceptions -fno-rtti charset.c -o charset.o; fi cc1plus: warning: command line option ‘-Wnested-externs’ is valid for C/ObjC but not for C++ cc1plus: warning: command line option ‘-Wmissing-prototypes’ is valid for C/ObjC but not for C++ In file included from /usr/include/c++/7/stdlib.h:36:0, from system.h:214, from charset.c:21: /usr/include/c++/7/cstdlib:41:10: fatal error: bits/c++config.h: No such file or directory

include <bits/c++config.h>

      ^~~~~~~~~~~~~~~~~~

compilation terminated.

cc1plus: warning: command line option ‘-Wnested-externs’ is valid for C/ObjC but not for C++ cc1plus: warning: command line option ‘-Wmissing-prototypes’ is valid for C/ObjC but not for C++ lto-compress.c:34:10: fatal error: zlib.h: No such file or directory

include

      ^~~~~~~~

compilation terminated. Makefile_libcommon:99: recipe for target 'lto-compress.o' failed make[2]: [lto-compress.o] Error 1 make[2]: Leaving directory '/home/weiguo/minigcc/gcc' Makefile:2: recipe for target 'all' failed make[1]: [all] Error 2 make[1]: Leaving directory '/home/weiguo/minigcc/gcc' Makefile:72: recipe for target 'all-recursive' failed make: *** [all-recursive] Error 1

zhouwg commented 3 years ago

sudo apt-get install gcc-multilib g++-multilib sudo apt-get install zlib1g-dev