User forums > Help

Code::Blocks build dependencies under ubuntu?

<< < (2/2)

oBFusCATed:
Using packages means that you can uninstall all added files. This is the job of the package system - to manage all the files of the package.

make install/uninstall doesn't track files, they use the build rules to do this job, so if the rules change between the install and uninstall steps the uninstall won't be complete and there would be misery and suffering.

cacb:

--- Quote from: oBFusCATed on February 20, 2020, 11:45:24 pm ---Using packages means that you can uninstall all added files. This is the job of the package system - to manage all the files of the package.

--- End quote ---
A valid point. Thanks.

cacb:

--- Quote from: oBFusCATed on February 20, 2020, 07:39:30 pm ---Yes, in the configure script.
If you want to have problem free building just use
--- Code: ---dpkg-buildpackage -us -uc
--- End code ---

--- End quote ---

Hi, I am revisiting this because I am experiencing trouble with this method as well. I still need to satisfy dependencies manually, and when I do the build still fails.

I began with a clean install of Kubuntu 18.04 running under virtualbox.

sudo apt install git
git clone https://github.com/obfuscated/codeblocks_sf
cd codeblocks_sf/
dpkg-buildpackage -us -uc

This fails because dpkg-dev is not installed, so I try again

sudo apt-install dpkg-dev
dpkg-buildpackage -us -uc

This results in the following message

dpkg-buildpackage -us -uc
dpkg-buildpackage: info: source package codeblocks
dpkg-buildpackage: info: source version 17.12svn11267
dpkg-buildpackage: info: source distribution unstable
dpkg-buildpackage: info: source changed by Jens Lody <jens@codeblocks.org>
dpkg-buildpackage: info: host architecture amd64
 dpkg-source --before-build codeblocks_sf
dpkg-checkbuilddeps: error: Unmet build dependencies: debhelper (>= 7.4.11~) cdbs automake (>= 1.9) libtool (>= 1.4) libwxgtk2.8-dev | libwxgtk3.0-dev wx-common libbz2-dev zlib1g-dev libgtk2.0-dev libgamin-dev libboost1.40-dev | libboost-dev (>= 1.40) libboost-system-dev libhunspell-dev libfontconfig1-dev libglib2.0-dev
dpkg-buildpackage: warning: build dependencies/conflicts unsatisfied; aborting
dpkg-buildpackage: warning: (Use -d flag to override.)

I thought the dependencies would be resolved automatically to get a problem free build, but that is not what I am seeing. Ok, lets try to install those dependencies manually then.

sudo apt install debhelper cdbs automake libtool libwxgtk3.0-dev wx-common libbz2-dev zlib1g-dev libgtk2.0-dev libgamin-dev libboost-dev libboost-system-dev libhunspell-dev libfontconfig1-dev libglib2.0-dev

And then try again:

ca@RPICross:~/codeblocks_sf$ dpkg-buildpackage -us -uc
dpkg-buildpackage: info: source package codeblocks
dpkg-buildpackage: info: source version 17.12svn11267
dpkg-buildpackage: info: source distribution unstable
dpkg-buildpackage: info: source changed by Jens Lody <jens@codeblocks.org>
dpkg-buildpackage: info: host architecture amd64
 dpkg-source --before-build codeblocks_sf
 fakeroot debian/rules clean
test -x debian/rules
rm -f debian/stamp-makefile-build debian/stamp-makefile-install
/usr/bin/make -C . -j1 -k distclean
make[1]: Entering directory '/home/ca/codeblocks_sf'
make[1]: *** No rule to make target 'distclean'.
make[1]: Leaving directory '/home/ca/codeblocks_sf'
/usr/share/cdbs/1/class/makefile.mk:91: recipe for target 'makefile-clean' failed
make: [makefile-clean] Error 2 (ignored)
rm -f debian/stamp-autotools
rmdir --ignore-fail-on-non-empty .
rmdir: failed to remove '.': Invalid argument
/usr/share/cdbs/1/class/autotools.mk:64: recipe for target 'makefile-clean' failed
make: [makefile-clean] Error 1 (ignored)
set -e;
rm -f debian/stamp-autotools-files
dh_clean
dh_clean: Compatibility levels before 9 are deprecated (level 7 in use)
 dpkg-source -b codeblocks_sf
dpkg-source: info: using source format '3.0 (native)'
dpkg-source: info: building codeblocks in codeblocks_17.12svn11267.tar.xz
dpkg-source: info: building codeblocks in codeblocks_17.12svn11267.dsc
 debian/rules build
test -x debian/rules
mkdir -p "."
set -e;   mv ./src/sdk/wxpropgrid/build/config.guess ./src/sdk/wxpropgrid/build/config.guess.cdbs-orig; cp --remove-destination /usr/share/misc/config.guess ./src/sdk/wxpropgrid/build/config.guess;   mv ./src/plugins/contrib/SpellChecker/wxspellchecker/build/config.guess ./src/plugins/contrib/SpellChecker/wxspellchecker/build/config.guess.cdbs-orig; cp --remove-destination /usr/share/misc/config.guess ./src/plugins/contrib/SpellChecker/wxspellchecker/build/config.guess;   mv ./src/plugins/contrib/wxContribItems/wxchart/build/config.guess ./src/plugins/contrib/wxContribItems/wxchart/build/config.guess.cdbs-orig; cp --remove-destination /usr/share/misc/config.guess ./src/plugins/contrib/wxContribItems/wxchart/build/config.guess;
set -e;   mv ./src/sdk/wxpropgrid/build/config.sub ./src/sdk/wxpropgrid/build/config.sub.cdbs-orig; cp --remove-destination /usr/share/misc/config.sub ./src/sdk/wxpropgrid/build/config.sub;   mv ./src/plugins/contrib/SpellChecker/wxspellchecker/build/config.sub ./src/plugins/contrib/SpellChecker/wxspellchecker/build/config.sub.cdbs-orig; cp --remove-destination /usr/share/misc/config.sub ./src/plugins/contrib/SpellChecker/wxspellchecker/build/config.sub;   mv ./src/plugins/contrib/wxContribItems/wxchart/build/config.sub ./src/plugins/contrib/wxContribItems/wxchart/build/config.sub.cdbs-orig; cp --remove-destination /usr/share/misc/config.sub ./src/plugins/contrib/wxContribItems/wxchart/build/config.sub;
touch debian/stamp-autotools-files
chmod a+x /home/ca/codeblocks_sf/./configure
chmod: cannot access '/home/ca/codeblocks_sf/./configure': No such file or directory
/usr/share/cdbs/1/class/autotools.mk:44: recipe for target 'debian/stamp-autotools' failed
make: *** [debian/stamp-autotools] Error 1
dpkg-buildpackage: error: debian/rules build subprocess returned exit status 2
ca@RPICross:~/codeblocks_sf$

So what I actually going on here? Why is it failing and what can I do to fix it? Looks like the build is consistently failing on 'distclean' and then unable to recover? It seems to me the repository has an issue...

oBFusCATed:
You have to run the boostrap script in the main folder of the repo. It will turn the configure.ac file in configure file then you're good to go.

cacb:

--- Quote from: oBFusCATed on February 29, 2020, 01:54:16 pm ---You have to run the boostrap script in the main folder of the repo. It will turn the configure.ac file in configure file then you're good to go.

--- End quote ---

Ok, thanks, that was one of the missing pieces indeed! I still found that this works only if the dependencies are already satisfied, so in my script that runs this I have to install the packages mentioned earlier. But now it builds properly.

Thanks again.

Navigation

[0] Message Index

[*] Previous page

Go to full version