wails icon indicating copy to clipboard operation
wails copied to clipboard

ld: framework not found UniformTypeIdentifiers after wails build

Open annikovk opened this issue 4 years ago • 13 comments

Description wails build and wails dev commands return an error about missing UniformTypeIdentifiers library. I do not know how to install it explicitly. Only saw that my macOS version (12.1) should have it bundled. Moreover, the file is here:

locate UniformTypeIdentifiers | grep -v kotlin
/System/Library/Frameworks/UniformTypeIdentifiers.framework
/System/Library/Frameworks/UniformTypeIdentifiers.framework/Resources
/System/Library/Frameworks/UniformTypeIdentifiers.framework/Versions
/System/Library/Frameworks/UniformTypeIdentifiers.framework/Versions/A
/System/Library/Frameworks/UniformTypeIdentifiers.framework/Versions/A/Resources
/System/Library/Frameworks/UniformTypeIdentifiers.framework/Versions/A/Resources/BridgeSupport
/System/Library/Frameworks/UniformTypeIdentifiers.framework/Versions/A/Resources/BridgeSupport/UniformTypeIdentifiers.arm64e.bridgesupport
/System/Library/Frameworks/UniformTypeIdentifiers.framework/Versions/A/Resources/BridgeSupport/UniformTypeIdentifiers.bridgesupport
/System/Library/Frameworks/UniformTypeIdentifiers.framework/Versions/A/Resources/Info.plist
/System/Library/Frameworks/UniformTypeIdentifiers.framework/Versions/A/Resources/version.plist
/System/Library/Frameworks/UniformTypeIdentifiers.framework/Versions/A/_CodeSignature
/System/Library/Frameworks/UniformTypeIdentifiers.framework/Versions/A/_CodeSignature/CodeResources
/System/Library/Frameworks/UniformTypeIdentifiers.framework/Versions/Current

To Reproduce Steps to reproduce the behaviour:

  1. wails init -n wailsLogAnalyzer
Wails CLI v2.0.0-beta.30


Initialising Project WailsLogAnalyzer
-------------------------------------


Project Name:      wailsLogAnalyzer
Project Directory: /Users/konstantin.annikov/Downloads/wailsLogAnalyzer
Project Template:  vanilla
Template Support:  https://github.com/wailsapp/wails

Initialised project 'wailsLogAnalyzer' in 382ms.
  1. cd ./wailsLogAnalyzer/
  2. wails dev
  3. See error
wails dev
Wails CLI v2.0.0-beta.30


Executing: go mod tidy
Executing: wails generate module
Building application for development...
No Install command. Skipping.
No Build command. Skipping.
Compiling application: # runtime/cgo
ld: framework not found UniformTypeIdentifiers
clang: error: linker command failed with exit code 1 (use -v to see invocation)

Build error - continuing to run current version
exit status 2
Watching (sub)/directory: /Users/konstantin.annikov/Downloads/wailsLogAnalyzer
Using Dev Server URL: http://localhost:34115
Using reload debounce setting of 100 milliseconds

Expected behaviour

  • improved error message, so missing frameworks could be installed by executing a command in console

Screenshots

System Details

wails doctor
Wails CLI v2.0.0-beta.30


Scanning system - Please wait (this may take a long time)...Done.

System
------
OS:		MacOS
Version: 	12.1
ID:		199506
Go Version:	go1.17.6
Platform:	darwin
Architecture:	amd64

Dependency			Package Name	Status		Version
----------			------------	------		-------
xcode command line tools 	N/A		Installed	2392
npm 				N/A		Installed	8.4.1
*upx 				N/A		Available	

* - Optional Dependency

Diagnosis
---------
Your system is ready for Wails development!
Optional package(s) installation details:
  - upx : Available at https://upx.github.io/

Additional context Add any other context about the problem here.

annikovk avatar Feb 10 '22 14:02 annikovk

Just updated to macOS 12.2, same here:

wails doctor
Wails CLI v2.0.0-beta.30


Scanning system - Please wait (this may take a long time)...Done.

System
------
OS:		MacOS
Version: 	12.2
ID:		199506
Go Version:	go1.17.6
Platform:	darwin
Architecture:	amd64

Dependency			Package Name	Status		Version
----------			------------	------		-------
xcode command line tools 	N/A		Installed	2392
npm 				N/A		Installed	8.4.1
*upx 				N/A		Available	

* - Optional Dependency

Diagnosis
---------
Your system is ready for Wails development!
Optional package(s) installation details:
  - upx : Available at https://upx.github.io/

annikovk avatar Feb 10 '22 14:02 annikovk

Reinstallation XCode Command line tools helped. Maybe add a hint to the error's text?

annikovk avatar Feb 10 '22 15:02 annikovk

Yeah this is super annoying. I guess we could run the error through a filter and determine if that's the problem? Did you reinstall to the latest? I'm trying to determine the exact steps

leaanthony avatar Feb 11 '22 10:02 leaanthony

Yeah, latest

annikovk avatar Feb 11 '22 10:02 annikovk

Not sure you can retest this, but I've pushed a commit to try and output some help if this happens. Are you able to test it?

leaanthony avatar Feb 12 '22 10:02 leaanthony

Not sure you can retest this, but I've pushed a commit to try and output some help if this happens. Are you able to test it?

Any updates? Having same issue on macOS 12.0.1

allcapsc avatar Feb 24 '22 03:02 allcapsc

Not sure you can retest this, but I've pushed a commit to try and output some help if this happens. Are you able to test it?

Any updates? Having same issue on macOS 12.0.1

I was able to get it working! If anyone has the same issue you can refer to https://mac.install.guide/commandlinetools/6.html to Uninstall Xcode Command Tools and https://mac.install.guide/commandlinetools/7.html to Reinstall Xcode Command Tools. Hope that Helps! 😄

allcapsc avatar Feb 24 '22 04:02 allcapsc

@allcapsc did you test the latest Wails release? It should output a help text user with instructions to reinstall the xcode cli tools in this case.

stffabi avatar Feb 24 '22 04:02 stffabi

@allcapsc did you test the latest Wails release? It should output a help text user with instructions to reinstall the xcode cli tools in this case.

@stffabi I have not, I'm running v2.0.0-beta.32. Would that be latest? I might have skimmed through the error log when that error appeared for me.

allcapsc avatar Feb 24 '22 04:02 allcapsc

'beta.32' should output the instructions. Maybe the detection doesn't yet detect all cases.

stffabi avatar Feb 24 '22 04:02 stffabi

'beta.32' should output the instructions. Maybe the detection doesn't yet detect all cases.

Ah maybe but thank you tho! Got it working thankfully 👍

allcapsc avatar Feb 24 '22 04:02 allcapsc

If someone encounters the same problem and reinstalling Xcode Command Tools still fails, you can check the path where the toolkit is located

Run xcode-select -p

If "/Applications/Xcode. app/Contents/Developer" is displayed

Run sudo xcode-select --switch /Library/Developer/CommandLineTools

-- My version info Wails CLI v2.1.0 macOS: 12.5.1-x86_64 CLT: 14.0.0.0.1.1661618636

it work!

jaylin507 avatar Oct 25 '22 12:10 jaylin507

Thanks for letting us know!. Will update the troubleshooting guide

leaanthony avatar Oct 25 '22 19:10 leaanthony