Closed popovicd closed 3 years ago
Please provide the output of gcc -v
. With the following setup, the issue cannot be reproduced:
Using built-in specs. COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-pc-linux-gnu/11.1.0/lto-wrapper Target:
x86_64-pc-linux-gnu Configured with: /build/gcc/src/gcc/configure --prefix=/usr
--libdir=/usr/lib --libexecdir=/usr/lib --mandir=/usr/share/man
--infodir=/usr/share/info --with-bugurl=https://bugs.archlinux.org/
--enable-languages=c,c++,ada,fortran,go,lto,objc,obj-c++,d --with-isl
--with-linker-hash-style=gnu --with-system-zlib --enable-__cxa_atexit
--enable-cet=auto --enable-checking=release --enable-clocale=gnu
--enable-default-pie --enable-default-ssp --enable-gnu-indirect-function
--enable-gnu-unique-object --enable-install-libiberty --enable-linker-build-id
--enable-lto --enable-multilib --enable-plugin --enable-shared
--enable-threads=posix --disable-libssp --disable-libstdcxx-pch
--disable-libunwind-exceptions --disable-werror
gdc_include_dir=/usr/include/dlang/gdc Thread model: posix Supported LTO
compression algorithms: zlib zstd gcc version 11.1.0 (GCC)
With the added security flags (-Wformat-extra-args -Wformat -Werror=format-security
):
g++ -std=c++11 -DHAVE_CONFIG_H \
-I. -Isrc/include -Wformat-extra-args -Wformat -Werror=format-security \
-O -MT src/cfg/libcfg_la-mink_config.lo -MD -MP \
-MF src/cfg/.deps/libcfg_la-mink_config.Tpo -c src/cfg/mink_config.cpp \
-fPIC -DPIC \
-o src/cfg/.libs/libcfg_la-mink_config.o
I havee also tried with your default Yocto flags:
g++ -std=c++11 -m64 -mtune=core2 -msse3 -mfpmath=sse -fstack-protector-strong -DHAVE_CONFIG_H \
-I. -Isrc/include -D_FORTIFY_SOURCE=2 -Wformat -Wformat-security -Werror=format-security \
-O2 -MT src/cfg/libcfg_la-mink_config.lo -MD -MP -MF src/cfg/.deps/libcfg_la-mink_config.Tpo \
-c src/cfg/mink_config.cpp -fPIC -DPIC -o src/cfg/.libs/libcfg_la-mink_config.o
Here is the output (it must be loaded against Yocto lib locations):
Using built-in specs.
COLLECT_GCC=./work/core2-64-poky-linux/gcc/11.2.0-r0/package/usr/bin/x86_64-poky-linux-gcc-11.2.0
COLLECT_LTO_WRAPPER=/opt/linux/poky/build/tmp/work/core2-64-poky-linux/gcc/11.2.0-r0/package/usr/bin/../libexec/gcc/x86_64-poky-linux/11.2.0/lto-wrapper
Target: x86_64-poky-linux
Configured with: ../../../../../../work-shared/gcc-11.2.0-r0/gcc-11.2.0/configure --build=x86_64-linux --host=x86_64-poky-linux --target=x86_64-poky-linux --prefix=/usr --exec_prefix=/usr --bindir=/usr/bin --sbindir=/usr/sbin --libexecdir=/usr/libexec --datadir=/usr/share --sysconfdir=/etc --sharedstatedir=/com --localstatedir=/var --libdir=/usr/lib --includedir=/usr/include --oldincludedir=/usr/include --infodir=/usr/share/info --mandir=/usr/share/man --disable-silent-rules --disable-dependency-tracking --with-libtool-sysroot=/ --with-gnu-ld --enable-shared --enable-languages=c,c++ --enable-threads=posix --enable-multilib --enable-default-pie --enable-c99 --enable-long-long --enable-symvers=gnu --enable-libstdcxx-pch --program-prefix=x86_64-poky-linux- --without-local-prefix --disable-install-libiberty --disable-libssp --enable-libitm --enable-lto --disable-bootstrap --with-system-zlib --with-linker-hash-style=gnu --enable-linker-build-id --with-ppl=no --with-cloog=no --enable-checking=release --enable-cheaders=c_global --without-isl --with-build-sysroot=/ --enable-standard-branch-protection --disable-static --enable-nls --with-glibc-version=2.28 --enable-initfini-array --enable-__cxa_atexit --with-arch=native
Thread model: posix
Supported LTO compression algorithms: zlib
gcc version 11.2.0 (GCC)
This is from the Yocto automatic generated toolchain from the build system - no modification upon it whatsoever.
In the mean time, I managed to bypass the issue with adding the following into the recipe:
TARGET_CPPFLAGS:appen = "-Wno-format-security"
This seems to be ncurses
related. Can you check which version you're using in your Yocto build?
@popovicd , I will close this issue for the time being since it is not directly related to mINK.
Building the framework with Yocto/OpenEmbededd (Poky reference, version honister) following issue occurs for x86_64
Also: