Author Topic: Building CodeBlocks source  (Read 41363 times)

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7591
    • My Best Post
Re: Building CodeBlocks source
« Reply #30 on: August 05, 2013, 05:25:28 am »
I've now installed libgtk2.0-dev and libgtk-3-dev, but still stopping at the same spot. Was there anything else I was supposed to get? My searches really only turned up those two.

I suggest doing the NON CB build because it might give better directions on the prereqs.

http://wiki.codeblocks.org/index.php?title=Installing_Code::Blocks_from_source_on_Linux

Or maybe try these pre-reqs
http://wiki.codeblocks.org/index.php?title=Installing_Code::Blocks_nightly_build_on_Ubuntu

Tim S.
« Last Edit: August 05, 2013, 05:27:04 am by stahta01 »
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 64 bit.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline blauzahn

  • Almost regular
  • **
  • Posts: 161
Re: Building CodeBlocks source
« Reply #31 on: August 05, 2013, 07:51:55 pm »
Did you suceed in compiling cb?

Compiling cb from the commandline works on Ubuntu 12.10, once the ./configure script ran sucessfully
(see wiki or file BUILD). It then shows:

Code
*************************************************
* Code::Blocks source tree has been configured. *
*************************************************

If you do not want do install boost and can live without the NassiShneiderman-plugin,
then change the configure to:

Code
./configure --with-contrib-plugins=all,-NassiShneiderman

If memory serves me, to satisfy configure I had to install:
libgtk2-common
libgtk2.0-dev
wx-common
wx2.8-headers
libwxbase2.8-0
libwxbase2.8-dev
libwxgtk2.8-0
libwxgtk2.8-dev


Offline sorinev

  • Multiple posting newcomer
  • *
  • Posts: 61
Re: Building CodeBlocks source
« Reply #32 on: August 06, 2013, 04:43:03 am »
Did you suceed in compiling cb?

I did not.

Compiling cb from the commandline works on Ubuntu 12.10, once the ./configure script ran sucessfully
(see wiki or file BUILD). It then shows:

Code
*************************************************
* Code::Blocks source tree has been configured. *
*************************************************

If you do not want do install boost and can live without the NassiShneiderman-plugin,
then change the configure to:

Code
./configure --with-contrib-plugins=all,-NassiShneiderman

If memory serves me, to satisfy configure I had to install:
libgtk2-common
libgtk2.0-dev
wx-common
wx2.8-headers
libwxbase2.8-0
libwxbase2.8-dev
libwxgtk2.8-0
libwxgtk2.8-dev

I checked for those packages, and it says that I already have all of them installed.

Offline sorinev

  • Multiple posting newcomer
  • *
  • Posts: 61
Re: Building CodeBlocks source
« Reply #33 on: August 06, 2013, 07:07:00 am »
When trying to build the plugins:

./configure --with-contrib-plugins=all seems to fail at:

No package 'hunspell' found.

Last night, I tried apt-getting this and searching the package manager for it, but I got nothing useful. Today, apt-get doesn't tell me there's no hunspell anymore, so it actually installed that. But I still get the error. It says something about if I installed anything using a non-standard prefix, but I've done everything from the system install itself, to apt getting everything, to making things, all with default options; nothing different or special.
« Last Edit: August 06, 2013, 07:10:14 am by sorinev »

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7255
Re: Building CodeBlocks source
« Reply #34 on: August 06, 2013, 08:19:56 am »
It's libhunspell-dev on debian-based systems.

Offline sorinev

  • Multiple posting newcomer
  • *
  • Posts: 61
Re: Building CodeBlocks source
« Reply #35 on: August 06, 2013, 10:16:36 am »
It's libhunspell-dev on debian-based systems.

That did the trick, thank you for the assist. I also needed libgamin-dev and libboost-dev. However, after I did make && make install, this happened.

Code
make[6]: Nothing to be done for `install-exec-am'.
 /bin/mkdir -p '/usr/local/include/codeblocks/scripting/sqplus'
 /usr/bin/install -c -m 644 SqPlusConst.h SquirrelBindingsUtils.h SquirrelVM.h sqplus.h SquirrelObject.h '/usr/local/include/codeblocks/scripting/sqplus'
/usr/bin/install: cannot remove ‘/usr/local/include/codeblocks/scripting/sqplus/SqPlusConst.h’: Permission denied
/usr/bin/install: cannot remove ‘/usr/local/include/codeblocks/scripting/sqplus/SquirrelBindingsUtils.h’: Permission denied
/usr/bin/install: cannot remove ‘/usr/local/include/codeblocks/scripting/sqplus/SquirrelVM.h’: Permission denied
/usr/bin/install: cannot remove ‘/usr/local/include/codeblocks/scripting/sqplus/sqplus.h’: Permission denied
/usr/bin/install: cannot remove ‘/usr/local/include/codeblocks/scripting/sqplus/SquirrelObject.h’: Permission denied
make[6]: *** [install-sdkHEADERS] Error 1
make[6]: Leaving directory `/home/sorinev/devel/trunk/src/include/scripting/sqplus'
make[5]: *** [install-am] Error 2
make[5]: Leaving directory `/home/sorinev/devel/trunk/src/include/scripting/sqplus'
make[4]: *** [install-recursive] Error 1
make[4]: Leaving directory `/home/sorinev/devel/trunk/src/include/scripting'
make[3]: *** [install-recursive] Error 1
make[3]: Leaving directory `/home/sorinev/devel/trunk/src/include'
make[2]: *** [install] Error 2
make[2]: Leaving directory `/home/sorinev/devel/trunk/src/include'
make[1]: *** [install-recursive] Error 1
make[1]: Leaving directory `/home/sorinev/devel/trunk/src'
make: *** [install-recursive] Error 1

Is this something that I need to address, or have I reached the end and am good to go?

Offline BlueHazzard

  • Developer
  • Lives here!
  • *****
  • Posts: 3353
Re: Building CodeBlocks source
« Reply #36 on: August 06, 2013, 10:42:33 am »
i think you have to do "sudo make install" unless you use a installation directory with write permission (use --prefix=/path/to/install/with/write/permission in the configure preocess)

Offline sorinev

  • Multiple posting newcomer
  • *
  • Posts: 61
Re: Building CodeBlocks source
« Reply #37 on: August 06, 2013, 10:53:23 am »
I've been using sudo when doing make and make install, I kept getting permission denied failures midway through otherwise. So it still does it even with sudo. Which I find weird.

I'm also building the source through the codeblocks IDE I got through apt-get. The IDE portion of the build was successful, and the contrib plugins workspace seems to be going ok too. I'm use the cbp files that have "unix" in their names, as I'm assuming that's what I was supposed to choose.

The building-codeblocks-using-codeblocks-itself method seems to be going a lot cleaner than a raw compile on the command line. Although maybe, I guess, it helps that I've been installing all of these dev libraries the last couple of days.

Offline BlueHazzard

  • Developer
  • Lives here!
  • *****
  • Posts: 3353
Re: Building CodeBlocks source
« Reply #38 on: August 06, 2013, 01:58:43 pm »
I've been using sudo when doing make and make install, I kept getting permission denied failures midway through otherwise. So it still does it even with sudo. Which I find weird.

never use sudo where it is not needed. You cut your own rights. Use sudo only if it is needed...

Offline sorinev

  • Multiple posting newcomer
  • *
  • Posts: 61
Re: Building CodeBlocks source
« Reply #39 on: August 06, 2013, 10:19:53 pm »
Well yeah, I try not to. But when I get permission denied errors, I really don't know what the alternative is.

So I've got the IDE built, and the contrib plugins built, and I did the ./update, but the plugins don't seem to load when I start codeblocks? All the stuff present in my Windows version of the svn build is missing from my Linux svn build.

Jens' page seems to be saying that the contrib plugins can't be used on Ubuntu? Really?! :( I guess I don't really use them, but still...

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7255
Re: Building CodeBlocks source
« Reply #40 on: August 06, 2013, 10:30:30 pm »
Well yeah, I try not to. But when I get permission denied errors, I really don't know what the alternative is.

So I've got the IDE built, and the contrib plugins built, and I did the ./update, but the plugins don't seem to load when I start codeblocks? All the stuff present in my Windows version of the svn build is missing from my Linux svn build.

Jens' page seems to be saying that the contrib plugins can't be used on Ubuntu? Really?! :( I guess I don't really use them, but still...
I never wrote this.
You can use the contrib-plugins in ubuntu without any issues.
But you can not use the contrib-plugins-packages from my site, as ubuntu uses different lib-versions the debian does.

And I do not build ubuntu-packages.
I could do, but I personally don't like (and of course don't use) ubuntu (except for testing purposes) and I build packages for three versiond of fedora, two CentOS/RedHat versions and two debian versions (all in 32 and 64-bit) and this binds enough of my resources.

Offline blauzahn

  • Almost regular
  • **
  • Posts: 161
Re: Building CodeBlocks source
« Reply #41 on: August 06, 2013, 10:57:01 pm »
If you see only the ubuntu-version, your compiled programm is either not installed or not started.
I have even uninstalled the ubuntu version of codeblocks to avoid conflicts. But before you start
uninstalling that, at least you can see, if you can start /usr/local/bin/codeblocks from the commandline.

If you still lack a sucessful installation, try only:

Code
make

watch the result. And only when it looks ok (no error visible,  instead: "Nothing to be done for `all-am'."), then enter:

Code
sudo make install

If that does not work, check if you can write (as sudoer) to that directory at all.  e.g.

Code
sudo install --directory /usr/local/include/codeblocks/scripting/sqplus
sudo touch /usr/local/include/codeblocks/scripting/sqplus/mytouchtest.txt

Offline sorinev

  • Multiple posting newcomer
  • *
  • Posts: 61
Re: Building CodeBlocks source
« Reply #42 on: August 06, 2013, 10:57:10 pm »
I must have missed some part of the process somewhere then. The contrib plugins were successfully built, so I think there's some step I haven't done. I assumed I was supposed to run the ./update file? (which I did).

Code
output/share/codeblocks            is full of all of the individual contrib zip files.
output/share/codeblocks/plugins    is full of all the matching contrib .so files.


Offline sorinev

  • Multiple posting newcomer
  • *
  • Posts: 61
Re: Building CodeBlocks source
« Reply #43 on: August 06, 2013, 11:02:23 pm »
at least you can see, if you can start /usr/local/bin/codeblocks from the commandline.


Yep, it starts ok from that directory the first try, just the contrib plugins are missing.

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7255
Re: Building CodeBlocks source
« Reply #44 on: August 06, 2013, 11:16:37 pm »
Do you use C::B to build C::B or do you use the automake-system ?
You wrote about both, if I remember correctly.

For automake you do not need the update-scripts.
Just (the simplest example):
  • ./bootstrap
  • ./configure --with-contrib-plugins=all
  • make
  • sudo make install
  • codeblocks -v

Better would be:
  • ./bootstrap
  • mkdir build
  • cd build
  • -./configure --prefix=/home/username/whatever-you-like --with-contrib-plugins=all
  • make -jx (where x is the amount of your cpu-cores+1)
  • make install
  • /home/username/whatever-you-like/bin/codeblocks -v

Both example assume you start from the root of C::B's sources.
The second one makes it easier to remove the whole build-tree, does not litter the sources with intermediate files and keeps your copy of C::B in a folder below your home-folder, so there can not be any access-right issues and you can keep multiple versions of C::B on one system (including "official" builds below /usr).

The -v parameter is not needed for normal use, but it gives more debug-messages if something went wrong, as it seems to be in your case.