aarzilli / gdlv

GUI frontend for Delve
Other
1.32k stars 48 forks source link

go install: error related to Foundation #52

Closed mpl closed 3 years ago

mpl commented 3 years ago

I get the following while trying to install. I can try to figure it out by myself, but given I'm a noob when it comes to MacOS stuff, it could very well be something trivial that you already know the answer to, hence the issue.

$ go install
# gioui.org/app/internal/cocoainit
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/libxml2/libxml/module.modulemap:1:8: error: redefinition of module 'libxml2'
module libxml2 [system] [extern_c] {
       ^
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/libxml2/module.modulemap:1:8: note: previously defined here
module libxml2 [system] [extern_c] {
       ^
While building module 'Foundation' imported from vendor/gioui.org/app/internal/cocoainit/cocoa_darwin.go:9:
While building module 'CoreFoundation' imported from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h:6:
While building module 'Dispatch' imported from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/CoreFoundation.framework/Headers/CFStream.h:20:
In file included from <module-includes>:1:
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/dispatch/dispatch.h:59:10: fatal error: could not build module 'os_object'
#include <os/object.h>
 ~~~~~~~~^
While building module 'Foundation' imported from vendor/gioui.org/app/internal/cocoainit/cocoa_darwin.go:9:
While building module 'CoreFoundation' imported from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h:6:
In file included from <module-includes>:1:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/CoreFoundation.framework/Headers/CoreFoundation.h:60:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/CoreFoundation.framework/Headers/CFPropertyList.h:17:
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/CoreFoundation.framework/Headers/CFStream.h:20:10: fatal error: could not build module 'Dispatch'
#include <dispatch/dispatch.h>
 ~~~~~~~~^
While building module 'Foundation' imported from vendor/gioui.org/app/internal/cocoainit/cocoa_darwin.go:9:
In file included from <module-includes>:1:
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h:6:10: fatal error: could not build module 'CoreFoundation'
#include <CoreFoundation/CoreFoundation.h>
 ~~~~~~~~^
While building module 'Foundation' imported from vendor/gioui.org/app/internal/cocoainit/cocoa_darwin.go:9:
While building module 'CoreGraphics' imported from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSGeometry.h:9:
In file included from <module-includes>:1:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CoreGraphics.h:8:
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CGBase.h:12:10: fatal error: could not build module 'CoreFoundation'
#include <CoreFoundation/CFBase.h>
 ~~~~~~~~^
While building module 'Foundation' imported from vendor/gioui.org/app/internal/cocoainit/cocoa_darwin.go:9:
While building module 'CoreGraphics' imported from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSGeometry.h:9:
While building module 'IOKit' imported from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CGDisplayConfiguration.h:12:
In file included from <module-includes>:4:
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/IOKit.framework/Headers/IOCFBundle.h:26:10: fatal error: could not build module 'CoreFoundation'
#include <CoreFoundation/CoreFoundation.h>
 ~~~~~~~~^
While building module 'Foundation' imported from vendor/gioui.org/app/internal/cocoainit/cocoa_darwin.go:9:
While building module 'Security' imported from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSURLCredential.h:9:
In file included from <module-includes>:1:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/Security.framework/Headers/Security.h:27:
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/Security.framework/Headers/SecBase.h:28:10: fatal error: could not build module 'CoreFoundation'
#include <CoreFoundation/CFBase.h>
 ~~~~~~~~^
While building module 'Foundation' imported from vendor/gioui.org/app/internal/cocoainit/cocoa_darwin.go:9:
While building module 'CoreServices' imported from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSURLError.h:15:
In file included from <module-includes>:1:
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/CoreServices.framework/Headers/CoreServices.h:19:10: fatal error: could not build module 'CoreFoundation'
#include <CoreFoundation/CoreFoundation.h>
 ~~~~~~~~^
While building module 'Foundation' imported from vendor/gioui.org/app/internal/cocoainit/cocoa_darwin.go:9:
While building module 'CoreServices' imported from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSURLError.h:15:
While building module 'DiskArbitration' imported from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/CoreServices.framework/Frameworks/CarbonCore.framework/Headers/Files.h:56:
In file included from <module-includes>:1:
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/DiskArbitration.framework/Headers/DiskArbitration.h:27:10: fatal error: could not build module 'CoreFoundation'
#include <CoreFoundation/CoreFoundation.h>
 ~~~~~~~~^
While building module 'Foundation' imported from vendor/gioui.org/app/internal/cocoainit/cocoa_darwin.go:9:
While building module 'CoreServices' imported from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSURLError.h:15:
While building module 'CFNetwork' imported from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/CoreServices.framework/Headers/CoreServices.h:31:
In file included from <module-includes>:1:
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/CFNetwork.framework/Headers/CFNetwork.h:18:10: fatal error: could not build module 'CoreFoundation'
#include <CoreFoundation/CoreFoundation.h>
 ~~~~~~~~^
While building module 'Foundation' imported from vendor/gioui.org/app/internal/cocoainit/cocoa_darwin.go:9:
While building module 'XPC' imported from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSXPCConnection.h:14:
In file included from <module-includes>:1:
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/xpc/xpc.h:6:10: fatal error: could not build module 'os_object'
#include <os/object.h>
 ~~~~~~~~^
While building module 'Foundation' imported from vendor/gioui.org/app/internal/cocoainit/cocoa_darwin.go:9:
While building module 'ApplicationServices' imported from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSAppleEventDescriptor.h:9:
In file included from <module-includes>:1:
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/ApplicationServices.framework/Headers/ApplicationServices.h:23:10: fatal error: could not build module 'CoreServices'
#include <CoreServices/CoreServices.h>
 ~~~~~~~~^
While building module 'Foundation' imported from vendor/gioui.org/app/internal/cocoainit/cocoa_darwin.go:9:
While building module 'ApplicationServices' imported from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSAppleEventDescriptor.h:9:
While building module 'CoreText' imported from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/ApplicationServices.framework/Frameworks/ATS.framework/Headers/SFNTLayoutTypes.h:16:
In file included from <module-includes>:1:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreText.framework/Headers/CoreText.h:20:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/CoreText.framework/Headers/CTFont.h:20:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/CoreText.framework/Headers/CTFontDescriptor.h:20:
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/CoreText.framework/Headers/CTFontTraits.h:14:10: fatal error: could not build module 'CoreFoundation'
#include <CoreFoundation/CoreFoundation.h>
 ~~~~~~~~^
While building module 'Foundation' imported from vendor/gioui.org/app/internal/cocoainit/cocoa_darwin.go:9:
While building module 'ApplicationServices' imported from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSAppleEventDescriptor.h:9:
While building module 'ColorSync' imported from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/ApplicationServices.framework/Headers/ApplicationServices.h:31:
In file included from <module-includes>:1:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/ApplicationServices.framework/Frameworks/ColorSync.framework/Headers/ColorSync.h:10:
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/ColorSync.framework/Headers/ColorSyncBase.h:12:10: fatal error: could not build module 'CoreFoundation'
#include <CoreFoundation/CoreFoundation.h>
 ~~~~~~~~^
While building module 'Foundation' imported from vendor/gioui.org/app/internal/cocoainit/cocoa_darwin.go:9:
While building module 'ApplicationServices' imported from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSAppleEventDescriptor.h:9:
While building module 'ImageIO' imported from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/ApplicationServices.framework/Headers/ApplicationServices.h:47:
In file included from <module-includes>:1:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/ApplicationServices.framework/Frameworks/ImageIO.framework/Headers/ImageIO.h:10:
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/ImageIO.framework/Headers/ImageIOBase.h:16:10: fatal error: could not build module 'CoreFoundation'
#include <CoreFoundation/CoreFoundation.h>
 ~~~~~~~~^
vendor/gioui.org/app/internal/cocoainit/cocoa_darwin.go:9:9: fatal error: could not build module 'Foundation'
#import <Foundation/Foundation.h>
 ~~~~~~~^
16 errors generated.

I'm on macOS 10.15.7, and dlv itself is already installed and seems to be working fine.

aarzilli commented 3 years ago

In principle this should be reported to gio, however looking at the errors it seems more likely that the problem is just that your install of the command line tools is corrupted somehow. I would suggest trying to delete and reinstall, alternatively there's a lot of results on google for redefinition of module 'libxml2'.

mpl commented 3 years ago

yes, I have already reinstalled libxml2 via brew, as well as Xcode and Tools for XCode via the apple store, but no luck so far. But I agree, it is most likely a problem on my end. I was just hoping you would know, but feel free to close that issue of course.

aarzilli commented 3 years ago

No clue, sorry.

rosshadden commented 3 years ago

~I get the same error. @mpl did you ever figure it out? I tried the things suggested here as well to no avail.~

Update: I did this and it worked (despite being downvoted).