indexstore-db
indexstore-db copied to clipboard
Import errors when running `swift build`
I'm following the directions in the README, but when I get to swift build I see a number of import errors:
╰─ swift build
Building for debugging...
/Users/stevenhepting/workspace/indexstore-db/lib/Support/PatternMatching.cpp:13:10: fatal error: 'IndexStoreDB/Support/PatternMatching.h' file not found
#include "IndexStoreDB/Support/PatternMatching.h"
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 error generated.
/Users/stevenhepting/workspace/indexstore-db/lib/LLVMSupport/Support/circular_raw_ostream.cpp:13:10: fatal error: 'llvm/Support/circular_raw_ostream.h' file not found
#include "llvm/Support/circular_raw_ostream.h"
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/stevenhepting/workspace/indexstore-db/lib/LLVMSupport/Support/raw_ostream.cpp:13:10: fatal error: 'llvm/Support/raw_ostream.h' file not found
#include "llvm/Support/raw_ostream.h"
^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/stevenhepting/workspace/indexstore-db/lib/Support/Concurrency-Mac.cpp:13:10: fatal error: 'IndexStoreDB/Support/Concurrency.h' file not found
#include "IndexStoreDB/Support/Concurrency.h"
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/stevenhepting/workspace/indexstore-db/lib/Support/Logging.cpp:14:10: fatal error: 'IndexStoreDB/Support/Logging.h' file not found
#include "IndexStoreDB/Support/Logging.h"
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/stevenhepting/workspace/indexstore-db/lib/Support/FilePathWatcher.cpp:13:10: fatal error: 'IndexStoreDB/Support/FilePathWatcher.h' file not found
#include "IndexStoreDB/Support/FilePathWatcher.h"
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/stevenhepting/workspace/indexstore-db/lib/Support/Path.cpp:13:10: fatal error: 'IndexStoreDB/Support/Path.h' file not found
#include "IndexStoreDB/Support/Path.h"
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/stevenhepting/workspace/indexstore-db/lib/LLVMSupport/Support/YAMLTraits.cpp:9:10: fatal error: 'llvm/Support/YAMLTraits.h' file not found
#include "llvm/Support/YAMLTraits.h"
^~~~~~~~~~~~~~~~~~~~~~~~~~~
[1/87] Compiling YAMLTraits.cpp
Is there perhaps another way to build this project using cmake?
I'm having the same issues, on windows 10, both with Swift 5.8 and Swift 5.9 Development (got it from the official downloads)
@shepting
I was able to get rid of this errors.
There are some symbolic links in this repository. According to this answer on StackOverflow
https://stackoverflow.com/questions/5917249/git-symbolic-links-in-windows/59761201#59761201
It is necessary to turn a git configuration on.
However now I have another missing file
indexstore-db\lib\Support\Logging.cpp:19:10: fatal error: 'dispatch/dispatch.h' file not found
#include <dispatch/dispatch.h>
^~~~~~~~~~~~~~~~~~~~~
And this I don't know where it is supposed to come from :/
If you look at our instructions for building on Linux you'll see we're passing some extra -I options to find toolchain headers; does something similar work on Windows?
@benlangmuir yes, that would work on Windows as well. -Xcc -I${env:SDKROOT}\usr\include or -Xcc %SDKROOT%\usr\include (depending on the shell) should work I believe.