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

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.

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

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?

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

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!

Sorry, could you explain that in more detail?


Gale

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/blob/master/mac/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:
https://forum.audacityteam.org/t/is-there-updated-build-instructions-for-compiling-audacity/42210/4 .”

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.

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.

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.