Hi.
I was trying to setup a PPA repository, to provide Nightly Builds for Ubuntu users, but after a few tests, I encountered a build problem.
I first had to force "setup_control.sh" with debian version 11, because Ubuntu 22.04 LTS is based on Debain Bookworm in an unstable version, witch still have libwxgtk-3.0 instead of libwxgtk-3.2 present in the stable version. (I'll soon make a second update of this script with this)
The main problem is that the build fails because of the "PKG_CHECK_MODULES" macro in the configure scipt, and I really don't know how to get rid of this.
I've attached the build log if needed.
Does anyone have a solution for this ?
Regards
Xav'
Because of the not up to date wxwidgets I always use wxwidgets trunk which I install in /opt/wx. There, wxwidgets trunk can coexist with the version provided by the Linux distro. That way you still can install other programs of your distro which rely on its original wxwidgets. I use it on Ubuntu as well as on Arch, Raspberry PI OS. It has been a while that I used it on FreeBSD also. It is an out of tree build in order to keep trunk relatively clean, apart from the changes made by bootstrap.
On distros based on apt-packages I install wxwidgets and cb with checkinstall. This probably isn't suitable for being used in a PPA repository though. I never bothered to make one because I just call checkinstall which creates and installs a debian package for me.
a snippet out of my wxwidgets Makefile:
trunk=trunk
build=build
WX_PREFIX=/opt/wx
config:
@mkdir -p $(build)
@(cd $(build) && ../$(trunk)/configure --prefix=$(WX_PREFIX) --with-cxx=14)
a snippet out of my cb Makefile:
trunk=trunk
build=build
WX_PREFIX=/opt/wx
bootstrap:
(cd $(trunk) && ACLOCAL_FLAGS="-I `$(WX_PREFIX)/bin/wx-config --prefix`/share/aclocal" ./bootstrap )
config:
@mkdir -p $(build)
(cd $(build) && \
LT_SYS_LIBRARY_PATH=$(WX_PREFIX)/lib \
../$(trunk)/configure \
--with-wx-config=$(WX_PREFIX)/bin/wx-config --with-wx-prefix=$(WX_PREFIX) \
--disable-code-completion \
--with-contrib-plugins=all,-NassiShneiderman,-codesnippets)
Have a nice day.
Hi.
Well, the problem is not wxWidgets related : it is only the call to the "PKG_CHECK_MODULES" macro.
It appears only once in the configure script for Ubuntu (see attached configure file):
19863 : PKG_CHECK_MODULES(zlib, zlib, HAVE_ZLIB=yes, HAVE_ZLIB=no)
And this is the line causing the error:
......
checking for vsnprintf... yes
/<<PKGBUILDDIR>>/./configure: line 19863: syntax error near unexpected token `zlib,'
/<<PKGBUILDDIR>>/./configure: line 19863: `PKG_CHECK_MODULES(zlib, zlib, HAVE_ZLIB=yes, HAVE_ZLIB=no)'
make: *** [/usr/share/cdbs/1/class/autotools.mk:46: debian/stamp-autotools] Error 2
dpkg-buildpackage: error: debian/rules build subprocess returned exit status 2
Regards
Xav'
There are references to this issue here (https://www.libraw.org/node/2624):
QuoteThis happens when pkg-config has not been installed when running autoreconf prior to executing configure script.
Hi
Quote from: Miguel Gimenez on August 04, 2023, 01:36:30 PM
There are references to this issue here (https://www.libraw.org/node/2624):
QuoteThis happens when pkg-config has not been installed when running autoreconf prior to executing configure script.
I've checked this : pkg-config has been installed.
I think I've found a fix : adding
AC_CONFIG_MACRO_DIRS([m4]) after
LT_INIT (configure.ac line 27) seems to do the job.
I'll launch a ppa build to confirm.
Regards
Xav'
Hi.
Quote from: Xaviou on August 04, 2023, 01:54:20 PM
I think I've found a fix : adding AC_CONFIG_MACRO_DIRS([m4]) after LT_INIT (configure.ac line 27) seems to do the job.
This fix works : I have succeeded in building Code::Blocks for Ubuntu 22.04 and 23.04 (the build for 22.10 has been rejected saying that it was an obsolete version that won't accept new updated :o ).
I' post a diff ASAP : I also have to modify the "setup_control.sh" file as ubuntu's wxWidgets dependencies for a version are not the same that the debian version it was created from.
I have another question regarding building with ppa : I saw in the "official" ppa ( https://launchpad.net/~codeblocks-devs ) that it was possible to launch builds for both i386 and amd64.
My ppa has i386 enabled, but as I create the source package on a 64bits VM of Ubuntu, it only launch amd64 builds.
I tried to modify manually the buildinfo file before signing the changes, replacing "Build-Architecture: amd64" by "Build-Architecture: i386 amd64", and updating the checksums in the ".changes" file.
Then I launched the "signing and uploading" process witch succeeded.
But I didn't received any acceptance or rejection mail as usual so I think the source package wasn't accepted.
Does anyone know how to specify both i386 and amd64 when creating the source package ?
I have also tested with "debuild -ai386" but it didn't worked : the sousrce package was created for amd64.
Regards
Xav'
Ubuntu 22.10 is a non-LTS release and its support ended last month, probably because of that new packages aren't accepted.
Recent Ubuntu versions (20.04 or later? i can't remember) dropped the 32 bit subsystem completely, you can't do 32 bit builds for these releases.
Hi
Quote from: sodev on August 07, 2023, 05:09:04 PM
Ubuntu 22.10 is a non-LTS release and its support ended last month, probably because of that new packages aren't accepted.
You're definitely right.
Quote from: sodev on August 07, 2023, 05:09:04 PM
Recent Ubuntu versions (20.04 or later? i can't remember) dropped the 32 bit subsystem completely, you can't do 32 bit builds for these releases.
It seems a bit older than that : having a look in alternatives mirrors for download shows that the last available 32bits version is 16.04.
So this problem seems to be solved...
Thank you
Regards
Xav'
Hi.
Here are 2 patchs:
- diff1.patch if another update of the "setup_control.sh" script, using "lsb_release" to obtain codename instead of a simple "cat /etc/debian_version"
- diff2.patch is an addition to allow automatic building for ppa
Regards
Xav'
Patchs applied in r13331 (https://sourceforge.net/p/codeblocks/code/13331/) and r13332 (https://sourceforge.net/p/codeblocks/code/13332/), thank you.
According to this wxWidgets commit (https://github.com/wxWidgets/wxWidgets/commit/aef7df6c9f44f751d97f4f6519ae6e5c3b81019d) it may be more future proof to not use lsb_release but parse that information from /etc/os-release instead.
Then the first part of setup_control.sh should be similar to this...
if [ "$#" -ne 1 ] || [ -z "${1##*detect*}" ]; then
echo "Doing version detection"
test -e /etc/os-release && os_release='/etc/os-release' || os_release='/usr/lib/os-release'
. "$os_release"
if [ $ID = "debian" ] || [ $ID = "ubuntu" ]; then
version=$VERSION_CODENAME
else
version=`cat /etc/debian_version`
fi
else
version=$1
fi
echo "Found version: $version"
@xaviou, does the code in the previous post work for you?. os-release was added to systemd in 2012.
Hi
Quote from: Miguel Gimenez on August 09, 2023, 12:53:14 PM
@xaviou, does the code in the previous post work for you?. os-release was added to systemd in 2012.
Seems to be ok : testedswith Debian Buster/Bullseye/Bookworm and Ubuntu Jammy/Lunar
Regards
Xav'
Applied in r13333 (https://sourceforge.net/p/codeblocks/code/13333/), thank you for testing.