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

./fetchDependencies fail build #1235

Closed
krupitskas opened this issue Feb 2, 2021 · 13 comments
Closed

./fetchDependencies fail build #1235

krupitskas opened this issue Feb 2, 2021 · 13 comments
Labels
Answered A question was answered Question

Comments

@krupitskas
Copy link

I have next output

/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/sys/_types.h:55:9: error:
      unknown type name '__int64_t'
typedef __int64_t       __darwin_blkcnt_t;      /* total blocks */
        ^
/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/sys/_types.h:56:9: error:
      unknown type name '__int32_t'; did you mean '__int128_t'?
typedef __int32_t       __darwin_blksize_t;     /* preferred block size */
        ^
note: '__int128_t' declared here
/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/sys/_types.h:57:9: error:
      unknown type name '__int32_t'; did you mean '__int128_t'?
typedef __int32_t       __darwin_dev_t;         /* dev_t */
        ^
note: '__int128_t' declared here
/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/sys/_types.h:60:9: error:
      unknown type name '__uint32_t'; did you mean '__uint128_t'?
typedef __uint32_t      __darwin_gid_t;         /* [???] process and gro...
        ^
note: '__uint128_t' declared here
/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/sys/_types.h:61:9: error:
      unknown type name '__uint32_t'; did you mean '__uint128_t'?
typedef __uint32_t      __darwin_id_t;          /* [XSI] pid_t, uid_t, o...
        ^
note: '__uint128_t' declared here
/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/sys/_types.h:62:9: error:
      unknown type name '__uint64_t'
typedef __uint64_t      __darwin_ino64_t;       /* [???] Used for 64 bi...
        ^
/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/sys/_types.h:68:9: error:
      unknown type name '__darwin_natural_t'
typedef __darwin_natural_t __darwin_mach_port_name_t; /* Used by mach */
        ^
/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/sys/_types.h:70:9: error:
      unknown type name '__uint16_t'; did you mean '__uint128_t'?
typedef __uint16_t      __darwin_mode_t;        /* [???] Some file attributes */
        ^
note: '__uint128_t' declared here
/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/sys/_types.h:71:9: error:
      unknown type name '__int64_t'
typedef __int64_t       __darwin_off_t;         /* [???] Used for file sizes */
        ^
/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/sys/_types.h:72:9: error:
      unknown type name '__int32_t'; did you mean '__int128_t'?
typedef __int32_t       __darwin_pid_t;         /* [???] process and gro...
        ^
note: '__int128_t' declared here
/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/sys/_types.h:73:9: error:
      unknown type name '__uint32_t'; did you mean '__uint128_t'?
typedef __uint32_t      __darwin_sigset_t;      /* [???] signal set */
        ^
note: '__uint128_t' declared here
/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/sys/_types.h:74:9: error:
      unknown type name '__int32_t'; did you mean '__int128_t'?
typedef __int32_t       __darwin_suseconds_t;   /* [???] microseconds */
        ^
note: '__int128_t' declared here
/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/sys/_types.h:75:9: error:
      unknown type name '__uint32_t'; did you mean '__uint128_t'?
typedef __uint32_t      __darwin_uid_t;         /* [???] user IDs */
        ^
note: '__uint128_t' declared here
/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/sys/_types.h:76:9: error:
      unknown type name '__uint32_t'; did you mean '__uint128_t'?
typedef __uint32_t      __darwin_useconds_t;    /* [???] microseconds */
        ^
note: '__uint128_t' declared here
In file included from /Users/krupitskas/Code/MoltenVK/External/glslang/glslang/MachineIndependent/propagateNoContraction.cpp:42:
In file included from /Users/krupitskas/Code/MoltenVK/External/glslang/glslang/MachineIndependent/propagateNoContraction.h:42:
In file included from /Users/krupitskas/Code/MoltenVK/External/glslang/glslang/MachineIndependent/../Include/intermediate.h:56:
In file included from /Users/krupitskas/Code/MoltenVK/External/glslang/glslang/MachineIndependent/../Include/../Include/Common.h:40:
In file included from /usr/local/opt/llvm/include/c++/v1/algorithm:639:
In file included from /usr/local/opt/llvm/include/c++/v1/initializer_list:46:
In file included from /usr/local/opt/llvm/include/c++/v1/cstddef:44:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/stddef.h:64:
/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/_types.h:43:9: error:
      unknown type name '__uint32_t'; did you mean '__uint128_t'?
typedef __uint32_t      __darwin_wctype_t;
        ^
note: '__uint128_t' declared here
In file included from /Users/krupitskas/Code/MoltenVK/External/glslang/glslang/MachineIndependent/propagateNoContraction.cpp:42:
In file included from /Users/krupitskas/Code/MoltenVK/External/glslang/glslang/MachineIndependent/propagateNoContraction.h:42:
In file included from /Users/krupitskas/Code/MoltenVK/External/glslang/glslang/MachineIndependent/../Include/intermediate.h:56:
In file included from /Users/krupitskas/Code/MoltenVK/External/glslang/glslang/MachineIndependent/../Include/../Include/Common.h:40:
In file included from /usr/local/opt/llvm/include/c++/v1/algorithm:639:
In file included from /usr/local/opt/llvm/include/c++/v1/initializer_list:46:
In file included from /usr/local/opt/llvm/include/c++/v1/cstddef:44:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/stddef.h:69:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/sys/_types/_ptrdiff_t.h:31:
/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/machine/types.h:37:2: error:
      architecture not supported
#error architecture not supported
 ^
In file included from /Users/krupitskas/Code/MoltenVK/External/glslang/glslang/MachineIndependent/propagateNoContraction.cpp:42:
In file included from /Users/krupitskas/Code/MoltenVK/External/glslang/glslang/MachineIndependent/propagateNoContraction.h:42:
In file included from /Users/krupitskas/Code/MoltenVK/External/glslang/glslang/MachineIndependent/../Include/intermediate.h:56:
In file included from /Users/krupitskas/Code/MoltenVK/External/glslang/glslang/MachineIndependent/../Include/../Include/Common.h:40:
In file included from /usr/local/opt/llvm/include/c++/v1/algorithm:639:
In file included from /usr/local/opt/llvm/include/c++/v1/initializer_list:46:
In file included from /usr/local/opt/llvm/include/c++/v1/cstddef:44:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/stddef.h:69:
/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/sys/_types/_ptrdiff_t.h:32:9: error:
      unknown type name '__darwin_ptrdiff_t'
typedef __darwin_ptrdiff_t ptrdiff_t;
        ^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated.
note: Using new build system
note: Building targets in parallel
note: Planning build
note: Using build description from disk
** BUILD FAILED **

This sounds like some system libraries/sdk problems?

@billhollings
Copy link
Contributor

Check your Xcode environment. Do you have Xcode installed? Or just the Command Line tools? MoltenVK requires Xcode for building.

@billhollings
Copy link
Contributor

And make sure xcode-select is pointing to Xcode. See #1221 for more info.

@krupitskas
Copy link
Author

I have Xcode

└[~]> xcode-select -p
/Applications/Xcode.app/Contents/Developer

This is the first stuff which fails with such strange errors

@billhollings
Copy link
Contributor

└[~]> xcode-select -p
/Applications/Xcode.app/Contents/Developer

That looks correct. Which is strange, because there is likely something wonky with your Xcode configuration if you are seeing all those references to CLT in your build errors.

./fetchDependencies calls xcodebuild which should follow the path set by xcode-select. As pointed out in #1221, that can sometimes get mixed up if CLT are installed after Xcode.

@krupitskas
Copy link
Author

Any ideas how to solve it?
I mean I have really huge amount of projects which I've compiled on my Mac, but this is a first repo which cause such a problems.

@billhollings
Copy link
Contributor

Any ideas how to solve it?

Although you have tested this already, just in case, you could try running:

sudo xcode-select -s /Applications/Xcode.app/Contents/Developer

to try to reset the Xcode SDK path you need.

You can also access pre-built MoltenVK binaries:

  • The Vulkan SDK includes binaries for macOS.
  • The CI build artifacts in this MoltenVK repo include binaries downloads for all platforms. On that page, select the most recent CI workflow, and select the platform binary to download.

@billhollings billhollings added Answered A question was answered Question labels Feb 5, 2021
@krupitskas
Copy link
Author

krupitskas commented Feb 7, 2021

sudo xcode-select -s /Applications/Xcode.app/Contents/Developer

Thanks, but this doesn't help. I really don't want to install precompiled binaries and want to compile it myself, just for a contribution purpose.
I've searched more and people have exact same errors in other repos.
giampaolo/psutil#1832
facebookresearch/detectron2#2288
https://stackoverflow.com/questions/64038829/pyaudio-install-error-after-updated-to-xcode-12

@cdavis5e
Copy link
Collaborator

cdavis5e commented Feb 7, 2021

Did you try passing -arch x86_64, like your linked issues all suggest?

Alternatively, did you try upgrading to a later Xcode 12? Xcode 12.2 at least should have the 11.0 SDK.

@krupitskas
Copy link
Author

krupitskas commented Feb 8, 2021

Screenshot 2021-02-08 at 20 46 55


└[~/Code/MoltenVK]> ./fetchDependencies --macos -arch x86_64
Error: Unsupported option -arch
┌[krupitskas@endurance] [/dev/ttys000] [master] [1]
└[~/Code/MoltenVK]> ./fetchDependencies -arch x86_64 --macos
Error: Unsupported option -arch

I've tried to export export ARCHFLAGS="-arch x86_64", have same result

@cdavis5e
Copy link
Collaborator

cdavis5e commented Feb 8, 2021

I wonder if we should add support for -arch to fetchDependencies.

What do your environment variables look like? I'm wondering if there's some variable set which is interfering with this.

@krupitskas
Copy link
Author

└[~]> env
TERM_SESSION_ID=w0t0p0:82147CBD-8342-4394-89C9-9E61F1A08186
SSH_AUTH_SOCK=/private/tmp/com.apple.launchd.ZuIeQ9ALT2/Listeners
LC_TERMINAL_VERSION=3.4.4
COLORFGBG=15;0
ITERM_PROFILE=Default
XPC_FLAGS=0x0
PWD=/Users/krupitskas
SHELL=/bin/zsh
__CFBundleIdentifier=com.googlecode.iterm2
LC_CTYPE=UTF-8
TERM_PROGRAM_VERSION=3.4.4
TERM_PROGRAM=iTerm.app
PATH=/usr/local/sbin:/usr/local/opt/llvm/bin/:/Users/krupitskas/.bin/:/usr/local/opt/llvm/bin/:/Users/krupitskas/.bin/:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Library/Apple/usr/bin:/Library/Frameworks/Mono.framework/Versions/Current/Commands:/Users/krupitskas/.cargo/bin
LC_TERMINAL=iTerm2
COLORTERM=truecolor
COMMAND_MODE=unix2003
TERM=xterm-256color
HOME=/Users/krupitskas
TMPDIR=/var/folders/z9/9186mqj11jj5ng7yz66ldl6c0000gn/T/
USER=krupitskas
XPC_SERVICE_NAME=0
LOGNAME=krupitskas
ITERM_SESSION_ID=w0t0p0:82147CBD-8342-4394-89C9-9E61F1A08186
__CF_USER_TEXT_ENCODING=0x0:0:0
SHLVL=1
OLDPWD=/Users/krupitskas
EDITOR=subl -w
LIBCLANG_SYSTEM_INCLUDE_DIR=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include
CPLUS_INCLUDE_PATH=/usr/local/opt/llvm/include/c++/v1:/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include
LIBRARY_PATH=:/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/lib
ZSH=/Users/krupitskas/.oh-my-zsh
PAGER=less
LESS=-R
LSCOLORS=Gxfxcxdxbxegedabagacad
GPG_TTY=/dev/ttys000
_=/usr/bin/env
%

@cdavis5e
Copy link
Collaborator

cdavis5e commented Feb 8, 2021

CPLUS_INCLUDE_PATH=/usr/local/opt/llvm/include/c++/v1:/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include
LIBRARY_PATH=:/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/lib

Well there's your problem. Try removing those directories from these variables and running it.

@krupitskas
Copy link
Author

krupitskas commented Feb 8, 2021

This was a problem, thank you @cdavis5e!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Answered A question was answered Question
Projects
None yet
Development

No branches or pull requests

3 participants