LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   error compiling audacity-1.3.4 (https://www.linuxquestions.org/questions/slackware-14/error-compiling-audacity-1-3-4-a-613531/)

tramni1980 01-14-2008 02:06 PM

error compiling audacity-1.3.4
 
Hello!
I am running Slackware Linux 12.0 with kernel generic-smp-2.6.21.5-smp. I have problems compiling audacity-src-1.3.4-beta. Has any one been successful dong that?
I use the following build script:
#!/bin/sh

# Slackware build script for Audacity

# Written by Chess Griffin <chess at chessgriffin dot com>
# Thanks to Eric Hameleers for adding the audacity.desktop
# file and other tweaks and bug fixes.

# Modified by the SlackBuilds.org project

PRGNAM=audacity
VERSION=1.3.4
ARCH=${ARCH:-i686}
TAG=${TAG:-mai1}
CWD=$(pwd)
TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}

if [ "$ARCH" = "i486" ]; then
SLKCFLAGS="-O2 -march=i486 -mtune=i686"
elif [ "$ARCH" = "i686" ]; then
SLKCFLAGS="-O2 -march=i686 -mtune=i686"
fi

rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
cd $TMP || exit 1
rm -rf $PRGNAM-$VERSION
tar -xjvf $CWD/$PRGNAM-src-$VERSION.tar.bz2 || exit 1
cd $PRGNAM-src-$VERSION-beta || exit 1
chown -R root:root .
chmod -R u+w,go+r-w,a-s .

CFLAGS="$SLKCFLAGS" \
CXXFLAGS="$SLKCFLAGS" \
./configure \
--prefix=/usr \
--mandir=/usr/man \
--docdir=/usr/doc/$PRGNAM-$VERSION \
--with-expat=system \
--enable-unicode \
--with-libvorbis=system \
--with-libflac=system \
--with-libsndfile=system \
--with-libid3tag=system \
--with-libresample=local \
--without-soundtouch \
--without-portaudio \
--without-portmixer \
--build=$ARCH-slackware-linux \
|| exit 1

read
# --with-libmad=system
# --with-portmixer

make || exit 1
make install DESTDIR=$PKG || exit 1

( cd $PKG
find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
)

# We're going to overwrite the include audacity.desktop file with ours,
# and the icon isn't added at all by upstream, so we'll do that here
install -D -m 0644 $CWD/audacity.desktop $PKG/usr/share/applications/audacity.desktop
install -D -m 0644 images/AudacityLogo48x48.xpm $PKG/usr/share/pixmaps/audacity.xpm

mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
cp -a LICENSE.txt README.txt $CWD/$PRGNAM.SlackBuild $CWD/{slack-desc,doinst.sh,audacity.desktop} $PKG/usr/doc/$NAME-$VERSION

mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc
cat $CWD/doinst.sh > $PKG/install/doinst.sh

cd $PKG
/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$TAG.tgz

The error occurs during the "make" phase and has something to do with import mp3.

Thanks for your attention.
Regards,
Martin

weibullguy 01-14-2008 02:27 PM

Why do you need a script to build an app from source? Hmm. Anyway, why don't you post the actual error or, better yet, the last 20-30 lines of output from the failed make.

dive 01-14-2008 03:02 PM

Without the exact error message it's hard to know what the problem is.

Quote:

Originally Posted by weibullguy (Post 3022278)
Why do you need a script to build an app from source?

The script builds a package.

jong357 01-14-2008 03:19 PM

1.4.x is out.. Try building that unless you need 1.3.whatever....

And yes, error output would be most helpfull.

tramni1980 01-15-2008 04:01 AM

Well, here are the last few lines from the output:

g++ -c -I../lib-src/portaudio/pa_common -O2 -march=i686 -mtune=i686 -I../lib-src/libresample/include -I../lib-src/libnyquist/nyx -I../lib-src/libvamp -I../lib-src/allegro -I../lib-src/FileDialog -Wall -fno-strict-aliasing -I./include -I. -I/usr/lib/wx/include/gtk2-unicode-release-2.6 -I/usr/include/wx-2.6 -DGTK_NO_CHECK_CASTS -D__WXGTK__ -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -DNO_GCC_PRAGMA -DAUDACITY_DLL_API='' import/ImportLOF.cpp -o import/ImportLOF.o
g++ -c -I../lib-src/portaudio/pa_common -O2 -march=i686 -mtune=i686 -I../lib-src/libresample/include -I../lib-src/libnyquist/nyx -I../lib-src/libvamp -I../lib-src/allegro -I../lib-src/FileDialog -Wall -fno-strict-aliasing -I./include -I. -I/usr/lib/wx/include/gtk2-unicode-release-2.6 -I/usr/include/wx-2.6 -DGTK_NO_CHECK_CASTS -D__WXGTK__ -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -DNO_GCC_PRAGMA -DAUDACITY_DLL_API='' import/ImportMIDI.cpp -o import/ImportMIDI.o
../lib-src/allegro/mfmidi.h:22: warning: 'class Midifile_reader' has virtual functions but non-virtual destructor
g++ -c -I../lib-src/portaudio/pa_common -O2 -march=i686 -mtune=i686 -I../lib-src/libresample/include -I../lib-src/libnyquist/nyx -I../lib-src/libvamp -I../lib-src/allegro -I../lib-src/FileDialog -Wall -fno-strict-aliasing -I./include -I. -I/usr/lib/wx/include/gtk2-unicode-release-2.6 -I/usr/include/wx-2.6 -DGTK_NO_CHECK_CASTS -D__WXGTK__ -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -DNO_GCC_PRAGMA -DAUDACITY_DLL_API='' import/ImportMP3.cpp -o import/ImportMP3.o
import/ImportMP3.cpp: In function 'void GetMP3ImportPlugin(ImportPluginList*, UnusableImportPluginList*)':
import/ImportMP3.cpp:52: error: 'DESC' was not declared in this scope
import/ImportMP3.cpp:52: error: 'wxSIZEOF' was not declared in this scope
make[1]: *** [import/ImportMP3.o] Error 1
make[1]: Leaving directory `/tmp/SBo/audacity-src-1.3.4-beta/src'
make: *** [audacity] Error 2

Any suggestions will be appreciated.

I searched for a while, but I could not find the source cod of audacity-1.4.x for downloading. Would you please provide a link?

Thank you for your responsiveness.
Regards,
Martin

gnashley 01-15-2008 08:14 AM

"-I/usr/include/wx-2.6" -audacity needs wxGTK-2.6 to compile apparently.

tramni1980 01-15-2008 08:32 AM

Quote:

Originally Posted by gnashley (Post 3023171)
"-I/usr/include/wx-2.6" -audacity needs wxGTK-2.6 to compile apparently.

I have wxGTK-2.6.3-i686-1_SBo installed using the script from slackbuilds.org. The previous version of audacity compiles, but this one does not.

weibullguy 01-15-2008 11:10 AM

Open the file /tmp/SBo/audacity-src-1.3.4-beta/src/import/ImportMP3.cpp in your favorite editor. Look for this line right after the header (around line 28)
Code:

#include <wx/defs.h>
Add this line right after it
Code:

#include <wx/intl.h>
Then look for this a little further down (around line 35)
Code:

static const wxChar *exts[] =
{
  wxT("mp3"),
  wxT("mp2"),
  wxT("mpg"),
  wxT("mpeg"),
  wxT("mpa")
};

Add this line right before it
Code:

#define DESC _("MP3 files")
Save the file with your changes and execute make again. Should work.

The other option is to use a stable release of Audacity instead of a beta release.

tramni1980 01-15-2008 11:38 AM

I think I will rather wait for a stable release, since the current installed 1.3.3 works fine.

Thank you for your reply.

jong357 01-15-2008 07:46 PM

Sorry... Was thinking of Audacious.... Audacity, Audacious.. Something wrong with that. Too many linux programs so people are running out of names I guess. ;)

I just googled your error. Someone said it's a known bug and is fixed in CVS. Grab the latest from SVN/CVS and build that. Or you could diff the two and come up with a patch.

They also said installing libmad solves the issue as well.... Use the search luke... I haven't tried it myself but seemed like a pretty definitive post...

weibullguy 01-15-2008 07:59 PM

Quote:

Originally Posted by jong357 (Post 3023914)
Someone said it's a known bug and is fixed in CVS.

They also said installing libmad solves the issue as well.... Use the search luke... I haven't tried it myself but seemed like a pretty definitive post...

That's where I got the lines that need to be added, so a CVS grab should work unless something else has changed as well. I can confirm that libmad will prevent that little bit of code from compiling.

ppr:kut 01-16-2008 01:35 AM

But then there's again the problems regarding libmad described here:
http://www.linuxquestions.org/questi...4-beta-604042/

At llest current cvs-version does include a version of libmad and does build against that one.


All times are GMT -5. The time now is 03:44 AM.