You are not logged in.

#1 2005-09-06 21:08:37

tmaynard
Member
Registered: 2005-07-29
Posts: 34

smpeg - build failure

I am getting link errors in trying to build smpeg from the AUR (so that I can build pysol-sound-server ... so that I can build pysol ... so that I can waste *more* time....)

gcc -march=i686 -O2 -pipe -I/usr/include/SDL -D_REENTRANT -DTHREADED_AUDIO -I/usr/include/gtk-1.2 -I/usr/include/glib-1.2 -I/usr/lib/glib/include -I/usr/X11R6/include -I/usr/X11R6/include -DNDEBUG -I.. -DNOCONTROLS -I. -I./audio -I./video -o .libs/plaympeg plaympeg.o .libs/libsmpeg.so -L/usr/lib -lSDL -lpthread -lm -lSDL -lpthread -lm -lSDL -lpthread -lm -L/usr/lib -Wl,-rpath,/usr/lib -lSDL -lpthread -lm
.libs/libsmpeg.so: undefined reference to `operator new[](unsigned int)'
.libs/libsmpeg.so: undefined reference to `operator delete(void*)'
.libs/libsmpeg.so: undefined reference to `__cxa_pure_virtual'
.libs/libsmpeg.so: undefined reference to `operator delete[](void*)'
.libs/libsmpeg.so: undefined reference to `operator new(unsigned int)'
collect2: ld returned 1 exit status
make[1]: *** [plaympeg] Error 1
make[1]: Leaving directory `/var/abs/local/smpeg/src/smpeg-0.4.4'
make: *** [all-recursive] Error 1
==> ERROR: Build Failed.  Aborting...

I *suspect* that this may be related to Operation Libtool Slay, but do not know how to investigate further....

A google search on the error message just gave me one *old* link (BIG file)
http://mail.linux-sxs.org/pipermail/lin … ctober.txt
which suggested looking for the libm, libSDL, and libpthread libraries in which of course are all there. 

I *am* using the testing repo however.  Any pointers would be appreciated.  Thanks,

Todd

Offline

#2 2005-09-07 00:07:44

Snowman
Developer/Forum Fellow
From: Montreal, Canada
Registered: 2004-08-20
Posts: 5,212

Re: smpeg - build failure

smpeg build fine on my system but I don't use the testing repo (except xorg).  The error message above doesn't look like the usual libtool problem.  My guess would be that it's a gcc 4 problem as the code is quite old (2001) or a problem with the new sdl in testing. You could look on your system for *.la files. There are a few threads in the "Making package" section about that.  Anyway, I've read that the packages in testing will be moved in current/extra in a week or two. Then, I'll be more able to test it. :?

Offline

#3 2005-09-07 00:35:59

tmaynard
Member
Registered: 2005-07-29
Posts: 34

Re: smpeg - build failure

I had forgotten the GCC 4 side of things.... that is a likely possibility I suppose.  I didn't see any *.la files.  I was looking at the CVS on icculus and I saw a *little* recent activity, but nothing that seemed to be in response to GCC 4 - I hate CVS commits that just say "update". 

I might try playing around with the code a bit more when I get off of work later.  It'll be good practice.  I guess I can see if I have the same prob with the CVS code.... and I guess I can try and narrow down where the problem is..... It is a pretty small library.

Any pointers would definitely be welcome.

Offline

#4 2005-09-07 03:14:30

Snowman
Developer/Forum Fellow
From: Montreal, Canada
Registered: 2004-08-20
Posts: 5,212

Re: smpeg - build failure

I just checked the cvs. Looks that the version was bumped to smpeg-0.4.5 but there is no release/snapshots.  I'll wait for the testing packages to it the stable repo before working on smpeg.

EDIT: The pkg is here: http://www.astro.umontreal.ca/~belanger … pkg.tar.gz

Offline

#5 2005-09-07 04:16:02

Snowman
Developer/Forum Fellow
From: Montreal, Canada
Registered: 2004-08-20
Posts: 5,212

Re: smpeg - build failure

BTW, there's a mesa dependency.

Offline

#6 2005-09-07 17:36:12

tmaynard
Member
Registered: 2005-07-29
Posts: 34

Re: smpeg - build failure

Thanks for the binary package snowman....although that is cheating of course..... I am gonna see if I can build the CVS version.

