Difficulty with "Building on Mac" setup. CMake/config

Building and customizing Audacity from the source code.

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

Difficulty with "Building on Mac" setup. CMake/config

Permanent link to this post Posted by undertone_dj » Thu May 05, 2016 3:16 am

I'm trying to get setup to compile audacity on a macbook air with Xcode 7.3

I'm following the instructions on this page:
http://wiki.audacityteam.org/wiki/Building_On_Mac
Under the section:
"Install CMake"

And getting stuck on this step:

"Configure cmake:
./configure --prefix=/usr/local --docdir=/share/doc/CMake --mandir=/share/man"

Here's what my input looks like, and the resulting error:

"djs-MacBook-Air:cmake-3.5.2-Darwin-x86_64 dj$ ./configure --prefix=/usr/local --docdir=/share/doc/CMake --mandir=/share/man
-bash: ./configure: No such file or directory"

I browse on my hard drive to this path and I see no executable "configure". The "./" tells me that this is a hidden directory/command though, yes?. Though, I've got cmake 3.5.2 whereas the instructions are refering to 2.8.10.2 version. Is this something that was in 2.8.x and is no longer in 3.5.2?

If I look in applications, I appear to have both installed. I see "CMake" (which is v3.5.2) and I also see "Cmake 2.8-3". 3.x is there because I copied it from downloads after unzipping. 2.8 is there due to a separate setup instruction set that had me download/compile/install via ports.

I can launch both versions. If I hit the configure button inide of the app, I get this error (I was trying to change the generator to XCode):

"Error in configuration process, project files may be invalid."

When I click through, here's the output in CMake

CMake Error: Unable to open cache file for save. //CMakeCache.txt
CMake Error: The source directory "" does not exist.
Specify --help for usage, or press the help button on the CMake GUI.
CMake Error: : System Error: No such file or directory


I'm not sure how CMake will be used later in the process, should I just move on because it's installed? Or do I need to stop and get this configure step correct?

In the end, I'd ideally like to be compiling and running audacity through Xcode, so perhaps I can skip CMake and Pkgconfig? Though, When just opening the Audacity/mac/Audacity.xcodeproj I get a pile of other errors I'm trying to sort through. I'll start a separate thread for those issues.
undertone_dj
 
Posts: 5
Joined: Tue Apr 26, 2016 2:34 am
Operating System: OS X 10.10 Yosemite

Re: Difficulty with "Building on Mac" setup. CMake/config

Permanent link to this post Posted by Gale Andrews » Thu May 05, 2016 10:38 am

There is no need to build Audacity. We have binaries at http://audacityteam.org/download/mac.

If you still want to build Audacity, follow https://github.com/audacity/audacity/blob/master/mac/Build.txt. Note the workarounds mentioned there for building with greater than Xcode 7.1, which is not officially supported.


Gale
________________________________________FOR INSTANT HELP: (Click on Link below)
* * * * * Tips * * * * * Tutorials * * * * * Quick Start Guide * * * * * Audacity Manual
Gale Andrews
Quality Assurance
 
Posts: 26093
Joined: Fri Jul 27, 2007 12:02 am
Operating System: Windows 10

Re: Difficulty with "Building on Mac" setup. CMake/config

Permanent link to this post Posted by undertone_dj » Sun May 08, 2016 8:17 am

Thanks for Replying!

I've already got the binaries. I'm trying to compile as I'm learning to code audio apps, and I wanted to examine what Audacity is doing as a learning exercise.

Thanks for the link to the latest build instructions, (which I found are also included in the /mac directory of the audacity source). I was able to get the 10.6 SDK copied over. I discovered that I was trying to build the wrong wxWidgets version. I had the latest 3.1.0. I've now got the correct, but older 3.0.2 and the patch step succeeded. The build step is successfully building wxWidgets.

But when I try to launch audacity-master/mac/Audacity.xcodeproj and hit run, I get some errors and the build fails:

libFLAC -> bitmath.c errors on:
'config.h' file not found

libFLAC++ -> metadata.cpp errors on:
'config.h' file not found

and

expat -> xmlparse.c errors on:
'expat_config.h' file not found.


Following the errors, I see that line 22 in Audacity/lib-src/expat/lib/xmlparse.c has this:
#include <expat_config.h>

I use spotlight to find expat_config.h and there are several instances on my drive, though at the path:
Audacity/lib-src/expat I see a file:
"expat_config.h.in" but no "expat_config.h"

Is this a generated file? At what step should it being generated?

The first expat_config file.h that comes up is here:
~/Downloads/wxWidgets-3.0.2/bld_release/src/expat/expat_config.h

So... I'm not really clear on the best approach for unwinding this. Is my audacity project not linking over to my built wxWidgets files? Do I need to add a library path to XCode? Or an evnironment variable (I'm more of a pc guy, what's the mac equivalent of an environment variable?).

