Code::Blocks Forums

User forums => Help => Topic started by: minno on July 25, 2012, 10:00:13 pm

Title: How can I install Code::Blocks on Linux without root access?
Post by: minno on July 25, 2012, 10:00:13 pm
I've been following the wiki guide here (http://wiki.codeblocks.org/index.php?title=Installing_Code::Blocks_from_source_on_Linux), and I'm stuck on making wx.  I'm trying to install it on a computer where I don't have root access, so it fails when I try to use the command "make install", since it can't create the directory /opt/wx.  What do I have to change in the Makefile to be able to install it in my home directory instead?
Title: Re: How can I install Code::Blocks on Linux without root access?
Post by: Jenna on July 25, 2012, 10:04:37 pm
For wx you don't need make install, just make is enough.
If you use the wx-config created in the root of the build-directory, it will work.

For C::B you can use the --prefix= parameter if you run configure, to chose the base-directory of your installation.

By the way, this should also work for wxwidgets, but as written before it's not necessarily needed.
Title: Re: How can I install Code::Blocks on Linux without root access?
Post by: minno on July 25, 2012, 11:11:03 pm
For wx you don't need make install, just make is enough.
If you use the wx-config created in the root of the build-directory, it will work.

For C::B you can use the --prefix= parameter if you run configure, to chose the base-directory of your installation.

By the way, this should also work for wxwidgets, but as written before it's not necessarily needed.

I don't have much experience with Linux.  So you're saying that in the part of the guide where it says to do: "../config --stuff" followed by "make", I don't need to do the next two steps, "su" and "make install"?
Title: Re: How can I install Code::Blocks on Linux without root access?
Post by: Jenna on July 25, 2012, 11:29:36 pm
For wx you don't need make install, just make is enough.
If you use the wx-config created in the root of the build-directory, it will work.

For C::B you can use the --prefix= parameter if you run configure, to chose the base-directory of your installation.

By the way, this should also work for wxwidgets, but as written before it's not necessarily needed.

I don't have much experience with Linux.  So you're saying that in the part of the guide where it says to do: "../config --stuff" followed by "make", I don't need to do the next two steps, "su" and "make install"?
For wxWidgets : yes.
The only thing you need to do is call the wx-config in t the build-dir directly (with full or relative path) or add the path to it to your own PATH environment variable.
Title: Re: How can I install Code::Blocks on Linux without root access?
Post by: minno on July 27, 2012, 07:48:14 am
New problem:  I can't run the command "ldconfig" without root privileges.  Is there any workaround for this?  Is there a way that I can manually instruct the linker to look in the correct folders to find wx while I'm compiling codeblocks?
Title: Re: How can I install Code::Blocks on Linux without root access?
Post by: MortenMacFly on July 27, 2012, 08:14:43 am
New problem:  I can't run the command "ldconfig" without root privileges.  Is there any workaround for this?
I am not a Linux guy, but you can adopt the LD_LIBRARY path also via script file or shell startup-scripts. Have a look at the "run.sh" script that gets generated during the C::B build. Here, the LD_LIBRARY path is adopted so C::B finds its libraries (a.k.a. plugins). The same applies for wxWidgets or any other 3rd party lib, too IMHO.
Title: Re: How can I install Code::Blocks on Linux without root access?
Post by: Jenna on July 27, 2012, 11:20:48 am
Normally you don't need to tweak ldconfig, automake and libtooll link and install fine, so C::B can be used without running ldconfig.
At least on all my linux boxes (Fedora, Debian, Mint, Uubuntu, CentOS).