Offline

#7 2005-09-07 18:58:08

Snowman
Developer/Forum Fellow
From: Montreal, Canada
Registered: 2004-08-20
Posts: 5,212

Re: smpeg - build failure

tmaynard wrote:

Thanks for the binary package snowman....although that is cheating of course.....

I know. tongue

tmaynard wrote:

I am gonna see if I can build the CVS version.

I'll probably do a cvs version when gcc4 will hit current repo unless you do it before.  If you need help, pm me.

Offline

#8 2005-09-07 19:01:04

tmaynard
Member
Registered: 2005-07-29
Posts: 34

Re: smpeg - build failure

Still messing with it, but the CVS version builds successfully.

Offline

#9 2005-09-07 19:12:24

Snowman
Developer/Forum Fellow
From: Montreal, Canada
Registered: 2004-08-20
Posts: 5,212

Re: smpeg - build failure

If you get  a working PKGBUILD, post it here or send it to me.  I'll test it and update my smpeg package.

Offline

#10 2005-09-07 19:24:58

tmaynard
Member
Registered: 2005-07-29
Posts: 34

Re: smpeg - build failure

CVS PKGBUILD that works w current testing repos (GCC 4.0) :

# Contributor: Todd Maynard <arch@toddmaynard.com>

pkgname=smpeg-cvs
pkgver=20050907
pkgrel=1
pkgdesc="SMPEG is a free MPEG1 video player library with sound support."
url="http://icculus.org/smpeg/"
license=
depends=('sdl' 'gtk' 'mesa')
provides=('smpeg')
conflicts=('smpeg')
makedepends=('cvs')
install=$pkgname.install

_cvsroot=":pserver:anonymous:anonymous:@cvs.icculus.org:/cvs/cvsroot"
_cvsmod="smpeg"

build() {
  cd $startdir/src
  msg "Connecting to icculus.org CVS server...."
  cvs -z3 -d $_cvsroot co -D $pkgver -f $_cvsmod
  cd $_cvsmod
  ./autogen.sh

  msg "CVS checkout done or server timeout"
  msg "Starting make..."

  cp -r ../$_cvsmod ../$_cvsmod-build
  cd ../$_cvsmod-build

  ./configure --prefix=/usr
  make || return 1
  make DESTDIR=$startdir/pkg install || return 1


  rm -r $startdir/src/$_cvsmod-build
}
# vim:syntax=sh

I suppose my next step in this whole thing is to start doing some diffing to see if I can get 0.4.4 +patch to compile so that you can have a working non-cvs PKGBUILD when all this good stuff moves from testing to current.

Offline

#11 2005-09-07 21:30:35

Snowman
Developer/Forum Fellow
From: Montreal, Canada
Registered: 2004-08-20
Posts: 5,212

Re: smpeg - build failure

tmaynard wrote:

I suppose my next step in this whole thing is to start doing some diffing to see if I can get 0.4.4 +patch to compile so that you can have a working non-cvs PKGBUILD when all this good stuff moves from testing to current.

Thanks for the PKGBUILD. big_smile Don't worry too much about the patch.  I might just go with the cvs version as they haven't released any source tarball for version 0.4.5.  There is a way to specify the date with cvs (-D option) so we could use the code from this date as it works.  I'll check that tonight.

Offline

#12 2005-09-07 22:05:45

tmaynard
Member
Registered: 2005-07-29
Posts: 34

Re: smpeg - build failure

Yeah the CVS script works.... I can now play solitaire to my hearts content.  Unfortunately I haven't stumbled onto an easy fix with 0.4.4 code so the CVS (with -D option) maybe the best route to go.   Thanks for all the help.

Offline

#13 2005-09-07 22:48:38

tmaynard
Member
Registered: 2005-07-29
Posts: 34

Re: smpeg - build failure

Got It!  (Thanks to a little [OK a lot] of help from a certain gentoo ebuild)

# Maintainer: Eric Belanger <belanger@astro.umontreal.ca>