Any advice appreciated. Where do I go from here?
undertone_dj
 
Posts: 5
Joined: Tue Apr 26, 2016 2:34 am
Operating System: OS X 10.10 Yosemite

Re: Difficulty with "Building on Mac" setup. CMake/config

Permanent link to this post Posted by Gale Andrews » Sun May 08, 2016 12:06 pm

undertone_dj wrote:Where do I go from here?

To begin with, have you gone back to Xcode 7.1 or earlier, or applied the workarounds for Xcode greater than 7.1 mentioned in mac/Build.txt?

Gale
________________________________________FOR INSTANT HELP: (Click on Link below)
* * * * * Tips * * * * * Tutorials * * * * * Quick Start Guide * * * * * Audacity Manual
Gale Andrews
Quality Assurance
 
Posts: 26093
Joined: Fri Jul 27, 2007 12:02 am
Operating System: Windows 10

Re: Difficulty with "Building on Mac" setup. CMake/config

Permanent link to this post Posted by undertone_dj » Mon May 16, 2016 12:41 pm

Got it working, thanks so much for the help!!

I tried the xCode 7.3 workarounds but that didn't seem to work. So I killed 7.3, downloaded xCode 7.1 and now I see the old 10.6 SDK available in build settings, and it's all working.

I'd boil my various problems down to "didn't have the exact versions". Instead of getting latest xcode, wxWidgets, audacity, etc... and instead getting the specific versions specified in the build.txt (though the one you linked is newer than the one included with Audacity, it should get updated in the src tar) everything worked.

Thanks again!
undertone_dj
 
Posts: 5
Joined: Tue Apr 26, 2016 2:34 am
Operating System: OS X 10.10 Yosemite

Re: Difficulty with "Building on Mac" setup. CMake/config

Permanent link to this post Posted by Gale Andrews » Mon May 16, 2016 2:14 pm

undertone_dj wrote:the one you linked is newer than the one included with Audacity, it should get updated in the src tar

Sorry, could you explain that in more detail?


Gale
________________________________________FOR INSTANT HELP: (Click on Link below)
* * * * * Tips * * * * * Tutorials * * * * * Quick Start Guide * * * * * Audacity Manual
Gale Andrews
Quality Assurance
 
Posts: 26093
Joined: Fri Jul 27, 2007 12:02 am
Operating System: Windows 10

Re: Difficulty with "Building on Mac" setup. CMake/config

Permanent link to this post Posted by undertone_dj » Tue May 17, 2016 12:22 pm

Sure... The files unpacked from audacity0master.zip, "audacity-master/mac/Build.txt" in the second paragraph looks like this:

"In the instructions below, Xcode 4.3.3 (for the 10.6 SDK) and
Xcode 5.1.1 will be used. Xcode 6.1.1, 6.3, 6.4.1, and 7.1
have been verified to work as well."

Whereas the same file, at the link you posted here:
https://github.com/audacity/audacity/bl ... /Build.txt

Here's what the second paragraph looks like:

"In the instructions below, Xcode 4.3.3 (for the 10.6 SDK) and
Xcode 5.1.1 will be used. Xcode 6.1.1, 6.3, 6.4.1, and 7.1
have also been verified to work. Xcode 7.2 and later require a
custom build setting to accept the 10.6 SDK, or to edit
src\MemoryX.h in the Audacity code. See this topic:
viewtopic.php?p=303835#p303835 ."

So... the online file you posted appears new, and has the details that were the crux of my problem, whereas the the bulid.txt file that comes with the source code is missing that bit. Perhaps the souce code version of the file should be updated.
undertone_dj
 
Posts: 5
Joined: Tue Apr 26, 2016 2:34 am
Operating System: OS X 10.10 Yosemite

Re: Difficulty with "Building on Mac" setup. CMake/config

Permanent link to this post Posted by steve » Tue May 17, 2016 1:22 pm

undertone_dj wrote:Whereas the same file, at the link you posted here:
https://github.com/audacity/audacity/bl ... /Build.txt

That's the current version for the development code. That's the version that will be in the next release code unless it is updated again between now and then.

undertone_dj wrote:whereas the the bulid.txt file that comes with the source code

That depends on which version of the source code. If you download the latest alpha code, then you will get the most recent version of all the files. If you download an older version of the source code, then you get the files that were current at the time.
9/10 questions are answered in the FREQUENTLY ASKED QUESTIONS (FAQ)
steve
Site Admin
 
Posts: 45001
Joined: Sat Dec 01, 2007 11:43 am
Operating System: Linux *buntu


Return to Compiling Audacity



Who is online

Users browsing this forum: No registered users and 2 guests