compiling Audacity with Kdevelop

I have been trying to compile Audacity with Kdevelop for several days. I have had some success, but I am still running into problems. I have set up a website that will become a HOWTO when things are working. Right now, it really just chronicles the problems that I am having. But, please do take a look.

Getting to the point, I am still having trouble building. Can we tell what is missing from the build errors?

TIA,
backdoc

Here are my configure parameters:
–enable-debug=yes --with-portaudio=v19 --with-wxwidgets=2.8 --program-prefix=k_

Here’s the tail of my build errors:
gcc -g -I…/portaudio-v19/include -Iinclude -DPACKAGE_NAME=“PortMixer” -DPACKAGE_TARNAME=“portmixer” -DPACKAGE_VERSION=“2.0” -DPACKAGE_STRING=“PortMixer 2.0” -DPACKAGE_BUGREPORT=“audacity.sourceforge.net” -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DPX_USE_UNIX_OSS=1 -DPX_USE_LINUX_ALSA=1 -c src/px_linux_alsa.c -o px_linux_alsa.o
/usr/bin/ar ruv libportmixer.a px_mixer.o px_unix_oss.o px_linux_alsa.o
/usr/bin/ar: creating libportmixer.a
a - px_mixer.o
a - px_unix_oss.o
a - px_linux_alsa.o
ranlib libportmixer.a
ln -sf portmixer/libportmixer.a .
make[1]: Target `all’ not remade because of errors.
make: *** [audacity] Error 2

gzipping the file this way prevents audacity.1 from getting deleted

cat help/audacity.1 | gzip -9 > help/audacity.1.gz
make: Target `all’ not remade because of errors.
*** Exited with status: 2 ***

Additional information.

I have been working with someone on the Kdevelop list. At this point, I’m not exactly sure what additional benefit this will be, but I was asked to run make -k and provide that input to the Audacity developers. Here’s the output:

Note: To save some space here, I limited the output to the part that looked relevant. To see the entire output, you can <go here> or <directly here>

