Swift / C build error related to missing definition of fds_bits
.
#69311
Labels
bug
A deviation from expected or documented behavior. Also: expected but undesirable behavior.
c interop
Feature: Interoperability with C
clang importer
Area → compiler: The clang importer
Description
A build error occurs with a missing definition of
fds_bits
in certain cases. The error message generted is:Steps to reproduce
This reproducer is a minimized version of GraphViz, available here:
https://github.com/SwiftDocOrg/GraphViz
This is not to say that there is an issue with GraphViz itself, but rather, the process to build it.
This reproducer requires five files. The directory tree looks like this:
Listing for
Sources/Clibgraphviz/gvc.h
:Listing for
Sources/Clibgraphviz/arith.h
:Listing for
Sources/Clibgraphviz/module.modulemap
:Listing for
Sources/GraphViz/Renderer.swift
:Listing for
Package.swift
:The error only occurs when performing a clean build, namely:
swift package clean; swift build
Performing two or more builds after a
clean
, like so:swift build; swift build
causes the build to succed after the second invocation.
Expected behavior
The compilation via
swift build
should succeed on the first invocation.Environment
The text was updated successfully, but these errors were encountered: