I am using MacOSbigsur, Macbook Pro, M1 Chip,
I installed Virtual box the latest version 6.1.26r145957, use this command for confirmation (VBoxManage --version).
I installed Vagrant 2.2.18, use this command for confirmation (Vagrant --version).
I clone the repo from https://box.scotch.io/, and then type on terminal "vagrant up"
Following an error occurs, I try many solutions available on the internet but not fixed. I uninstall both software and re-install did not work for me, permission is ok from system preference.
There was an error while executing VBoxManage, a CLI used by Vagrant
for controlling VirtualBox. The command and stderr is shown below.
Command: ["hostonlyif", "create"]
Stderr: 0%...
Progress state: NS_ERROR_FAILURE
VBoxManage: error: Failed to create the host-only adapter
VBoxManage: error: VBoxNetAdpCtl: Error while adding new interface: failed to open
/dev/vboxnetctl: No such file or directory
VBoxManage: error: Details: code NS_ERROR_FAILURE (0x80004005), component
HostNetworkInterfaceWrap, interface IHostNetworkInterface
VBoxManage: error: Context: "RTEXITCODE handleCreate(HandlerArg *)" at line 95 of file VBoxManageHostonly.cpp
Possible Solution: sudo "/Library/Application Support/VirtualBox/LaunchDaemons/VirtualBoxStartup.sh" restart
when I run this command its shows the following errors
Loading VBoxDrv.kext
Incompatible architecture: Binary is for x86_64, but needed arch arm64e
Error: Failed to load org.virtualbox.kext.VBoxDrv
Loading VBoxUSB.kext
Incompatible architecture: Binary is for x86_64, but needed arch arm64e
Error: Failed to load org.virtualbox.kext.VBoxUSB
Loading VBoxNetFlt.kext
Incompatible architecture: Binary is for x86_64, but needed arch arm64e
Error: Failed to load org.virtualbox.kext.VBoxNetFlt
Loading VBoxNetAdp.kext
Incompatible architecture: Binary is for x86_64, but needed arch arm64e
Error: Failed to load org.virtualbox.kext.VBoxNetAdp
Executing: /usr/bin/kmutil unload -b org.virtualbox.kext.VBoxNetAdp
Error occurred unloading extensions: Missing extension with identifier org.virtualbox.kext.VBoxNetAdp : Incompatible
architecture: Binary is for x86_64, but needed arch arm64e
Executing: /usr/bin/kmutil unload -b org.virtualbox.kext.VBoxNetFlt
Error occurred unloading extensions: Missing extension with identifier org.virtualbox.kext.VBoxNetFlt : Incompatible
architecture: Binary is for x86_64, but needed arch arm64e
Executing: /usr/bin/kmutil unload -b org.virtualbox.kext.VBoxUSB
Error occurred unloading extensions: Missing extension with identifier org.virtualbox.kext.VBoxUSB : Incompatible architecture: Binary is for x86_64, but needed arch arm64e
Executing: /usr/bin/kmutil unload -b org.virtualbox.kext.VBoxDrv
Error occurred unloading extensions: Missing extension with identifier org.virtualbox.kext.VBoxDrv : Incompatible architecture: Binary is for x86_64, but needed arch arm64e
Fatal error: VirtualBox
I had a similar error.
Stderr: 0%...
Progress state: NS_ERROR_FAILURE
VBoxManage: error: Failed to create the host-only adapter
VBoxManage: error: VBoxNetAdpCtl: Error while adding new interface: failed to open /dev/vboxnetctl: No such file or directory
VBoxManage: error: Details: code NS_ERROR_FAILURE (0x80004005), component HostNetworkInterfaceWrap, interface IHostNetworkInterface
VBoxManage: error: Context: "RTEXITCODE handleCreate(HandlerArg *)" at line 95 of file VBoxManageHostonly.cpp
Was able resolve simply by going to security settings and adding allow from Oracle.
For me this occurred after updating Mac OS, Oracle VB and Vagrant. Currently on Mac Os Monterey 12.3.1
Related
When I try to run the clang command, I get the following error:
xcode-select: Failed to locate 'clang', requesting installation of command line developer tools.
And then I receive this pop-up:
However, no matter how many times I click "Install" - going through a 15-minute install process - I continue to get the same error.
I have also tried running xcode-select --install however that gives the following error:
xcode-select: error: command line tools are already installed, use "Software Update" to install updates
I have also tried manually installing from here.
I'm on an M1 mac running macOS Monterey Version 12.5.
It also yields a core dump:
2022-09-19 10:51:04.669 xcodebuild[1541:17443] [MT] DVTPlugInLoading: Failed to load code for plug-in com.apple.dt.IDESimulatorAvailability (/Applications/Xcode.app/Contents/PlugIns/IDESimulatorAvailability.ideplugin), error = Error Domain=NSCocoaErrorDomain Code=3588 "dlopen(/Applications/Xcode.app/Contents/PlugIns/IDESimulatorAvailability.ideplugin/Contents/MacOS/IDESimulatorAvailability, 0x0109): Symbol not found: (_OBJC_CLASS_$_SimDiskImage)
Referenced from: '/Applications/Xcode.app/Contents/PlugIns/IDESimulatorAvailability.ideplugin/Contents/MacOS/IDESimulatorAvailability'
Expected in: '/Library/Developer/PrivateFrameworks/CoreSimulator.framework/Versions/A/CoreSimulator'" UserInfo={NSLocalizedFailureReason=The bundle couldn’t be loaded., NSLocalizedRecoverySuggestion=Try reinstalling the bundle., NSFilePath=/Applications/Xcode.app/Contents/PlugIns/IDESimulatorAvailability.ideplugin/Contents/MacOS/IDESimulatorAvailability, NSDebugDescription=dlopen(/Applications/Xcode.app/Contents/PlugIns/IDESimulatorAvailability.ideplugin/Contents/MacOS/IDESimulatorAvailability, 0x0109): Symbol not found: (_OBJC_CLASS_$_SimDiskImage)
Referenced from: '/Applications/Xcode.app/Contents/PlugIns/IDESimulatorAvailability.ideplugin/Contents/MacOS/IDESimulatorAvailability'
Expected in: '/Library/Developer/PrivateFrameworks/CoreSimulator.framework/Versions/A/CoreSimulator', NSBundlePath=/Applications/Xcode.app/Contents/PlugIns/IDESimulatorAvailability.ideplugin, NSLocalizedDescription=The bundle “IDESimulatorAvailability” couldn’t be loaded.}, dyldError = dlopen(/Applications/Xcode.app/Contents/PlugIns/IDESimulatorAvailability.ideplugin/Contents/MacOS/IDESimulatorAvailability, 0x0000): Symbol not found: (_OBJC_CLASS_$_SimDiskImage)
Referenced from: '/Applications/Xcode.app/Contents/PlugIns/IDESimulatorAvailability.ideplugin/Contents/MacOS/IDESimulatorAvailability'
Expected in: '/Library/Developer/PrivateFrameworks/CoreSimulator.framework/Versions/A/CoreSimulator'
2022-09-19 10:51:04.688 xcodebuild[1541:17443] [MT] DVTAssertions: ASSERTION FAILURE in /System/Volumes/Data/SWE/Apps/DT/BuildRoots/BuildRoot2/ActiveBuildRoot/Library/Caches/com.apple.xbs/Sources/DVTFrameworks/DVTFrameworks-21303/DVTFoundation/PlugInArchitecture/DataModel/DVTPlugIn.m:374
Details: Failed to load code for plug-in com.apple.dt.IDESimulatorAvailability (/Applications/Xcode.app/Contents/PlugIns/IDESimulatorAvailability.ideplugin)
Please ensure Xcode packages are up-to-date — try running 'xcodebuild -runFirstLaunch'.
NSBundle error: Error Domain=NSCocoaErrorDomain Code=3588 "dlopen(/Applications/Xcode.app/Contents/PlugIns/IDESimulatorAvailability.ideplugin/Contents/MacOS/IDESimulatorAvailability, 0x0109): Symbol not found: (_OBJC_CLASS_$_SimDiskImage)
Referenced from: '/Applications/Xcode.app/Contents/PlugIns/IDESimulatorAvailability.ideplugin/Contents/MacOS/IDESimulatorAvailability'
Expected in: '/Library/Developer/PrivateFrameworks/CoreSimulator.framework/Versions/A/CoreSimulator'" UserInfo={NSLocalizedFailureReason=The bundle couldn’t be loaded., NSLocalizedRecoverySuggestion=Try reinstalling the bundle., NSFilePath=/Applications/Xcode.app/Contents/PlugIns/IDESimulatorAvailability.ideplugin/Contents/MacOS/IDESimulatorAvailability, NSDebugDescription=dlopen(/Applications/Xcode.app/Contents/PlugIns/IDESimulatorAvailability.ideplugin/Contents/MacOS/IDESimulatorAvailability, 0x0109): Symbol not found: (_OBJC_CLASS_$_SimDiskImage)
Referenced from: '/Applications/Xcode.app/Contents/PlugIns/IDESimulatorAvailability.ideplugin/Contents/MacOS/IDESimulatorAvailability'
Expected in: '/Library/Developer/PrivateFrameworks/CoreSimulator.framework/Versions/A/CoreSimulator', NSBundlePath=/Applications/Xcode.app/Contents/PlugIns/IDESimulatorAvailability.ideplugin, NSLocalizedDescription=The bundle “IDESimulatorAvailability” couldn’t be loaded.}
Object: <DVTPlugIn: 0x60000080b7a0>
Method: -loadAssertingOnError:error:
Thread: <_NSMainThread: 0x600002c402c0>{number = 1, name = main}
Hints:
Backtrace:
0 0x000000010653d410
1 0x000000010653caec
2 0x000000010653cc6c
3 0x00000001063eb2ac
4 0x00000001063b1118
5 0x00000001063af528
6 0x0000000181aa01b4
7 0x0000000181aaf414
8 0x000000010658158c
9 0x000000010655d4b0
10 0x00000001063af3c0
11 0x00000001063af5e0
12 0x00000001074372ec
13 0x0000000107436ae0
14 0x00000001074361e8
15 0x0000000104c70324
16 0x0000000104c21e0c
sh: line 1: 1543 Abort trap: 6 /Applications/Xcode.app/Contents/Developer/usr/bin/xcodebuild -sdk /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk -find clang 2> /dev/null
clang: error: sh -c '/Applications/Xcode.app/Contents/Developer/usr/bin/xcodebuild -sdk /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk -find clang 2> /dev/null' failed with exit code 34304: (null) (errno=Invalid argument)
How can I install clang?
Please ensure Xcode packages are up-to-date — try running xcodebuild -runFirstLaunch.
This worked for me.
I had the same problem and updated Xcode, relinked paths etc, which didn't help.
What worked was opening Xcode after the update and accepting the prompt to load essential development tools (for macOS and iOS).
A bit hidden in the error message is also the CLI solution: "Please ensure Xcode packages are up-to-date — try running 'xcodebuild -runFirstLaunch'."
You can also open Xcode, select the default runtime tools (MacOS and iOS in my case), then clang should run as normal.
I believe this is the same as doing #LanderTome's answer, but not able to verify.
After installing XCode 14.1 on MacOS Ventura 13.0.1, my clang didn't work with an error very similar to this, and repeatedly tried to install the XCode command line tools. It turns out that xcode-select was pointing to the command line tools that are part of the full XCode package, and failing to find clang in there. clang is included in the command line tools package, but not in some versions of the full XCode package.
What I did to fix it was:
sudo xcode-select -switch /Library/Developer/CommandLineTools
This switches the location that clang and other tools are run from. If you want to switch back to running them from the XCode package, you can use:
sudo xcode-select -switch /Applications/Xcode.app/Contents/Developer
I'm trying to release my project in both linux and windwos machines without success.
I have tried to explicitly define the -CC to few options but non of them worked in both machines.
Pre installed packages:
sudo apt-get install build-essential
sudo apt-get install gcc-multilib g++-multilib
sudo apt-get install gcc-mingw-w64
In the project i'm using c code which uses these flags in order to selective compilation
//#cgo windows CFLAGS: "-IC:/Program Files/OpenSSL-Win64/include"
//#cgo windows LDFLAGS: "-LC:/Program Files/OpenSSL-Win64/lib" -llibcrypto
//#cgo linux LDFLAGS: -lssl -lcrypto
//#cgo CFLAGS: -Wno-deprecated-declarations
running GoRelaser locally on windows machine will result this error.
⨯ release failed after 24.28s error=failed to build for windows_arm64: exit status 2: # runtime/cgo
gcc_arm64.S: Assembler messages:
gcc_arm64.S:28: Error: no such instruction: `stp x29,x30,[sp,'
gcc_arm64.S:32: Error: too many memory references for `mov'
gcc_arm64.S:34: Error: no such instruction: `stp x19,x20,[sp,'
gcc_arm64.S:37: Error: no such instruction: `stp x21,x22,[sp,'
gcc_arm64.S:40: Error: no such instruction: `stp x23,x24,[sp,'
gcc_arm64.S:43: Error: no such instruction: `stp x25,x26,[sp,'
gcc_arm64.S:46: Error: no such instruction: `stp x27,x28,[sp,'
gcc_arm64.S:50: Error: too many memory references for `mov'
gcc_arm64.S:51: Error: too many memory references for `mov'
gcc_arm64.S:52: Error: too many memory references for `mov'
gcc_arm64.S:54: Error: no such instruction: `blr x20'
gcc_arm64.S:55: Error: no such instruction: `blr x19'
gcc_arm64.S:57: Error: no such instruction: `ldp x27,x28,[sp,'
gcc_arm64.S:60: Error: no such instruction: `ldp x25,x26,[sp,'
gcc_arm64.S:63: Error: no such instruction: `ldp x23,x24,[sp,'
gcc_arm64.S:66: Error: no such instruction: `ldp x21,x22,[sp,'
gcc_arm64.S:69: Error: no such instruction: `ldp x19,x20,[sp,'
gcc_arm64.S:72: Error: no such instruction: `ldp x29,x30,[sp],'
⨯ release failed after 24.28s error=failed to build for windows_arm64: exit status 2: # runtime/cgo
gcc_arm64.S: Assembler messages:
gcc_arm64.S:28: Error: no such instruction: `stp x29,x30,[sp,'
gcc_arm64.S:32: Error: too many memory references for `mov'
gcc_arm64.S:34: Error: no such instruction: `stp x19,x20,[sp,'
gcc_arm64.S:37: Error: no such instruction: `stp x21,x22,[sp,'
gcc_arm64.S:40: Error: no such instruction: `stp x23,x24,[sp,'
gcc_arm64.S:43: Error: no such instruction: `stp x25,x26,[sp,'
gcc_arm64.S:46: Error: no such instruction: `stp x27,x28,[sp,'
gcc_arm64.S:50: Error: too many memory references for `mov'
gcc_arm64.S:51: Error: too many memory references for `mov'
gcc_arm64.S:52: Error: too many memory references for `mov'
gcc_arm64.S:54: Error: no such instruction: `blr x20'
gcc_arm64.S:55: Error: no such instruction: `blr x19'
gcc_arm64.S:57: Error: no such instruction: `ldp x27,x28,[sp,'
gcc_arm64.S:60: Error: no such instruction: `ldp x25,x26,[sp,'
gcc_arm64.S:63: Error: no such instruction: `ldp x23,x24,[sp,'
gcc_arm64.S:66: Error: no such instruction: `ldp x21,x22,[sp,'
gcc_arm64.S:69: Error: no such instruction: `ldp x19,x20,[sp,'
gcc_arm64.S:72: Error: no such instruction: `ldp x29,x30,[sp],'
running GoReleaser locally on ubuntu machine will result
gcc: error: unrecognized command line option ‘-mthreads’; did you mean ‘-pthread’?
GoReleaser:
# This is an example .goreleaser.yml file with some sensible defaults.
# Make sure to check the documentation at https://goreleaser.com
before:
hooks:
# You may remove this if you don't use go modules.
- go mod tidy
# you may remove this if you don't need go generate
- go generate ./...
builds:
- env:
- CGO_ENABLED=1
goos:
- linux
- windows
archives:
- replacements:
linux: Linux
windows: Windows
386: i386
amd64: x86_64
checksum:
name_template: 'checksums.txt'
snapshot:
name_template: "{{ incpatch .Version }}-next"
changelog:
sort: asc
filters:
exclude:
- '^docs:'
- '^test:'
By default GoReleaser will attempt to make builds for 386, amd64 and arm64. But your windows machine is likey an amd64/x86_64 machine. Normally this is no issue with Go, but since you are using CGO your C toolchain has to support compilation for arm64, which it doesn't.
You should be able to limit the CPU architectures it attempts to build by adding goarch to your config file:
...
builds:
goarch:
- amd64
...
Cross compiling cgo projects is notoriously difficult and a known limitation of GoReleaser. I recommend taking a look at the cgo cookbook if you have not already done so.
As for the error you are getting on ubuntu, it looks like you C toolchain doesn't have the right dependencies/capabilities to cross compile to windows.
I have not done any CGO cross compilation myself(attempt to avoid it at all costs) so I can't vouch for this tool, but from what I am reading online xgo might be able to help you out.
i am new to coding and am currently facing an annoying issue when installing Vagrant
and it is stopping from completing my studies, i am using:
macOS Big Sur 11.3.1 on a MacPro
I've tried uninstalling / installing both Vagrant and Virtualbox using their own websites and using brew, but no luck so far to solve the below issue.
vagrant --version
Vagrant 2.2.16
Here is log from my terminal (also tried using iTerm but the same issue):
vagrant up
Bringing machine 'default' up with 'virtualbox' provider...
==> default: Checking if box 'bento/ubuntu-16.04-i386' version '2.3.5' is up to date...
==> default: A newer version of the box 'bento/ubuntu-16.04-i386' is available and already
==> default: installed, but your Vagrant machine is running against
==> default: version '2.3.5'. To update to version '202102.02.0',
==> default: destroy and recreate your machine.
==> default: Clearing any previously set forwarded ports...
==> default: Clearing any previously set network interfaces...
==> default: Preparing network interfaces based on configuration...
default: Adapter 1: nat
==> default: Forwarding ports...
default: 8000 (guest) => 8000 (host) (adapter 1)
default: 8080 (guest) => 8080 (host) (adapter 1)
default: 5000 (guest) => 5000 (host) (adapter 1)
default: 22 (guest) => 2222 (host) (adapter 1)
==> default: Running 'pre-boot' VM customizations...
==> default: Booting VM...
There was an error while executing `VBoxManage`, a CLI used by Vagrant
for controlling VirtualBox. The command and stderr is shown below.
Command: ["startvm", "1c862e17-0e9e-475d-8b1c-7df81fc3b144", "--type", "headless"]
Stderr: VBoxManage: error: The virtual machine 'vagrant_default_1621523735226_48464' has terminated unexpectedly during startup with exit code 1 (0x1)
VBoxManage: error: Details: code NS_ERROR_FAILURE (0x80004005), component MachineWrap, interface IMachine
Screenshot
I trying to vagrant up this file from my course materials, and i just download it and change the directory with "cd" to the folder with the vagrant file then to vagrant up.
Thank you so much,
UPDATE:
I tired the some of the solutions here but it didn't work too, and when i tried the below code i got a lot of error messages.
sudo "/Library/Application
Support/VirtualBox/LaunchDaemons/VirtualBoxStartup.sh" restart
sudo "/Library/Application Support/VirtualBox/LaunchDaemons/VirtualBoxStartup.sh" restart
Password:
Loading VBoxDrv.kext
Error Domain=KMErrorDomain Code=71 "Incompatible architecture: Binary is for x86_64, but needed arch arm64e" UserInfo={NSLocalizedDescription=Incompatible architecture: Binary is for x86_64, but needed arch arm64e}
Error: Failed to load org.virtualbox.kext.VBoxDrv
Loading VBoxUSB.kext
Error Domain=KMErrorDomain Code=71 "Incompatible architecture: Binary is for x86_64, but needed arch arm64e" UserInfo={NSLocalizedDescription=Incompatible architecture: Binary is for x86_64, but needed arch arm64e}
Error: Failed to load org.virtualbox.kext.VBoxUSB
Loading VBoxNetFlt.kext
Error Domain=KMErrorDomain Code=71 "Incompatible architecture: Binary is for x86_64, but needed arch arm64e" UserInfo={NSLocalizedDescription=Incompatible architecture: Binary is for x86_64, but needed arch arm64e}
Error: Failed to load org.virtualbox.kext.VBoxNetFlt
Loading VBoxNetAdp.kext
Error Domain=KMErrorDomain Code=71 "Incompatible architecture: Binary is for x86_64, but needed arch arm64e" UserInfo={NSLocalizedDescription=Incompatible architecture: Binary is for x86_64, but needed arch arm64e}
Error: Failed to load org.virtualbox.kext.VBoxNetAdp
Executing: /usr/bin/kmutil unload -b org.virtualbox.kext.VBoxNetAdp
Error Domain=KMErrorDomain Code=3 "Error occurred unloading extensions: Missing extension with identifier org.virtualbox.kext.VBoxNetAdp : Incompatible architecture: Binary is for x86_64, but needed arch arm64e" UserInfo={NSLocalizedDescription=Error occurred unloading extensions: Missing extension with identifier org.virtualbox.kext.VBoxNetAdp : Incompatible architecture: Binary is for x86_64, but needed arch arm64e}
Executing: /usr/bin/kmutil unload -b org.virtualbox.kext.VBoxNetFlt
Error Domain=KMErrorDomain Code=3 "Error occurred unloading extensions: Missing extension with identifier org.virtualbox.kext.VBoxNetFlt : Incompatible architecture: Binary is for x86_64, but needed arch arm64e" UserInfo={NSLocalizedDescription=Error occurred unloading extensions: Missing extension with identifier org.virtualbox.kext.VBoxNetFlt : Incompatible architecture: Binary is for x86_64, but needed arch arm64e}
Executing: /usr/bin/kmutil unload -b org.virtualbox.kext.VBoxUSB
Error Domain=KMErrorDomain Code=3 "Error occurred unloading extensions: Missing extension with identifier org.virtualbox.kext.VBoxUSB : Incompatible architecture: Binary is for x86_64, but needed arch arm64e" UserInfo={NSLocalizedDescription=Error occurred unloading extensions: Missing extension with identifier org.virtualbox.kext.VBoxUSB : Incompatible architecture: Binary is for x86_64, but needed arch arm64e}
Executing: /usr/bin/kmutil unload -b org.virtualbox.kext.VBoxDrv
Error Domain=KMErrorDomain Code=3 "Error occurred unloading extensions: Missing extension with identifier org.virtualbox.kext.VBoxDrv : Incompatible architecture: Binary is for x86_64, but needed arch arm64e" UserInfo={NSLocalizedDescription=Error occurred unloading extensions: Missing extension with identifier org.virtualbox.kext.VBoxDrv : Incompatible architecture: Binary is for x86_64, but needed arch arm64e}
Fatal error: VirtualBox
I am trying to install LightGBM GPU version on Windows systems (I am using Anaconda on Windows for Python). I followed the installation guide from the beginning.
I have succefully completed the first two tasks:
Install the appropriate OpenCL SDK
Install MinGW
However, I encountered error after this command for Boost Compilation:
b2 install --build_dir="C:\boost\boost-build" --prefix="C:\boost\boost-build" toolset=gcc --with=filesystem,system threading=multi --layout=system release
The Error Message are as followed:
error: Name clash for 'libboost_atomic.a'
error:
error: Tried to build the target twice, with property sets having
error: these incompatible properties:
error:
error: - 64
error: - 32
error:
error: Please make sure to have consistent requirements for these
error: properties everywhere in your project, especially for install
error: targets.
Please share me any suggestions on how should I rectify the problem?
It is a test-drive example "https://flutter.io/get-started/test-drive/#terminal"
I have got the following error, please comment how to resolve this issue.
Xcode's output:
↳
=== BUILD TARGET Runner OF PROJECT Runner WITH CONFIGURATION Debug ===
clang-3.5: error: unknown argument: '-gmodules'
clang-3.5: error: unknown argument: '-fbuild-session-file=/Users/nelson/Library/Developer/Xcode/DerivedData/ModuleCache.noindex/Session.modulevalidation'
clang-3.5: error: no such file or directory: '/Users/nelson/Library/Developer/Xcode/DerivedData/Runner-ctvpprsqskddfxbtqtsepwpaebqm/Index/DataStore'
clang-3.5: error: option '-fmodules-validate-once-per-build-session' requires '-fbuild-session-timestamp=<seconds since Epoch>'
Command /usr/local/bin/clang-omp failed with exit code 1
clang-3.5: error: unknown argument: '-gmodules'
clang-3.5: error: unknown argument: '-fbuild-session-file=/Users/nelson/Library/Developer/Xcode/DerivedData/ModuleCache.noindex/Session.modulevalidation'
clang-3.5: error: no such file or directory: '/Users/nelson/Library/Developer/Xcode/DerivedData/Runner-ctvpprsqskddfxbtqtsepwpaebqm/Index/DataStore'
clang-3.5: error: option '-fmodules-validate-once-per-build-session' requires '-fbuild-session-timestamp=<seconds since Epoch>'
Command /usr/local/bin/clang-omp failed with exit code 1
=== BUILD TARGET Runner OF PROJECT Runner WITH CONFIGURATION Debug ===
error: the following command failed with exit code 1 but produced no further output
CompileC /Users/nelson/Library/Developer/Xcode/DerivedData/Runner-ctvpprsqskddfxbtqtsepwpaebqm/Build/Intermediates.noindex/Runner.build/Debug-iphonesimulator/Runner.build/Objects-normal/x86_64/Runner_vers.o /Users/nelson/Library/Developer/Xcode/DerivedData/Runner-ctvpprsqskddfxbtqtsepwpaebqm/Build/Intermediates.noindex/Runner.build/Debug-iphonesimulator/Runner.build/DerivedSources/Runner_vers.c normal x86_64 c com.apple.compilers.llvm.clang.1_0.compiler
clang-3.5: error: unknown argument: '-gmodules'
clang-3.5: error: unknown argument: '-fbuild-session-file=/Users/nelson/Library/Developer/Xcode/DerivedData/ModuleCache.noindex/Session.modulevalidation'
clang-3.5: error: no such file or directory: '/Users/nelson/Library/Developer/Xcode/DerivedData/Runner-ctvpprsqskddfxbtqtsepwpaebqm/Index/DataStore'
clang-3.5: error: option '-fmodules-validate-once-per-build-session' requires '-fbuild-session-timestamp=<seconds since Epoch>'
Command /usr/local/bin/clang-omp failed with exit code 1
clang-3.5: error: unknown argument: '-gmodules'
clang-3.5: error: unknown argument: '-fbuild-session-file=/Users/nelson/Library/Developer/Xcode/DerivedData/ModuleCache.noindex/Session.modulevalidation'
clang-3.5: error: no such file or directory: '/Users/nelson/Library/Developer/Xcode/DerivedData/Runner-ctvpprsqskddfxbtqtsepwpaebqm/Index/DataStore'
clang-3.5: error: option '-fmodules-validate-once-per-build-session' requires '-fbuild-session-timestamp=<seconds since Epoch>'
Command /usr/local/bin/clang-omp failed with exit code 1
Could not build the application for the simulator.
Error launching application on iPhone 7 Plus.
I have resolved the issue as the following:
If you look at the question carefully, it triggered an outdated version of clang 3.5, I uninstalled an outdated version and installed a new one.
remove clang-omp from os x
$ brew uninstall clang-omp
After uninstall clang-omp, flutter installer required to update to the latest version. Actually, I did the update before but I did it again.
$ flutter upgrade
I try to run flutter again but it cannot be compiled. It was missing clang-omp
$ flutter run
=== BUILD TARGET Runner OF PROJECT Runner WITH CONFIGURATION Debug ===
error: can't exec '/usr/local/bin/clang-omp' (No such file or directory)
Command /usr/local/bin/clang-omp failed with exit code 71
error: can't exec '/usr/local/bin/clang-omp' (No such file or directory)
Command /usr/local/bin/clang-omp failed with exit code 71
Because it required an updated version of clang during compilation. I installed llvm
$ brew install llvm
and update the PATH accordingly.
echo 'export PATH="/usr/local/opt/llvm/bin:$PATH"' >> ~/.bash_profile
Compile the application again, it was compiled successfully.
$ flutter run
Launching lib/main.dart on iPhone 7 Plus in debug mode...
Starting Xcode build...
├─Assembling Flutter resources... 1.1s
└─Compiling, linking and signing... 8.6s
Xcode build done. 11.3s
Syncing files to device iPhone 7 Plus... 3.9s
🔥 To hot reload changes while running, press "r". To hot restart (and rebuild state), press "R".
An Observatory debugger and profiler on iPhone 7 Plus is available at: http://127.0.0.1:8100/
For a more detailed help message, press "h". To quit, press "q".
Initializing hot reload...
Reloaded 0 of 391 libraries in 486ms.