make -C twolame
make[2]: Entering directory /mnt/LINUX_DOCS/audacity/lib-src/twolame' Making all in libtwolame make[3]: Entering directory /mnt/LINUX_DOCS/audacity/lib-src/twolame/libtwolame’
if /bin/bash …/libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -I/mnt/LINUX_DOCS/audacity/lib-src/twolame/libtwolame -I…/build -I …/build/ -g -O2 -std=c99 -Wunused -Wall -g -Werror -MT psycho_1.lo -MD -MP -MF “.deps/psycho_1.Tpo” -c -o psycho_1.lo psycho_1.c;
then mv -f “.deps/psycho_1.Tpo” “.deps/psycho_1.Plo”; else rm -f “.deps/psycho_1.Tpo”; exit 1; fi
gcc -DHAVE_CONFIG_H -I. -I/mnt/LINUX_DOCS/audacity/lib-src/twolame/libtwolame -I…/build -I …/build/ -g -O2 -std=c99 -Wunused -Wall -g -Werror -MT psycho_1.lo -MD -MP -MF .deps/psycho_1.Tpo -c psycho_1.c -fPIC -DPIC -o .libs/psycho_1.o
cc1: warnings being treated as errors
psycho_1.c: In function ‘psycho_1_deinit’:
psycho_1.c:639: warning: dereferencing type-punned pointer will break strict-aliasing rules
psycho_1.c:640: warning: dereferencing type-punned pointer will break strict-aliasing rules
psycho_1.c:641: warning: dereferencing type-punned pointer will break strict-aliasing rules
make[3]: *** [psycho_1.lo] Error 1
if /bin/bash …/libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -I/mnt/LINUX_DOCS/audacity/lib-src/twolame/libtwolame -I…/build -I …/build/ -g -O2 -std=c99 -Wunused -Wall -g -Werror -MT psycho_2.lo -MD -MP -MF “.deps/psycho_2.Tpo” -c -o psycho_2.lo psycho_2.c;
then mv -f “.deps/psycho_2.Tpo” “.deps/psycho_2.Plo”; else rm -f “.deps/psycho_2.Tpo”; exit 1; fi
gcc -DHAVE_CONFIG_H -I. -I/mnt/LINUX_DOCS/audacity/lib-src/twolame/libtwolame -I…/build -I …/build/ -g -O2 -std=c99 -Wunused -Wall -g -Werror -MT psycho_2.lo -MD -MP -MF .deps/psycho_2.Tpo -c psycho_2.c -fPIC -DPIC -o .libs/psycho_2.o
cc1: warnings being treated as errors
psycho_2.c: In function ‘psycho_2_deinit’:
psycho_2.c:525: warning: dereferencing type-punned pointer will break strict-aliasing rules
psycho_2.c:526: warning: dereferencing type-punned pointer will break strict-aliasing rules
psycho_2.c:527: warning: dereferencing type-punned pointer will break strict-aliasing rules
psycho_2.c:528: warning: dereferencing type-punned pointer will break strict-aliasing rules
psycho_2.c:529: warning: dereferencing type-punned pointer will break strict-aliasing rules
make[3]: *** [psycho_2.lo] Error 1
if /bin/bash …/libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -I/mnt/LINUX_DOCS/audacity/lib-src/twolame/libtwolame -I…/build -I …/build/ -g -O2 -std=c99 -Wunused -Wall -g -Werror -MT psycho_4.lo -MD -MP -MF “.deps/psycho_4.Tpo” -c -o psycho_4.lo psycho_4.c;
then mv -f “.deps/psycho_4.Tpo” “.deps/psycho_4.Plo”; else rm -f “.deps/psycho_4.Tpo”; exit 1; fi
gcc -DHAVE_CONFIG_H -I. -I/mnt/LINUX_DOCS/audacity/lib-src/twolame/libtwolame -I…/build -I …/build/ -g -O2 -std=c99 -Wunused -Wall -g -Werror -MT psycho_4.lo -MD -MP -MF .deps/psycho_4.Tpo -c psycho_4.c -fPIC -DPIC -o .libs/psycho_4.o
cc1: warnings being treated as errors
psycho_4.c: In function ‘psycho_4_deinit’:
psycho_4.c:563: warning: dereferencing type-punned pointer will break strict-aliasing rules
psycho_4.c:564: warning: dereferencing type-punned pointer will break strict-aliasing rules
psycho_4.c:565: warning: dereferencing type-punned pointer will break strict-aliasing rules
psycho_4.c:566: warning: dereferencing type-punned pointer will break strict-aliasing rules
psycho_4.c:567: warning: dereferencing type-punned pointer will break strict-aliasing rules
make[3]: *** [psycho_4.lo] Error 1
if /bin/bash …/libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -I/mnt/LINUX_DOCS/audacity/lib-src/twolame/libtwolame -I…/build -I …/build/ -g -O2 -std=c99 -Wunused -Wall -g -Werror -MT twolame.lo -MD -MP -MF “.deps/twolame.Tpo” -c -o twolame.lo twolame.c;
then mv -f “.deps/twolame.Tpo” “.deps/twolame.Plo”; else rm -f “.deps/twolame.Tpo”; exit 1; fi
gcc -DHAVE_CONFIG_H -I. -I/mnt/LINUX_DOCS/audacity/lib-src/twolame/libtwolame -I…/build -I …/build/ -g -O2 -std=c99 -Wunused -Wall -g -Werror -MT twolame.lo -MD -MP -MF .deps/twolame.Tpo -c twolame.c -fPIC -DPIC -o .libs/twolame.o
cc1: warnings being treated as errors
twolame.c: In function ‘twolame_close’:
twolame.c:877: warning: dereferencing type-punned pointer will break strict-aliasing rules
twolame.c:878: warning: dereferencing type-punned pointer will break strict-aliasing rules
twolame.c:879: warning: dereferencing type-punned pointer will break strict-aliasing rules
make[3]: *** [twolame.lo] Error 1
make[3]: Target all' not remade because of errors. make[3]: Leaving directory /mnt/LINUX_DOCS/audacity/lib-src/twolame/libtwolame’
make[3]: Entering directory /mnt/LINUX_DOCS/audacity/lib-src/twolame' make[3]: Nothing to be done for all-am’.
make[3]: Leaving directory /mnt/LINUX_DOCS/audacity/lib-src/twolame' make[2]: *** [all-recursive] Error 1 make[2]: Target all’ not remade because of errors.
make[2]: Leaving directory /mnt/LINUX_DOCS/audacity/lib-src/twolame' make[1]: *** [libtwolame-recursive] Error 2 make -C allegro make[2]: Entering directory /mnt/LINUX_DOCS/audacity/lib-src/allegro’
make[2]: allegro.a' is up to date. make[2]: Leaving directory /mnt/LINUX_DOCS/audacity/lib-src/allegro’
ln -sf allegro/allegro.a allegro.a
make -C FileDialog
make[2]: Entering directory /mnt/LINUX_DOCS/audacity/lib-src/FileDialog' make[2]: Nothing to be done for all’.
make[2]: Leaving directory /mnt/LINUX_DOCS/audacity/lib-src/FileDialog' ln -sf FileDialog/FileDialog.a FileDialog.a make -C portaudio-v19 lib/libportaudio.la make[2]: Entering directory /mnt/LINUX_DOCS/audacity/lib-src/portaudio-v19’
make[2]: lib/libportaudio.la' is up to date. make[2]: Leaving directory /mnt/LINUX_DOCS/audacity/lib-src/portaudio-v19’
ln -sf .libs/libportaudio.a portaudio-v19/lib/libportaudio.a
make -C portmixer
make[2]: Entering directory /mnt/LINUX_DOCS/audacity/lib-src/portmixer' make[2]: Nothing to be done for all’.
make[2]: Leaving directory /mnt/LINUX_DOCS/audacity/lib-src/portmixer' ln -sf portmixer/libportmixer.a . make[1]: Target all’ not remade because of errors.
make[1]: Leaving directory /mnt/LINUX_DOCS/audacity/lib-src' make: *** [audacity] Error 2 make: Target all’ not remade because of errors.

