Deploy error: cannot find type 'SortOrder' in scope

Site: haibosfashion.com

I got build errors when install Ignite [GitHub - twostraws/Ignite: A static site generator for Swift developers.], which is build successfully in my local machine.

From the deploy log, it said “xxx types are not found”, but it is could be found, please refer to screenshot in below.

1:54:41 PM: build-image version: ecdc8b770f4a0193fd3f258c1bc6029e681813a4 (focal)
1:54:41 PM: buildbot version: 22552e71c3c7b6a5ebfd780eb1c9b2f42fe63aa7
1:54:41 PM: Building without cache
1:54:41 PM: Starting to prepare the repo for build
1:54:41 PM: No cached dependencies found. Cloning fresh repo
1:54:41 PM: git clone --filter=blob:none https://github.com/Haibo-Zhou/my-new-website
1:54:41 PM: Preparing Git Reference refs/heads/MyDevSpace
1:54:44 PM: Starting to install dependencies
1:54:44 PM: Python version set to 3.8
1:54:44 PM: Attempting Ruby version 2.7.2, read from environment
1:54:45 PM: Using Ruby version 2.7.2
1:54:45 PM: Started restoring cached go cache
1:54:46 PM: Finished restoring cached go cache
1:54:47 PM: go version go1.19.13 linux/amd64
1:54:48 PM: Downloading https://download.swift.org/swift-5.9.1-release/ubuntu2004/swift-5.9.1-RELEASE/swift-5.9.1-RELEASE-ubuntu20.04.tar.gz
1:54:48 PM: /tmp/swiftenv-5.9.1- /opt/build/repo
1:54:48 PM:   % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
1:54:48 PM:                                  Dload  Upload   Total   Spent    Left  Speed
1:54:49 PM:   0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
1:54:50 PM:   6  561M    6 36.0M    0     0  49.2M      0  0:00:11 --:--:--  0:00:11 49.2M
1:54:51 PM:  21  561M   21  122M    0     0  70.7M      0  0:00:07  0:00:01  0:00:06 70.7M
1:54:52 PM:  41  561M   41  235M    0     0  86.1M      0  0:00:06  0:00:02  0:00:04 86.1M
1:54:53 PM:  69  561M   69  391M    0     0   105M      0  0:00:05  0:00:03  0:00:02  105M
1:54:53 PM:  93  561M   93  526M    0     0   111M      0  0:00:05  0:00:04  0:00:01  111M
1:54:53 PM: 100  561M  100  561M    0     0   113M      0  0:00:04  0:00:04 --:--:--  124M
1:55:09 PM: /opt/build/repo
1:55:09 PM: 5.9.1 has been installed.
1:55:09 PM: Using Swift version 5.9.1
1:55:09 PM: Building Swift package
1:55:09 PM: Started restoring cached swift build
1:55:09 PM: Finished restoring cached swift build
1:55:10 PM: Fetching https://github.com/twostraws/Ignite.git
1:55:10 PM: [1/1466] Fetching ignite
1:55:10 PM: Fetched https://github.com/twostraws/Ignite.git (0.26s)
1:55:11 PM: Fetching https://github.com/apple/swift-markdown.git
1:55:11 PM: [1/6045] Fetching swift-markdown
1:55:11 PM: Fetched https://github.com/apple/swift-markdown.git (0.39s)
1:55:12 PM: Fetching https://github.com/swiftlang/swift-cmark.git
1:55:12 PM: [1/17821] Fetching swift-cmark
1:55:13 PM: Fetched https://github.com/swiftlang/swift-cmark.git (1.12s)
1:55:13 PM: Fetching https://github.com/apple/swift-argument-parser.git
1:55:13 PM: [1/12089] Fetching swift-argument-parser
1:55:14 PM: Fetched https://github.com/apple/swift-argument-parser.git (0.65s)
1:55:14 PM: Computing version for https://github.com/apple/swift-argument-parser.git
1:55:14 PM: Computed https://github.com/apple/swift-argument-parser.git at 1.5.0 (0.20s)
1:55:14 PM: Creating working copy for https://github.com/apple/swift-markdown.git
1:55:14 PM: Working copy of https://github.com/apple/swift-markdown.git resolved at main
1:55:14 PM: Creating working copy for https://github.com/apple/swift-argument-parser.git
1:55:14 PM: Working copy of https://github.com/apple/swift-argument-parser.git resolved at 1.5.0
1:55:14 PM: Creating working copy for https://github.com/twostraws/Ignite.git
1:55:14 PM: Working copy of https://github.com/twostraws/Ignite.git resolved at main
1:55:14 PM: Creating working copy for https://github.com/swiftlang/swift-cmark.git
1:55:14 PM: Working copy of https://github.com/swiftlang/swift-cmark.git resolved at gfm
1:55:16 PM: [1/1] Compiling plugin GenerateManual
1:55:16 PM: Building for debugging...
1:55:16 PM: [1/41] Compiling cmark-gfm cmark_ctype.c
1:55:16 PM: [2/41] Compiling cmark-gfm cmark.c
1:55:16 PM: [3/41] Compiling cmark-gfm-extensions tasklist.c
1:55:16 PM: [4/41] Compiling cmark-gfm node.c
1:55:16 PM: [5/41] Compiling cmark-gfm-extensions tagfilter.c
1:55:16 PM: [6/41] Compiling cmark-gfm-extensions strikethrough.c
1:55:16 PM: [7/41] Compiling cmark-gfm-extensions ext_scanners.c
1:55:16 PM: [8/41] Compiling cmark-gfm-extensions core-extensions.c
1:55:16 PM: [9/41] Compiling cmark-gfm-extensions table.c
1:55:16 PM: [10/41] Compiling cmark-gfm-extensions autolink.c
1:55:16 PM: [11/41] Compiling cmark-gfm xml.c
1:55:16 PM: [12/41] Compiling cmark-gfm syntax_extension.c
1:55:16 PM: [13/41] Compiling cmark-gfm render.c
1:55:16 PM: [14/41] Compiling cmark-gfm registry.c
1:55:16 PM: [15/41] Compiling cmark-gfm references.c
1:55:16 PM: [16/41] Compiling cmark-gfm plugin.c
1:55:16 PM: [17/41] Compiling cmark-gfm utf8.c
1:55:16 PM: [18/41] Compiling cmark-gfm plaintext.c
1:55:16 PM: [19/41] Compiling cmark-gfm map.c
1:55:16 PM: [20/41] Compiling cmark-gfm linked_list.c
1:55:16 PM: [21/41] Compiling cmark-gfm man.c
1:55:16 PM: [22/41] Compiling cmark-gfm latex.c
1:55:16 PM: [23/41] Compiling cmark-gfm iterator.c
1:55:16 PM: [24/41] Compiling cmark-gfm html.c
1:55:16 PM: [25/41] Compiling cmark-gfm scanners.c
1:55:16 PM: [26/41] Compiling cmark-gfm houdini_html_e.c
1:55:16 PM: [27/41] Compiling cmark-gfm houdini_html_u.c
1:55:16 PM: [28/41] Compiling cmark-gfm inlines.c
1:55:16 PM: [29/41] Compiling cmark-gfm houdini_href_e.c
1:55:16 PM: [30/41] Compiling cmark-gfm footnotes.c
1:55:16 PM: [31/41] Compiling cmark-gfm buffer.c
1:55:16 PM: [32/41] Copying Resources
1:55:16 PM: [33/41] Compiling cmark-gfm commonmark.c
1:55:16 PM: [34/41] Compiling CAtomic CAtomic.c
1:55:16 PM: [35/41] Compiling cmark-gfm arena.c
1:55:16 PM: [36/41] Compiling cmark-gfm blocks.c
1:55:17 PM: [38/93] Emitting module Markdown
1:55:20 PM: [39/110] Compiling Markdown RangerTracker.swift
1:55:20 PM: [40/110] Compiling Markdown MarkupRewriter.swift
1:55:20 PM: [41/110] Compiling Markdown BasicBlockContainer.swift
1:55:20 PM: [42/110] Compiling Markdown BasicInlineContainer.swift
1:55:20 PM: [43/110] Compiling Markdown BlockContainer.swift
1:55:20 PM: [44/110] Compiling Markdown BlockMarkup.swift
1:55:20 PM: [45/110] Compiling Markdown InlineContainer.swift
1:55:20 PM: [46/110] Compiling Markdown InlineMarkup.swift
1:55:20 PM: [47/110] Compiling Markdown ListItemContainer.swift
1:55:20 PM: [48/110] Compiling Markdown AtomicCounter.swift
1:55:20 PM: [49/110] Compiling Markdown CharacterExtensions.swift
1:55:20 PM: [50/110] Compiling Markdown CollectionExtensions.swift
1:55:20 PM: [51/110] Compiling Markdown StringExtensions.swift
1:55:20 PM: [52/110] Compiling Markdown MarkupVisitor.swift
1:55:20 PM: [53/110] Compiling Markdown MarkupWalker.swift
1:55:20 PM: [54/110] Compiling Markdown MarkupFormatter.swift
1:55:20 PM: [55/110] Compiling Markdown MarkupTreeDumper.swift
1:55:20 PM: [56/110] Compiling Markdown OrderedList.swift
1:55:20 PM: [57/110] Compiling Markdown UnorderedList.swift
1:55:20 PM: [58/110] Compiling Markdown Paragraph.swift
1:55:20 PM: [59/110] Compiling Markdown CodeBlock.swift
1:55:20 PM: [60/110] Compiling Markdown HTMLBlock.swift
1:55:20 PM: [61/110] Compiling Markdown Heading.swift
1:55:20 PM: [62/110] Compiling Markdown ThematicBreak.swift
1:55:20 PM: [63/110] Compiling Markdown Table.swift
1:55:20 PM: [64/110] Compiling Markdown TableBody.swift
1:55:20 PM: [65/110] Compiling Markdown TableCell.swift
1:55:20 PM: [66/110] Compiling Markdown TableCellContainer.swift
1:55:20 PM: [67/110] Compiling Markdown TableHead.swift
1:55:20 PM: [68/110] Compiling Markdown TableRow.swift
1:55:20 PM: [69/110] Compiling Markdown Replacement.swift
1:55:20 PM: [70/110] Compiling Markdown SourceLocation.swift
1:55:20 PM: [71/110] Compiling Markdown Emphasis.swift
1:55:20 PM: [72/110] Compiling Markdown Image.swift
1:55:20 PM: [73/110] Compiling Markdown ChildIndexPath.swift
1:55:20 PM: [74/110] Compiling Markdown DirectiveArgument.swift
1:55:20 PM: [75/110] Compiling Markdown Document.swift
1:55:20 PM: [76/110] Compiling Markdown LiteralMarkup.swift
1:55:20 PM: [77/110] Compiling Markdown Markup.swift
1:55:20 PM: [78/110] Compiling Markdown MarkupChildren.swift
1:55:20 PM: [79/110] Compiling Markdown MarkupData.swift
1:55:20 PM: [80/110] Compiling Markdown PlainTextConvertibleMarkup.swift
1:55:20 PM: [81/110] Compiling Markdown RawMarkup.swift
1:55:20 PM: [82/110] Compiling Markdown BlockDirective.swift
1:55:20 PM: [83/110] Compiling Markdown BlockQuote.swift
1:55:20 PM: [84/110] Compiling Markdown CustomBlock.swift
1:55:20 PM: [85/110] Compiling Markdown DoxygenDiscussion.swift
1:55:20 PM: [86/110] Compiling Markdown DoxygenNote.swift
1:55:20 PM: [87/110] Compiling Markdown DoxygenParameter.swift
1:55:20 PM: [88/110] Compiling Markdown DoxygenReturns.swift
1:55:20 PM: [89/110] Compiling Markdown ListItem.swift
1:55:20 PM: [90/110] Compiling Markdown InlineAttributes.swift
1:55:20 PM: [91/110] Compiling Markdown Link.swift
1:55:20 PM: [92/110] Compiling Markdown Strikethrough.swift
1:55:20 PM: [93/110] Compiling Markdown Strong.swift
1:55:20 PM: [94/110] Compiling Markdown CustomInline.swift
1:55:20 PM: [95/110] Compiling Markdown InlineCode.swift
1:55:20 PM: [96/110] Compiling Markdown InlineHTML.swift
1:55:20 PM: [97/110] Compiling Markdown LineBreak.swift
1:55:20 PM: [98/110] Compiling Markdown SoftBreak.swift
1:55:20 PM: [99/110] Compiling Markdown SymbolLink.swift
1:55:20 PM: [100/110] Compiling Markdown Text.swift
1:55:20 PM: [101/110] Compiling Markdown Aside.swift
1:55:20 PM: [102/110] Compiling Markdown BlockDirectiveParser.swift
1:55:20 PM: [103/110] Compiling Markdown CommonMarkConverter.swift
1:55:20 PM: [104/110] Compiling Markdown LazySplitLines.swift
1:55:20 PM: [105/110] Compiling Markdown ParseOptions.swift
1:55:20 PM: [106/110] Compiling Markdown RangeAdjuster.swift
1:55:20 PM: [108/112] Wrapping AST for Markdown for debugging
1:55:21 PM: [110/186] Compiling Ignite Action.swift
1:55:21 PM: /opt/build/repo/.build/checkouts/Ignite/Sources/Ignite/Extensions/Array-Sorting.swift:47:75: error: cannot find type 'SortOrder' in scope
1:55:21 PM:     public func sorted<T: Comparable>(by function: (Element) -> T, order: SortOrder = .forward) -> [Element] {
1:55:21 PM:                                                                           ^~~~~~~~~
1:55:21 PM: [111/186] Compiling Ignite CustomAction.swift
1:55:21 PM: /opt/build/repo/.build/checkouts/Ignite/Sources/Ignite/Extensions/Array-Sorting.swift:47:75: error: cannot find type 'SortOrder' in scope
1:55:21 PM:     public func sorted<T: Comparable>(by function: (Element) -> T, order: SortOrder = .forward) -> [Element] {
1:55:21 PM:                                                                           ^~~~~~~~~
1:55:21 PM: [112/186] Compiling Ignite DismissModal.swift
1:55:21 PM: /opt/build/repo/.build/checkouts/Ignite/Sources/Ignite/Extensions/Array-Sorting.swift:47:75: error: cannot find type 'SortOrder' in scope
1:55:21 PM:     public func sorted<T: Comparable>(by function: (Element) -> T, order: SortOrder = .forward) -> [Element] {
1:55:21 PM:                                                                           ^~~~~~~~~

Can you share your repo so we can test?

Sure please have a check. Here is Ignite static site generator repo:
https://github.com/twostraws/Ignite

And this is a starter repo you could test:
https://github.com/twostraws/IgniteStarter

Hi hrishikesh, is there any progress?

I’m unable to get Swift working locally at all:

swift build
error: 'ignite': Invalid manifest (compiled with: ["/home/hrishikesh/usr/bin/swiftc", "-vfsoverlay", "/tmp/TemporaryDirectory.P8IttG/vfs.yaml", "-L", "/home/hrishikesh/usr/lib/swift/pm/ManifestAPI", "-lPackageDescription", "-Xlinker", "-rpath", "-Xlinker", "/home/hrishikesh/usr/lib/swift/pm/ManifestAPI", "-swift-version", "5", "-I", "/home/hrishikesh/usr/lib/swift/pm/ManifestAPI", "-package-description-version", "5.9.0", "/home/hrishikesh/Ignite/Package.swift", "-Xfrontend", "-disable-implicit-concurrency-module-import", "-Xfrontend", "-disable-implicit-string-processing-module-import", "-o", "/tmp/TemporaryDirectory.w5yLRu/ignite-manifest"])
error: fatalError
<unknown>:0: warning: glibc not found for 'x86_64-unknown-linux-gnu'; C stdlib may be unavailable
error: link command failed with exit code 1 (use -v to see invocation)
/usr/bin/ld.gold: error: cannot open Scrt1.o: No such file or directory
/usr/bin/ld.gold: error: cannot open crti.o: No such file or directory
/usr/bin/ld.gold: error: cannot open crtbeginS.o: No such file or directory
/usr/bin/ld.gold: error: cannot open crtendS.o: No such file or directory
/usr/bin/ld.gold: error: cannot open crtn.o: No such file or directory
/usr/bin/ld.gold: error: cannot find -lgcc
/usr/bin/ld.gold: error: cannot find -lgcc_s
/usr/bin/ld.gold: error: cannot find -lc
/usr/bin/ld.gold: error: cannot find -lgcc
/usr/bin/ld.gold: error: cannot find -lgcc_s
/home/hrishikesh/usr/lib/swift/linux/x86_64/swiftrt.o:SwiftRT-ELF-WASM.cpp:function swift_image_constructor(): error: undefined reference to '__dso_handle'
clang-15: error: linker command failed with exit code 1 (use -v to see invocation)

I’m on Day 1 of using Swift, so please excuse my ignorance. Online search is not particularly helpful about this.