Developer forums (C::B DEVELOPMENT STRICTLY!) > Development

Unable to build for Ubuntu PPA

(1/3) > >>

Xaviou:
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'

blauzahn:
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:

--- Code: ---trunk=trunk
build=build
WX_PREFIX=/opt/wx

config:
    @mkdir -p $(build)
    @(cd $(build) && ../$(trunk)/configure --prefix=$(WX_PREFIX) --with-cxx=14)

--- End code ---

a snippet out of my cb Makefile:

--- Code: ---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)

--- End code ---

Have a nice day.

Xaviou:
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):

--- Code: ---19863 : PKG_CHECK_MODULES(zlib, zlib, HAVE_ZLIB=yes, HAVE_ZLIB=no)
--- End code ---
And this is the line causing the error:

--- Code: ---......
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
--- End code ---

Regards
Xav'

Miguel Gimenez:
There are references to this issue here:

--- Quote ---This happens when pkg-config has not been installed when running autoreconf prior to executing configure script.
--- End quote ---

Xaviou:
Hi

--- Quote from: Miguel Gimenez on August 04, 2023, 01:36:30 pm ---There are references to this issue here:

--- Quote ---This happens when pkg-config has not been installed when running autoreconf prior to executing configure script.
--- End quote ---

--- End quote ---
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'

Navigation

[0] Message Index

[#] Next page

Go to full version