Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Import errors when running swift build #169

Open
shepting opened this issue May 19, 2023 · 4 comments
Open

Import errors when running swift build #169

shepting opened this issue May 19, 2023 · 4 comments

Comments

@shepting
Copy link

shepting commented May 19, 2023

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?

@daniele-niero
Copy link

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)

@daniele-niero
Copy link

@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 :/

@benlangmuir
Copy link
Contributor

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?

@compnerd
Copy link
Member

compnerd commented Sep 16, 2023

@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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants