Compiling with OS X Yosemite, Xcode 6.4, and wxWidgets 3.1

Building and customizing Audacity from the source code.
Forum rules
If you require help using Audacity, please post on the forum board relevant to your operating system:
Windows
Mac OS X
GNU/Linux and Unix-like
Post Reply
mmcev106
Posts: 6
Joined: Thu Aug 20, 2015 10:28 am
Operating System: Please select

Compiling with OS X Yosemite, Xcode 6.4, and wxWidgets 3.1

Post by mmcev106 » Thu Aug 20, 2015 11:08 am

The OS X development instructions seem quite out of date, so I realize I may be blazing new trails. I am currently stuck on the error below:

Code: Select all

/Users/markmcever/Downloads/audacity/lib-src/FileDialog/mac/FileDialogPrivate.mm:49:39: error: C++ requires a type specifier for all declarations
@interface OSPanelDelegate : NSObject wxOSX_10_6_AND_LATER(<NSOpenSavePanelDelegate>)
                                      ^
/Users/markmcever/Downloads/audacity/lib-src/FileDialog/mac/FileDialogPrivate.mm:49:60: error: expected expression
@interface OSPanelDelegate : NSObject wxOSX_10_6_AND_LATER(<NSOpenSavePanelDelegate>)
                                                           ^
/Users/markmcever/Downloads/audacity/lib-src/FileDialog/mac/FileDialogPrivate.mm:49:61: error: use of undeclared identifier
      'NSOpenSavePanelDelegate'
@interface OSPanelDelegate : NSObject wxOSX_10_6_AND_LATER(<NSOpenSavePanelDelegate>)
                                                            ^
/Users/markmcever/Downloads/audacity/lib-src/FileDialog/mac/FileDialogPrivate.mm:49:85: error: expected expression
@interface OSPanelDelegate : NSObject wxOSX_10_6_AND_LATER(<NSOpenSavePanelDelegate>)
                                                                                    ^
/Users/markmcever/Downloads/audacity/lib-src/FileDialog/mac/FileDialogPrivate.mm:49:86: error: expected ';' after top level declarator
@interface OSPanelDelegate : NSObject wxOSX_10_6_AND_LATER(<NSOpenSavePanelDelegate>)
                                                                                     ^
                                                                                     ;
/Users/markmcever/Downloads/audacity/lib-src/FileDialog/mac/FileDialogPrivate.mm:49:39: error: cannot declare variable inside @interface or
      @protocol
@interface OSPanelDelegate : NSObject wxOSX_10_6_AND_LATER(<NSOpenSavePanelDelegate>)
I should mention that I am using wxWidgets 3.1 because 3.0 has its own issues compiling on Yosemite, but I don't think that's related. Does anyone have any idea why NSOpenSavePanelDelegate isn't being found?
Last edited by Gale Andrews on Thu Aug 20, 2015 1:16 pm, edited 1 time in total.
Reason: typo it's > its

Gale Andrews
Quality Assurance
Posts: 26087
Joined: Fri Jul 27, 2007 12:02 am
Operating System: Windows 10
Contact:

Re: Compiling with OS X Yosemite, Xcode 6.4, and wxWidgets 3

Post by Gale Andrews » Thu Aug 20, 2015 1:25 pm

The highest Xcode that has been verified is 6.3 but I suspect the answer is to use wxWidgets 3.0.2 (the latest stable version) then build Audacity HEAD and follow mac/build.txt in the Audacity sources.

Audacity 2.1.1 release is not likely to build "as is" on Yosemite.


Gale
________________________________________FOR INSTANT HELP: (Click on Link below)
* * * * * Tips * * * * * Tutorials * * * * * Quick Start Guide * * * * * Audacity Manual

mmcev106
Posts: 6
Joined: Thu Aug 20, 2015 10:28 am
Operating System: Please select

Re: Compiling with OS X Yosemite, Xcode 6.4, and wxWidgets 3

Post by mmcev106 » Fri Aug 21, 2015 3:34 pm

Thanks Gale. I don't mind being the one to make the appropriate updates to make building possible in Yosemite, but I might need some direction on this particular error. I spent a couple of hours googling and troubleshooting the other day, and I'm still completely stumped.

Gale Andrews
Quality Assurance
Posts: 26087
Joined: Fri Jul 27, 2007 12:02 am
Operating System: Windows 10
Contact:

Re: Compiling with OS X Yosemite, Xcode 6.4, and wxWidgets 3

Post by Gale Andrews » Sat Aug 22, 2015 4:23 am

What are you trying to do, in detail? What version of Audacity are you trying to build?

I repeat my suggestion that you build HEAD with wx 3.0.2, following mac/Build.txt. Then you will be able to build Audacity on Yosemite.

Almost certainly you won't be able to build Audacity 2.1.1 release on Yosemite unless Yosemite was upgraded from Lion or Mountain Lion that had an older Xcode installation.

