D.gnu - Installing GDC to home directory?
- dsimcha (3/3) Aug 14 2011 Is there an easy way to compile and install GDC + Phobos, druntime and a...
- Johannes Pfau (7/10) Aug 14 2011 I think you could just change the "--prefix=/opt/gdc" to
- Iain Buclaw (7/15) Aug 14 2011 --prefix is hard coded into the application, DESTDIR is post installatio...
- dsimcha (2/17) Aug 15 2011 Works great, thanks.
- Vijay Nayar (18/27) Aug 15 2011 The '--prefix="/usr"' options tells the compiled program where it will
- Trass3r (2/12) Aug 15 2011 How would you configure it to create a dmd like package that can be
- Iain Buclaw (3/17) Aug 15 2011 You can extract it anywhere. Just make sure that the gdc /bin directory ...
- Vijay Nayar (30/45) Aug 19 2011 Sorry about the late reply. Traditionally, if you have a standard
Is there an easy way to compile and install GDC + Phobos, druntime and a few custom libraries to your home directory on a machine that you don't have root access to?
Aug 14 2011
dsimcha wrote:Is there an easy way to compile and install GDC + Phobos, druntime and a few custom libraries to your home directory on a machine that you don't have root access to?I think you could just change the "--prefix=/opt/gdc" to "--prefix=/home/dsimcha/gdc" and it should work. Or you could use --prefix="/usr" and 'DESTDIR="/home/dsimcha" make install', I never understood the difference between prefix and DESTDIR. -- Johannes Pfau
Aug 14 2011
== Quote from Johannes Pfau (spam example.com)'s articledsimcha wrote:--prefix is hard coded into the application, DESTDIR is post installation (make installs ie: gdc to $(DESTDIR)$(prefix)/bin). If installing in your home directory, you can get away with configuring with --prefix=/gdc and installing with DESTDIR=$HOME/apps - alter as needed. Regards IainIs there an easy way to compile and install GDC + Phobos, druntime and a few custom libraries to your home directory on a machine that you don't have root access to?I think you could just change the "--prefix=/opt/gdc" to "--prefix=/home/dsimcha/gdc" and it should work. Or you could use --prefix="/usr" and 'DESTDIR="/home/dsimcha" make install', I never understood the difference between prefix and DESTDIR.
Aug 14 2011
== Quote from Iain Buclaw (ibuclaw ubuntu.com)'s article== Quote from Johannes Pfau (spam example.com)'s articleWorks great, thanks.dsimcha wrote:--prefix is hard coded into the application, DESTDIR is post installation (make installs ie: gdc to $(DESTDIR)$(prefix)/bin). If installing in your home directory, you can get away with configuring with --prefix=/gdc and installing with DESTDIR=$HOME/apps - alter as needed. Regards IainIs there an easy way to compile and install GDC + Phobos, druntime and a few custom libraries to your home directory on a machine that you don't have root access to?I think you could just change the "--prefix=/opt/gdc" to "--prefix=/home/dsimcha/gdc" and it should work. Or you could use --prefix="/usr" and 'DESTDIR="/home/dsimcha" make install', I never understood the difference between prefix and DESTDIR.
Aug 15 2011
On Mon, 15 Aug 2011 07:23:02 +0200, Johannes Pfau wrote:dsimcha wrote:The '--prefix="/usr"' options tells the compiled program where it will search for libraries, other binaries, data files, and other information when it runs. The 'DESTDIR="/home/dsimcha"' option tells the compiler to dump the output files in the specified directory. Why is this useful? Mostly it is useful if you are compiling a binary for other people to use, but don't want to wreck your local environment. For example, if I am creating a binary .deb or .rpm, I can compile everything I want so that it expects to run in '/usr' (prefix), but dump the files in '/home/vnayar/myproject/rpm' (DESTDIR). After I run my command, I'll have stuff like: /home/vnayar/myproject/rpm/ + usr/bin/mybin + usr/share/mydata + usr/lib/libmine.so And after I wrap all that up in a .deb package, and someone else installs it, they will have binaries ready to go in /usr/bin, etc.Is there an easy way to compile and install GDC + Phobos, druntime and a few custom libraries to your home directory on a machine that you don't have root access to?I think you could just change the "--prefix=/opt/gdc" to "--prefix=/home/dsimcha/gdc" and it should work. Or you could use --prefix="/usr" and 'DESTDIR="/home/dsimcha" make install', I never understood the difference between prefix and DESTDIR.
Aug 15 2011
For example, if I am creating a binary .deb or .rpm, I can compile everything I want so that it expects to run in '/usr' (prefix), but dump the files in '/home/vnayar/myproject/rpm' (DESTDIR). After I run my command, I'll have stuff like: /home/vnayar/myproject/rpm/ + usr/bin/mybin + usr/share/mydata + usr/lib/libmine.so And after I wrap all that up in a .deb package, and someone else installs it, they will have binaries ready to go in /usr/bin, etc.How would you configure it to create a dmd like package that can be extracted anywhere?
Aug 15 2011
== Quote from Trass3r (un known.com)'s articleYou can extract it anywhere. Just make sure that the gdc /bin directory is in your $PATH.For example, if I am creating a binary .deb or .rpm, I can compile everything I want so that it expects to run in '/usr' (prefix), but dump the files in '/home/vnayar/myproject/rpm' (DESTDIR). After I run my command, I'll have stuff like: /home/vnayar/myproject/rpm/ + usr/bin/mybin + usr/share/mydata + usr/lib/libmine.so And after I wrap all that up in a .deb package, and someone else installs it, they will have binaries ready to go in /usr/bin, etc.How would you configure it to create a dmd like package that can be extracted anywhere?
Aug 15 2011
On Tue, 16 Aug 2011 00:32:06 +0200, Trass3r wrote:Sorry about the late reply. Traditionally, if you have a standard autotools project, and you do not have permissions to override system files, you create subdirectories that you use locally and put them in your path. I use a directory structure like this: /home/vnayar/bin /home/vnayar/lib /home/vnayar/share To install software to, and have it expect to run from, your local directory, compile it like so: $ cd my-program-0.1 $ ./configure --prefix=$HOME $ make ; make install To run these commands by default when you enter them in the prompt, you'll want to set up your PATH settings. For example, if you use Bash as your shell there is usually a file called ".bashrc" or ".profile" in your home directory that is read when the shell first loads. You can add an entry to the shell environment variable "PATH" by adding the following line to the bottom of the file: export PATH=$HOME/bin:$PATH The PATH environment variable is searched left to right, so this means, "Look for executables in $HOME/bin before looking in the normal places." So if you install your own personal 'gcc', it will be loaded instead of the one in /usr/bin/gcc. You can manually load your new changes using the command "source ~/.profile". To check what executable will be run for a particular command, use 'which', e.g. "which gcc" outputs "/usr/bin/gcc" for me. - VijayFor example, if I am creating a binary .deb or .rpm, I can compile everything I want so that it expects to run in '/usr' (prefix), but dump the files in '/home/vnayar/myproject/rpm' (DESTDIR). After I run my command, I'll have stuff like: /home/vnayar/myproject/rpm/ + usr/bin/mybin + usr/share/mydata + usr/lib/libmine.so And after I wrap all that up in a .deb package, and someone else installs it, they will have binaries ready to go in /usr/bin, etc.How would you configure it to create a dmd like package that can be extracted anywhere?
Aug 19 2011