Opened 4 years ago

Closed 4 years ago

#12358 closed Bug report (worksforme)

FileZilla 3.52.0.2 does not compile on macOS earlier than 11.0

Reported by: Lothar Haeger Owned by:
Priority: high Component: FileZilla Client
Keywords: Cc: Lothar Haeger
Component version: Operating system type: OS X
Operating system version: 10.15.7

Description

I'm maintaining FileZilla at MacPorts and run into the following when compiling:

:info:build toolbar.mm:9:8: warning: instance method '-setToolbarStyle:' not found (return type defaults to 'id') [-Wobjc-method-access]
:info:build                 [tlw setToolbarStyle:NSWindowToolbarStyleExpanded];
:info:build                      ^~~~~~~~~~~~~~~
:info:build /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSWindow.h:185:12: note: receiver is instance of class declared here
:info:build @interface NSWindow : NSResponder <NSAnimatablePropertyContainer, NSMenuItemValidation, NSUserInterfaceValidations, NSUserInterfaceItemIdentification, NSAppearanceCustomization, NSAccessibilityElement, NSAc
cessibility>
:info:build            ^
:info:build toolbar.mm:9:24: error: use of undeclared identifier 'NSWindowToolbarStyleExpanded'
:info:build                 [tlw setToolbarStyle:NSWindowToolbarStyleExpanded];
:info:build                                      ^
:info:build 2 warnings generated.
:info:build mv -f settings/.deps/filezilla-optionspage.Tpo settings/.deps/filezilla-optionspage.Po
:info:build 1 warning and 1 error generated.
:info:build make[4]: *** [libfzmac_a-toolbar.o] Error 1

3.51 compiled just fine and it seem the change in toolbar.mm is causing this because you use setToolbarStyle:NSWindowToolbarStyleExpanded, which is only available from macOS 11.0 onwards, see https://developer.apple.com/documentation/appkit/nswindowtoolbarstyle/nswindowtoolbarstyleexpanded?language=objc

Attachments (1)

main.log (946.2 KB ) - added by Lothar Haeger 4 years ago.
Full build log

Download all attachments as: .zip

Change History (3)

by Lothar Haeger, 4 years ago

Attachment: main.log added

Full build log

comment:1 by Lothar Haeger, 4 years ago

PS: same goes for 3.52.0.3, unfortunately.

comment:2 by Tim Kosse, 4 years ago

Resolution: worksforme
Status: newclosed

Usage of this function is guarded by an availability check.

Instead of using an outdated SDK you need to use the latest version of the SDK together with the -mmacosx-version-min=10.11 compiler flag.

Note: See TracTickets for help on using tickets.