Giter Club home page Giter Club logo

Comments (16)

thomas-roos avatar thomas-roos commented on July 17, 2024 1

Thank you for the quick response - here is all you need: Dockerfile

from aws-lc.

thomas-roos avatar thomas-roos commented on July 17, 2024

if this warning ist suppressed this is the next:

| FAILED: crypto/CMakeFiles/crypto_objects.dir/x509v3/v3_utl.c.o
| /home/ubuntu/yocto/build/tmp/work/core2-64-poky-linux/aws-lc/1.1.0-r0/recipe-sysroot-native/usr/bin/x86_64-poky-linux/x86_64-poky-linux-gcc -DBORINGSSL_DISPATCH_TEST -DBORINGSSL_IMPLEMENTATION -DBORINGSSL_SHARED_LIBRARY -I/home/ubuntu/yocto/build/tmp/work/core2-64-poky-linux/aws-lc/1.1.0-r0/git/crypto/../include -m64 -march=core2 -mtune=core2 -msse3 -mfpmath=sse -fstack-protector-strong  -O2 -D_FORTIFY_SOURCE=2 -Wformat -Wformat-security -Werror=format-security  --sysroot=/home/ubuntu/yocto/build/tmp/work/core2-64-poky-linux/aws-lc/1.1.0-r0/recipe-sysroot  -O2 -pipe -g -feliminate-unused-debug-types -fmacro-prefix-map=/home/ubuntu/yocto/build/tmp/work/core2-64-poky-linux/aws-lc/1.1.0-r0=/usr/src/debug/aws-lc/1.1.0-r0                      -fdebug-prefix-map=/home/ubuntu/yocto/build/tmp/work/core2-64-poky-linux/aws-lc/1.1.0-r0=/usr/src/debug/aws-lc/1.1.0-r0                      -fdebug-prefix-map=/home/ubuntu/yocto/build/tmp/work/core2-64-poky-linux/aws-lc/1.1.0-r0/recipe-sysroot=                      -fdebug-prefix-map=/home/ubuntu/yocto/build/tmp/work/core2-64-poky-linux/aws-lc/1.1.0-r0/recipe-sysroot-native=  -Wno-array-bounds -std=c99 -fvisibility=hidden -Wall -Wextra -Wno-unused-parameter -Werror -Wunused -Wcomment -Wchar-subscripts -Wuninitialized -Wshadow -Wwrite-strings -Wformat-security -Wunused-result -Wno-cast-function-type  -DAWS_LC_STDALIGN_AVAILABLE -DAWS_LC_BUILTIN_SWAP_SUPPORTED -Wvla -Werror -Wformat=2 -Wsign-compare -Wmissing-field-initializers -Wwrite-strings -ggdb -Wall -fvisibility=hidden -fno-common -Wno-free-nonheap-object -Wimplicit-fallthrough -Wformat-signedness -Wmissing-prototypes -Wold-style-definition -Wstrict-prototypes -Wshadow -D_XOPEN_SOURCE=700 -fPIC -MD -MT crypto/CMakeFiles/crypto_objects.dir/x509v3/v3_utl.c.o -MF crypto/CMakeFiles/crypto_objects.dir/x509v3/v3_utl.c.o.d -o crypto/CMakeFiles/crypto_objects.dir/x509v3/v3_utl.c.o -c /home/ubuntu/yocto/build/tmp/work/core2-64-poky-linux/aws-lc/1.1.0-r0/git/crypto/x509v3/v3_utl.c
| In file included from /home/ubuntu/yocto/build/tmp/work/core2-64-poky-linux/aws-lc/1.1.0-r0/recipe-sysroot/usr/include/string.h:535,
|                  from /home/ubuntu/yocto/build/tmp/work/core2-64-poky-linux/aws-lc/1.1.0-r0/git/crypto/x509v3/v3_utl.c:63:
| In function 'memset',
|     inlined from 'OPENSSL_memset' at /home/ubuntu/yocto/build/tmp/work/core2-64-poky-linux/aws-lc/1.1.0-r0/git/crypto/x509v3/../internal.h:845:10,
|     inlined from 'ipv6_from_asc' at /home/ubuntu/yocto/build/tmp/work/core2-64-poky-linux/aws-lc/1.1.0-r0/git/crypto/x509v3/v3_utl.c:1282:9:
| /home/ubuntu/yocto/build/tmp/work/core2-64-poky-linux/aws-lc/1.1.0-r0/recipe-sysroot/usr/include/bits/string_fortified.h:59:10: error: '__builtin_memset' may write between 16 and 2147483647 bytes into a region of size 15 [-Werror=stringop-overflow=]
|    59 |   return __builtin___memset_chk (__dest, __ch, __len,
|       |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|    60 |                                  __glibc_objsize0 (__dest));
|       |                                  ~~~~~~~~~~~~~~~~~~~~~~~~~~
| /home/ubuntu/yocto/build/tmp/work/core2-64-poky-linux/aws-lc/1.1.0-r0/git/crypto/x509v3/v3_utl.c: In function 'ipv6_from_asc':
| /home/ubuntu/yocto/build/tmp/work/core2-64-poky-linux/aws-lc/1.1.0-r0/git/crypto/x509v3/v3_utl.c:1230:40: note: at offset [1, 16] into destination object 'v6' of size [0, 16]
|  1230 | static int ipv6_from_asc(unsigned char v6[16], const char *in)
|       |                          ~~~~~~~~~~~~~~^~~~~~
| cc1: all warnings being treated as errors

from aws-lc.

thomas-roos avatar thomas-roos commented on July 17, 2024

If this is also suppressed, it is building.

from aws-lc.

