| Summary: | sato-sdk for sugarbay fails to build with gcc security flags | ||||||
|---|---|---|---|---|---|---|---|
| Product: | [Build System, Metadata & Runtime] OE-Core | Reporter: | Alexandru Georgescu <alexandru.c.georgescu> | ||||
| Component: | devtools / tool chain | Assignee: | Saul Wold <sgw> | ||||
| Status: | VERIFIED FIXED | QA Contact: | |||||
| Severity: | normal | ||||||
| Priority: | Medium | CC: | ionutx.chisanovici, meta.mr.watcher, meta.watcher | ||||
| Version: | 1.5 | ||||||
| Target Milestone: | 1.5.1 | ||||||
| Hardware: | x86 | ||||||
| OS: | Multiple | ||||||
| Whiteboard: | |||||||
| OS type for building Yocto: | --- | Type of Regression: | --- | ||||
| Verified: | Documentation change: | Don't know | |||||
| Attachments: |
|
||||||
|
Description
Alexandru Georgescu
2013-11-11 16:10:35 UTC
Created attachment 1615 [details]
compile log
Hi, The same issue for the build for qemux86-64 image having the security flags enable in local.conf. make[2]: Entering directory `/home/ionut/work/poky/build64_sf/tmp/work/x86_64-poky-linux/openssl/1.0.1e-r15.0/openssl-1.0.1e' [ -z "" ] || x86_64-poky-linux-gcc -m64 --sysroot=/home/ionut/work/poky/build64_sf/tmp/sysroots/qemux86-64 -fPIC -DOPENSSL_PIC -DOPENSSL_THREADS -D_REENTRANT -DDSO_DLFCN -DHAVE_DLFCN_H -DL_ENDIAN -DTER MIO -O2 -pipe -g -feliminate-unused-debug-types -fstack-protector-all -pie -fpie -D_FORTIFY_SOURCE=2 -Wall -Wa,--noexecstack -DHAVE_CRYPTODEV -DUSE_CRYPTODEV_DIGESTS -DOPENSSL_IA32_SSE2 -DOPENSSL_BN_ASM_M ONT -DOPENSSL_BN_ASM_MONT5 -DOPENSSL_BN_ASM_GF2m -DSHA1_ASM -DSHA256_ASM -DSHA512_ASM -DMD5_ASM -DAES_ASM -DVPAES_ASM -DBSAES_ASM -DWHIRLPOOL_ASM -DGHASH_ASM -Iinclude \ -DFINGERPRINT_PREMAIN_DSO_LOAD -o fips_premain_dso \ fips_premain.c fipscanister.o \ libcrypto.a -lgcc -ldl make[3]: Entering directory `/home/ionut/work/poky/build64_sf/tmp/work/x86_64-poky-linux/openssl/1.0.1e-r15.0/openssl-1.0.1e' make[4]: Entering directory `/home/ionut/work/poky/build64_sf/tmp/work/x86_64-poky-linux/openssl/1.0.1e-r15.0/openssl-1.0.1e' /home/ionut/work/poky/build64_sf/tmp/sysroots/x86_64-linux/usr/libexec/x86_64-poky-linux/gcc/x86_64-poky-linux/4.8.1/ld: libcrypto.a(cryptlib.o): relocation R_X86_64_PC32 against symbol `OPENSSL_showfatal' can not be used when making a shared object; recompile with -fPIC /home/ionut/work/poky/build64_sf/tmp/sysroots/x86_64-linux/usr/libexec/x86_64-poky-linux/gcc/x86_64-poky-linux/4.8.1/ld: final link failed: Bad value collect2: error: ld returned 1 exit status make[4]: *** [link_a.gnu] Error 1 make[4]: Leaving directory `/home/ionut/work/poky/build64_sf/tmp/work/x86_64-poky-linux/openssl/1.0.1e-r15.0/openssl-1.0.1e' make[3]: *** [do_linux-shared] Error 2 make[3]: Leaving directory `/home/ionut/work/poky/build64_sf/tmp/work/x86_64-poky-linux/openssl/1.0.1e-r15.0/openssl-1.0.1e' make[2]: *** [libcrypto.so.1.0.0] Error 2 make[2]: Leaving directory `/home/ionut/work/poky/build64_sf/tmp/work/x86_64-poky-linux/openssl/1.0.1e-r15.0/openssl-1.0.1e' make[1]: *** [shared] Error 2 make[1]: Leaving directory `/home/ionut/work/poky/build64_sf/tmp/work/x86_64-poky-linux/openssl/1.0.1e-r15.0/openssl-1.0.1e/crypto' make: *** [build_crypto] Error 1 ERROR: oe_runmake failed WARNING: exit code 1 from a shell command. I have tried to reproduce this and was not able, is it possible you enabled the security flags in a build that already existed? That could cause this issue and the issue mentioned in bug 5505, I could build openssl with no issues. Hi Saul, This is happening for the 64 bits images. Try a build for 64 bits image. Cheers, Ionut Yes, I am building for genericx86-64, which is a 64bit system, can you confirm this in a clean build area please. (In reply to comment #5) > Yes, I am building for genericx86-64, which is a 64bit system, can you > confirm > this in a clean build area please. Hi Saul, We have tried with clean builds (didn't build anything before). Hi Soul, We have another problem now, something related to zlib libraries. This is happening for core-image-sato-sdk builds for the 64 bits images (genericx86-64 and nuc) having security flags enabled within the local.conf. Checked this on Fedora 19 and Ubuntu 13 and on both systems I have zlib and zlib libraries installed. Please see below: ERROR: Function failed: do_configure (log file is located at /home/ionut/work/poky/build_sf/tmp/work/x86_64-poky-linux/libid3tag/0.15.1b-r7/temp/log.do_configure.30447) ERROR: Logfile of failure stored in: /home/ionut/work/poky/build_sf/tmp/work/x86_64-poky-linux/libid3tag/0.15.1b-r7/temp/log.do_configure.30447 Log data follows: | DEBUG: Executing python function sysroot_cleansstate | DEBUG: Python function sysroot_cleansstate finished | DEBUG: SITE files ['endian-little', 'common-linux', 'common-glibc', 'bit-64', 'x86_64-linux', 'common'] | DEBUG: Executing shell function autotools_preconfigure | DEBUG: Shell function autotools_preconfigure finished | DEBUG: Executing shell function do_configure | automake (GNU automake) 1.13.4 | Copyright (C) 2013 Free Software Foundation, Inc. | License GPLv2+: GNU GPL version 2 or later <http://gnu.org/licenses/gpl-2.0.html> | This is free software: you are free to change and redistribute it. | There is NO WARRANTY, to the extent permitted by law. | | Written by Tom Tromey <tromey@redhat.com> | and Alexandre Duret-Lutz <adl@gnu.org>. | AUTOV is 1.13 | NOTE: Executing ACLOCAL="aclocal --system-acdir=/home/ionut/work/poky/build_sf/tmp/work/x86_64-poky-linux/libid3tag/0.15.1b-r7/build/aclocal-copy/ --automake-acdir=/home/ionut/work/poky/build_sf/tmp/sysroots/x86_64-linux/usr/share/aclocal-1.13" autoreconf --verbose --install --force --exclude=autopoint | autoreconf: Entering directory `.' | autoreconf: configure.ac: not using Gettext | autoreconf: running: aclocal --system-acdir=/home/ionut/work/poky/build_sf/tmp/work/x86_64-poky-linux/libid3tag/0.15.1b-r7/build/aclocal-copy/ --automake-acdir=/home/ionut/work/poky/build_sf/tmp/sysroots/x86_64-linux/usr/share/aclocal-1.13 --force | autoreconf: configure.ac: tracing | autoreconf: running: libtoolize --copy --force | libtoolize: putting auxiliary files in `.'. | libtoolize: copying file `./ltmain.sh' | libtoolize: Consider adding `AC_CONFIG_MACRO_DIR([m4])' to configure.ac and | libtoolize: rerunning libtoolize, to keep the correct libtool macros in-tree. | libtoolize: Consider adding `-I m4' to ACLOCAL_AMFLAGS in Makefile.am. | autoreconf: running: /home/ionut/work/poky/build_sf/tmp/sysroots/x86_64-linux/usr/bin/autoconf --force | autoreconf: running: /home/ionut/work/poky/build_sf/tmp/sysroots/x86_64-linux/usr/bin/autoheader --force | autoreconf: running: automake --foreign --add-missing --copy --force-missing | autoreconf: running: gnu-configize | autoreconf: Leaving directory `.' | NOTE: Running /home/ionut/work/poky/build_sf/tmp/work/x86_64-poky-linux/libid3tag/0.15.1b-r7/libid3tag-0.15.1b/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/lib/libid3tag --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=/home/ionut/work/poky/build_sf/tmp/sysroots/nuc -enable-speed | configure: WARNING: unrecognized options: --enable-speed | configure: loading site script /home/ionut/work/poky/meta/site/endian-little | configure: loading site script /home/ionut/work/poky/meta/site/common-linux | configure: loading site script /home/ionut/work/poky/meta/site/common-glibc | configure: loading site script /home/ionut/work/poky/meta/site/x86_64-linux | configure: loading site script /home/ionut/work/poky/meta/site/common | configure: loading site script /home/ionut/work/poky/build_sf/tmp/sysroots/nuc/usr/share/x86_64-poky-linux_config_site.d/eglibc_config | checking for a BSD-compatible install... /usr/bin/install -c | checking whether build environment is sane... yes | checking for x86_64-poky-linux-strip... x86_64-poky-linux-strip | checking for a thread-safe mkdir -p... /bin/mkdir -p | checking for gawk... gawk | checking whether make sets $(MAKE)... yes | checking whether make supports nested variables... yes | checking build system type... x86_64-pc-linux-gnu | checking host system type... x86_64-poky-linux-gnu | checking for x86_64-poky-linux-gcc... x86_64-poky-linux-gcc -m64 --sysroot=/home/ionut/work/poky/build_sf/tmp/sysroots/nuc | checking whether the C compiler works... yes | checking for C compiler default output file name... a.out | checking for suffix of executables... | checking whether we are cross compiling... yes | checking for suffix of object files... o | checking whether we are using the GNU C compiler... yes | checking whether x86_64-poky-linux-gcc -m64 --sysroot=/home/ionut/work/poky/build_sf/tmp/sysroots/nuc accepts -g... yes | checking for x86_64-poky-linux-gcc -m64 --sysroot=/home/ionut/work/poky/build_sf/tmp/sysroots/nuc option to accept ISO C89... none needed | checking for style of include used by make... GNU | checking dependency style of x86_64-poky-linux-gcc -m64 --sysroot=/home/ionut/work/poky/build_sf/tmp/sysroots/nuc... none | checking how to print strings... printf | checking for a sed that does not truncate output... (cached) sed | checking for grep that handles long lines and -e... /bin/grep | checking for egrep... /bin/grep -E | checking for fgrep... /bin/grep -F | checking for ld used by x86_64-poky-linux-gcc -m64 --sysroot=/home/ionut/work/poky/build_sf/tmp/sysroots/nuc... x86_64-poky-linux-ld --sysroot=/home/ionut/work/poky/build_sf/tmp/sysroots/nuc | checking if the linker (x86_64-poky-linux-ld --sysroot=/home/ionut/work/poky/build_sf/tmp/sysroots/nuc ) is GNU ld... yes | checking for BSD- or MS-compatible name lister (nm)... x86_64-poky-linux-nm | checking the name lister (x86_64-poky-linux-nm) interface... BSD nm | checking whether ln -s works... yes | checking the maximum length of command line arguments... 1572864 | checking whether the shell understands some XSI constructs... yes | checking whether the shell understands "+="... yes | checking how to convert x86_64-pc-linux-gnu file names to x86_64-poky-linux-gnu format... func_convert_file_noop | checking how to convert x86_64-pc-linux-gnu file names to toolchain format... func_convert_file_noop | checking for x86_64-poky-linux-ld --sysroot=/home/ionut/work/poky/build_sf/tmp/sysroots/nuc option to reload object files... -r | checking for x86_64-poky-linux-objdump... x86_64-poky-linux-objdump | checking how to recognize dependent libraries... pass_all | checking for x86_64-poky-linux-dlltool... no | checking for dlltool... no | checking how to associate runtime and link libraries... printf %s\n | checking for x86_64-poky-linux-ar... x86_64-poky-linux-ar | checking for archiver @FILE support... @ | checking for x86_64-poky-linux-strip... (cached) x86_64-poky-linux-strip | checking for x86_64-poky-linux-ranlib... x86_64-poky-linux-ranlib | checking command to parse x86_64-poky-linux-nm output from x86_64-poky-linux-gcc -m64 --sysroot=/home/ionut/work/poky/build_sf/tmp/sysroots/nuc object... ok | checking for sysroot... /home/ionut/work/poky/build_sf/tmp/sysroots/nuc | checking for x86_64-poky-linux-mt... no | checking for mt... mt | configure: WARNING: using cross tools not prefixed with host triplet | checking if mt is a manifest tool... no | checking how to run the C preprocessor... x86_64-poky-linux-gcc -E --sysroot=/home/ionut/work/poky/build_sf/tmp/sysroots/nuc -m64 | checking for ANSI C header files... (cached) yes | checking for sys/types.h... (cached) yes | checking for sys/stat.h... (cached) yes | checking for stdlib.h... (cached) yes | checking for string.h... (cached) yes | checking for memory.h... (cached) yes | checking for strings.h... (cached) yes | checking for inttypes.h... (cached) yes | checking for stdint.h... (cached) yes | checking for unistd.h... (cached) yes | checking for dlfcn.h... (cached) yes | checking for objdir... .libs | checking if x86_64-poky-linux-gcc -m64 --sysroot=/home/ionut/work/poky/build_sf/tmp/sysroots/nuc supports -fno-rtti -fno-exceptions... no | checking for x86_64-poky-linux-gcc -m64 --sysroot=/home/ionut/work/poky/build_sf/tmp/sysroots/nuc option to produce PIC... -fPIC -DPIC | checking if x86_64-poky-linux-gcc -m64 --sysroot=/home/ionut/work/poky/build_sf/tmp/sysroots/nuc PIC flag -fPIC -DPIC works... yes | checking if x86_64-poky-linux-gcc -m64 --sysroot=/home/ionut/work/poky/build_sf/tmp/sysroots/nuc static flag -static works... no | checking if x86_64-poky-linux-gcc -m64 --sysroot=/home/ionut/work/poky/build_sf/tmp/sysroots/nuc supports -c -o file.o... yes | checking if x86_64-poky-linux-gcc -m64 --sysroot=/home/ionut/work/poky/build_sf/tmp/sysroots/nuc supports -c -o file.o... (cached) yes | checking whether the x86_64-poky-linux-gcc -m64 --sysroot=/home/ionut/work/poky/build_sf/tmp/sysroots/nuc linker (x86_64-poky-linux-ld --sysroot=/home/ionut/work/poky/build_sf/tmp/sysroots/nuc -m elf_x86_64) supports shared libraries... yes | checking whether -lc should be explicitly linked in... no | checking dynamic linker characteristics... GNU/Linux ld.so | checking how to hardcode library paths into programs... immediate | checking whether stripping libraries is possible... yes | checking if libtool supports shared libraries... yes | checking whether to build shared libraries... yes | checking whether to build static libraries... yes | checking for ANSI C header files... (cached) yes | checking for assert.h... (cached) yes | checking for unistd.h... (cached) yes | checking zlib.h usability... yes | checking zlib.h presence... yes | checking for zlib.h... yes | checking for an ANSI C-conforming const... yes | checking for inline... inline | checking for ftruncate... (cached) yes | checking for compress2 in -lz... no | configure: error: libz was not found | *** You must first install zlib (libz) before you can build this package. | *** If zlib is already installed, you may need to use the LDFLAGS | *** environment variable to specify its installed location, e.g. -L<dir>. | Configure failed. The contents of all config.log files follows to aid debugging | ERROR: oe_runconf failed | WARNING: exit code 1 from a shell command. | ERROR: Function failed: do_configure (log file is located at /home/ionut/work/poky/build_sf/tmp/work/x86_64-poky-linux/libid3tag/0.15.1b-r7/temp/log.do_configure.30447) ERROR: Task 4307 (/home/ionut/work/poky/meta/recipes-multimedia/libid3tag/libid3tag_0.15.1b.bb, do_configure) failed with exit code '1' NOTE: Tasks Summary: Attempted 4169 tasks of which 422 didn't need to be rerun and 1 failed. Waiting for 0 running tasks to finish: Summary: 1 task failed: /home/ionut/work/poky/meta/recipes-multimedia/libid3tag/libid3tag_0.15.1b.bb, do_configure Summary: There were 18 WARNING messages shown. Summary: There was 1 ERROR message shown, returning a non-zero exit code. Cheers, IonutC I baptized Saul ... sorry :) I am not sure what that last comment was supposed to mean. It seems we met another issue with the obsuce linkage issue, I am doing a full build with core-image-sato-sdk and qemux86-64 to see if I find anymore issues. Try again! http://git.yoctoproject.org/cgit/cgit.cgi/poky/commit/?id=2961b58640daa8078ae3a70028f0fbbf2abb7882 Tried another two builds using the below commits: meta-yocto-bsp = "master:bc1e359aaefeeddf8525b46eb80ac14db7f637b3" meta-intel meta-nuc = "master:a665015a6a95be732eeee8f7a915fcf0e030c112" 1. for nuc for which everything was ok, the core-image-sato-sdk image was build without errors; 2. for generix86-64 which failed with the below error: ERROR: Function failed: do_compile (log file is located at /home/ionut/work/poky/build/tmp/work/x86_64-linux/grub-efi-native/2.00-r2/temp/log.do_compile.6800) ERROR: Logfile of failure stored in: /home/ionut/work/poky/build/tmp/work/x86_64-linux/grub-efi-native/2.00-r2/temp/log.do_compile.6800 | /usr/bin/ld: -r and -shared may not be used together | collect2: error: ld returned 1 exit status | make[3]: *** [trig.module] Error 1 | make[3]: *** Waiting for unfinished jobs.... | make[3]: Leaving directory `/home/ionut/work/poky/build/tmp/work/x86_64-linux/grub-efi-native/2.00-r2/grub-2.00/grub-core' | make[2]: *** [all] Error 2 | make[2]: Leaving directory `/home/ionut/work/poky/build/tmp/work/x86_64-linux/grub-efi-native/2.00-r2/grub-2.00/grub-core' | make[1]: *** [all-recursive] Error 1 | make[1]: Leaving directory `/home/ionut/work/poky/build/tmp/work/x86_64-linux/grub-efi-native/2.00-r2/grub-2.00' | make: *** [all] Error 2 | ERROR: oe_runmake failed | WARNING: exit code 1 from a shell command. | ERROR: Function failed: do_compile (log file is located at /home/ionut/work/poky/build/tmp/work/x86_64-linux/grub-efi-native/2.00-r2/temp/log.do_compile.6800) ERROR: Task 1284 (virtual:native:/home/ionut/work/poky/meta/recipes-bsp/grub/grub-efi_2.00.bb, do_compile) failed with exit code '1' NOTE: Tasks Summary: Attempted 5587 tasks of which 437 didn't need to be rerun and 1 failed. Waiting for 0 running tasks to finish: Summary: 1 task failed: virtual:native:/home/ionut/work/poky/meta/recipes-bsp/grub/grub-efi_2.00.bb, do_compile Summary: There were 22 WARNING messages shown. Summary: There was 1 ERROR message shown, returning a non-zero exit code. Cheers, IonutC I beleive this is now really fixed Issue is now fixed. This was verified with: meta-yocto-bsp = "master:cea75f9c8c083d76ad8c45127be332665ef09d06" meta-sugarbay = "master:381f53495e662454873ff858e4d40a64e3b20a55" Cheers, Ionut C |