Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build Issue in Ubuntu 18 #691

Closed
1 task
boquan-fang opened this issue Dec 9, 2024 · 4 comments · Fixed by #692
Closed
1 task

Build Issue in Ubuntu 18 #691

boquan-fang opened this issue Dec 9, 2024 · 4 comments · Fixed by #692
Labels
bug This issue is a bug. p2 This is a standard priority issue

Comments

@boquan-fang
Copy link

boquan-fang commented Dec 9, 2024

Describe the bug

In S2N-TLS CI, we ran CRT-CPP unit tests on Ubuntu 18 platform, and CRT failed to prebuild AWSLC libcrypto with the latest changes from main.

+ cmake ./aws-crt-cpp -Bbuild -DBUILD_DEPS=ON -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/tmp/tmp.3YYeGieDe6
--
622 | -- AWS CRT C++ 0.29.7
623 | -- The CXX compiler identification is GNU 9.4.0
624 | -- The C compiler identification is GNU 9.4.0
625 | -- Check for working CXX compiler: /usr/bin/g++-9
626 | -- Check for working CXX compiler: /usr/bin/g++-9 -- works
627 | -- Detecting CXX compiler ABI info
628 | -- Detecting CXX compiler ABI info - done
629 | -- Detecting CXX compile features
630 | -- Detecting CXX compile features - done
631 | -- Check for working C compiler: /usr/bin/gcc-9
632 | -- Check for working C compiler: /usr/bin/gcc-9 -- works
633 | -- Detecting C compiler ABI info
634 | -- Detecting C compiler ABI info - done
635 | -- Detecting C compile features
636 | -- Detecting C compile features - done
637 | -- CMake 3.10.2
638 | -- Performing Test AWS_HAVE_GCC_OVERFLOW_MATH_EXTENSIONS
639 | -- Performing Test AWS_HAVE_GCC_OVERFLOW_MATH_EXTENSIONS - Success
640 | -- Performing Test AWS_HAVE_WINAPI_DESKTOP
641 | -- Performing Test AWS_HAVE_WINAPI_DESKTOP - Failed
642 | -- Performing Test AWS_ARCH_INTEL
643 | -- Performing Test AWS_ARCH_INTEL - Success
644 | -- Performing Test AWS_ARCH_INTEL_X64
645 | -- Performing Test AWS_ARCH_INTEL_X64 - Success
646 | -- Performing Test AWS_ARCH_ARM64
647 | -- Performing Test AWS_ARCH_ARM64 - Failed
648 | -- Performing Test AWS_ARCH_ARM32
649 | -- Performing Test AWS_ARCH_ARM32 - Failed
650 | -- Performing Test AWS_HAVE_GCC_INLINE_ASM
651 | -- Performing Test AWS_HAVE_GCC_INLINE_ASM - Success
652 | -- Performing Test AWS_HAVE_AUXV
653 | -- Performing Test AWS_HAVE_AUXV - Success
654 | -- Performing Test AWS_HAVE_EXECINFO
655 | -- Performing Test AWS_HAVE_EXECINFO - Success
656 | -- Performing Test AWS_HAVE_LINUX_IF_LINK_H
657 | -- Performing Test AWS_HAVE_LINUX_IF_LINK_H - Success
658 | -- Performing Test HAVE_MTUNE_NEOVERSE_V1
659 | -- Performing Test HAVE_MTUNE_NEOVERSE_V1 - Failed
660 | -- Performing Test HAVE_M_AVX2_FLAG
661 | -- Performing Test HAVE_M_AVX2_FLAG - Success
662 | -- Performing Test HAVE_M_AVX512_FLAG
663 | -- Performing Test HAVE_M_AVX512_FLAG - Success
664 | -- Performing Test AWS_HAVE_AVX2_INTRINSICS
665 | -- Performing Test AWS_HAVE_AVX2_INTRINSICS - Success
666 | -- Performing Test AWS_HAVE_AVX512_INTRINSICS
667 | -- Performing Test AWS_HAVE_AVX512_INTRINSICS - Success
668 | -- Performing Test AWS_HAVE_MM256_EXTRACT_EPI64
669 | -- Performing Test AWS_HAVE_MM256_EXTRACT_EPI64 - Success
670 | -- Performing Test AWS_HAVE_CLMUL
671 | -- Performing Test AWS_HAVE_CLMUL - Success
672 | -- Performing Test AWS_HAVE_ARM32_CRC
673 | -- Performing Test AWS_HAVE_ARM32_CRC - Failed
674 | -- Performing Test AWS_HAVE_ARMv8_1
675 | -- Performing Test AWS_HAVE_ARMv8_1 - Failed
676 | -- Looking for pthread.h
677 | -- Looking for pthread.h - found
678 | -- Looking for pthread_create
679 | -- Looking for pthread_create - not found
680 | -- Check if compiler accepts -pthread
681 | -- Check if compiler accepts -pthread - yes
682 | -- Found Threads: TRUE
683 | -- Performing Test HAS_FPIC_FLAG
684 | -- Performing Test HAS_FPIC_FLAG - Success
685 | -- Performing Test HAS_64BIT_FILE_OFFSET_BY_DEFAULT
686 | -- Performing Test HAS_64BIT_FILE_OFFSET_BY_DEFAULT - Success
687 | -- Looking for fseeko
688 | -- Looking for fseeko - found
689 | -- Looking for stdint.h
690 | -- Looking for stdint.h - found
691 | -- Looking for stdbool.h
692 | -- Looking for stdbool.h - found
693 | -- Performing Test HAS_WGNU
694 | -- Performing Test HAS_WGNU - Failed
695 | -- Performing Test HAVE_SYSCONF
696 | -- Performing Test HAVE_SYSCONF - Success
697 | -- Looking for pthread_attr_setaffinity_np
698 | -- Looking for pthread_attr_setaffinity_np - found
699 | -- Performing Test PTHREAD_SETNAME_TAKES_2ARGS
700 | -- Performing Test PTHREAD_SETNAME_TAKES_2ARGS - Success
701 | -- Performing Test PTHREAD_GETNAME_TAKES_2ARGS
702 | -- Performing Test PTHREAD_GETNAME_TAKES_2ARGS - Failed
703 | -- Performing Test PTHREAD_GET_NAME_TAKES_2ARGS
704 | -- Performing Test PTHREAD_GET_NAME_TAKES_2ARGS - Failed
705 | -- Performing Test PTHREAD_GETNAME_TAKES_3ARGS
706 | -- Performing Test PTHREAD_GETNAME_TAKES_3ARGS - Success
707 | -- Building SIMD base64 decoder
708 | -- Packaging currently only supported on Fedora.
709 | -- Performing Test HAS_WNO_STRINGOP_OVERFLOW
710 | -- Performing Test HAS_WNO_STRINGOP_OVERFLOW - Success
711 | -- Performing Test HAS_WNO_ARRAY_PARAMETER
712 | -- Performing Test HAS_WNO_ARRAY_PARAMETER - Success
713 | -- cmake command for dependency AWSLC: /usr/bin/cmake;-DCMAKE_CXX_COMPILER=/usr/bin/g++-9;-DCMAKE_CXX_FLAGS_DEBUG=-g;-DCMAKE_CXX_FLAGS_MINSIZEREL=-Os -DNDEBUG;-DCMAKE_CXX_FLAGS_RELEASE=-O3 -DNDEBUG;-DCMAKE_CXX_FLAGS_RELWITHDEBINFO=-O2 -g -DNDEBUG;-DCMAKE_C_COMPILER=/usr/bin/gcc-9;-DCMAKE_C_FLAGS_DEBUG=-g;-DCMAKE_C_FLAGS_MINSIZEREL=-Os -DNDEBUG;-DCMAKE_C_FLAGS_RELEASE=-O3 -DNDEBUG;-DCMAKE_C_FLAGS_RELWITHDEBINFO=-O2 -g -DNDEBUG;-DCMAKE_MAKE_PROGRAM=/usr/bin/make;-B/tmp/tmp.TmtlOL74Ub/build/deps/AWSLC;/tmp/tmp.TmtlOL74Ub/aws-crt-cpp/crt/aws-lc;-DCMAKE_BUILD_TYPE=Release;-DCMAKE_PREFIX_PATH=;-DCMAKE_INSTALL_PREFIX=/tmp/tmp.TmtlOL74Ub/build/deps/AWSLC/install;-DCMAKE_INSTALL_RPATH=;-DBUILD_SHARED_LIBS=;-GUnix Makefiles;-DDISABLE_GO=ON;-DDISABLE_PERL=ON;-DBUILD_LIBSSL=OFF;-DBUILD_TESTING=OFF;-DCMAKE_C_FLAGS= -Wno-stringop-overflow -Wno-array-parameter
714 | -- The C compiler identification is GNU 9.4.0
715 | -- Check for working C compiler: /usr/bin/gcc-9
716 | -- Check for working C compiler: /usr/bin/gcc-9 -- works
717 | -- Detecting C compiler ABI info
718 | -- Detecting C compiler ABI info - done
719 | -- Detecting C compile features
720 | -- Detecting C compile features - done
721 | -- Checking for module 'libunwind-generic'
722 | --   No package 'libunwind-generic' found
723 | libunwind not found. Disabling unwind tests.
724 | -- Go not found. Disabling some code generation and using pre-generated code in generated-src/
725 | -- Perl not found. Disabling some code generation and using pre-generated code in generated-src/
726 | -- Run check_run file_to_test 'memcmp_invalid_stripped_check.c', flag_to_set 'MEMCMP_INVALID_STRIPPED', and compile_flags '-O3 -DNDEBUG'.
727 | CMake Warning at CMakeLists.txt:371 (message):
728 | Currently, GCC 9.4.0 is not supported due to a memcmp related bug reported
729 | in https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95189.
730 |  
731 | We strongly recommend against using the GCC 9.4.0 compiler.
732 |  
733 |  
734 | -- Setting CMAKE_C_STANDARD=11
735 | -- stdalign_check.c probe is positive, enabling AWS_LC_STDALIGN_AVAILABLE
736 | -- builtin_swap_check.c probe is positive, enabling AWS_LC_BUILTIN_SWAP_SUPPORTED
737 | -- Check if the system is big endian
738 | -- Searching 16 bit integer
739 | -- Looking for sys/types.h
740 | -- Looking for sys/types.h - found
741 | -- Looking for stdint.h
742 | -- Looking for stdint.h - found
743 | -- Looking for stddef.h
744 | -- Looking for stddef.h - found
745 | -- Check size of unsigned short
746 | -- Check size of unsigned short - done
747 | -- Using unsigned short
748 | -- Check if the system is big endian - little endian
749 | -- The ASM compiler identification is GNU
750 | -- Found assembler: /usr/bin/gcc-9
751 | Copying platform assembly files from /tmp/tmp.TmtlOL74Ub/aws-crt-cpp/crt/aws-lc/generated-src/linux-x86_64/crypto/ to /tmp/tmp.TmtlOL74Ub/crypto
752 | -- Looking for pthread.h
753 | -- Looking for pthread.h - found
754 | -- Looking for pthread_create
755 | -- Looking for pthread_create - not found
756 | -- Looking for pthread_create in pthreads
757 | -- Looking for pthread_create in pthreads - not found
758 | -- Looking for pthread_create in pthread
759 | -- Looking for pthread_create in pthread - found
760 | -- Found Threads: TRUE
761 | -- Configuring done
762 | -- Generating done
763 | CMake Warning:
764 | Manually-specified variables were not used by the project:
765 |  
766 | CMAKE_CXX_COMPILER
767 | CMAKE_CXX_FLAGS_DEBUG
768 | CMAKE_CXX_FLAGS_MINSIZEREL
769 | CMAKE_CXX_FLAGS_RELWITHDEBINFO
770 |  
771 |  
772 | -- Build files have been written to: /tmp/tmp.TmtlOL74Ub
773 | Error: could not load cache
774 | CMake Error at crt/aws-c-common/cmake/AwsPrebuildDependency.cmake:74 (message):
775 | Build failed for dependency project AWSLC
776 | Call Stack (most recent call first):
777 | CMakeLists.txt:107 (aws_prebuild_dependency)
778 |  
779 |  
780 | -- Configuring incomplete, errors occurred!
781 | See also "/tmp/tmp.TmtlOL74Ub/build/CMakeFiles/CMakeOutput.log".
782 | See also "/tmp/tmp.TmtlOL74Ub/build/CMakeFiles/CMakeError.log".