wx 3.0.2 is the only wx3 version that is supported. Nothing later, nothing earlier.


Gale.
________________________________________FOR INSTANT HELP: (Click on Link below)
* * * * * Tips * * * * * Tutorials * * * * * Quick Start Guide * * * * * Audacity Manual

mmcev106
Posts: 6
Joined: Thu Aug 20, 2015 10:28 am
Operating System: Please select

Re: Compiling with OS X Yosemite, Xcode 6.4, and wxWidgets 3

Post by mmcev106 » Sat Aug 22, 2015 2:44 pm

I am trying to build master from github (which is 2.1.1). Unfortunately, wxWidgets 3.0.2 does not build out of the box on Yosemite either, but master (3.1) does (which I why I went that route). I don't believe the current error I'm getting is related to wxWidgets though, since NSOpenSavePanelDelegate (the undeclared identifier) is part of the OSX SDK. Perhaps that is a false assumption. I should mention that while I'm running Yosemite, I am still compiling against the 10.7 SDK.

Getting two projects building in Yosemite is a little more than I wanted to bite off. However, if I get some time I might try to backport the Yosemite fixes from wxWidgets 3.1 to 3.0.2 to get it compiling. I will post here if/when I make progress. Thanks for the feedback!

Gale Andrews
Quality Assurance
Posts: 26087
Joined: Fri Jul 27, 2007 12:02 am
Operating System: Windows 10
Contact:

Re: Compiling with OS X Yosemite, Xcode 6.4, and wxWidgets 3

Post by Gale Andrews » Sat Aug 22, 2015 4:46 pm

mmcev106 wrote:I am trying to build master from github (which is 2.1.1).
No, master is 2.1.2-alpha.
mmcev106 wrote:wxWidgets 3.0.2 does not build out of the box on Yosemite
Yes it does, or I would not be saying so. I built wxWidgets 3.0.2 on a clean installation of OS X 10.10.4.
mmcev106 wrote:I should mention that while I'm running Yosemite, I am still compiling against the 10.7 SDK.
From the top of mac/Build.txt which I have already suggested you look at:
At this time, the newest SDK version that Audacity can build with is 10.6. To build Audacity using Xcode 5.1 or newer, you need to extract the 10.6 SDK from an earlier version of Xcode.

mmcev106 wrote:I might try to backport the Yosemite fixes from wxWidgets 3.1 to 3.0.2 to get it compiling. I will post here if/when I make progress.
wx 3.0.2 should just build on Yosemite. Have you asked on the wxWidgets mailing lists why it doesn't?

As I said, Audacity does not currently support later than wx 3.0.2. Your suggestion will modify 3.0.2 and could prevent Audacity compiling.


Gale
________________________________________FOR INSTANT HELP: (Click on Link below)
* * * * * Tips * * * * * Tutorials * * * * * Quick Start Guide * * * * * Audacity Manual

mmcev106
Posts: 6
Joined: Thu Aug 20, 2015 10:28 am
Operating System: Please select

Re: Compiling with OS X Yosemite, Xcode 6.4, and wxWidgets 3

Post by mmcev106 » Sat Aug 22, 2015 5:28 pm

I apologize on the version. I read 2.1.1 from the README.txt, which I guess hasn't been updated yet.

For record, I've been reading mac/Build.txt from the beginning, and didn't deviate from it until I hit roadblocks. I wouldn't have gotten this far without it.

I got some nasty errors on wxWidgets 3.0.2, but 3.1 compiled out of the box. I suppose I will try 3.0.2 again, and post my issues on the wxWidgets forum.

Thanks again for the feedback.

mmcev106
Posts: 6
Joined: Thu Aug 20, 2015 10:28 am
Operating System: Please select

Re: Compiling with OS X Yosemite, Xcode 6.4, and wxWidgets 3

Post by mmcev106 » Sat Aug 22, 2015 5:45 pm

....and I am compiling against 10.6. I was confusing this with another project when I mentioned 10.7. I apologize.

Gale Andrews
Quality Assurance
Posts: 26087
Joined: Fri Jul 27, 2007 12:02 am
Operating System: Windows 10
Contact:

Re: Compiling with OS X Yosemite, Xcode 6.4, and wxWidgets 3

Post by Gale Andrews » Sun Aug 23, 2015 11:14 am

mmcev106 wrote:I read 2.1.1 from the README.txt, which I guess hasn't been updated yet.
The README relates to each release, so during the alpha period it is at the previous release.


Gale
________________________________________FOR INSTANT HELP: (Click on Link below)
* * * * * Tips * * * * * Tutorials * * * * * Quick Start Guide * * * * * Audacity Manual

mmcev106
Posts: 6
Joined: Thu Aug 20, 2015 10:28 am
Operating System: Please select

Re: Compiling with OS X Yosemite, Xcode 6.4, and wxWidgets 3

Post by mmcev106 » Sun Aug 23, 2015 12:06 pm

Good to know, thanks.

Post Reply