bryce-shang avatar bryce-shang commented on July 17, 2024

Thank you for reporting this issue.

Would you share the Docker image link? I spent some time installing gcc-12 but got Unable to locate package gcc-12.

from aws-lc.

bryce-shang avatar bryce-shang commented on July 17, 2024

Thank you for the quick response - here is all you need: Dockerfile

Is the link correct? Only gcc-9 is found in the built Docker image. Besides, this Docker image does not have CMake installed. Would you include more specific reproduce steps?

yoctouser@3e02d4f75a3e:~$ gcc --version
gcc (Ubuntu 9.4.0-1ubuntu1~20.04.1) 9.4.0
Copyright (C) 2019 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

yoctouser@3e02d4f75a3e:~$ which gcc
/usr/bin/gcc
yoctouser@3e02d4f75a3e:~$ cd /usr/bin
yoctouser@3e02d4f75a3e:/usr/bin$ ls -lth | grep gcc
lrwxrwxrwx 1 root root     22 Mar  9 17:57 gcc-9 -> x86_64-linux-gnu-gcc-9
lrwxrwxrwx 1 root root     25 Mar  9 17:57 gcc-ar-9 -> x86_64-linux-gnu-gcc-ar-9
lrwxrwxrwx 1 root root     25 Mar  9 17:57 gcc-nm-9 -> x86_64-linux-gnu-gcc-nm-9
lrwxrwxrwx 1 root root     29 Mar  9 17:57 gcc-ranlib-9 -> x86_64-linux-gnu-gcc-ranlib-9
-rwxr-xr-x 1 root root   1.2M Mar  9 17:57 x86_64-linux-gnu-gcc-9
-rwxr-xr-x 1 root root    35K Mar  9 17:57 x86_64-linux-gnu-gcc-ar-9
-rwxr-xr-x 1 root root    35K Mar  9 17:57 x86_64-linux-gnu-gcc-nm-9
-rwxr-xr-x 1 root root    35K Mar  9 17:57 x86_64-linux-gnu-gcc-ranlib-9
lrwxrwxrwx 1 root root      5 Mar 20  2020 gcc -> gcc-9
lrwxrwxrwx 1 root root      8 Mar 20  2020 gcc-ar -> gcc-ar-9
lrwxrwxrwx 1 root root      8 Mar 20  2020 gcc-nm -> gcc-nm-9
lrwxrwxrwx 1 root root     12 Mar 20  2020 gcc-ranlib -> gcc-ranlib-9
lrwxrwxrwx 1 root root      5 Mar 20  2020 x86_64-linux-gnu-gcc -> gcc-9
lrwxrwxrwx 1 root root      8 Mar 20  2020 x86_64-linux-gnu-gcc-ar -> gcc-ar-9
lrwxrwxrwx 1 root root      8 Mar 20  2020 x86_64-linux-gnu-gcc-nm -> gcc-nm-9
lrwxrwxrwx 1 root root     12 Mar 20  2020 x86_64-linux-gnu-gcc-ranlib -> gcc-ranlib-9
-rwxr-xr-x 1 root root    454 Apr 11  2011 c99-gcc
-rwxr-xr-x 1 root root    428 May  7  2006 c89-gcc

from aws-lc.

thomas-roos avatar thomas-roos commented on July 17, 2024

Sure - we are using Yocto to build your software. Yocto builds EVERYTHING from scratch - so GCC 12 as well.
To start the build process (was written in the Readme.md in the linked github folder)
You need to build the docker container, start it and run the build for your software with yocto.
build docker container:
build -t yocto-build
run docker container
docker run -it yocto-build
build yocto
cd yocto
source poky/oe-init-build-env
bitbake aws-lc
this will take some time, need space, need cpu... depending on your machine - finally you should get the error message.
After this you can go into the environment for your software by bitbake aws-lc -c devshell (there is GCC 12 available)

from aws-lc.

bryce-shang avatar bryce-shang commented on July 17, 2024

#495 was created to address some warnings reported by gcc-12.

The build from scratch on the Docker image takes time. So, gcc-12 on Ubuntu 2022 was used to reproduce these build issues and there maybe some different compile warnings.

Let me know if this change solves the issue.

from aws-lc.

thomas-roos avatar thomas-roos commented on July 17, 2024

thank you, can confirm those warnings are now gone when using 038628d
Still getting when building for arch arm those warnings.txt
They can be suppressed by -Wno-array-parameter

from aws-lc.

mikelpr avatar mikelpr commented on July 17, 2024

this isn't limited to yocto. it doesn't build on fedora 36 with GCC 12 either

from aws-lc.

DominicDams avatar DominicDams commented on July 17, 2024

Hi I made a change several days ago that should fix the problem @thomas-roos linked to. Are you still seeing these issues when you build with the latest commit?

from aws-lc.

thomas-roos avatar thomas-roos commented on July 17, 2024

I still see issues as decribed here: #487 (comment)
But I've tested against latest commit (eba80de) and still get: error.log (only with arch arm)

from aws-lc.

thomas-roos avatar thomas-roos commented on July 17, 2024

not with arch arm64!

from aws-lc.

DominicDams avatar DominicDams commented on July 17, 2024

Oops looks like I forgot to merge my commit in...

I'll have that merged in by eod as long as the CI still passes

from aws-lc.

thomas-roos avatar thomas-roos commented on July 17, 2024

Hi, please tell me the commit id that should fix the warning when it is in main.

from aws-lc.

DominicDams avatar DominicDams commented on July 17, 2024

01ae506

from aws-lc.

thomas-roos avatar thomas-roos commented on July 17, 2024

great - can confirm this fixes the warnings.
Thank you!

from aws-lc.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.