how to compile and install from source

Hi, I have just made the switch to Ubuntu Studio, and am very impressed with the low latency using the preempt realtime kernel (48000Hz with 64 frames, 2 periods, 2.67sec with no xruns so far (1.53Ghz AthlonXP 1800+ 768MB DDR) incase anybody cares). My problem is this: I have successfully compiled from source, but I don´t know how to run the newly installed Ardour 2.1. The old 2.0 still boots, and I´m not keen enough with linux yet to know what happens exactly after running ¨su scons install¨ Do I have to uninstall the old Ardour first? Thanks for all the help!

hallo, most probably the distribution version will be installed in /usr/bin, and the one that you installed yourself will be placed in /usr/local/bin.
try opening a terminal and type /usr/local/bin/ardour2, that should make it.

otherwise, if you have installed ardour yourself, you should be able to remove the ubuntu-version by using synaptic - you don’t really need both on your system, do you?

cheers,
doc

Ok, thanks for the reply. I ran the command, and am getting this error: ¨eric@ubuntu-studio:/usr/bin$ ardour2.1
/usr/local/lib/ardour2/ardour-2.1: error while loading shared libraries: liblrdf.so.2: cannot open shared object file: No such file or directory¨
apparently it has something to do with some path not set somewhere, but I don´t know exactly how to fix this.

ok, that could be possible.
here i have a file /etc/ld.so.conf
which by default was not working at all, but it looks now like:

/usr/share/qt3/lib
/usr/share/qt4/lib
/usr/local/lib
#/usr/local/lib/alsaplayer/interface
#/usr/local/lib/alsaplayer/output
#/usr/local/lib/alsaplayer/reader
#/usr/local/lib/alsaplayer/scopes
#/usr/local/lib/alsaplayer/input
#/usr/local/lib/ardour2
#/usr/local/lib/jack
#/usr/local/lib/ladspa
#/usr/local/lib/linuxsampler
#/usr/local/lib/linuxsampler/include
#/usr/local/lib/moc/decoder_plugins
#/usr/local/lib/mplayer/vidix
#/usr/local/lib/muse/plugins
#/usr/local/lib/muse/qtplugins/designer
#/usr/local/lib/muse/synthi
#/usr/local/lib/pkgconfig
#/usr/local/lib/SpiralPlugins
#/usr/local/lib/SuperCollider/plugins
#/usr/local/lib/swami
#/usr/local/lib/sweep
#/usr/local/lib/vhook
#/usr/local/lib/wine
#/usr/local/lib/yasm
/usr/lib
/usr/local/kde/lib
/lib
#/lib/iptables
#/lib/ocp-0.1.10_rc5
#/lib/security
#/lib/tls

include /etc/ld.so.conf.d/*.conf

i created this my self and commented out later, the stuff which is not so important for the machine to be able to compile.
anyway, you could make an update of the file which is now present at your machine, and than trying to manipulate it so, that the libraries will be found at compile/runtime.

after making some changes in this file, you have to run the program

‘ldconfig’

as root, for the changes for being applied.
this command is good to run anyway from time to time.

please run ‘locate ardour2’ in the console, to find out, where exactly ardour2(.1) stuff is installed in.

cheers,
doc

Hey, thanks for the help. I modified the /etc/ld.so.conf file with the new stuff, and now running Ardour2 works good. I will uninstall the old one with synaptic, and hey by the way, what happens when I want to recompile a newer version? How do I uninstall the previous (compiled) version and upgrade? Thanks again!

you don’t need to uninstall it - everything that needs to will be replaced by “scons install”

/J\

Ok, I upgraded my system to 64 bit, and reinstalled with 64 bit version of ubuntu studio. I then compiled ardour2.1 from source and am having some strange problems. When running as root, everything is dandy. However, I cannot run as a normal user. I’ve made some progress by modifying the ld.so.conf file and using chmod 777 on a bunch of files ardour wants to load, but when I try to start a new file or open an existing file, there are a bunch of GTK warnings, and an error message saying “cannot find icon image for tool_object.png”, and then the program shuts down. I installed as a user with “su scons” and then “su scons install”. Any suggestions? Thanks.

“su scons” will compile Ardour as root, so EVERY file created can only be used by root.

Use “scons” (without su) instead. You might have to remove the previous compiled version with “su scons -c”.

Ok, that would explain it. I ended up going through a whole bunch of files and doing chmod until I was able to run as a normal user, but I kept getting some gtk warning message (although I forget what it said). Anyhow, I’m back to 32 bit Ubuntu Studio (for now) and will reinstall ardour 2.1 from source soon. So I should run “scons”, and then “su scons install”? Or can I do “scons install” as a user? I guess I’ll post again if I run into problems. I’m still learning the whole compile from source thing (although I like it a lot). Cheers.

I haven’t read the whole thread but are you new to linux ? If so, be aware that there are areas of your filesystem that only the root user is able to modify.

By default, anything that is not /home/“user” would only be modified by root. The “su” utility can give you access to superuser’s priviledges if you are “allowed” to (i.e. you know the root password or anyone else’s passwords because su can also be invoked with a username that is not yours).

Anyway, to change the ownership of a whole directory and file tree, just sit at the top of the tree and type

su -c ‘chown -R user.group *’

where user is your username and group the group you belong to, which is likely to be the same name as your username. Once you have done that, every file and directory of that tree will belong to you. IF you want to make all of them have the “write” permission, then type the following :

chmod -R u+w *

You are adding write permission to every file and directory to the user only, i.e. you in this case.
I recommend you get one of these “unix in a nutshell” book if you don’t know much about unix.

hmm, i am not sure if thorgal is going to encourage someone who is new to linux to change the permissions of /usr/local/bin …/lib etc?

the right way is to run simple ‘scons’ and to install with ‘sudo scons install’ or ‘su (pswd) scons install’

cheers,
doc

p.s. but reading something to understand about the filesystem is really good!

Thanks for the help guys, I’m making slow but sure progress learning linux and how to compile and manipulate files. It’s more that I’m new to chmod rather than linux in general, but the -R option makes sense for a directory (recursive). I will learn more about fundamentals of administrating linux, but for now I just want to record my music! Again I appreciate all the help.

cheers,
eric

@nowhiskey

haha, no, I don’t encourage anyone to change the file permissions that were set by default in a standard linux/unix file tree. But I think that anything done in /home/user should belong to user, except if you are building kernel stuff which sometimes requires you to be root (if e.g. you’re using debian’s make-kpkg).
Anything elsewhere (system-wise), should belong to root (data partitions under / can belong to users, they’re not related to the OS core). Now, the ‘group’ ownership is a complete different story! that’s why it is complex and requires to read about unix filesystem tree in general.