I have MacOSx 10.10.5 and xcode version 7.2.
I am trying to install wxWidget 3.0.2 for Audacity project 2.1.2, but can’t succeed,have spend around 4-5 days but still not able to compile audacity.
I have gone through instructions given in following links :
More on the hacks. As I understand it if you have greater than Xcode 7.1, you should only use the 10.11 SDK which is the minimum allowed. In src\MemoryX.h change
#if !(_MSC_VER >= 1800 || __cplusplus >= 201402L)
to
#if !(_MSC_VER >= 1800 || __cplusplus >=201603L)
(or other value appropriate to your Clang compiler).
Hi Gale, succeed to install wxWidget somehow but now there are 31 errors on compiling audacity like below :
Undefined symbols for architecture i386:
“non-virtual thunk to wxGrid::GetSizeAvailableForScrollTarget(wxSize const&)”, referenced from:
vtable for Grid in Grid.o
Hi
wxWidgets needs building, but not installing.
Once built, put an environment variable in pointing to its directory.
wxWidgets-3.1 is out and very stable.
Be careful if you apply the suggested patches.
Audacity will almost certainly not build with XXode. You mat need to use Xcodebuild on the command line.
You need/must have, earlier SDK’s installed.
It wont build with 10.11.4 + 10.11 SDK
Unless something has changed in the last few days…
Is that officially supported by Audacity? I’d need to check the “compile.txt” file. I’ve been using 3.0.2 which is the latest “stable release” (and definitely IS officially supported by Audacity) Downloads - wxWidgets
Undefined symbols for architecture i386:
“non-virtual thunk to wxGrid::GetSizeAvailableForScrollTarget(wxSize const&)”, referenced from:
vtable for Grid in Grid.o
I am clueless at this point of time now because I have tried same steps many times…but no success till yet.
[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.
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
patch -p0 -i /mac/wxMac_additions/wxMac-3.0.2-fixes.patch , where path to audacity source in my case is /Users/richabhawsar/Desktop/Audacity/audacity-master
sudo /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.
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.
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
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.
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 ???
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.
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
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.