"non-virtual thunk" error when compling audacity on yosemite

Hi,

I am using Audacity 2.1.2 and wxwidgtes 3.0.2.

I have successfully built wx-widget as I can see the desired output on console.
But when I am building the Audacity project I am getting too many errors of -

non-virtual thunk to …
“non-virtual thunk to wxTextCtrlBase::SetHint(wxString const&)”, referenced from:
vtable for TimerRecordPathCtrl in TimerRecordDialog.o
vtable for HighlightTextCtrl in Lyrics.o

I have also tried solution given on these links :

macos - Mac gcc non-virtual thunk error - Stack Overflow and How to specify new GCC path for CMake - Stack Overflow

but on the 3rd step after export i.e.

ambuj66s-iMac:cmake-3.5.2 ambujshukla$ cmake /Users/ambujshukla/src/AudacitySRC/
CMake Error: The current CMakeCache.txt directory /Users/ambujshukla/src/cmake-3.5.2/CMakeCache.txt is different than the directory /Volumes/data/Downloads/cmake-3.5.2 where CMakeCache.txt was created. This may result in binaries being created in the wrong place. If you are not sure, reedit the CMakeCache.txt
CMake Error: The source directory “/Users/ambujshukla/src/AudacitySRC” does not appear to contain CMakeLists.txt.

Could anybody please provide the working solution of this error.

Thanks…

Please note there is no need for you to build Audacity. You can download it from http://audacityteam.org/download/mac.

I only see the same “solutions” that you found.

What version of Xcode are you using? You should be using Xcode 7.1 or earlier. Later Xcode is not officially supported by Audacity.

Gale

Ok… I am using Xcode 7.2 :frowning:

So I should try with earlier Xcode version… let me try…

and as I see it, building with XCode is broken, and has been for sometime … of any version of XCode especially with the github version.

The only success I ever had with the mac sources was when using the exact, early and recommended versions of everything, and following the build.txt guidelines. But then it broke one night with some commit or other to github.

A builder may have some success if using the EXACT same specifically correct versions of everything supported, including the Downloaded source. Not the git hub source.

It’s not only XCode versions, it’s osx versions, and the SDK versions. then, you have to have to have the correct version of wxWidgets to go with it.

Start mixing C compiler versions as well … and you are in for an interesting ride :slight_smile:

robert

Hi Robert,

Ok… What I understand from past few days experience and your answer that with the combination of OSx 10.10, Xcode 7.2, audacity source-code GitHub version and wxWidgets 3.0.2 I can not build/compile the Audacity source code using XCode :cry: am I correct ?

Can you please specify the correct versions of OSx, Xcode, SDKs, source code etc to building with Xcode successfully.

Thanks…

Those are specified in https://github.com/audacity/audacity/blob/master/mac/Build.txt. That is, no greater than Xcode 7.1, and use the 10.6 SDK as well as the SDK that came with Xcode. WxWidgets 3.0.2 is fine.

When you follow those instructions you should be able to build with any version of OS X Lion or greater.

Gale

Also, these are good instructions for uninstalling Xcode so you can start over with a new Xcode installation: http://osxdaily.com/2012/02/20/uninstall-xcode/.


Gale