News:

Accounts with zero posts and zero activity during the last months will be deleted periodically to fight SPAM!

Main Menu

How can I install Code::Blocks on Linux without root access?

Started by minno, July 25, 2012, 10:00:13 PM

Previous topic - Next topic

minno

I've been following the wiki guide here, 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?

Jenna

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.

minno

Quote from: jens 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.

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"?

Jenna

Quote from: minno on July 25, 2012, 11:11:03 PM
Quote from: jens 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.

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.

minno

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?

MortenMacFly

Quote from: 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?
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.
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: [url="https://www.codeblocks.org/docs/main_codeblocks_en.html"]https://www.codeblocks.org/docs/main_codeblocks_en.html[/url]
C::B FAQ: [url="https://wiki.codeblocks.org/index.php?title=FAQ"]https://wiki.codeblocks.org/index.php?title=FAQ[/url]

Jenna

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).