rafael2k / darkice

DarkIce is a live audio streamer. It records audio from an audio interface (e.g. sound card), encodes it and sends it to a streaming server. This is the official development repository of Darkice.
http://www.darkice.org
198 stars 46 forks source link

Troubles compiling darkice 1.3 on archlinux #119

Open Ouack23 opened 7 years ago

Ouack23 commented 7 years ago

Hey, as I said, I can't compile the archlinux package from the aur ( https://aur.archlinux.org/packages/darkice/ ), but that's nothing to do with you.

I tried to update the PKGBUILD to compile the 1.3 version :

# Maintainer: Sam Mulvey <archlinux at sammulvey.com>
# Contributor: Andrea Scarpino <andrea@archlinux.org>
# Contributor: Ganjolinux aka Basalari David <ganjolinux@gmail.com>
# Contributor: speps <speps at aur dot archlinux dot org>

pkgname=darkice
pkgver=1.3
pkgrel=1
pkgdesc="Live audio streamer. Reads from audio interface, encodes, sends to streaming server."
arch=('i686' 'x86_64' 'armv6h' 'armv7h')
url="http://code.google.com/p/darkice/"
license=('GPL')
depends=('lame' 'libpulse' 'faac' 'jack' 'twolame' 'opus' 'libsamplerate' 'libaacplus')
source=("http://downloads.sourceforge.net/project/darkice/darkice/1.3/darkice-1.3.tar.gz?r=&ts=1477414969&use_mirror=vorboss")
md5sums=('a4d3a1007bfd22dfa02c3ca4ae88c63c')

build() {
  cd "$srcdir/$pkgname-$pkgver"

  ./configure --prefix=/usr \
              --sysconfdir=/etc \
              --with-aacplus \
                          --with-opus \
                          --with-samplerate
  make
}

package() {
  cd "$srcdir/$pkgname-$pkgver"

  make DESTDIR="$pkgdir/" install

  # daemon
  install -Dm755 "$srcdir/service" "$pkgdir/usr/lib/systemd/system/darkice@.service"

  mkdir -p "$pkgdir/etc/darkice"
  mv "$pkgdir/etc/darkice.cfg" "$pkgdir/etc/darkice/darkice.cfg"
}

Unfortunately, this does not work, I have an error during the compilation :+1:

VorbisLibEncoder.cpp: Dans la fonction membre ‘virtual unsigned int VorbisLibEncoder::write(const void*, unsigned int)’:
VorbisLibEncoder.cpp:340:62: erreur : invalid conversion from ‘const float*’ to ‘float*’ [-fpermissive]
         src_short_to_float_array (shortBuffer, converterData.data_in, totalSamples);
                                                ~~~~~~~~~~~~~~^~~~~~~
In file included from VorbisLibEncoder.h:56:0,
                 from VorbisLibEncoder.cpp:42:
/usr/include/samplerate.h:171:6: note :   initializing argument 2 of ‘void src_short_to_float_array(const short int*, float*, int)’
 void src_short_to_float_array (const short *in, float *out, int len) ;
      ^~~~~~~~~~~~~~~~~~~~~~~~

Do you have any idea why it pops, and how to resolve it ? Thanks a lot for reading !