Is there updated build instructions for compiling Audacity?

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

Re: Is there updated build instructions for compiling Audaci

Permanent link to this post Posted by rachalmers » Wed Apr 27, 2016 12:49 pm

This is gleaned from Apple: http://lists.apple.com/archives/unix-porting/2003/Dec/msg00107.html

[A non-virtual thunk is] an internal implementation detail used for C++ class hierarchies that involve multiple inheritance. You aren't doing anything wrong; this is a compiler bug. We know that we need to fix it. In the mean time, the best workaround we know of is to use the same optimization level for linking against a library that you used to compile the library.

(You might also consider not exporting a C++ interface from a library. We work very hard to make sure that the C and Objective C ABI stays the same from one compiler release to the next, but we make no such promise for C++.)


That's probably no help, but it is an indication of something deeper. I think you may be building wxWidgets incorrectly???

I just build 3.0.2 to see if it would build. Configured wxWidgets 3.0.2 for `x86_64-apple-darwin15.4.0'

Just FYI, I can compile most of Audacity on my Mac mini with XCodebuild. However - I have wxWidgets compiled and lives in
/Users/robert/src/wxWidgets-3.1.0 with a path variable pointing to it.
I compiled it with xcodebuild.

How I'm getting there - briefly.
I downloaded wxWidgets-3.1.0.
It's on github - see their docs here.
https://github.com/wxWidgets/wxWidgets/ ... readme.txt

The install.txt that is needed to be followed is in wxWidgets-3.1.0/docs/osx/install.txt in your Widgets src code folder. Probably the same in 3.0.2
You need to follow its instruction, what ever your version. You also don't need to INSTALL it. Just make it. and point to the folder in your path.

It's too simple. Like this.
After Xcode is installed, download wxWidgets-{version}.tar.bz2 and then
double-click on it to unpack it to create a wxWidgets directory.

Next use Terminal (under Applications, Utilities, Terminal) to access a command
prompt. Use cd to change directories to your wxWidgets directory and execute
the following sets of commands from the wxWidgets directory.

---------

mkdir build-cocoa-debug
cd build-cocoa-debug
../configure --enable-debug
make
# Build the samples and demos
cd samples; make;cd ..
cd demos; make;cd ..

---------

After the compilation completes, use Finder to run the samples and demos
Go to build-cocoa-debug/samples to experiment with the Cocoa samples.
Go to build-cocoa-debug/demos to experiment with the Cocoa demos.
Double-click on the executables which have an icon showing three small squares.
The source code for the samples is in wxWidgets/samples
The source code for the demos is in wxWidgets/demos


My Audacity soruce code is in /Users/robert/src/AudacityMASTER - a git pull from Audacity.

Now remember - I'm NOT using the "supported" build elements. Neither wxWidgts, not XCode. I'm using XCode 7.3, with MacOSX10.11.sdk, on OSX 10.11.4.
... so I know it wont build all the way yet. I'm working on it.... :-)

But I do get most of the way with.
codebuild -sdk /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk clean -configuration Release 2>&1 | tee clean.log
xcodebuild -sdk /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk -configuration Release install 2>&1 | tee release.log


Can I shorten this ?
I believe you are possibly not building wxWidgets correctly in the first place. See above.
Your errors are wxWidget errors - not Audacity errors.

oh and yes, I know it all builds and works if I use the "supported" parts of the equation. I've done it. I'm working a little ahead of that though...

I hope I am helping and not just making matters worse ...
let us know how you get on.
Robert
rachalmers
 
Posts: 163
Joined: Wed Jan 06, 2016 10:53 am
Operating System: OS X 10.11 El Capitan or later (macOS)

Re: Is there updated build instructions for compiling Audaci

Permanent link to this post Posted by richabhawsar » Wed Apr 27, 2016 2:09 pm

Hi Robert, Thanks for these useful details.. I'll go through it and will check if it works.
Although while building wxWidget I got the result
Configured wxWidgets 3.0.2 for `x86_64-apple-darwin14.5.0'
:?

I wonder what do you mean by
I have wxWidgets compiled and lives in
/Users/robert/src/wxWidgets-3.1.0 with a path variable pointing to it.
, I have no idea how to set path variable ?

also I am curious to know what these commands do ( copied from your answer) ?
codebuild -sdk /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk clean -configuration Release 2>&1 | tee clean.log
xcodebuild -sdk /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk -configuration Release install 2>&1 | tee release.log


Let me describe shortly how I am building wxWidget/audacity :

1. Downloaded wxWidgets-3.0.2.tar.bz2 from https://www.wxwidgets.org/downloads/
2. Run tar xf wxWidgets-3.0.2.tar.bz2 to untar it.
3. cd wxWidgets-3.0.2
4. mkdir build-cocoa-debug
5 .cd build-cocoa-debug
6. ../configure --enable-debug
7. make
success till 7th step.

Also I verified list the installed configurations via wx-config --list
which gives the result :
Default config is osx_cocoa-unicode-3.0
Default config will be used for output


