Ubuntu 8.04 + Codeblocks troubles

pretty inexperienced both in coding and linux so please be patient :oops:

followed these http://forum.openframeworks.cc/t/installing-codeblocks-8.02-in-ubuntu-8.04-hardy-heron/727/0 instructions and codeblocks apparently installed ok (terminal output here http://squerk.org/temp/cb-install-terminal00.txt … svn build rev 5195). then i tried tried running:

  • example projects in of_preRelease_v0.05_linux_cb_FAT
  • some of Chris Sugrue’s codeblocks projects

and i get console error messages. more on this in a bit, first a question:

the text in these console messages is different from the build log in the codeblocks window… is there any way to copy it to clipboard or a file it’s stored in? ctrl+c closes the console window (so does shift+ctrl+c)

i’ll type the error in here for now:

“error while loading shared libraries: libavcodec.so.51: cannot open shared object file: no such file or directory”

the location listed before this error:

“…”/textureExample/bin/textureExample_debug

seems odd because “…”/textureExample/bin/libs/ exists

and “…”/textureExample/bin/libs/libavcodec.so.51 exists too …

but textureExample_debug isn’t a directory (thought it might be a error log… if it is, texteditor won’t open it). this happens with all the codeblocks projects i open and try to build and run.

can all of this have anything to do with:

bad installation procedure before using the script jaime suggested, therefore messing things up in my ubuntu install?

bad directory structure? any specific place i should have of_preRelease_v0.05_linux_cb_FAT ?

anything else?

help!

thanks.

edit:

the terminal output from the installation script linked above is from when i ran the script again, so thats why it didn’t install anything… i included it hoping it might help.

You can use the X Server’s copy-paste feature to copy text from windows without hitting any key. Just highlight the text you want to copy in the source window and then middle click on the destination window (like your favorite text editor or a firefox edit box).

As for your error, I guess you’re trying to run your apps from inside code::blocks, which is something that never really worked reliably for me except when using my external-script-hack-in-0.04. This requires either scripting or patching C::B and is one of the things I’d really like to get right for the next version of OF, but time to hack on this has been sorely lacking lately :confused:

Anyway, check if you can run you compiled apps by executing the app runner script from nautilus or from the command line and tell us how that goes.

Cheers,
P.

never really worked reliably for me except when using my external script hack in 0.04. This requires either scripting or patching C::B and is one of the things I’d really like to get right for the next version of OF, but time to hack on this has been sorely lacking lately :confused:

this has been fixed though in 0.05 - see the readme text file. We’ve added several options for running the app via C::B. Also, in the latest versions of CB (since a few months) there has been the ability to run a script instead of an exe and will look at that in future releases.

thanks!!
zach

thanks for the replies. i’ve been busy, with little time left for OF. had some time today to try to get the ball rolling.

from what i gathered from zach’s reply, i should be able to run the OF examples inside codeblocks… tried the advancedGraphicsExample, and i got this:

/home/gundam/of_preRelease_v0.05_linux_cb_FAT/apps/examples/polygonExample/bin/polygonExample_debug: error while loading shared libraries: libavcodec.so.51: cannot open shared object file: No such file or directory

Process returned 32512 (0x7F00) execution time : 0.000 s
Press ENTER to continue.

which is the same error i was getting before with the textureExample. any pointers?

try with this:

http://65.111.166.199/openframeworks/of-preRelease-v0.058-linux-cb-FAT.tar.gz

that’s the prepre version 0.06 and should solve the problems with run and debug.

You also need the last codeblocks version. Be sure you’ve installed all the updates from the updates icon in the notification area or:

sudo apt-get update
sudo apt-get dist-upgrade

from a terminal

If that doesn’t work, try uninstalling codeblocks:

sudo apt-get remove codeblocks

and installing by executing the script install_codeblocks.sh in the scripts folder by double clicking it and choosing run in a terminal. That should install the last codeblocks verision.

from what i gathered from zach’s reply, i should be able to run the OF examples inside codeblocks…

In order for you to be able to run OF examples inside codeblocks, you need to modify a codeblocks environment variable. The details of how to do this are in the readMe.txt that lies in the root directory of of_preRelease_v0.05_linux_cb_FAT or whichever version you are using…

You can run the examples from outside of codeblocks by running the “.ClickToLaunchApp_Debug” or “.ClickToLaunchApp_Release” scripts that are created in the “bin” directory once you have compiled.

[quote author=“arturo”]try with this:

http://65.111.166.199/openframeworks/of-preRelease-v0.058-linux-cb-FAT.tar.gz

that’s the prepre version 0.06 and should solve the problems with run and debug.

and installing by executing the script install_codeblocks.sh in the scripts folder by double clicking it and choosing run in a terminal. That should install the last codeblocks verision.[/quote]

i uninstalled codeblocks and tried running the script by clicking on it and it dindn’t work - the text editor opened and i wasn’t given the usual choices of “run /run in terminal / display / etc”. so i cd’d to to the scrpits folder in a terminal window, and sudo sh install_codeblocks.sh , terminal output here:

Fetched 1B in 3s (0B/s)
Reading package lists… Done
Reading package lists… Done
Building dependency tree
Reading state information… Done
libcodeblocks0 is already the newest version.
libwxsmithlib0 is already the newest version.
Suggested packages:
libwxgtk2.8-dev
The following NEW packages will be installed:
codeblocks codeblocks-contrib
0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded.
Need to get 7171kB of archives.
After this operation, 21.3MB of additional disk space will be used.
Get:1 http://lgp203.free.fr hardy/universe codeblocks 8.02svn5195-0ubuntu1~hardy [4475kB]
Get:2 http://lgp203.free.fr hardy/universe codeblocks-contrib 8.02svn5195-0ubuntu1~hardy [2696kB]
Fetched 7171kB in 2min30s (47.7kB/s)
Selecting previously deselected package codeblocks.
(Reading database …
dpkg: serious warning: files list file for package `libcodeblocks0’ missing, assuming package has no files currently installed.
131698 files and directories currently installed.)
Unpacking codeblocks (from …/codeblocks_8.02svn5195-0ubuntu1~hardy_i386.deb) …
Selecting previously deselected package codeblocks-contrib.
Unpacking codeblocks-contrib (from …/codeblocks-contrib_8.02svn5195-0ubuntu1~hardy_i386.deb) …
Setting up codeblocks (8.02svn5195-0ubuntu1~hardy) …

Setting up codeblocks-contrib (8.02svn5195-0ubuntu1~hardy) …
Reading package lists… Done
Building dependency tree
Reading state information… Done
freeglut3-dev is already the newest version.
libasound2-dev is already the newest version.
libxmu-dev is already the newest version.
libxxf86vm-dev is already the newest version.
g++ is already the newest version.
libgl1-mesa-dev is already the newest version.
libglu1-mesa-dev is already the newest version.
libraw1394-dev is already the newest version.
libpoco-dev is already the newest version.
libtheora-dev is already the newest version.
E: Couldn’t find package libvorbisenc-dev

so i’m missing a package… any repositories i should add to get it?

codeblocks doesn’t show up in the applications list, where is it installing to?

there is a Code::Blocks IDE file in /usr/share/applications , but it won’t run if i try to.

Hi tibor

That package is not important, indeed I modified the script to add it but in the final version is not needed and I forgot to remove it again, and the rest of the packages seem to have been installed without problem.

Sometimes when you install a package it doesn’t show inmediately in the aplications menu, so perhaps just by restarting your computer will be enough and codeblocks will be there. If not try executing codeblocks from a terminal and post the output in case it doesn’t work.

thanks for replying.

codeblocks doesn’t show in the applications menu after restart, executing from terminal returns:

~$ codeblocks
codeblocks: error while loading shared libraries: libcodeblocks.so.0: cannot open shared object file: No such file or directory

i assume that if i run the 0.05 install script, it’ll work (it did before)… but i’ll wait for now, since hopefully .058 will be working soon too.

i don’t have another box here, otherwise i’d make a fresh install of ubuntu and see if the script works.

thanks for helping, any tips welcome.

edit:

tried uninstalling and running the 0.05 codeblocks install script, with the same result as .058… must have broken my ubuntu install. if anyone can help out, i’d be thankful, otherwise i’ll just try to start over with a fresh install.

Reareading the output from the apt-get it seems one of the installed packages was not right:

dpkg: serious warning: files list file for package `libcodeblocks0’
missing, assuming package has no files currently installed.

try with:

sudo apt-get uninstall libcodeblocks0

sudo apt-get install libcodeblocks0

[quote author=“arturo”]Reareading the output from the apt-get it seems one of the installed packages was not right:

dpkg: serious warning: files list file for package `libcodeblocks0’
missing, assuming package has no files currently installed.

try with:

sudo apt-get uninstall libcodeblocks0

sudo apt-get install libcodeblocks0[/quote]

too late for that :smiley: , i’ve already re-installed ubuntu. the good news:

the 0.058 install_codeblocks script worked this time (same error with libvorbisenc-dev, but that was it) and codeblocks now shows in the applications menu. tried to build and run an example and got a message back stating that g++ wasn’t installed … sudo apt-get install g++
… took care of that.

not so good news:

after installing g++ i started codeblocks and tried building and running an example (build log » http://squerk.org/temp/example-build.txt). this time i don’t get a window with the error i was getting initially, but the files that used to show up in the example’s “bin” directory, don’t anymore, and neither does the example start from within codeblocks.

sorry, the error with libvorbisenc-dev was interrupting the install_codeblocks script, that’s why you needed to install g++ manually, so some other libreries are missing.

this one should work:

http://65.111.166.199/openframeworks/install-codeblocks.sh

or just install them manually:

sudo apt-get install freeglut3-dev libasound2-dev libxmu-dev libxxf86vm-dev g++ libgl1-mesa-dev libglu1-mesa-dev libraw1394-dev libpoco-dev

i installed manually and some progress seems to have been made, although build and run still doesn’t work, and the files still don’t show up in the example projects’s bin directory, the errors are different from a few minutes ago and look more familiar, in a way :smiley:

edit:

the 0.05 release examples build and run, if run on build is set to true in the project custom variables, run still causes this, regardless:

/home/gundam/of_preRelease_v0.05_linux_cb_FAT/apps/examples/textureExample/bin/textureExample_debug: error while loading shared libraries: libavcodec.so.51: cannot open shared object file: No such file or directory

Process returned 32512 (0x7F00) execution time : 0.000 s
Press ENTER to continue.

is this normal? if so, i think i’m sorted out :slight_smile:

the 0.58 examples (to which the build log in this post refers to) seem to not be running due to libvorbisenc-dev being missing.

Yes, it is normal in 0.05 that run and debug doesn’t work. You need to activate the runOnBuild variable to run them or run them from the folder with the clickToLaunchApp.sh script

I’ve uploaded some changes to 0.058 if you want to give them a try, now run and debug should work. As you already installed the last version of codeblocks, it should be enough to download;

http://65.111.166.199/openframeworks/of-preRelease-v0.059-linux-cb-FAT.tar.gz

and open the examples in the apps folder.

Also thanks for testing, having a fresh ubuntu install has been really helpful to debug

i’ve been busy… tried running and building the adavnced graphics example in 0.059 and got this » http://squerk.org/temp/example-build01.txt

0.05 it working though :slight_smile:

cheers and thanks for helping out.

arturo,

I can’t compile any of the .59 examples as it doesn’t find any of the poco stuff.

  
  
../../../libs/openFrameworks/events/ofAppEvents.h|4|error: poco/FIFOEvent.h: No such file or directory|  
../../../libs/openFrameworks/events/ofAppEvents.h|5|error: poco/Delegate.h: No such file or directory|  
../../../libs/openFrameworks/events/ofKeyEvents.h|4|error: Poco/FIFOEvent.h: No such file or directory|  
../../../libs/openFrameworks/events/ofKeyEvents.h|5|error: Poco/Delegate.h: No such file or directory|  
../../../libs/openFrameworks/events/ofAppEvents.h|117|error: ‘Poco’ has not been declared|  
../../../libs/openFrameworks/events/ofAppEvents.h|118|error: ‘Poco’ has not been declared|  
../../../libs/openFrameworks/events/ofAppEvents.h|65|error: ‘Poco’ has not been declared|  
.../../../libs/openFrameworks/events/ofAppEvents.h|82|error: ‘Poco’ has not been declared|  
||More errors follow but not being shown.|  
||Edit the max errors limit in compiler options...|  
||=== Build finished: 50 errors, 11 warnings ===|  
  

sorry, poco need the includes to be in a Poco folder.

It’s already corrected in the download, but if you don’t want to download it again, just create a Poco folder in libs/poco/include and put all the contents of include in that folder.