views:

44

answers:

2

Usually every time `make install' is run, files are not put in a specific directory like /usr/prog1. Instead, the files are put in directories where files from other programs are already in like /usr/lib and /usr/bin. I believe this has been a common practice since long time ago. This practice surely increases the probability of file name collision.

Since my googling returned no good discussion on this matter, I am wondering what people do to manage the file name collision? Do they simply try this or that name and if something goes wrong, a bug is filed by the user and the developer picks another name? Or, do they simply prefix the names of their files? Anyone is aware of a good discussion on this matter?

+2  A: 

Usually when compiling programs, you can usually specify a prefix path like this: ./configure --prefix=/usr/local/prog1 or ./configure --prefix=/opt/prog1 (whether you use /usr/local or /opt doesn't really matter). Then when running make install it'll put the files in the specified prefix path. You can then either 1) add /opt/prog1/bin/ to your PATH or you can make a symlink to the executable file in /usr/local/bin which should already be in your PATH.

Best thing is to use your distributions package manager though.

Daniel Egeberg
+4  A: 

Usually people choose the name they want and if something collides then the problem gets resolved by the distribution. That's what happened with ack (ack in Debian, Kanji converter) and ack (ack-grep in Debian, text search utility).

Collisions don't seem to be that common though. A quick web search should tell you if the name is used somewhere. If it's not searcheable, it's probably not included in many distributions and that means you're not likely to actually conflict.

viraptor
A collision can occur if you want to install multiple versions of the *same* program though.
Daniel Egeberg
Then you're most probably doing that for some specific reason. Most "big version" changes can coexist (like `php4` and `php5`) in popular distros. Libraries have a known versioning solution for both major and minor versions. If you need to recompile yourself and maintain many versions concurrently, have a look at `nixos` which can do that, or simply install into `/opt/software-version`
viraptor