-
-
Notifications
You must be signed in to change notification settings - Fork 52
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
Build darwin target fail on Windows 10 host XCode 14.3 #187
Comments
systray_darwin.m:1:9: fatal error: 'Cocoa/Cocoa.h' file not found |
This doesn't look like a fyne_cross log - is there surrounding info missing? Or does this refer to fyne instead of fyne_cross |
Hey, I have the same problem on Linux. Logfile from @vinser xc14.3.log |
I think I have seen this issue, but haven't had time investigating it. Switching to an older release of the sdk solve the problem. If I remember there is two of them in the package distributed by Apple. |
same here (ubuntu 22.04) I've tried SDKs 12.4, 12.5.1, 13.4 and 14.3.1 |
Are you able to provide the error info or debug log? |
Sure, sorry for not doing it in the first place OS: Ubuntu 22.04 When trying to use Command_Line_Tools_for_Xcode_14.3.1.dmg, extraction seem OK
And 12.4, too, even though there are some messages from cpio (directory was cleaned before doing extraction)
I'm attaching the logs from the fyne-cross darwin build from both SDKs
Since readme tells to use a SDK >= 12.4 I haven't tried an older one |
I haven't tried this latest SDK, but is it possible that Apple has removed the distribution of Cocoa.h? |
For Xcode 14.2, macOS SDK 13.1 the file is found at:
|
This command parameter does not look correct - it is almost certainly not a macOS SDK path as it is on a linux computer! |
If you look at my message, you will see that I did the extract just before fyne-cross darwin-sdk-extract --xcode-path /home/zwindler/sources/gocastle/bin/Command_Line_Tools_for_Xcode_12.4.dmg This creates the /home/zwindler/sources/gocastle/bin/SDKs path But maybe I misunderstood the readme and I'm missing a step? |
Ah apologies, I was confusing it with "bundled" option it seems. I missed that you had extracted it before. Are you certain that the |
There is no apologies needed, thanks for trying to help I don't have my computer with me right now but I'll dig in that direction and get back to you Thanks again |
Ok, I had never listed the directory and now I understand what someone meant somewhere in the issue or another duplicate one. The SDKs directory that is extracted by
Sorry for the missunderstanding. So now that I understand that I have to tell fyne-cross which of those SDKs I want to use, I can now do some tests with various versions of the SDK. MacOSX11.1.sdk seems to work (though I don't have a Mac to try it), and so does MacOSX12.3.sdk (from Command_Line_Tools_for_Xcode_12.4.dmg and Command_Line_Tools_for_Xcode_14.3.1.dmg respectively)
However, MacOSX13.3.sdk doesn't
I'll attach the full log |
Here is the log SDKs.14.3.1_MacOSX13.3.sdk.log Though I'm totally fine with using SDKs.14.3.1/MacOSX12.3.sdk, which works Many thanks for your help again [Edit] Contrary to what I just said, SDKs.14.3.1/MacOSX12.3.sdk only works on amd64. It fails for arm64. But SDKs.12.4/MacOSX.sdk seems ok for both
|
Got similar issue, downloaded $ ls /data/root/Command_Line_Tools_for_Xcode/SDKs
MacOSX13.3.sdk MacOSX13.sdk MacOSX14.4.sdk MacOSX14.sdk MacOSX.sdk
$ git clone https://github.com/fyne-io/examples.git && cd examples && ls
AUTHORS bugs clock data.go fractal fyne-cross fyne_metadata_init.go go.mod go.sum Icon.png img LICENSE main.go README.md tictactoe vendor xkcd $ fyne-cross darwin -app-id io.fyne.example -macosx-sdk-path /data/root/Command_Line_Tools_for_Xcode/SDKs/MacOSX13.3.sdk -arch=amd64 -debug -no-cache -env GOPROXY=https://goproxy.io,direct
# fyne.io/systray
clang version 13.0.1 ([email protected]:ziglang/zig-bootstrap.git 81f0e6c5b902ead84753490db4f0007d08df964a)
Target: x86_64-unknown-macosx-gnu
Thread model: posix
InstalledDir: /go/pkg/mod/fyne.io/[email protected]
(in-process)
"/usr/local/zig/zig" -cc1 -triple x86_64-unknown-macosx10.11.0-gnu -Wundef-prefix=TARGET_OS_ -Werror=undef-prefix -Wdeprecated-objc-isa-usage -Werror=deprecated-objc-isa-usage -emit-obj --mrelax-relocations -disable-free -disable-llvm-verifier -discard-value-names -main-file-name systray_darwin.m -mrelocation-model pic -pic-level 2 -mframe-pointer=all -fno-rounding-math -faligned-alloc-unavailable -target-sdk-version=13.3 -fcompatibility-qualified-id-block-type-checking -fvisibility-inlines-hidden-static-local-var -target-cpu core2 -tune-cpu generic -debugger-tuning=lldb -v -fcoverage-compilation-dir=/go/pkg/mod/fyne.io/[email protected] -nostdsysteminc -nobuiltininc -resource-dir /usr/local/lib/clang/13.0.1 -dependency-file /root/.cache/zig/tmp/730c5c84b88b598c-systray_darwin.o.d -MT /root/.cache/zig/tmp/730c5c84b88b598c-systray_darwin.o -sys-header-deps -MV -isystem /usr/local/zig/lib/include -isystem /usr/local/zig/lib/libc/include/x86_64-macos.10-gnu -isystem /usr/local/zig/lib/libc/include/any-macos.10-any -isystem /usr/local/zig/lib/libc/include/any-macos-any -isysroot /sdk -iwithsysroot /usr/include -iframeworkwithsysroot /System/Library/Frameworks -D _DEBUG -I /go/pkg/mod/fyne.io/[email protected] -I $WORK/b230/ -D DARWIN -fmacro-prefix-map=/tmp/go-build2505255251/b230=/tmp/go-build -fmacro-prefix-map=/go/pkg/mod/fyne.io/[email protected]=/_/fyne.io/[email protected] -fcoverage-prefix-map=/tmp/go-build2505255251/b230=/tmp/go-build -fcoverage-prefix-map=/go/pkg/mod/fyne.io/[email protected]=/_/fyne.io/[email protected] -Og -fdebug-compilation-dir=/go/pkg/mod/fyne.io/[email protected] -fdebug-prefix-map=/tmp/go-build2505255251/b230=/tmp/go-build -fdebug-prefix-map=/go/pkg/mod/fyne.io/[email protected]=/_/fyne.io/[email protected] -ferror-limit 19 -fsanitize=alignment,array-bounds,bool,builtin,enum,float-cast-overflow,function,integer-divide-by-zero,nonnull-attribute,null,object-size,pointer-overflow,return,returns-nonnull-attribute,shift-base,shift-exponent,signed-integer-overflow,unreachable,vla-bound -fsanitize-trap=alignment,array-bounds,bool,builtin,enum,float-cast-overflow,function,integer-divide-by-zero,nonnull-attribute,null,object-size,pointer-overflow,return,returns-nonnull-attribute,shift-base,shift-exponent,signed-integer-overflow,unreachable,vla-bound -pthread -stack-protector 2 -stack-protector-buffer-size 4 -fblocks -fencode-extended-block-signature -fregister-global-dtors-with-atexit -fgnuc-version=4.2.1 -fobjc-runtime=macosx-10.11.0 -fobjc-arc -fobjc-exceptions -fexceptions -fmax-type-align=16 -fno-spell-checking -target-cpu x86-64 -target-feature -16bit-mode -target-feature -32bit-mode -target-feature -3dnow -target-feature -3dnowa -target-feature +64bit -target-feature -adx -target-feature -aes -target-feature -amx-bf16 -target-feature -amx-int8 -target-feature -amx-tile -target-feature -avx -target-feature -avx2 -target-feature -avx512bf16 -target-feature -avx512bitalg -target-feature -avx512bw -target-feature -avx512cd -target-feature -avx512dq -target-feature -avx512er -target-feature -avx512f -target-feature -avx512ifma -target-feature -avx512pf -target-feature -avx512vbmi -target-feature -avx512vbmi2 -target-feature -avx512vl -target-feature -avx512vnni -target-feature -avx512vp2intersect -target-feature -avx512vpopcntdq -target-feature -avxvnni -target-feature -bmi -target-feature -bmi2 -target-feature -branchfusion -target-feature -cldemote -target-feature -clflushopt -target-feature -clwb -target-feature -clzero -target-feature +cmov -target-feature -cx16 -target-feature +cx8 -target-feature -enqcmd -target-feature -ermsb -target-feature -f16c -target-feature -false-deps-lzcnt-tzcnt -target-feature -false-deps-popcnt -target-feature -fast-11bytenop -target-feature -fast-15bytenop -target-feature -fast-7bytenop -target-feature -fast-bextr -target-feature -fast-gather -target-feature -fast-hops -target-feature -fast-lzcnt -target-feature -fast-movbe -target-feature -fast-scalar-fsqrt -target-feature -fast-scalar-shift-masks -target-feature -fast-shld-rotate -target-feature -fast-variable-crosslane-shuffle -target-feature -fast-variable-perlane-shuffle -target-feature -fast-vector-fsqrt -target-feature -fast-vector-shift-masks -target-feature -fma -target-feature -fma4 -target-feature -fsgsbase -target-feature -fsrm -target-feature +fxsr -target-feature -gfni -target-feature -hreset -target-feature -idivl-to-divb -target-feature +idivq-to-divl -target-feature -invpcid -target-feature -kl -target-feature -lea-sp -target-feature -lea-uses-ag -target-feature -lvi-cfi -target-feature -lvi-load-hardening -target-feature -lwp -target-feature -lzcnt -target-feature +macrofusion -target-feature +mmx -target-feature -movbe -target-feature -movdir64b -target-feature -movdiri -target-feature -mwaitx -target-feature +nopl -target-feature -pad-short-functions -target-feature -pclmul -target-feature -pconfig -target-feature -pku -target-feature -popcnt -target-feature -prefer-128-bit -target-feature -prefer-256-bit -target-feature -prefer-mask-registers -target-feature -prefetchwt1 -target-feature -prfchw -target-feature -ptwrite -target-feature -rdpid -target-feature -rdrnd -target-feature -rdseed -target-feature -retpoline -target-feature -retpoline-external-thunk -target-feature -retpoline-indirect-branches -target-feature -retpoline-indirect-calls -target-feature -rtm -target-feature -sahf -target-feature -serialize -target-feature -seses -target-feature -sgx -target-feature -sha -target-feature -shstk -target-feature +slow-3ops-lea -target-feature +slow-incdec -target-feature -slow-lea -target-feature -slow-pmaddwd -target-feature -slow-pmulld -target-feature -slow-shld -target-feature -slow-two-mem-ops -target-feature -slow-unaligned-mem-16 -target-feature -slow-unaligned-mem-32 -target-feature -soft-float -target-feature +sse -target-feature +sse2 -target-feature -sse3 -target-feature -sse4.1 -target-feature -sse4.2 -target-feature -sse4a -target-feature -sse-unaligned-mem -target-feature -ssse3 -target-feature -tbm -target-feature -tsxldtrk -target-feature -uintr -target-feature -use-aa -target-feature -use-glm-div-sqrt-costs -target-feature -vaes -target-feature -vpclmulqdq -target-feature +vzeroupper -target-feature -waitpkg -target-feature -wbnoinvd -target-feature -widekl -target-feature +x87 -target-feature -xop -target-feature -xsave -target-feature -xsavec -target-feature -xsaveopt -target-feature -xsaves -D__GCC_HAVE_DWARF2_CFI_ASM=1 -o /root/.cache/zig/tmp/730c5c84b88b598c-systray_darwin.o -x objective-c systray_darwin.m
clang -cc1 version 13.0.1 based upon LLVM 13.0.1 default target x86_64-linux-musl
ignoring nonexistent directory "/usr/local/zig/lib/libc/include/any-macos.10-any"
#include "..." search starts here:
#include <...> search starts here:
/go/pkg/mod/fyne.io/[email protected]
$WORK/b230
/usr/local/zig/lib/include
/usr/local/zig/lib/libc/include/x86_64-macos.10-gnu
/usr/local/zig/lib/libc/include/any-macos-any
/sdk/usr/include
/sdk/System/Library/Frameworks (framework directory)
End of search list.
In file included from systray_darwin.m:1:
In file included from /sdk/System/Library/Frameworks/Cocoa.framework/Headers/Cocoa.h:12:
In file included from /sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h:12:
In file included from /sdk/System/Library/Frameworks/Foundation.framework/Headers/NSBundle.h:6:
/sdk/System/Library/Frameworks/Foundation.framework/Headers/NSString.h:371:81: error: function does not return string type
- (nullable instancetype)initWithUTF8String:(const char *)nullTerminatedCString NS_FORMAT_ARGUMENT(1);
~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^ ~
/sdk/System/Library/Frameworks/Foundation.framework/Headers/NSObjCRuntime.h:103:48: note: expanded from macro 'NS_FORMAT_ARGUMENT'
#define NS_FORMAT_ARGUMENT(A) __attribute__ ((format_arg(A)))
^ ~
In file included from systray_darwin.m:1:
In file included from /sdk/System/Library/Frameworks/Cocoa.framework/Headers/Cocoa.h:12:
In file included from /sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h:12:
In file included from /sdk/System/Library/Frameworks/Foundation.framework/Headers/NSBundle.h:6:
/sdk/System/Library/Frameworks/Foundation.framework/Headers/NSString.h:372:52: error: function does not return NSString
- (instancetype)initWithString:(NSString *)aString NS_FORMAT_ARGUMENT(1);
~~~~~~~~~~~~~~~~~~ ^ ~
/sdk/System/Library/Frameworks/Foundation.framework/Headers/NSObjCRuntime.h:103:48: note: expanded from macro 'NS_FORMAT_ARGUMENT'
#define NS_FORMAT_ARGUMENT(A) __attribute__ ((format_arg(A)))
^ ~
In file included from systray_darwin.m:1:
In file included from /sdk/System/Library/Frameworks/Cocoa.framework/Headers/Cocoa.h:12:
In file included from /sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h:12:
In file included from /sdk/System/Library/Frameworks/Foundation.framework/Headers/NSBundle.h:6:
/sdk/System/Library/Frameworks/Foundation.framework/Headers/NSString.h:387:53: error: function does not return NSString
+ (instancetype)stringWithString:(NSString *)string NS_FORMAT_ARGUMENT(1);
~~~~~~~~~~~~~~~~~ ^ ~
/sdk/System/Library/Frameworks/Foundation.framework/Headers/NSObjCRuntime.h:103:48: note: expanded from macro 'NS_FORMAT_ARGUMENT'
#define NS_FORMAT_ARGUMENT(A) __attribute__ ((format_arg(A)))
^ ~
In file included from systray_darwin.m:1:
In file included from /sdk/System/Library/Frameworks/Cocoa.framework/Headers/Cocoa.h:12:
In file included from /sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h:12:
In file included from /sdk/System/Library/Frameworks/Foundation.framework/Headers/NSBundle.h:6:
/sdk/System/Library/Frameworks/Foundation.framework/Headers/NSString.h:389:83: error: function does not return string type
+ (nullable instancetype)stringWithUTF8String:(const char *)nullTerminatedCString NS_FORMAT_ARGUMENT(1);
~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^ ~
/sdk/System/Library/Frameworks/Foundation.framework/Headers/NSObjCRuntime.h:103:48: note: expanded from macro 'NS_FORMAT_ARGUMENT'
#define NS_FORMAT_ARGUMENT(A) __attribute__ ((format_arg(A)))
^ ~
In file included from systray_darwin.m:1:
In file included from /sdk/System/Library/Frameworks/Cocoa.framework/Headers/Cocoa.h:12:
In file included from /sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h:12:
In file included from /sdk/System/Library/Frameworks/Foundation.framework/Headers/NSBundle.h:6:
/sdk/System/Library/Frameworks/Foundation.framework/Headers/NSString.h:395:114: error: function does not return string type
- (nullable instancetype)initWithCString:(const char *)nullTerminatedCString encoding:(NSStringEncoding)encoding NS_FORMAT_ARGUMENT(1);
~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^ ~
/sdk/System/Library/Frameworks/Foundation.framework/Headers/NSObjCRuntime.h:103:48: note: expanded from macro 'NS_FORMAT_ARGUMENT'
#define NS_FORMAT_ARGUMENT(A) __attribute__ ((format_arg(A)))
^ ~
In file included from systray_darwin.m:1:
In file included from /sdk/System/Library/Frameworks/Cocoa.framework/Headers/Cocoa.h:12:
In file included from /sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h:12:
In file included from /sdk/System/Library/Frameworks/Foundation.framework/Headers/NSBundle.h:6:
/sdk/System/Library/Frameworks/Foundation.framework/Headers/NSString.h:396:97: error: function does not return string type
+ (nullable instancetype)stringWithCString:(const char *)cString encoding:(NSStringEncoding)enc NS_FORMAT_ARGUMENT(1);
~~~~~~~~~~~~~~ ^ ~
/sdk/System/Library/Frameworks/Foundation.framework/Headers/NSObjCRuntime.h:103:48: note: expanded from macro 'NS_FORMAT_ARGUMENT'
#define NS_FORMAT_ARGUMENT(A) __attribute__ ((format_arg(A)))
^ ~
In file included from systray_darwin.m:1:
In file included from /sdk/System/Library/Frameworks/Cocoa.framework/Headers/Cocoa.h:12:
In file included from /sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h:91:
In file included from /sdk/System/Library/Frameworks/Foundation.framework/Headers/NSURLError.h:15:
In file included from /sdk/System/Library/Frameworks/CoreServices.framework/Headers/CoreServices.h:23:
In file included from /sdk/System/Library/Frameworks/CoreServices.framework/Frameworks/AE.framework/Headers/AE.h:20:
In file included from /sdk/System/Library/Frameworks/CoreServices.framework/Frameworks/CarbonCore.framework/Headers/CarbonCore.h:87:
In file included from /sdk/System/Library/Frameworks/CoreServices.framework/Frameworks/CarbonCore.framework/Headers/Components.h:26:
In file included from /sdk/System/Library/Frameworks/CoreServices.framework/Frameworks/CarbonCore.framework/Headers/Files.h:56:
In file included from /sdk/System/Library/Frameworks/DiskArbitration.framework/Headers/DADisk.h:28:
In file included from /sdk/System/Library/Frameworks/IOKit.framework/Headers/IOKitLib.h:49:
/sdk/System/Library/Frameworks/IOKit.framework/Headers/IOTypes.h:81:49: error: expected ';' after top level declarator
typedef mach_vm_address_t IOVirtualAddress __kernel_ptr_semantics;
^
In file included from systray_darwin.m:1:
In file included from /sdk/System/Library/Frameworks/Cocoa.framework/Headers/Cocoa.h:12:
In file included from /sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h:91:
In file included from /sdk/System/Library/Frameworks/Foundation.framework/Headers/NSURLError.h:15:
In file included from /sdk/System/Library/Frameworks/CoreServices.framework/Headers/CoreServices.h:23:
In file included from /sdk/System/Library/Frameworks/CoreServices.framework/Frameworks/AE.framework/Headers/AE.h:20:
In file included from /sdk/System/Library/Frameworks/CoreServices.framework/Frameworks/CarbonCore.framework/Headers/CarbonCore.h:87:
In file included from /sdk/System/Library/Frameworks/CoreServices.framework/Frameworks/CarbonCore.framework/Headers/Components.h:26:
In file included from /sdk/System/Library/Frameworks/CoreServices.framework/Frameworks/CarbonCore.framework/Headers/Files.h:56:
In file included from /sdk/System/Library/Frameworks/DiskArbitration.framework/Headers/DADisk.h:28:
In file included from /sdk/System/Library/Frameworks/IOKit.framework/Headers/IOKitLib.h:52:
/sdk/System/Library/Frameworks/IOKit.framework/Headers/OSMessageNotification.h:120:53: error: expected ';' after top level declarator
typedef natural_t OSAsyncReference[kOSAsyncRefCount] __kernel_ptr_semantics;
^
8 errors generated.
This is the full log |
Same problem as above, cannot seem to be able to cross compile to darwin with Xcode CLI 15.3. |
Describe the bug:
Cross compilation with MacOSX13.3.sdk failed with error
could not package the Fyne app: could not package the Fyne app: exit status 1
Old chap MacOSX11.3.sdk does it well
To Reproduce:
Steps to reproduce the behaviour:
fyne-cross darwin-sdk-extract --xcode-path c:\MyDev\macOS\XC14.3\Command_Line_Tools_for_Xcode_14.3.dmg
fyne-cross darwin -macosx-sdk-path="C:\MyDev\macOS\XC14.3\SDKs\MacOSX13.3.sdk" >xc14.3.log
Example code:
Device and debug info (please complete the following information):
Debug info
The text was updated successfully, but these errors were encountered: