i-rinat / apulse

PulseAudio emulation for ALSA
MIT License
609 stars 35 forks source link

Debian 7.8 on amd64 won't let me install the i386 prerequisites #22

Closed DavidGriffith closed 9 years ago

DavidGriffith commented 9 years ago
thoth:~/proj/misc/apulse/build$ make
...
[ 66%] Building C object CMakeFiles/pulse.dir/src/apulse-threaded-mainloop.c.o
[ 73%] Building C object CMakeFiles/pulse.dir/src/util.c.o
[ 80%] Building C object CMakeFiles/pulse.dir/src/ringbuffer.c.o
[ 86%] Building C object CMakeFiles/pulse.dir/src/notimplemented.c.o
Linking C shared library libpulse.so
/usr/bin/ld: cannot find -lglib-2.0
/usr/bin/ld: cannot find -lasound
collect2: error: ld returned 1 exit status
make[2]: *** [libpulse.so.0] Error 1
make[1]: *** [CMakeFiles/pulse.dir/all] Error 2
make: *** [all] Error 2
herman:~/proj/misc/apulse/build$

I suppose this is because it wants glib-2.0 and asound compiled as i386. However, Debian won't let me install them alongside the amd64 versions.

herman:~/proj/misc/apulse/build$ sudo apt-get install libglib2.0-dev:i386
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following packages were automatically installed and are no longer required:
  comerr-dev gir1.2-gtk-3.0 krb5-multidev libavahi-common-dev libcaca-dev
  libcairo-script-interpreter2 libdirectfb-dev libdirectfb-extra libflac-dev
  libfreetype6-dev libgcrypt11-dev libgnutls-dev libgnutls-openssl27
  libgnutlsxx27 libgpg-error-dev libgssrpc4 libjpeg8-dev libkadm5clnt-mit8
  libkadm5srv-mit8 libkdb5-6 libkrb5-dev libldap2-dev libp11-kit-dev
  libpcrecpp0 libpixman-1-dev libpng12-dev libreadline-dev libreadline6-dev
  librtmp-dev libslang2-dev libssh2-1-dev libtasn1-3-dev libts-dev
  libxcb-render0-dev libxcb-shm0-dev libxcomposite-dev libxcursor-dev
  libxdamage-dev libxfixes-dev libxinerama-dev libxml2-dev libxml2-utils
  libxrandr-dev libxrender-dev x11proto-composite-dev x11proto-damage-dev
  x11proto-fixes-dev x11proto-randr-dev x11proto-render-dev
  x11proto-xinerama-dev
Use 'apt-get autoremove' to remove them.
The following extra packages will be installed:
  libpcre3-dev:i386 libpcrecpp0:i386 pkg-config:i386 zlib1g-dev:i386
Suggested packages:
  libglib2.0-doc:i386
Recommended packages:
  python:i386
The following packages will be REMOVED:
  libatk1.0-dev libavahi-client-dev libcairo2-dev libcurl4-openssl-dev
  libdbus-1-dev libfluidsynth-dev libfontconfig1-dev libgdk-pixbuf2.0-dev
  libglade2-dev libglib2.0-dev libgtk-3-dev libgtk2.0-dev libidn11-dev
  libjack-dev libmpeg2-4-dev libpango1.0-dev libpcre3-dev libpulse-dev
  libsamplerate0-dev libsdl1.2-dev libsndfile1-dev libxft-dev nvidia-settings
  pkg-config
The following NEW packages will be installed:
  libglib2.0-dev:i386 libpcre3-dev:i386 libpcrecpp0:i386 pkg-config:i386
  zlib1g-dev:i386
0 upgraded, 5 newly installed, 24 to remove and 15 not upgraded.
Need to get 2,768 kB of archives.
After this operation, 51.0 MB disk space will be freed.
Do you want to continue [Y/n]?
mtbc commented 9 years ago

I have Skype (and apulse) installed in a 32-bit chroot because of this sort of awkward conflict. /-:

i-rinat commented 9 years ago

Yep, libglib2.0-dev:i386 is not installable on Debian amd64, but the only thing you need from that packet is symbolic link /lib/i386-linux-gnu/libglib-2.0.so/lib/i386-linux-gnu/libglib-2.0.so.0. You can do it yourself by calling

# ln -s /lib/i386-linux-gnu/libglib-2.0.so.0 /lib/i386-linux-gnu/libglib-2.0.so

Of course you need libglib2.0-0:i386 installed too.

i-rinat commented 9 years ago

Other solution is to create a i386 chroot with debootstrap, login with chroot directory-name linux32 bash and build project there.

DavidGriffith commented 9 years ago

I got the glib and asound library names fixed, but Skype still won't work. In the meantime, I've discovered that the 4.2 binary can be hacked to pretend that it's version 4.3. See http://www.linuxquestions.org/questions/linux-software-2/skype-without-pulseaudio-using-4-2-instead-of-4-3-a-4175517905/

i-rinat commented 9 years ago

Make sure application loads libraries you expect. This can be checked by examining output of

grep pulse /proc/2417/maps

Process ID of a process on your machine will be different, of course. Another common issue is muted microphone. Apulse doesn't touch mixer controls, so if microphone was muted and/or set to zero volume, it won't record anything.

rescuetoaster commented 7 years ago

Hello! My appologies to necrobump this thread but after hours and hours of searching and trial and fails this is the only thread even remotely close to my issue. Had exact same issue as OP with libglib. That part is sorted now. I do have issue with the next error also seen in OP original post, the:

/usr/bin/ld: cannot find -lasound collect2: error: ld returned 1 exit status make[2]: *** [libpulse.so.0] Error 1 only place i have libpulse.so.0 is in /usr/lib/i386-linux-gnu I have tried to link it, export the path nothing has worked. Can you kindly advise?

mati75 commented 7 years ago

Install libasound2-dev and try again.

rescuetoaster commented 7 years ago

Hi! Actually your suggestion gave me hint needed! what was missing was libasound2-dev:i386! Thank you ! It is now working as intended!