Author Topic: I can't run Codeblocks  (Read 22269 times)

Offline Mentos

  • Single posting newcomer
  • *
  • Posts: 3
I can't run Codeblocks
« on: November 17, 2009, 12:39:56 pm »
Hi!
I use Opensuse 11.2 x64. I have installed Codeblocks and when i try to run it, i get this error: codeblocks: relocation error: /usr/lib64/libcodeblocks.so.0: symbol _Z18wxSafeConvertWX2MBPKw, version WXU_2.8.2 not defined in file libwx_baseu-2.8.so.0 with link time reference
. What do i have to do?
Thanks

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7255
Re: I can't run Codeblocks
« Reply #1 on: November 17, 2009, 12:52:21 pm »
Where did you get your C::B from ?

Seems that openSuse supplies a wxWidgets-library, that is not compatible with the one your C::B is linked against.

Offline Mentos

  • Single posting newcomer
  • *
  • Posts: 3

kurtis99

  • Guest
Re: I can't run Codeblocks
« Reply #3 on: November 17, 2009, 06:02:54 pm »
same problem!
I use Ubuntu 9.10
Code
mike@myHome:~$ codeblocks 
codeblocks: relocation error: /usr/lib/libcodeblocks.so.0: symbol _Z18wxSafeConvertWX2MBPKw, version WXU_2.8.2 not defined in file libwx_baseu-2.8.so.0 with link time reference
but if I run codeblocks with -d gui starts, but build (F5) fails with same error message
Code
mike@myHome:~$ codeblocks -d

i got my code::blocks from nightly build (in this http://apt.jenslody.de/ debian repository)
« Last Edit: November 17, 2009, 06:05:11 pm by kurtis99 »

Offline Mentos

  • Single posting newcomer
  • *
  • Posts: 3
Re: I can't run Codeblocks
« Reply #4 on: November 17, 2009, 06:29:08 pm »
if i write codeblocks -d, CB begins but there are these errors: /usr/lib64/codeblocks/plugins/libdebugger.so: not loaded (missing symbols?)
/usr/lib64/codeblocks/plugins/libcodesnippets.so: not loaded (missing symbols?)
/usr/lib64/codeblocks/plugins/libcompiler.so: not loaded (missing symbols?)
/usr/lib64/codeblocks/plugins/libIncrementalSearch.so: not loaded (missing symbols?)

Offline koso

  • Multiple posting newcomer
  • *
  • Posts: 58
Re: I can't run Codeblocks
« Reply #5 on: November 17, 2009, 06:57:06 pm »
Easiest for both of you is to build it on your own. You need only to build C::B agains binary distributed wx libraries from your repositories. It is queit easy if you have all needed development packages and standard build tools -> more info on cb wiki page.

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7255
Re: I can't run Codeblocks
« Reply #6 on: November 17, 2009, 09:10:16 pm »
i got my code::blocks from nightly build (in this http://apt.jenslody.de/ debian repository)

I build for debian, and the packages, so I can not link against the wxWidgets libs provided by ubuntu, but you can use the packages from pasgui's repo:
see http://forums.codeblocks.org/index.php/topic,11504.msg78403.html#msg78403.

In my opinion it's not a C::B problem if either pacjkages that are not made for distro have problems, or if packages made for a distro (like the openSUse packages) just not run.

The package maintainers have to fix this,  devs can't do anything here.

I only tested build on ubuntu 9.10 and it works fine, if linked against the ubuntu-version of wxwidgets, but does not run, if linked against the version from apt.wxwidgets.org.

I will test it on openSuse 11.2 soon (I installed it in a kvm-virtual machine this afternoon).

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7255
Re: I can't run Codeblocks
« Reply #7 on: November 18, 2009, 11:13:10 am »
openSuse 11.2 always runs without errors with C::B from this repo: http://download.opensuse.org/repositories/devel:/tools:/ide/openSUSE_11.2/ .
All system software updated (C::B version is 5919).

Offline froff

  • Multiple posting newcomer
  • *
  • Posts: 16
Re: I can't run Codeblocks
« Reply #8 on: December 20, 2009, 11:57:05 pm »
Quote
I only tested build on ubuntu 9.10 and it works fine, if linked against the ubuntu-version of wxwidgets, but does not run, if linked against the version from apt.wxwidgets.org.

Hello
c::b does not work with ubuntu-version of wxwidgets (2.8.10-0ubuntu1). So installed wxwidgeds from wxwidgeds repository and now have both. But c::b still tries to use those from ubuntu repository. How to force it to use another library?

« Last Edit: December 21, 2009, 07:42:58 pm by froff »

Offline froff

  • Multiple posting newcomer
  • *
  • Posts: 16
Re: I can't run Codeblocks
« Reply #9 on: December 22, 2009, 08:55:11 am »
Heh
I decided to try compilation.
After a long struggle I successfully compiled version froma svn.
But It still does not work !!!!!! - the same problem.

Moreover: removed everything, and turned back old version from ubuntu repo.
The same problem. But before I decided to upgrade from Your repository (and later to compile by myself)
version from ubuntu repo worked well!
I'm under desperate. :(

I think It's good idea to deeply investigate this problem. Ubuntu is one of the major distros and I can see a lot of people have the same problem.

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7255
Re: I can't run Codeblocks
« Reply #10 on: December 22, 2009, 09:39:49 am »
First question:
Did you try pasgui's packages ?
http://forums.codeblocks.org/index.php/topic,11504.msg78403.html#msg78403

I think It's good idea to deeply investigate this problem. Ubuntu is one of the major distros and I can see a lot of people have the same problem.

It's up to ubuntu to fix this in my opinion.
They supply a version of wxWidgets-libs, that is not compatible to the one supplied by the wxWidgets-guys themselves.

Debian has an own version of wxWidgets 2.8.10 in their (unstable) repos and that works with C::B compiled and linked with/against wxWidgets from apt.wxwidgets.org, so there must be a difference between both versions.

If I remember right I read something about this issue on the Ubuntu bug-tracker or in a mailing list (the first version they supplied had the same error as far as I know).

If you compile from svn, make sure you have only one version of wxWidgets 2.8.10 on your system, either remove everything coming from apt.wxwidgets.org or all the ubuntu-packages (in this case you have to force the use of the apt.wxwidgets.org packages), make sure, wx-config points to the correct install (wx-config --list), run make clean before running ./configure ..., make sure (of course) there aren't any parts of C::B left in system, except the conf-files in ~/.codeblocks, they should not harm (at least not in this way).
If you install C::B to another prefix than /usr, you might need to run ldconfig after installation, see here fore details: http://wiki.codeblocks.org/index.php?title=Compiling_Code::Blocks_in_Linux_%28applies_to_all_distros%29#Resolving_issues .


And of coures: my C::B packages are compiled on and for debian, they used to work on ubuntu too, unless the ubuntu maintainers break the compatibility of wxWidgets.
If I get a faster internet-connection at home (just ISDN at the moment, it should come at the beginning of september, but they did not say which year  :( ), I probably will supply special packages for all debian flavours, and probably also for ubuntu, or at least for the broken distros (but this depends of the spare time I have).

kurtis99

  • Guest
Re: I can't run Codeblocks
« Reply #11 on: December 22, 2009, 01:38:17 pm »
I think I found solution for my problem (maybe it will help to somebody).
There was 3 versions of libwxbase2.8-0 package installed on my system, and "active" was version from ubuntu (2.8.10.1-0ubuntu1 (karmic)), so then i found this package in synaptic, pressed Ctrl+E and choose version from jens repository (2.8.10.1-0 (lenny-wx)).

Offline froff

  • Multiple posting newcomer
  • *
  • Posts: 16
Re: I can't run Codeblocks
« Reply #12 on: December 22, 2009, 08:08:58 pm »
BINGO kurtis99 :)
Now 5911 works perfectly;
Next I'm going to try latest from svn.

Thank's a lot!

Offline fabi545

  • Single posting newcomer
  • *
  • Posts: 3
Re: I can't run Codeblocks
« Reply #13 on: December 22, 2009, 11:03:39 pm »
I have the same Problem :(

But all thees tips doesn't help me :(

Have you got any other ideas?

//Sorry for my bad English

Offline froff

  • Multiple posting newcomer
  • *
  • Posts: 16
Re: I can't run Codeblocks
« Reply #14 on: December 23, 2009, 09:07:53 am »
What version are you trying to run?
You should downgrade libwxbase _after_ c::b installation. Probably when installing c::b it turns it back to most recent version from ubuntu repository (I'm not sure).
Try to _complete_ uninstall existing c::b and install 5911 from jens repo (recommended - old official 8.02 has some annoying bugs).
Next downgrade libwxbase to version from wxwidgets repository.

good luck!

Offline fabi545

  • Single posting newcomer
  • *
  • Posts: 3
Re: I can't run Codeblocks
« Reply #15 on: December 23, 2009, 10:24:32 am »
where can i downgrade libwxbase?

in the Software management I can't find it  :?

Offline Sowaco

  • Single posting newcomer
  • *
  • Posts: 4
Re: I can't run Codeblocks
« Reply #16 on: December 23, 2009, 10:57:03 am »
I also have had problems to install Codeblocks on Ubuntu (Karmic).

I have tried to use Jens packets without success.  So I switched to "http://lgp203.free.fr/ubuntu/".

Here are my the steps to fix all the problems:

Remove all 'old' packages:

Code
sudo apt-get remove build-essential gdb
sudo apt-get remove libwxgtk2.8-0 libwxgtk2.8-dev wx2.8-headers wx2.8-doc
sudo apt-get remove libwxgtk2.6-0 libwxgtk2.6-dev wx2.6-headers wx2.6-doc
sudo apt-get remove wx-common
sudo apt-get autoremove

Use synaptic, search for wx* lib's and remove them.

Code
sudo synaptic

Insert the "lgp203.free.fr" - Repository into sources.list.

Start an editor:

Code
sudo nano /etc/apt/sources.list

Insert following lines, save and exit.

Code
##CodeBlocks
deb http://lgp203.free.fr/ubuntu karmic universe
deb-src http://lgp203.free.fr/ubuntu karmic universe
deb http://lgp203.free.fr/ubuntu karmic unstable
deb-src http://lgp203.free.fr/ubuntu karmic unstable

Update list.

Code
sudo apt-get update

Import key for the repository.

Code
wget -q http://lgp203.free.fr/public.key -O- | sudo apt-key add -

Again some cleanups.

Code
sudo apt-get autoremove

Install everything.

Code
sudo apt-get install build-essential
sudo apt-get install gdb

sudo apt-get install libcodeblocks0 codeblocks libwxsmithlib0 codeblocks-contrib
sudo apt-get install libwxgtk2.8-0 libwxgtk2.8-dev wx2.8-headers wx-common

Now, Codeblocks should start.

Code
codeblocks

After these steps, everything works fine....


Regards
  Andreas

Offline fabi545

  • Single posting newcomer
  • *
  • Posts: 3
Re: I can't run Codeblocks
« Reply #17 on: December 23, 2009, 11:07:59 am »
But I have OpenSUSE so I can't use apt-get :(
« Last Edit: December 23, 2009, 11:14:28 am by fabi545 »

Offline froff

  • Multiple posting newcomer
  • *
  • Posts: 16
Re: I can't run Codeblocks
« Reply #18 on: December 23, 2009, 01:10:38 pm »
fabi545
start synaptic, select package and press Ctrl+E or select "Force version" from main menu.
You have to be connected to wxwidgets repository first to see their version in synaptic.
Select it and apply changes. Synaptic will show information, that packae will be downgraded.


Uh... suse.
Probably you don't have synaptic :)
See documentation how to force package version in suse.

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7255
Re: I can't run Codeblocks
« Reply #19 on: December 23, 2009, 01:15:57 pm »
Does synaptic exist for OpenSUSE ?
I don't think so.

openSuse 11.2 always runs without errors with C::B from this repo: http://download.opensuse.org/repositories/devel:/tools:/ide/openSUSE_11.2/ .
All system software updated (C::B version is 5919).

Does this not work ?

Search for wxGTK and and probably wxGTK-devel, I don't know the exact names at the moment.
Maybe I find the time later (this evening ?) to start my virtual OpenSUSE machine, to look how the packages are called exactly, and which versions I have installed.

Offline jabahpureza

  • Single posting newcomer
  • *
  • Posts: 2
Re: I can't run Codeblocks
« Reply #20 on: June 09, 2010, 01:01:37 am »
After these steps, everything works fine....

Regards
  Andreas

your instructions worked perfectly here. (Ubuntu 9.10 amd64)
Thank you very much!
jjR

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7255
Re: I can't run Codeblocks
« Reply #21 on: June 09, 2010, 09:29:33 am »
Hi guys

I also got the problem

codeblocks: relocation error: /usr/lib/libcodeblocks.so.0: symbol _ZN13wxAuiNotebook7SetFontERK6wxFont, version WXU_2.8.5 not defined in file libwx_gtk2u_aui-2.8.so.0 with link time reference

My linux is : Ubuntu 10.04LTS.
How can I solve the problem? how to find  jens repo?
Thanks
Please do not cross-post !
I gave you a hint in the thread you started with the same question.