Compiling and Installing libsndfile 1.0.18

Ok, since libsndfile 1.0.18 is finally released, I would like to update it on my ubuntu Hardy box, bust as always there is a “but”, so here goes.

In synaptic I can see two libsndfile packages, one is the common program libs and the other the development libs, both named as libsndfile and libsndfile-dev, I can completely remove the dev package but when I want to remove the standard package it wants to completely remove like a trizillion of applications that depend on it. Should I just remove the dev package, compile the new one with the same prefix as the ones in my system (that would be /usr) so it overwrites them all and build it as a .deb? Will that also build the files included in the dev package that I tend to remove?

If i wait for ubuntu to release libsndfile 1.0.18 (if they ever do) that will be like a hundred lightyears from now…and hopefully ardour will be in its 50,000th anniversary :wink:

Any ideas?

Thanks.

My suggestion is:

  • Remove the -dev package
  • Compile and install (well, ./configure) it with --prefix=/opt/libsndfile-1.0.18
  • Install stow and run 'stow -d /opt/ -t /usr/local libsndfile-1.0.18'
  • Run 'echo /usr/local/lib > /etc/ld.so.conf.d/local.conf'
  • Run 'ldconfig'

Now you should have all the files installed in /opt with symbolic links to /usr/local.
If you want to remove it (like when 1.0.18.1 is released) you unlink it first by adding a -D first to the stow options and just ‘rm -rf /opt/libsndfile-1.0.18’

When you compile something else against it, make sure you run ‘export PKGCONFIG_PATH=/usr/local/lib/pkgconfig’ first.

WOW! Ok, I’ll give this a go, will post results when I finish compiling ardour 3

Thanks!

Ok, I got a permission error on step 4 of your guide, o I have to create the file /etc/ld.so.conf.d/local.conf or should it be /etc/ld.so.conf.d/libc.conf

I have libc.conf and i486-linux-gnu.conf inside /etc/ld.so.conf.d

but no local.conf

Thanks

EDIT: Well it’s still worked without that step, compiled Ardour3 succesfully.

Thx again!

Ok, just one question, to unstow (remove links) what exactly do I have to do?

Seems stow -D libsndfile-1.0.18 won’t do the job, still see symlinks inside /usr/local

Thnx

For step 4 you have to be root so I guess the command should be
sudo echo /usr/local/lib > /etc/ld.so.conf.d/local.conf

Perhaps I was unclear in the unstow part. It’s
stow -D -d /opt/ -t /usr/local libsndfile-1.0.18
You add a -D to the command you run to stow it.

Dang. I thought I’d reformat this comment to avoid any copy/paste errors and it moved it from it’s original place to here. Oh well…

Ok, thanks. Still about step 4 I still get that permission error even as sudo. I never had a file called local.conf, I created it and added the line “/usr/local/lib” to it because even though after I created it, I would still have no permission to sudo echo at it. Strange no?

That’s really weird.

What that file does is to tell the dynamic linker to look in /usr/local/lib for files, and then the ‘ldconfig’ line updates the linker cache.
You could have all the content of the files there in one file, but the standard is to have one .conf per line.

Well that’s ok, I mean it all worked like a charm, and I really thank you so much for your explanation, only thing is that during the compiling process for Ardour3 I got the “taglib” error shown below, but I saw almost everyone has it, just reran scons again and all went through, is this error normal in version 3 at the moment?

TypeError ‘Tried to lookup File ’libs/taglib/headers/taglib’ as a Dir.’ trying to evaluate ‘${_concat(INCPREFIX, CPPPATH, INCSUFFIX, env, RDirs, TARGET, SOURCE)}’
scons: building terminated because of errors.

Thats a standard bug at present with the 3.0 build. Just run scons again and it will work. If you were cynical you could view it as a test of whether you’re actually the right person to try out 3.0 …

Ok, thx paul, well I will be testing 3, I already installed esvn to make a mirror of the svn files to see how it’s all going, and updating it frequently. I can see it’s still a bit away from polishing but it’s getting there, so I’ll be testing every now and then…

Thx guys!