Path of wxWidget folder is /Volumes/data/Downloads/wxWidgets-3.0.2
Downloaded Audacity version 2.1.2 from this link :- https://github.com/audacity/audacity

8. patch -p0 -i <path to Audacity source>/mac/wxMac_additions/wxMac-3.0.2-fixes.patch , where path to audacity source in my case is /Users/richabhawsar/Desktop/Audacity/audacity-master
9. sudo <path to Audacity source>/mac/build_wxwidgets , at this step issue of make: *** No rule to make target `install'. Stop. is arriving.

Please let me know where I am doing wrong, or missing any command or something which is necessary, also I wonder if any build setting has to be modified in xcodeproj to make it compile.

I am sorry for asking too many questions, but I am stuck on these issues badly, just want to get rid of.

Thanks,
Richa
richabhawsar
 
Posts: 10
Joined: Tue Apr 26, 2016 12:33 pm
Operating System: OS X 10.10 Yosemite

Re: Is there updated build instructions for compiling Audaci

Permanent link to this post Posted by rachalmers » Wed Apr 27, 2016 2:57 pm

Ok,

Firstly - you shouldn't be using sudo. Everything will build as your own user name, so long as you stay out of system directories.


Looks like Step 7 is ok.
If the make completed as
Configured wxWidgets 3.0.2 for `x86_64-apple-darwin14.5.0'
So wxWidgets is ok.

Now, the next step.

Once that is done, and you have applied the patches. (Which you don't have to do unless you need them)
Set the PATH. The 'new/dir/location' should be where you built your wxWidgets.
Code: Select all
export PATH=$PATH:/new/dir/location1


See a tutorial here.

The next step is to do this.

cd Audacity/mac

xcodebuild clean -configuration Release 2>&1 | tee config.log
then
xcodebuild -configuration Release install 2>&1 | tee release.log

These two log files are good to be able to look at for solutions if you need them... but

The above should work. This will build Audacity, and put it in a build directory WITHIN your Audacity source code directory. Look for Audacity.app, or read the tail of the log file.

If you want to build the Debug versions - change the word Release above to Debug

try that :-) and don't stress ....
Robert
rachalmers
 
Posts: 163
Joined: Wed Jan 06, 2016 10:53 am
Operating System: OS X 10.11 El Capitan or later (macOS)

Re: Is there updated build instructions for compiling Audaci

Permanent link to this post Posted by rachalmers » Wed Apr 27, 2016 3:17 pm

@Richa...

Can I offer a little further advice? To get you off the desktop. No longer need sudo.

I think you have a Data drive attached called Downloads, or simply 'data' ? yes? no?
I see it in /Volumes/data unless you have some other setup.

Path of wxWidget folder is /Volumes/data/Downloads/wxWidgets-3.0.2

Downloaded Audacity version 2.1.2 from this link :- https://github.com/audacity/audacity

and you have Audacity sources on your desktop...

However, you can keep everything off your desktop with Git by this command for Audacity.

Assuming your Downloads directory is on your "data" drive, ... do you have git installed ? Just type git at a terminal prompt.

If you don't have git, the program, then you probably need to get it. It's very common, and very useful.
Even if you don't have it - move your Desktop folder of Audacity to /Downloads.

$git
and press enter. If you get a message other than 'command not found' you have it.
then exactly.
Code: Select all
cd /Volumes/data/Downloads
git clone https://github.com/audacity/audacity AudacitySRC


Once it finishes you will have all your new Audacity source code in a directory called AudacitySRC, in your Downloads folder.

I put everything under /Users/robert/src - makes it easy to find. Like in /Users/Richa/src ??? :-)

Robert
rachalmers
 
Posts: 163
Joined: Wed Jan 06, 2016 10:53 am
Operating System: OS X 10.11 El Capitan or later (macOS)

Re: Is there updated build instructions for compiling Audaci

Permanent link to this post Posted by Gale Andrews » Wed Apr 27, 2016 3:50 pm

steve wrote:
rachalmers wrote:wxWidgets-3.1 is out and very stable.

Is that officially supported by Audacity?

No, categorically it is not supported. Even if it works now, we may make some code change that breaks with wxWidgets 3.1.x. While it would be useful for us to know if that happens, if you don't want added trouble, build with the supported wx3.0.2. ;)


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

Re: Is there updated build instructions for compiling Audaci

Permanent link to this post Posted by richabhawsar » Thu Apr 28, 2016 5:21 am

@Robert, Thank you so much for these answers, let me try your solutions if it works, hopefully it will. :)
richabhawsar
 
Posts: 10
Joined: Tue Apr 26, 2016 12:33 pm
Operating System: OS X 10.10 Yosemite

Re: Is there updated build instructions for compiling Audaci

Permanent link to this post Posted by rachalmers » Thu Apr 28, 2016 6:40 am

richabhawsar wrote:@Robert, Thank you so much for these answers, let me try your solutions if it works, hopefully it will. :)


Hi, interesting.

I also note that your step 9 above, step 10 in the Audacity docs doesn't have the "." at the end... It should be of course ...

9) Apply the following fixes to wxWidgets:

cd wxWidgets-3.0.2
patch -p0 -i <path to Audacity source>/mac/wxMac_additions/wxMac-3.0.2-fixes.patch .

10) And finally build/install wxWidgets:

sudo <path to Audacity source>/mac/build_wxwidgets .
......................................................................................................................| see full stop there.

Very important !!!
You should now be able to build Audacity using either the Xcode application or the
xcodebuild command line tool.


cheers
Robert
rachalmers
 
Posts: 163
Joined: Wed Jan 06, 2016 10:53 am
Operating System: OS X 10.11 El Capitan or later (macOS)

Re: Is there updated build instructions for compiling Audaci

Permanent link to this post Posted by richabhawsar » Thu Apr 28, 2016 6:52 am

Oh my bad. :( :oops:
Thanks so much again for such important point..
richabhawsar
 
Posts: 10
Joined: Tue Apr 26, 2016 12:33 pm
Operating System: OS X 10.10 Yosemite

Re: Is there updated build instructions for compiling Audaci

Permanent link to this post Posted by richabhawsar » Thu Apr 28, 2016 10:24 am

Hi Robert,

I am using full stop for patch command, and here is the output :

1st attempt :
richa76s-iMac:wxWidgets-3.0.2 ambujshukla$ patch -p0 -i /Users/richabhawsar/src/AudacitySRC/mac/wxMac_additions/wxMac-3.0.2-fixes.patch .
patch: **** File . is not a regular file -- can't patch


2nd attempt :
richa6s-iMac:wxWidgets-3.0.2 richabhawsar$ patch -p0 -i /Users/richabhawsar/src/AudacitySRC/mac/wxMac_additions/wxMac-3.0.2-fixes.patch.
patch: **** Can't open patch file /Users/richabhawsar/src/AudacitySRC/mac/wxMac_additions/wxMac-3.0.2-fixes.patch. : No such file or directory


However when I wrote this command without . , it successfully ran.

Also step 10,

richa76s-iMac:wxWidgets-3.0.2 richabhawsar$ sudo /Users/richabhawsar/src/AudacitySRC/mac/build_wxwidgets .
giving the result :-

checking for gcc... gcc -arch i386 -DMAC_OS_X_VERSION_MAX_ALLOWED=1060 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.6.sdk/ -mmacosx-version-min=10.6
checking whether the C compiler works... no
configure: error: in `/Users/richabhawsar/src/wxWidgets-3.0.2/bld_release':
configure: error: C compiler cannot create executables
See `config.log' for more details
make: *** No targets specified and no makefile found. Stop.
~/src/wxWidgets-3.0.2
~/src/wxWidgets-3.0.2/bld_debug ~/src/wxWidgets-3.0.2
make: *** No rule to make target `install'. Stop.
~/src/wxWidgets-3.0.2
~/src/wxWidgets-3.0.2/bld_release ~/src/wxWidgets-3.0.2
make: *** No rule to make target `install'. Stop.
~/src/wxWidgets-3.0.2


What is this error -
make: *** No rule to make target `install'. Stop.
?

:|
richabhawsar
 
Posts: 10
Joined: Tue Apr 26, 2016 12:33 pm
Operating System: OS X 10.10 Yosemite

Re: Is there updated build instructions for compiling Audaci

Permanent link to this post Posted by rachalmers » Thu Apr 28, 2016 11:36 am

Ok, sorry, I see that 'stop' now. and of course it isn't necessary.
So that's good. the Patch worked. I didn't use the patch actually - I commented out the Accessibility bit that uses it. My build was never going to be used by others, and I don't need that ability in the software.

So, I just did the patch, and it processed fine.
Ok, next bit. Compiling wxWidgets-3.0.2

Do you have the XCode command line tools installed? It won't work with out them installed.

I'm compiling this version now as I type this, and it's proceeding fine here.

It actually tells you there, "checking whether the C compiler works... no" and to check your config.log

=============
This is the successful result of my build ==========

------------------------------------------------------

The installation of wxWidgets is finished. On certain
platforms (e.g. Linux) you'll now have to run ldconfig
if you installed a shared library and also modify the
LD_LIBRARY_PATH (or equivalent) environment variable.

wxWidgets comes with no guarantees and doesn't claim
to be suitable for any purpose.

Read the wxWindows Licence on licencing conditions.

------------------------------------------------------

~/src/wxWidgets-3.0.2
zeus:wxWidgets-3.0.2 robert$


cheers
Robert
rachalmers
 
Posts: 163
Joined: Wed Jan 06, 2016 10:53 am
Operating System: OS X 10.11 El Capitan or later (macOS)

PreviousNext

Return to Compiling Audacity



Who is online

Users browsing this forum: No registered users and 2 guests