codeblocs error after upgrading to Ubuntu Karmic

hi

i just upgraded to karmic and now i get this when i run codeblocks.

$ 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

i have resintalled codeblocks with the OF ubuntu script and with aptitude with same result.

is anyone having similar issues? The error seems to come from wxwidgets.

thanks

enrike

just posted this in another thread, but just in case:

yes the install_codeblocks script is broken in karmic.the wx-widgets repositories are not updated frequently for ubuntu but normally it worked with hardy. here’s a new one that checks what repositories are available and chooses the newest one although just changing to jaunty is enough.

also you’re going to get an error with the libraries module in codeblocks:

the problem with the libraries is actually a problem with the output in pkg-config. try:

pkg-config --list-all

surely you will get an error at the end of the list. codeblocks is parsing that output and gets confused by it. normally the error is related to some missing packages. in a fresh install of karmic i’m getting:

Package libdrm was not found in the pkg-config search path.

so to solve it:

sudo apt-get install libdrm-dev

install_codeblocks.sh.zip

same problem

$ 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

I did pkg-config --list-all and yes the problem with libdrm was there this was solved by installing libdrm-dev, then i downloaded and run the install codeblocks script but i get the same problem. I removed codeblocks and run again the script just in case.

— edit —

this is the output of the scripts just in case. but everything seems normal to me. maybe i have to reinstall wx

$ sudo ./install_codeblocks.sh
OK
OK
Hit http://lgp203.free.fr karmic Release.gpg
Hit http://security.ubuntu.com karmic-security Release.gpg
Ign http://security.ubuntu.com karmic-security/main Translation-en_GB
Ign http://security.ubuntu.com karmic-security/restricted Translation-en_GB
Hit http://archive.canonical.com karmic Release.gpg
Ign http://archive.canonical.com karmic/partner Translation-en_GB
Ign http://security.ubuntu.com karmic-security/universe Translation-en_GB
Ign http://security.ubuntu.com karmic-security/multiverse Translation-en_GB
Hit http://security.ubuntu.com karmic-security Release
Ign http://lgp203.free.fr karmic/universe Translation-en_GB
Hit http://archive.canonical.com karmic Release
Hit http://security.ubuntu.com karmic-security/main Packages
Hit http://archive.canonical.com karmic/partner Packages
Hit http://security.ubuntu.com karmic-security/restricted Packages
Hit http://security.ubuntu.com karmic-security/main Sources
Hit http://security.ubuntu.com karmic-security/restricted Sources
Hit http://security.ubuntu.com karmic-security/universe Packages
Hit http://archive.canonical.com karmic/partner Sources
Hit http://security.ubuntu.com karmic-security/universe Sources
Hit http://security.ubuntu.com karmic-security/multiverse Packages
Hit http://security.ubuntu.com karmic-security/multiverse Sources
Hit http://lgp203.free.fr karmic Release
Hit http://lgp203.free.fr karmic/universe Packages
Hit http://apt.wxwidgets.org jaunty-wx Release.gpg
Ign http://apt.wxwidgets.org jaunty-wx/main Translation-en_GB
Hit http://apt.wxwidgets.org jaunty-wx Release
Hit http://es.archive.ubuntu.com karmic Release.gpg
Hit http://apt.wxwidgets.org jaunty-wx/main Packages
Get: 1 http://es.archive.ubuntu.com karmic/main Translation-en_GB [63.7kB]
Get: 2 http://es.archive.ubuntu.com karmic/restricted Translation-en_GB [3,402B]
Get: 3 http://es.archive.ubuntu.com karmic/universe Translation-en_GB [33.2kB]
Get: 4 http://es.archive.ubuntu.com karmic/multiverse Translation-en_GB [43.8kB]
Hit http://es.archive.ubuntu.com karmic-updates Release.gpg
Ign http://es.archive.ubuntu.com karmic-updates/main Translation-en_GB
Ign http://es.archive.ubuntu.com karmic-updates/restricted Translation-en_GB
Ign http://es.archive.ubuntu.com karmic-updates/universe Translation-en_GB
Ign http://es.archive.ubuntu.com karmic-updates/multiverse Translation-en_GB
Hit http://es.archive.ubuntu.com karmic-backports Release.gpg
Ign http://es.archive.ubuntu.com karmic-backports/main Translation-en_GB
Ign http://es.archive.ubuntu.com karmic-backports/restricted Translation-en_GB
Ign http://es.archive.ubuntu.com karmic-backports/universe Translation-en_GB
Ign http://es.archive.ubuntu.com karmic-backports/multiverse Translation-en_GB
Hit http://es.archive.ubuntu.com karmic-proposed Release.gpg
Ign http://es.archive.ubuntu.com karmic-proposed/restricted Translation-en_GB
Ign http://es.archive.ubuntu.com karmic-proposed/main Translation-en_GB
Ign http://es.archive.ubuntu.com karmic-proposed/multiverse Translation-en_GB
Ign http://es.archive.ubuntu.com karmic-proposed/universe Translation-en_GB
Hit http://es.archive.ubuntu.com karmic Release
Hit http://es.archive.ubuntu.com karmic-updates Release
Hit http://es.archive.ubuntu.com karmic-backports Release
Hit http://es.archive.ubuntu.com karmic-proposed Release
Hit http://es.archive.ubuntu.com karmic/main Packages
Hit http://es.archive.ubuntu.com karmic/restricted Packages
Hit http://es.archive.ubuntu.com karmic/main Sources
Hit http://es.archive.ubuntu.com karmic/restricted Sources
Hit http://es.archive.ubuntu.com karmic/universe Packages
Hit http://es.archive.ubuntu.com karmic/universe Sources
Hit http://es.archive.ubuntu.com karmic/multiverse Packages
Hit http://es.archive.ubuntu.com karmic/multiverse Sources
Hit http://es.archive.ubuntu.com karmic-updates/main Packages
Hit http://es.archive.ubuntu.com karmic-updates/restricted Packages
Hit http://es.archive.ubuntu.com karmic-updates/main Sources
Hit http://es.archive.ubuntu.com karmic-updates/restricted Sources
Hit http://es.archive.ubuntu.com karmic-updates/universe Packages
Hit http://es.archive.ubuntu.com karmic-updates/universe Sources
Hit http://es.archive.ubuntu.com karmic-updates/multiverse Packages
Hit http://es.archive.ubuntu.com karmic-updates/multiverse Sources
Hit http://es.archive.ubuntu.com karmic-backports/main Packages
Hit http://es.archive.ubuntu.com karmic-backports/restricted Packages
Hit http://es.archive.ubuntu.com karmic-backports/universe Packages
Hit http://es.archive.ubuntu.com karmic-backports/multiverse Packages
Hit http://es.archive.ubuntu.com karmic-proposed/restricted Packages
Hit http://es.archive.ubuntu.com karmic-proposed/main Packages
Hit http://es.archive.ubuntu.com karmic-proposed/multiverse Packages
Hit http://es.archive.ubuntu.com karmic-proposed/universe Packages
Fetched 144kB in 28s (5,006B/s)
Reading package lists… Done
Reading package lists… Done
Building dependency tree
Reading state information… Done
libcodeblocks0 is already the newest version.
codeblocks is already the newest version.
libwxsmithlib0 is already the newest version.
codeblocks-contrib is already the newest version.
libwxgtk2.8-0 is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 13 not upgraded.

ok i solved it. i started up synaptic and saw there were two wxwidgets packages to be upgraded. When I tried to upgrade them there was an error with python-wxgtk package

E: /var/cache/apt/archives/python-wxgtk2.8_2.8.10.1-1_i386.deb: trying to overwrite ‘/usr/share/pyshared/wx-2.8-gtk2-unicode/wxversion.py’, which is also in package python-wxversion 0

I tried few things with no luck, i am not good at this package installing science :wink: So I ended up trying to install it with aptitude which sometimes seems to deal better with this kind of problems, and this worked. So now CodeBlocks is up and runnign again.

thanks!

I followed arturo’s instructions and ran

  
  
sudo apt-get install libdrm-dev  

followed by running the new script. This resulted in the same error altern had, doing the following fixed it:

  
sudo apt-get update  
sudo apt-get upgrade  

this then installed the libwxgtk2.8-0 package which then enabled codeblocks to run.

However now I’m having problems both with the movieGrabberExample and moviePlayerExample. The grabber fails to find my build in camera (probably identical to yours arturo), and the fingers.mov file plays, but the output looks corrupted and it eventually segfauls. I can run cheese successfully, haven’t tried ucview.

The grabber fails to find my build in camera (probably identical to yours arturo

my computer died so can’t try with that camera : (

are you trying with unicap or gstreamer?

i’ve found a problem with the videoplayer in karmic as by default gstreamer uses now rgba, so you need to specify the depth in the pipeline. i have it working. going to pack it and upload it.

my codeblocks even didn’t start after i installed a fresh karmic 32bit.

this solved my problem:

just add deb http://apt.wxwidgets.org/ jaunty-wx main
to your software soruces and do a update & upgrade.

got it from here: http://forums.codeblocks.org/index.php?-…-1.msg77976

@arturo:

the problem is that da install_dependencies.sh still want to install the old hardy stuff:
line from the file:
WX_DEB=“deb http://apt.wxwidgets.org/ hardy-wx main”

/edit/

just got some errors with my fresh installation:
i also need the libunicap-dev package and the gstreamer0.10-ffmpeg package to start the movieplayer example.
i think you should add this to the install_dependencies.sh script or think about to change to a more free video format?!

benben, you will find that arturo already included a new codeblocks install script in this thread which fixes that problem.

i’m sorry, didn’t noticed that one. but its good when its already fixed! :slight_smile:

I just upgrade some packages and I’m getting this error again:

relocation error: /usr/lib/libcodeblocks.so.0: symbol _Z18wxSafeConvertWX2MBPKw, version WXU_2.8 not defined in file libwx_baseu-2.8.so.0 with link time reference

Can’t seem to fix it this time…I think I’m going to have to compile CB from source which is annoying. Looks like codeblocks is not up to date with the latest wxwidgets library in Karmic.

try in synaptic preferences > distribution: always prefer: jaunty-wx

that will make all wx-widgets related packages to be installed from the wx repositories instead of the ubuntu one.

then update & upgrade to change the packages to the original ones.

i’m looking for a way of doing this automatically from the script

I switched to wx-jaunty in Synaptic > Settings > Preferences > Distribution > ‘Prefer versions from’… ran sudo apt-get update then sudo apt-get upgrade, and no luck. It doesn’t seem to think anything needs upgrading. Same if I run install_depencies.sh or sudo apt-get install libdrm-dev - it thinks everything already has the latest versions, so it doesn’t need to worry.

(still get the same error when I run codeblocks)

Unfortunately that didn’t work for me either…I had to install codeblocks from source.

same for me. tried arturo’s workaround, but that didn’t help, too :frowning:

/edit/

see the karmic thread

You mean this thread?

http://forum.openframeworks.cc/t/karmic-package/2791/0

…Still getting the same

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

can you try setting jaunty-wx as preferred repo and doing the update & upgrade from synaptic instead of command line?

if it doesn’t recognize any new versions, uninstall codeblocks, apt-get autoremove and then reinstall from synaptic

oh dear, curses and double curses! I had codeblocks working fine with arturo’s file that is the wx-widgets from jaunty-wx. Then I clicked on the karmic upgrade without looking at which packages it wanted to upgrade and now I have the same problem as Oolong.

I ran the install-codeblocks.sh script again modified with --reinstall as an option in the apt-get install just for good measure.

I still have the problem.

I will dig around a bit but if anyone has a quick recipe I would be most grateful.

I see in synaptic that if I choose libwxbase2.8-0 and I choose Packages->Force Version, I can choose which version will be used. I have three in the list, the karmic default one, and the jaunty-wx 2.8.10-0 and also a jaunty-wx 2.6.10-1 one. I tried both the jaunty-wx ones and they didn’t work.

uninstall and reinstall of codeblocks is not working either

aaargh so confusing, now I forced the libwxbase2.8 and libwxgtk2.8 to use the karmic repository version and codeblocks works again.

this is the solution that worked for me, i added the source list that benben posted about here:
http://forum.openframeworks.cc/t/codeblocs-error-after-upgrading-to-ubuntu-karmic/2784/0

and when i checked my libwxbase2.8-0 package in synaptic , i had these packages available for me to force:

2.8.10.1-1 (jaunty-wx)
2.8.10.1-0ubuntu1 (karmic)
2.8.10.1-0 (jaunty-wx)
2.8.10.1-0 (hardy-wx)
2.8.9.2-1 (hardy-wx)
2.8.8.1-0 (hardy-wx)

and i force the 2.8.10.1-0ubuntu1 (karmic) version (even if i was warned it would be a downgrade) and now codeblocks works again! :smiley:

otherwise it doesn’t seem i need to touch libwxgtk2.8

Same here - forcing “2.8.10.1-0ubuntu1 (karmic)” in Synaptic solved the launch problem for me as well.
Thanks for posting!