pkgname=smpeg
pkgver=0.4.4
pkgrel=2
pkgdesc="SMPEG is a free MPEG1 video player library with sound support."
url="ftp://sunsite.dk"
license=""
depends=('sdl' 'gtk' 'mesa')
source=("ftp://sunsite.dk/pub/os/linux/loki/open-source/smpeg/$pkgname-$pkgver.tar.gz" "smpeg-0.4.4-config.patch")
md5sums=('59c76ac704088ef5539210190c4e1fe3' 'f70fffdbc4af6ca684817ede925c6087')
build() {
  cd $startdir/src/$pkgname-$pkgver

  # Bundled libtool doesnt properly add C++ libs even
        # though the shared library includes C++ objects
        sed -i 
                -e '/^libsmpeg_la_LIBADD =/s:$: -lstdc++:' 
                Makefile.in || die "sed Makefile.in failed"

  patch smpeg-0.4.4-config.in ../smpeg-0.4.4-config.patch
  ./configure --prefix=/usr
  make || return 1
  make DESTDIR=$startdir/pkg install
}

and the patch:

Only dump -L/-rpath if libdir is non-standard

--- smpeg-config.in
+++ smpeg-config.in
@@ -45,11 +45,13 @@
       echo $includes -I@includedir@/smpeg `@SDL_CONFIG@ --cflags`
       ;;
     --libs)
+      if [ "@libdir@" != "/usr/lib" ]; then
       if [ "`uname`" = "SunOS" ]; then
         libdirs="-L@libdir@ -R@libdir@"
       else
         libdirs="-L@libdir@ @SMPEG_RLD_FLAGS@"
       fi
+      fi
       echo $libdirs -lsmpeg `@SDL_CONFIG@ --libs`
       ;;
     *)

Snowman - I'll let you check it out and upload as you deem appropriate.  There were a couple of other patches in the gentoo ebuild which reflect a couple of changes in the code between 0.4.4 and current CVS. 

Let me know if I can be of any further assistance.

Offline

#14 2005-09-07 22:57:48

tmaynard
Member
Registered: 2005-07-29
Posts: 34

Re: smpeg - build failure

|| die "sed Makefile.in failed"  should prolly be yanked outta the PKGBUILD.

Offline

#15 2005-09-08 05:34:11

Snowman
Developer/Forum Fellow
From: Montreal, Canada
Registered: 2004-08-20
Posts: 5,212

Re: smpeg - build failure

tmaynard wrote:

|| die "sed Makefile.in failed"  should prolly be yanked outta the PKGBUILD.

Probably the sed line too isn't needed as it looks related to libtool wich is currently being removed in testing.

Thanks for the patch. Though, I might go with the cvs -D to get the 0.4.5 version...

Offline

#16 2005-09-08 11:50:17

tmaynard
Member
Registered: 2005-07-29
Posts: 34

Re: smpeg - build failure

Go figure - it actually seems to be the other way around.... the sed line IS needed, but the patch isn't.....  the patch wasn't even being applied because I messed up the name of the file to patch....

Updateted PKGBUILD for anyone interested:

# Maintainer: Eric Belanger <belanger@astro.umontreal.ca>

pkgname=smpeg
pkgver=0.4.4
pkgrel=2
pkgdesc="SMPEG is a free MPEG1 video player library with sound support."
url="ftp://sunsite.dk"
license=""
depends=('sdl' 'gtk' 'mesa')
source=("ftp://sunsite.dk/pub/os/linux/loki/open-source/smpeg/$pkgname-$pkgver.tar.gz")
md5sums=('59c76ac704088ef5539210190c4e1fe3')
build() {
  cd $startdir/src/$pkgname-$pkgver

  # Bundled libtool doesnt properly add C++ libs even
  # though the shared library includes C++ objects
  sed -i 
  -e '/^libsmpeg_la_LIBADD =/s:$: -lstdc++:' Makefile.in

  ./configure --prefix=/usr
  make || return 1
  make DESTDIR=$startdir/pkg install
}

*** Disclaimer *** I've been up for forty something hours (and it's not pysol's fault)  so I don't know what I am doing anymore....

Offline

#17 2005-09-08 17:13:26

Snowman
Developer/Forum Fellow
From: Montreal, Canada
Registered: 2004-08-20
Posts: 5,212

Re: smpeg - build failure

Hmm... Is it possible that you have some stray *.la files on your system that are causing all this trouble?

Anyway, I would suggest to keep the smpeg PKGBUILD as is for now. I'm afraid that you're doing un-needed work.

Offline

Board footer

Powered by FluxBB