Uploaded image for project: 'Swift'
  1. Swift
  2. SR-4613

Build failure on ARM: "Cannot destroy a value that still has uses!"

    XMLWordPrintable

    Details

      Description

      I'm trying to build Swift 3.1 on Raspberry Pi 3 / Raspbian Jessie. I'm building from "swift-3.1-branch" using https://github.com/uraimo/buildSwiftOnARM.

      When compiling I got stuck on the following point:

      [625/683] Compiling /home/pi/swift-source...neSupport/linux/armv7/SwiftOnoneSupport.o
      

      I ran the compilation of that specific file from gdb, and it fails somewhere on an assertion. Any clues on why this happens, and what I might be able to do about it?

      $ sudo gdb --args /home/pi/swift-source/build/buildbot_linux/swift-linux-armv7/bin/swift
      -frontend -c /home/pi/swift-source/swift/stdlib/public/SwiftOnoneSupport/SwiftOnoneSupport.swift -disable-objc-attr-requires-foundation-module -target armv7-unknown-linux-gnueabihf -
      disable-objc-interop -sdk / -I /home/pi/swift-source/build/buildbot_linux/swift-linux-armv7/./lib/swift/linux/armv7 -module-cache-path /home/pi/swift-source/build/buildbot_linux/swif
      t-linux-armv7/./module-cache -module-link-name swiftSwiftOnoneSupport -parse-stdlib -resource-dir /home/pi/swift-source/build/buildbot_linux/swift-linux-armv7/./lib/swift -D INTERNAL
      _CHECKS_ENABLED -sil-serialize-all -color-diagnostics -O -parse-as-library -module-name SwiftOnoneSupport -o /home/pi/swift-source/build/buildbot_linux/swift-linux-armv7/stdlib/publi
      c/SwiftOnoneSupport/linux/armv7/SwiftOnoneSupport.o
      GNU gdb (Raspbian 7.7.1+dfsg-5+rpi1) 7.7.1
      Copyright (C) 2014 Free Software Foundation, Inc.
      License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
      This is free software: you are free to change and redistribute it.
      There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
      and "show warranty" for details.
      This GDB was configured as "arm-linux-gnueabihf".
      Type "show configuration" for configuration details.
      For bug reporting instructions, please see:
      <http://www.gnu.org/software/gdb/bugs/>.
      Find the GDB manual and other documentation resources online at:
      <http://www.gnu.org/software/gdb/documentation/>.
      For help, type "help".
      Type "apropos word" to search for commands related to "word"...
      Reading symbols from /home/pi/swift-source/build/buildbot_linux/swift-linux-armv7/bin/swift...(no debugging symbols found)...done.
      (gdb) run
      Starting program: /home/pi/swift-source/build/buildbot_linux/swift-linux-armv7/bin/swift -frontend -c /home/pi/swift-source/swift/stdlib/public/SwiftOnoneSupport/SwiftOnoneSupport.sw
      ift -disable-objc-attr-requires-foundation-module -target armv7-unknown-linux-gnueabihf -disable-objc-interop -sdk / -I /home/pi/swift-source/build/buildbot_linux/swift-linux-armv7/.
      /lib/swift/linux/armv7 -module-cache-path /home/pi/swift-source/build/buildbot_linux/swift-linux-armv7/./module-cache -module-link-name swiftSwiftOnoneSupport -parse-stdlib -resource
      -dir /home/pi/swift-source/build/buildbot_linux/swift-linux-armv7/./lib/swift -D INTERNAL_CHECKS_ENABLED -sil-serialize-all -color-diagnostics -O -parse-as-library -module-name Swift
      OnoneSupport -o /home/pi/swift-source/build/buildbot_linux/swift-linux-armv7/stdlib/public/SwiftOnoneSupport/linux/armv7/SwiftOnoneSupport.o
      [Thread debugging using libthread_db enabled]
      Using host libthread_db library "/lib/arm-linux-gnueabihf/libthread_db.so.1".
      [New Thread 0x75615410 (LWP 2545)]
      swift: /home/pi/swift-source/swift/include/swift/SIL/SILValue.h:139: swift::ValueBase::~ValueBase(): Assertion `use_empty() && "Cannot destroy a value that still has uses!"' failed.
      
      Program received signal SIGABRT, Aborted.
      [Switching to Thread 0x75615410 (LWP 2545)]
      0x76c5df70 in __GI_raise (sig=sig@entry=6)
          at ../nptl/sysdeps/unix/sysv/linux/raise.c:56
      56      ../nptl/sysdeps/unix/sysv/linux/raise.c: No such file or directory.
      (gdb) bt
      #0  0x76c5df70 in __GI_raise (sig=sig@entry=6)
          at ../nptl/sysdeps/unix/sysv/linux/raise.c:56
      #1  0x76c5f324 in __GI_abort () at abort.c:89
      #2  0x76c56d98 in __assert_fail_base (fmt=0x0,
          assertion=0x3b44b61 "use_empty() && \"Cannot destroy a value that still has uses!\"", assertion@entry=0x0, file=0x1 <error: Cannot access memory at address 0x1>,
          file@entry=0x75615410 "\001", line=139, line@entry=1993793684,
          function=function@entry=0x3b44b9e "swift::ValueBase::~ValueBase()")
          at assert.c:92
      #3  0x76c56e74 in __GI___assert_fail (assertion=0x0, file=0x75615410 "\001",
          line=1993793684, function=0x3b44b9e "swift::ValueBase::~ValueBase()")
          at assert.c:101
      #4  0x00c31854 in swift::SILVisitor<(anonymous namespace)::InstructionDestroyer, void>::visit(swift::ValueBase*) ()
      #5  0x00c2e6e4 in swift::SILInstruction::destroy(swift::SILInstruction*) ()
      #6  0x00c1768c in swift::SILFunction::~SILFunction() ()
      #7  0x00c4867c in swift::SILModule::~SILModule() ()
      #8  0x000a3e4c in std::thread::_Impl<std::_Bind_simple<performIRGeneration(swift::IRGenOptions&, swift::ModuleDecl*, std::unique_ptr<swift::SILModule, std::default_delete<swift::SILModule> >, llvm::StringRef, llvm::LLVMContext&, swift::SourceFile*, llvm::GlobalVariable**, unsigned int)::$_5 ()> >::_M_run() ()
      #9  0x76e43348 in ?? () from /usr/lib/arm-linux-gnueabihf/libstdc++.so.6
      Backtrace stopped: previous frame identical to this frame (corrupt stack?)
      (gdb)
      

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              bouke Bouke Haarsma
            • Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: