Re: [Audacity-devel] Still libsndfile compilation errors on Linux
A free multi-track audio editor and recorder
Brought to you by:
aosiniao
From: Richard A. <ri...@au...> - 2006-07-17 21:18:02
|
Right, had a bit of a look at this: There seem to be quite a few cases: 1) system libsndfile, system libflac. This works, and is default if they exist (configure prefers system libsndfile to save building it). Audacity ends up built against system libflac, local copy of libflac isn't used. 2) local libsndfile, system libflac, user requested --disable-flac. This works - we get a local copy of libsndfile with no dependency on libflac, and audacity links against it. 3) local libsndfile, system libflac, no user options. This also occurs if the user doesn't have a system libsndfile. This is Markus's breaker, as we get errors about undefined flac symbols. Solution - add -lFLAC to the link command line. Question - how do we know we need to do this? We obviously can't do it all the time in case libflac isn't present. What we want to test is the presence of libflac in our local libsndfile. Unfortunately the presence / absence of flac doesn't show in the pkg-config file, so we can't look there. It of course shows up in the list of formats returned by the library, and in it's config.h, but testing either of those is quite heavyweight and means a custom "compile and see what happens" test. So I've cheated, and appropriated the libflac test from the libsndfile configure script, using it to decide if we should append -lFLAC to $LIBS. This problem only occurs because we static link local libsndfile, something that Eric doesn't really support (if you do make install it doesn't get installed ...) 4) system libsndfile, no system libflac, no user options. This assumes that system libsndfile works, i.e. was also built with no libflac linkage. This works now I've added a check in src/FileFormat.cpp sf_header_shortname so it doesn't segfault if SF_FORMAT_INFO.name is null. 5) system libsndfile, no system libflac, local libsndfile requested. Works fine Note that between testing these you will need to remove lib-src/libsndfile/Makefile and lib-src/libsndfile/src/.libs/libsndfile.a in order to trigger re-configuration and recompilation of libsndfile, which is necessary in order to pick up your current arguments to configure. This doesn't address the sqlite problems, but should resolve the issues with undefined flac symbols when building from local libraries. Richard |