Switch our CI to use Ubuntu 24 fixes this issue. The fix can be found in aws/s2n-tls#4964.

Is Ubuntu 18 actually supported in CRT? Or is it something that CRT aware of?

Regression Issue

  • Select this option if this issue appears to be a regression.

Expected Behavior

CRT-CPP should compiled and ran in S2N-TLS' CI which uses Ubuntu 18. It was running last week.

Current Behavior

CRT-CPP can't be compiled in our CI. Refer to the error message in the issue's description.

Reproduction Steps

Run CRT-CPP in Ubuntu 18 platform.

Possible Solution

No response

Additional Information/Context

No response

aws-crt-cpp version used

CRT-CPP main

Compiler and version used

gcc: 6 && 9

Operating System and version

Ubuntu 18

@boquan-fang boquan-fang added bug This issue is a bug. needs-triage This issue or PR still needs to be triaged. labels Dec 9, 2024
@github-actions github-actions bot added potential-regression Marking this issue as a potential regression to be checked by team member and removed potential-regression Marking this issue as a potential regression to be checked by team member labels Dec 9, 2024
@dougch
Copy link

dougch commented Dec 10, 2024

Does the CMake min version need bumping? (we're using 3.10)

@DmitriyMusatkin
Copy link
Contributor

hmm, interesting. our ci runs ubuntu 18 for all gcc versions and its passing - https://github.com/awslabs/aws-crt-cpp/actions/runs/12246747557/job/34163270558#step:3:336
cmake is a bit newer though. but we should support anything 3.9 and up.
anymore detail about your setup and ideally repro steps?

@sfod
Copy link
Contributor

sfod commented Dec 10, 2024

I've reproduced the issue on AL2 using cmake 3.10.2. Will update when figure out what exactly is causing it.

@sfod
Copy link
Contributor

sfod commented Dec 11, 2024

This PR should resolve the issue: #692
The fix itself is in awslabs/aws-c-common#1176

@jmklix jmklix added p2 This is a standard priority issue and removed needs-triage This issue or PR still needs to be triaged. labels Dec 11, 2024
@jmklix jmklix linked a pull request Dec 11, 2024 that will close this issue
@jmklix jmklix closed this as completed Dec 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug This issue is a bug. p2 This is a standard priority issue
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants