Author Topic: A problem about C::B svn make(Ubuntu12.04)  (Read 28387 times)

Offline Rexfield

  • Single posting newcomer
  • *
  • Posts: 8
A problem about C::B svn make(Ubuntu12.04)
« on: August 19, 2012, 04:19:57 am »
hey, ;-)
when i use "sudo ./configure --with-contrib-plugins=all"
terminal echo the message:
checking for HUNSPELL... no
configure: error: Package requirements (hunspell) were not met:

No package 'hunspell' found

Consider adjusting the PKG_CONFIG_PATH environment variable if you
installed software in a non-standard prefix.

Alternatively, you may set the environment variables HUNSPELL_CFLAGS
and HUNSPELL_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details.
===========================================================
How to solve this problem?thx a lot.

Offline Rexfield

  • Single posting newcomer
  • *
  • Posts: 8
Re: A problem about C::B svn make(Ubuntu12.04)
« Reply #1 on: August 19, 2012, 04:21:08 am »
I have installed "hunspell".

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9694
Re: A problem about C::B svn make(Ubuntu12.04)
« Reply #2 on: August 19, 2012, 07:15:36 am »
I have installed "hunspell".
You not only need hunspell, but primarily hunspell-dev.
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: https://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: https://wiki.codeblocks.org/index.php?title=FAQ

Offline Rexfield

  • Single posting newcomer
  • *
  • Posts: 8
Re: A problem about C::B svn make(Ubuntu12.04)
« Reply #3 on: August 19, 2012, 09:39:28 am »
OK, thank you, I GOT IT.BUG HOW TO 'gamin'?
Terminal return:
$ rpm -i gamin-0.0.19-1.x86_64.rpm
rpm:RPM should not be used directly install RPM packages, use Alien instead!
rpm:However assuming you know what you are doing...
error: 依赖性检测失败:
   /bin/sh 被 gamin-0.0.19-1.x86_64 所需要
   libc.so.6()(64bit) 被 gamin-0.0.19-1.x86_64 所需要
   libc.so.6(GLIBC_2.2.5)(64bit) 被 gamin-0.0.19-1.x86_64 所需要
   libc.so.6(GLIBC_2.3)(64bit) 被 gamin-0.0.19-1.x86_64 所需要
   libglib-2.0.so.0()(64bit) 被 gamin-0.0.19-1.x86_64 所需要

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7255
Re: A problem about C::B svn make(Ubuntu12.04)
« Reply #4 on: August 19, 2012, 10:45:37 am »
OK, thank you, I GOT IT.BUG HOW TO 'gamin'?
Terminal return:
$ rpm -i gamin-0.0.19-1.x86_64.rpm
rpm:RPM should not be used directly install RPM packages, use Alien instead!
rpm:However assuming you know what you are doing...
error: 依赖性检测失败:
   /bin/sh 被 gamin-0.0.19-1.x86_64 所需要
   libc.so.6()(64bit) 被 gamin-0.0.19-1.x86_64 所需要
   libc.so.6(GLIBC_2.2.5)(64bit) 被 gamin-0.0.19-1.x86_64 所需要
   libc.so.6(GLIBC_2.3)(64bit) 被 gamin-0.0.19-1.x86_64 所需要
   libglib-2.0.so.0()(64bit) 被 gamin-0.0.19-1.x86_64 所需要
Why do you try to install rpm, which are not meant to be installed on debian based systems.
Install the ubuntu package of gamin and gamin-devel .

Offline Rexfield

  • Single posting newcomer
  • *
  • Posts: 8
Re: A problem about C::B svn make(Ubuntu12.04)
« Reply #5 on: August 19, 2012, 11:47:50 am »
I used
 "$ sudo alien -i gamin-0.0.19-1.x86_64.rpm"
and
 "$ sudo alien -i gamin-devel-0.0.19-1.x86_64.rpm"
when them finished, try "./configure --with-contrib-plugins=all"
it's still an error.
=============
BTW:I did not find the DEB package      (*_*)

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7255
Re: A problem about C::B svn make(Ubuntu12.04)
« Reply #6 on: August 19, 2012, 02:24:20 pm »
You should know how to install packaages on the system you use.
There are several manuals arround and of course graphical package mangers for ubuntu.
I suggest using synaptic, it's the best package-manager for debian based systems in my opinion.

For the gamin stuff, use "sudo apt-get install gamin-devel" .

It seems you are not an experienced developer (at least not on ubunt-systems).
You will most likely run in more trouble.

Why don't you install a prebuild package of C::B and avoid the hassle of compiling it yourself ?

Offline Rexfield

  • Single posting newcomer
  • *
  • Posts: 8
Re: A problem about C::B svn make(Ubuntu12.04)
« Reply #7 on: August 19, 2012, 02:59:09 pm »
Yes, you're right.I use the C language in order to study compiler theory.May be the source replaced by a domestic server, so "sudo apt-get install gamin-devel" has been unsuccessful, forced installation with RPM, C :: B can not run.
Now re-install with Synaptic. I hope this time can be successful. ;-)
======================
↑ Google Translate =_=||||||||||||||

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7255
Re: A problem about C::B svn make(Ubuntu12.04)
« Reply #8 on: August 19, 2012, 03:17:32 pm »
Never (!), never (!!), never (!!!) use rpm's on debian based systems, unless you know exactly what you do and how to fix issues.

Offline Rexfield

  • Single posting newcomer
  • *
  • Posts: 8
Re: A problem about C::B svn make(Ubuntu12.04)
« Reply #9 on: August 19, 2012, 03:23:22 pm »
Yes, I will always remember it.
---------------------------------
Good! The program can run, displayed as "SVN 8237". This is the best gift I received today.
Thanks to MortenMacFly, Jens and my best friend Tolbkni.

Offline jdbosmaus

  • Single posting newcomer
  • *
  • Posts: 3
Re: A problem about C::B svn make(Ubuntu12.04)
« Reply #10 on: March 24, 2013, 07:31:30 am »
Due to the incompatibility documented here:
http://www.codeblocks.org/downloads/binaries
and the fact that the package provided by pasgui is out of date, I wanted to try compiling CodeBlocks 12.11 from source on Ubuntu 12.04. (Actually Kubuntu.)

This topic was helpful, but I think the package names listed in the posts above are for RPM rather than APT packages. It took me a while to figure out the package names I needed before ./configure would run cleanly.

Here are the commands for the packages that I found I needed to install:

apt-get install libhunspell-dev
apt-get install libgamin-dev
apt-get install libboost-dev

(libboost-doc is optional, but I installed it because I expect to use Boost.)

The "make install" command adds several .so files to /usr/local/lib. Therefore, before I could run CodeBlocks, I needed to rebuild the library cache by:
sudo ldconfig
 
And now I'm running CodeBlocks 12.11 build 8629!

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7255
Re: A problem about C::B svn make(Ubuntu12.04)
« Reply #11 on: March 24, 2013, 08:39:03 am »
On debian-based systems (Debian, Ubuntu probably Mint, etc.) it's the best to just run dpkg-buildpackage in the sources root.
This will tell you which packages are missing on your system and what's more, you get real deb-packages that can be installed easily.
The make uninstall is not reliable (at least not if the sources have changed between make install and make uninstall).

If you do not want to create packages (or are not on debian or another supported platform liek fedora, redhat, centos, opensuse etc.), you should configure your sources with --prefix=[/path/to/installation/folder][/b] to install C::B in a seperate folder below your home-directory.
You also should do the build-process from a seperate build-folder and call configure from there with relative path.

It is easy to remove the whole build-files at once and to remove C::B before compiling a new version, both might be needed if there are changes to the directory or library layout (and that happens from time to time if using svn-sources).

Offline jdbosmaus

  • Single posting newcomer
  • *
  • Posts: 3
Re: A problem about C::B svn make(Ubuntu12.04)
« Reply #12 on: March 25, 2013, 01:26:42 am »
Quote
On debian-based systems (Debian, Ubuntu probably Mint, etc.) it's the best to just run dpkg-buildpackage in the sources root.
This will tell you which packages are missing on your system and what's more, you get real deb-packages that can be installed easily.
The make uninstall is not reliable (at least not if the sources have changed between make install and make uninstall).

That is useful to know and I wasn't aware of it. (I'm new to Linux, though I used Unix systems about 25 years ago.)
I was using the procedure in the BUILD file that came with the sources, which is also the same on this page:
http://wiki.codeblocks.org/index.php?title=Installing_Code::Blocks_from_source_on_Linux

As it turns out I am going to be setting up two other Kubuntu systems with CodeBlocks and I was wondering whether
there was an easier way to do it than to build on each machine. I knew deb-packages would work but I didn't know
how to make them. So, thank you!

Offline cacb

  • Lives here!
  • ****
  • Posts: 536
Re: A problem about C::B svn make(Ubuntu12.04)
« Reply #13 on: May 19, 2013, 12:45:44 am »
Thanks a lot to jens for his extremely useful information! I am on Kubuntu 13.04 and I've been using his repository for nightlies for years without problems (thanks for that!). I just discovered that apparently there is an incompatibility with the latest *ubuntu, so like others I decided to try to build C::B from source rather than try another repository. So far download from SVN (using Bazaar!) went well, and dpkg-buildpackage seems easy enough. Hoping to re-use the built packages on a couple of other machines.

Offline cacb

  • Lives here!
  • ****
  • Posts: 536
Re: A problem about C::B svn make(Ubuntu12.04)
« Reply #14 on: May 19, 2013, 10:27:58 am »
It seems I was a bit quick to declare this a success, I am having some issues with installing built *.deb packages built from source on Kubuntu 13.04. I hope you can help point out where I went wrong

Some things I did
- downloaded source from http://svn.code.sf.net/p/codeblocks/code/trunk/
- tried to build C::B using dpkg-buildpackage, it failed. This was probably due to me having a static build of wxWidgets 2.8 installed
- re-built wxWidgets 2.8 to shared objects and tried dpkg-buildpackage again overnight

I now got the deb files below. I am puzzled as to why they are "10.05" and a much lower svn build than expected (8324)? The trunk includes changes until may 17 2013.
Code
total 172548
-rwxrwx--- 1 ca plugdev      1770 May 19 02:32 codeblocks_10.05svn8324.dsc
-rwxrwx--- 1 ca plugdev 172167115 May 19 02:32 codeblocks_10.05svn8324.tar.gz
-rwxrwx--- 1 ca plugdev   2889928 May 19 03:59 codeblocks-common_10.05svn8324_all.deb
-rwxrwx--- 1 ca plugdev    458928 May 19 03:59 codeblocks-contrib-common_10.05svn8324_all.deb
-rwxrwx--- 1 ca plugdev    556194 May 19 04:00 codeblocks-headers_10.05svn8324_all.deb
-rwxrwx--- 1 ca plugdev    290132 May 19 04:00 codeblocks-wxcontrib-headers_10.05svn8324_all.deb
drwxrwx--- 1 ca plugdev       176 May 19 09:51 trunk
-rwxrwx--- 1 ca plugdev    314118 May 19 04:00 wxsmith-headers_10.05svn8324_all.deb

If I try
sudo dpkg -i *.deb, I get dependency problems as shown below, and I don't seem to be able to resolve them

Code
(Reading database ... 339367 files and directories currently installed.)
Preparing to replace codeblocks-common 10.05svn8324 (using codeblocks-common_10.05svn8324_all.deb) ...
Unpacking replacement codeblocks-common ...
Preparing to replace codeblocks-contrib-common 10.05svn8324 (using codeblocks-contrib-common_10.05svn8324_all.deb) ...
Unpacking replacement codeblocks-contrib-common ...
Preparing to replace codeblocks-headers 10.05svn8324 (using codeblocks-headers_10.05svn8324_all.deb) ...
Unpacking replacement codeblocks-headers ...
Preparing to replace codeblocks-wxcontrib-headers 10.05svn8324 (using codeblocks-wxcontrib-headers_10.05svn8324_all.deb) ...
Unpacking replacement codeblocks-wxcontrib-headers ...
Preparing to replace wxsmith-headers 10.05svn8324 (using wxsmith-headers_10.05svn8324_all.deb) ...
Unpacking replacement wxsmith-headers ...
Setting up codeblocks-common (10.05svn8324) ...
Setting up codeblocks-contrib-common (10.05svn8324) ...
dpkg: dependency problems prevent configuration of codeblocks-headers:
 codeblocks-headers depends on codeblocks-dev (>= 10.05svn8324); however:
  Package codeblocks-dev is not installed.
 codeblocks-headers depends on codeblocks-dev (<< 10.05svn8324.1~); however:
  Package codeblocks-dev is not installed.

dpkg: error processing codeblocks-headers (--install):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of codeblocks-wxcontrib-headers:
 codeblocks-wxcontrib-headers depends on codeblocks-wxcontrib-dev (<< 10.05svn8324.1~); however:
  Version of codeblocks-wxcontrib-dev on system is 12.11svn8832-1.

dpkg: error processing codeblocks-wxcontrib-headers (--install):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of wxsmith-headers:
 wxsmith-headers depends on wxsmith-dev (>= 10.05svn8324); however:
  Package wxsmith-dev is not installed.
 wxsmith-headers depends on wxsmith-dev (<< 10.05svn8324.1~); however:
  Package wxsmith-dev is not installed.

dpkg: error processing wxsmith-headers (--install):
 dependency problems - leaving unconfigured
Processing triggers for hicolor-icon-theme ...
Processing triggers for man-db ...
Processing triggers for shared-mime-info ...
Unknown media type in type 'all/all'
Unknown media type in type 'all/allfiles'
Unknown media type in type 'uri/mms'
Unknown media type in type 'uri/mmst'
Unknown media type in type 'uri/mmsu'
Unknown media type in type 'uri/pnm'
Unknown media type in type 'uri/rtspt'
Unknown media type in type 'uri/rtspu'
Errors were encountered while processing:
 codeblocks-headers
 codeblocks-wxcontrib-headers
 wxsmith-headers

So what have I done wrong? I may need wxWidgets 2.9? Also, I am stuck as it seems the file dpkg-buildpackage is no longer in my source directory after tonights build. Does that make sense?

Your help appreciated. Sorry for making a mess.

Offline cacb

  • Lives here!
  • ****
  • Posts: 536
Re: A problem about C::B svn make(Ubuntu12.04)
« Reply #15 on: May 20, 2013, 03:28:19 pm »
Well, I have made some progress. I've moved to another computer with a fresh Kubuntu 13.04 64bit, and it does indeed work to follow the dpkg-buildpackage route

Some observations
- I thought I would get the very latest nightly build code from trunk http://svn.code.sf.net/p/codeblocks/code/trunk/ , however it seems to be some old 10.05 version. Instead I downloaded from http://svn.code.sf.net/p/codeblocks/code/branches/release-12.11/. Where are the latest updates?
- On the new machine, I built against the distro's own wx2.8.12, which worked. Not sure what will happen after I build my own version of wxWidgets like I normally do, and then try to rebuild codeblocks
- Had issues with an NTFS partition, could not build code::blocks on that until I had to properly mounted, Unrelated to C::B, but it is an issue sometimes with dual boot machines.

The IDE is up and running, while at the same time the latest updates have broken the previous ones I got from Jens. So I guess it is time for a major overhaul of my setups.

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: A problem about C::B svn make(Ubuntu12.04)
« Reply #16 on: May 20, 2013, 04:57:14 pm »
Where are the latest updates?
Here: http://svn.code.sf.net/p/codeblocks/code/trunk/ probably something is broken in the debian files.
Do you get a proper archive using the following commands:
Code
./bootstrap
./configure
make dist
You should get codeblocks-12.11*.tar.bz file.
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7255
Re: A problem about C::B svn make(Ubuntu12.04)
« Reply #17 on: May 20, 2013, 05:45:28 pm »
You should run ./bootstrap before any automake command to update the Makefile's and the debian/changelog .
The revision of the debian files is taken from the debian/changelog if you use dpkg-buildpackage.

What does svn info say about the revision ?

Offline cacb

  • Lives here!
  • ****
  • Posts: 536
Re: A problem about C::B svn make(Ubuntu12.04)
« Reply #18 on: May 20, 2013, 08:17:30 pm »
You should run ./bootstrap before any automake command to update the Makefile's and the debian/changelog .
The revision of the debian files is taken from the debian/changelog if you use dpkg-buildpackage.

ok, does this mean a ./bootstrap  is required before sudo dpkg-buildpackage command? I didn't know, these tools are new to me. Essentialy I need to understand exactly which steps to take to download the latest svn code, build deb packages that I can use on my identically configured Kubuntu machines.

What does svn info say about the revision ?

Don't know, because I use bazaar with bzr-svn to download the code  :)  But I used bzr qlog and saw that indeed the latest update was just a few days old. I have deleted it already as I thought it was a mistake since it gave me the 10.05 packages. But if it really was just a question of running ./bootstrap, I can try again.


Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7255
Re: A problem about C::B svn make(Ubuntu12.04)
« Reply #19 on: May 20, 2013, 09:05:23 pm »
./bootstrap creates the uptodate Makefile.in's and updates the revision.
At least in theory.
In your case it will not do so, because you use neither svn, git-svn nor git, but only these three scm-clients are supported by the underlying scripts.

You can look at the shell-script update_revision.sh and probaly tweak it to work with bzr-svn, but your on your own here, because no one of our dev's uses bazaar as far as I know.

What you can do manually is the following:
  • run ./bootstrap to create the correct Makefile.in's,
  • create a file named revision.m4 in the sources root,
  • put
    Quote
    m4_define([SVN_REV], 9099)
    m4_define([SVN_REVISION], 12.11svn9099)
    m4_define([SVN_DATEinto it], 2013-05-16 18:22:06)
    into it
  • use your svn-revision and -date, of course
  • run
    Quote
    dch -v 12.11svn9099 "New svn revision"
  • use your svn-revision again
  • run dpkg-buildpackage

Or just don't use our svn-repo, but the sources from my server:
http://apt.jenslody.de/testing/pool/main/c/codeblocks/

If you just download the *.orig.tar.gz tar-ball, you get the pure svn-sources without any patches, but after running ./bootstrap.
Ready for use with dpkg-buildpackage.
I update my repo much more frequently as this happens for the windows nightlies (currently I have svn r9099).

Offline cacb

  • Lives here!
  • ****
  • Posts: 536
Re: A problem about C::B svn make(Ubuntu12.04)
« Reply #20 on: May 20, 2013, 09:30:00 pm »
Or just don't use our svn-repo, but the sources from my server:
http://apt.jenslody.de/testing/pool/main/c/codeblocks/

If you just download the *.orig.tar.gz tar-ball, you get the pure svn-sources without any patches, but after running ./bootstrap.
Ready for use with dpkg-buildpackage.
I update my repo much more frequently as this happens for the windows nightlies (currently I have svn r9099).

Thank you, jens. I didn't know there was a dependency between the scm client and the build system. That's a bit unfortunate. I shall have a look at those scripts, but downloading the *.orig.tar.gz post ./bootstrap tar-ball from your server, ready for or use with dpkg-buildpackage seems to be the easiest by far. Probably the download is much faster that way too.

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7255
Re: A problem about C::B svn make(Ubuntu12.04)
« Reply #21 on: May 20, 2013, 09:57:51 pm »
I didn't know there was a dependency between the scm client and the build system. That's a bit unfortunate.
The build-system needs to know the svn-revision (at least for svn-builds, release builds are another story) and the only reliable way to get it, is to fetch the revision with the scm-client.

Offline cacb

  • Lives here!
  • ****
  • Posts: 536
Re: A problem about C::B svn make(Ubuntu12.04)
« Reply #22 on: May 20, 2013, 11:43:27 pm »
Thanks again, I managed to build it properly from svn trunk, code fetched with bzr-svn with ./bootstrap + the manual steps you described in reply#19. The only issue I had was my local static wxWidgets build got in the way, causing the C::B dpkg-buildpackage to fail after some time. I solved that by "hiding" my local wx-config and "unhiding" after the dpkg-buildpackage, not sure if there is any smarter way but it worked

Code
sudo mv /usr/local/bin/wx-config  /usr/local/bin/wx-config-hide 
sudo dpkg-buildpackage
sudo mv /usr/local/bin/wx-config-hide /usr/local/bin/wx-config

svn 9099 looks quite nice!

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7255
Re: A problem about C::B svn make(Ubuntu12.04)
« Reply #23 on: May 21, 2013, 04:02:33 am »
Run ./configure--help and you see the option --with-wx-config=CONFIG .
Add it (with path to correct wx-config) to DEB_CONFIGURE_EXTRA_FLAGS in debian/rules and it should work.

Offline cacb

  • Lives here!
  • ****
  • Posts: 536
Re: A problem about C::B svn make(Ubuntu12.04)
« Reply #24 on: May 21, 2013, 11:29:41 pm »
Run ./configure--help and you see the option --with-wx-config=CONFIG .
Add it (with path to correct wx-config) to DEB_CONFIGURE_EXTRA_FLAGS in debian/rules and it should work.

Thanks yet again. I have tried this on another Kubuntu 13.04 (32bit this time) and successfully built the C::B debs from the tarball on your site. The way to configure which wx-config to use reminds me of a similar problem when using C::B and trying to tell C::B/compiler to find the correct wx-config during compilation. I have a compiler setting (other options) like this
Code
`/usr/local/bin/wx-config --version=2.8 --toolkit=gtk2 --cxxflags`
As far as I know, hardcoding this way is the only way to select the correct wx-config within C::B. I would have liked to use a global variable, but at least in the past such variables didn't expand within backticks. Is there a smarter way now? Something similar to --with-wx-config=CONFIG  with global variables would be nice to have. Or simply expand global variables also within backtick strings.

Finally, once the C::B debs have been built, they must be installed in the correct order. By trial and error I found that this worked (32bit version)
Code
sudo dpkg -i codeblocks-common_12.11svn9099_all.deb
sudo dpkg -i libcodeblocks0_12.11svn9099_i386.deb
sudo dpkg -i libwxsmithlib0_12.11svn9099_i386.deb
sudo dpkg -i codeblocks_12.11svn9099_i386.deb
sudo dpkg -i codeblocks-contrib-common_12.11svn9099_all.deb
sudo dpkg -i codeblocks-libwxcontrib0_12.11svn9099_i386.deb
sudo dpkg -i codeblocks-contrib_12.11svn9099_i386.deb

Is there some easier way to simply say "install all and resolve dependencies between them" (without using a repository)?