For the moment, configure with --without-libtwolame (or install it on your system and use --with-libtwolame=system) to bypass the 3rd party library where your problem is. Also, get rid of the -Werror flag you have in your C[XX, PP]FLAGS, and you will get further. There are quite a few warnings in the audacity code. Some need fixing, many really don’t matter, and quite a lot are in contributed libraries and not core audacity.

Hmmm… I thought that libtwolame was included with the Audacity CVS code. So, I never considered it a prerequisite to compiling Audacity. In fact, I have compiled Audacity several times already without excluding libtwolame. The only time I found I was running into trouble was when I compiled with debugging.

In fact, I have been experimenting compiling with and without libtwolame, trying to figure out what failed and what didn’t. I thought for sure that I had uncovered the failing combination. That is, mixing --enable-debug=yes along with libtwolame consistently failed for me. I was ready to post my results. Then, I gave it one last test … and dangit, it worked. And, by “it”, I mean –with-portaudio=v19 --with-wxwidgets=2.8 --program-prefix=k_ --enable-debug=yes. This is a combination of things that had not worked for me before. I built with debugging, as a regular user and did not exclude libtwolame.

I’m trying to nail down a set of parameters that works so that I can finish my “Building Audacity with Kdevelop” HOWTO. But, my results are not consistent.

I’ve put most of the combinations of compiles that I’ve done on my website on the matrix page. It helps me keep track of what I’ve tried and helps provide them to others in an organized way.

EDIT: Oh. And, I went ahead and apt-got libtwolame. I don’t know if it will conflict with things or if it will eliminate some of the inconsistency I’ve observed.

UPDATE: I think I can call this resolved. I don’t know if it had anything to do with installing the libtwolame stuff (I suspect so), but I was finally able to build Audacity with debugging in Kdevelop. I’m not at home now. So, I can’t verify the configure options. But, if I’m not mistaken, they are “–with-portaudio=v19 --with-wxwidgets=2.8 --program-prefix=k_ --enable-debug=yes”. I will verify this when I get home.

Even though this was resolved, I still find this mysterious. If not having libtwolame installed had anything to do with my problems, why would I have ever been able to compile? Also, many times compiling would fail. I’d make a note of it. And, then later I would try it again and it would work. If it had only happened to me once, I would have just thought that I had made a mistake taking notes. But, it truly seemed to happen over and over again. Then again, maybe I really did make an error taking notes. Never the less, what I did last night worked. And, I believe it is repeatable. So, I will get my notes together and update my HOWTO. Hopefully, my experiences will make it easier for someone else to debug Audacity on Linux.