Code::Blocks Forums

User forums => Help => Topic started by: Gublerian on March 15, 2010, 12:50:17 pm

Title: C::B Portable: libcodeblocks.so.0 error
Post by: Gublerian on March 15, 2010, 12:50:17 pm
I successfully compiled the last trunk release according to this manual: http://wiki.codeblocks.org/index.php?title=Installing_Code::Blocks_from_source_on_Linux#Code::Blocks_installation (http://wiki.codeblocks.org/index.php?title=Installing_Code::Blocks_from_source_on_Linux#Code::Blocks_installation)

I also wrote a script as described here: http://wiki.codeblocks.org/index.php?title=FAQ#Q:_How_do_I_make_Code::Blocks_portable.3F (http://wiki.codeblocks.org/index.php?title=FAQ#Q:_How_do_I_make_Code::Blocks_portable.3F)

When I run it I get the following error:
Code
codeblocks: error while loading shared libraries: libcodeblocks.so.0: cannot open shared object file: No such file or directory

I have seen the solution to this at the bottom of the first page (http://wiki.codeblocks.org/index.php?title=Installing_Code::Blocks_from_source_on_Linux#Resolving_issues (http://wiki.codeblocks.org/index.php?title=Installing_Code::Blocks_from_source_on_Linux#Resolving_issues))

But: As my intention is to create a portable version of Code Blocks, I can't do this on every computer I where I want to run Code Blocks because I'm not always root. I also think that the idea behind a portable edition is to run on every computer, without making changes to it.

I compiled width Ubuntu 9.10, but the portable version should run on any (normal) distribution.

What do you suggest to do? Do you know any other solution?

Thanks.
Title: Re: C::B Portable: libcodeblocks.so.0 error
Post by: MortenMacFly on March 15, 2010, 08:33:06 pm
Did you try the CODEBLOCKS_DATA_DIR command line switch / envvar?
Title: Re: C::B Portable: libcodeblocks.so.0 error
Post by: Jenna on March 15, 2010, 09:23:28 pm
Did you try the CODEBLOCKS_DATA_DIR command line switch / envvar?
I don't think that it will work, because it's an issue of linux not finding the dynamic lib.

I suggest using a shell-script to start C::B and dynamically set LD_LIBRARY_PATH to the dir libcodeblocks.so* (and the other so's) reside.
Should not be needed for the plugins so's.
Title: Re: C::B Portable: libcodeblocks.so.0 error
Post by: MortenMacFly on March 16, 2010, 06:45:19 am
Did you try the CODEBLOCKS_DATA_DIR command line switch / envvar?
I don't think that it will work, because it's an issue of linux not finding the dynamic lib.
Ah - sorry, that is correct.
Linux was the OS unable to self-relocate... right?! :lol: :lol: :lol:
Title: Re: C::B Portable: libcodeblocks.so.0 error
Post by: Gublerian on March 18, 2010, 02:21:03 pm
Quote
I suggest using a shell-script to start C::B and dynamically set LD_LIBRARY_PATH to the dir libcodeblocks.so* (and the other so's) reside.
Thanks for your quick reply. This works!

Now I have the next error:
Quote
error while loading shared libraries: libwx_gtk2u_richtext-2.8.so.0: cannot open shared object file: No such file or directory

I think this is because I didn't compile wxGTK. Instead I installed it with the package manager (on the system where I compiled Code Blocks). But on the target system wxGTK is not available (and I have no root rights). What do you suggest?
Atm I'm trying two things:

What do you think? Is this the right path?
Title: Re: C::B Portable: libcodeblocks.so.0 error
Post by: oBFusCATed on March 18, 2010, 03:43:38 pm
The most robust solution for your problem is to change the configuration of C::B to use static linking as much as possible.

All other solutions will fail here or there.

Another option is to compile and install wxGTK in your home dir in the target machine.

for example: ./configure --prefix=~/cb