[RTEMS Project] #4937: RSB fails to build 6/rtems-llvm on Ubuntu 20.04 LTS

RTEMS trac trac at rtems.org
Wed Aug 2 11:22:59 UTC 2023


#4937: RSB fails to build 6/rtems-llvm on Ubuntu 20.04 LTS
-----------------------+--------------------
  Reporter:  kgardas   |      Owner:  (none)
      Type:  defect    |     Status:  new
  Priority:  normal    |  Milestone:
 Component:  tool/rsb  |    Version:
  Severity:  normal    |   Keywords:
Blocked By:            |   Blocking:
-----------------------+--------------------
 Hello,

 and attempt to use current (as of 2023-08-02) RSB source code to build 6
 /rtems-llvm on Ubuntu 20.04 LTS failes in three steps:

 (1) compilation of swig fails with:

 {{{
 + export CC_FOR_BUILD CXX_FOR_BUILD CFLAGS_FOR_BUILD CXXFLAGS_FOR_BUILD
 LDFLAGS_FOR_BUILD LDLIBS_FOR_BUILS LIBS_FOR_BUILS
 + /bin/cp /export/home/rtems/git/rtems/rtems-source-builder-
 ref/rtems/sources/pcre-8.40.tar.bz2 pcre-8.40.tar.bz2
 /bin/cp: cannot stat '/export/home/rtems/git/rtems/rtems-source-builder-
 ref/rtems/sources/pcre-8.40.tar.bz2': No such file or directory
 }}}

 looks like swig depends on pcre hence try to build it, but it's not
 downloaded at all. When I cheat and put required tarball into the source
 directory compilation is able to proceed to compiling LLVM.

 (2) however compilation of LLVM fails very quickly with:

 {{{
 -- Check size of el_rfunc_t
 -- Check size of el_rfunc_t - done
 -- Found libedit: /usr/include (found version ".")
 -- Found Doxygen: /usr/bin/doxygen (found version "1.8.17") found
 components: doxygen dot
 CMake Error at
 /usr/share/cmake-3.16/Modules/FindPackageHandleStandardArgs.cmake:146
 (message):
   Could NOT find SWIG (missing: SWIG_EXECUTABLE SWIG_DIR)
 Call Stack (most recent call first):
   /usr/share/cmake-3.16/Modules/FindPackageHandleStandardArgs.cmake:393
 (_FPHSA_FAILURE_MESSAGE)
   /usr/share/cmake-3.16/Modules/FindSWIG.cmake:64
 (FIND_PACKAGE_HANDLE_STANDARD_ARGS)
   tools/lldb/scripts/CMakeLists.txt:18 (find_package)


 -- Configuring incomplete, errors occurred!
 See also "/export/home/rtems/git/rtems/rtems-source-builder-
 ref/rtems/build/rtems-llvm-8.0.1-x86_64-linux-
 gnu-1/build/CMakeFiles/CMakeOutput.log".
 See also "/export/home/rtems/git/rtems/rtems-source-builder-
 ref/rtems/build/rtems-llvm-8.0.1-x86_64-linux-
 gnu-1/build/CMakeFiles/CMakeError.log".
 shell cmd failed: /bin/sh -ex  /export/home/rtems/git/rtems/rtems-source-
 builder-ref/rtems/build/rtems-llvm-8.0.1-x86_64-linux-gnu-1/do-build
 error: building rtems-llvm-8.0.1-x86_64-linux-gnu-1
 }}}

 and although RSB prefer to install its own tools like swig failing above,
 I've gone ahead and install swig from Ubuntu package and rerun again.

 (3) this time LLVM proceed to compilation and then fails with:

 {{{
 [ 12%] Building CXX object
 lib/Support/CMakeFiles/LLVMSupport.dir/Threading.cpp.o
 [ 12%] Building CXX object
 lib/Support/CMakeFiles/LLVMSupport.dir/Valgrind.cpp.o
 [ 12%] Building CXX object
 lib/Support/CMakeFiles/LLVMSupport.dir/Watchdog.cpp.o
 In file included from /export/home/rtems/git/rtems/rtems-source-builder-
 ref/rtems/build/rtems-llvm-8.0.1-x86_64-linux-
 gnu-1/llvm-8.0.1/lib/Support/Path.cpp:1110:
 /export/home/rtems/git/rtems/rtems-source-builder-ref/rtems/build/rtems-
 llvm-8.0.1-x86_64-linux-gnu-1/llvm-8.0.1/lib/Support/Unix/Path.inc: In
 function 'std::string llvm::sys::fs::getMainExecutable(const char*,
 void*)':
 /export/home/rtems/git/rtems/rtems-source-builder-ref/rtems/build/rtems-
 llvm-8.0.1-x86_64-linux-gnu-1/llvm-8.0.1/lib/Support/Unix/Path.inc:111:38:
 warning: '__builtin___snprintf_chk' output may be truncated before the
 last format character [-Wformat-truncation=]
   111 |   snprintf(fullpath, PATH_MAX, "%s/%s", dir, bin);
       |                                      ^
 In file included from /usr/include/stdio.h:867,
                  from /usr/include/c++/9/cstdio:42,
                  from /usr/include/c++/9/ext/string_conversions.h:43,
                  from /usr/include/c++/9/bits/basic_string.h:6496,
                  from /usr/include/c++/9/string:55,
                  from /usr/include/c++/9/bits/locale_classes.h:40,
                  from /usr/include/c++/9/bits/ios_base.h:41,
                  from /usr/include/c++/9/ios:42,
                  from /usr/include/c++/9/ostream:38,
                  from /usr/include/c++/9/iterator:64,
                  from /export/home/rtems/git/rtems/rtems-source-builder-
 ref/rtems/build/rtems-llvm-8.0.1-x86_64-linux-
 gnu-1/llvm-8.0.1/include/llvm/ADT/iterator_range.h:22,
                  from /export/home/rtems/git/rtems/rtems-source-builder-
 ref/rtems/build/rtems-llvm-8.0.1-x86_64-linux-
 gnu-1/llvm-8.0.1/include/llvm/ADT/SmallVector.h:17,
                  from /export/home/rtems/git/rtems/rtems-source-builder-
 ref/rtems/build/rtems-llvm-8.0.1-x86_64-linux-
 gnu-1/llvm-8.0.1/include/llvm/ADT/Twine.h:13,
                  from /export/home/rtems/git/rtems/rtems-source-builder-
 ref/rtems/build/rtems-llvm-8.0.1-x86_64-linux-
 gnu-1/llvm-8.0.1/include/llvm/Support/Path.h:19,
                  from /export/home/rtems/git/rtems/rtems-source-builder-
 ref/rtems/build/rtems-llvm-8.0.1-x86_64-linux-
 gnu-1/llvm-8.0.1/lib/Support/Path.cpp:14:
 /usr/include/x86_64-linux-gnu/bits/stdio2.h:67:35: note:
 '__builtin___snprintf_chk' output 2 or more bytes (assuming 4097) into a
 destination of size 4096
    67 |   return __builtin___snprintf_chk (__s, __n, __USE_FORTIFY_LEVEL -
 1,
       |
 ~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    68 |        __bos (__s), __fmt, __va_arg_pack ());
       |        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 [ 12%] Linking CXX static library ../libLLVMSupport.a
 [ 12%] Linking CXX static library ../../libLLVMDebugInfoPDB.a
 [ 12%] Built target LLVMSupport
 [ 12%] Built target LLVMDebugInfoPDB
 make: *** [Makefile:152: all] Error 2
 shell cmd failed: /bin/sh -ex  /export/home/rtems/git/rtems/rtems-source-
 builder-ref/rtems/build/rtems-llvm-8.0.1-x86_64-linux-gnu-1/do-build
 error: building rtems-llvm-8.0.1-x86_64-linux-gnu-1
 }}}

 I guess whole this LLVM toolchain deserves update to 16.x before
 investigating failure of more than 4 years old LLVM code here.

--
Ticket URL: <http://devel.rtems.org/ticket/4937>
RTEMS Project <http://www.rtems.org/>
RTEMS Project


More information about the bugs mailing list