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

Debian package error with wxWidgets 3.2 - Need help

(1/2) > >>

AndrewCot:
I have been able to build & run C::B on Linux (Xubuntu 22.04)with wxWidgets 3.2 using the following methods:   

* C::B loading workspace   
* boostrap/configure/makeI have not been able to build C::B on Linux (Xubuntu 22.04) with wxWidgets 3.2 using the debian build process. I get the following failure:


--- Code: ---dh_shlibdeps -pcodeblocks
dpkg-shlibdeps: warning: cannot find library libcodeblocks.so needed by debian/codeblocks/usr/lib/codeblocks/plugins/libdefaultmimehandler.so (ELF format: 'elf64-x86-64' abi: '0201003e00000000'; RPATH: '')
dpkg-shlibdeps: error: no dependency information found for /usr/local/lib/libwx_gtk3u_xrc-3.2.so.0 (used by debian/codeblocks/usr/lib/codeblocks/plugins/libdefaultmimehandler.so)
Hint: check if the library actually comes from a package.
dh_shlibdeps: error: dpkg-shlibdeps -Tdebian/codeblocks.substvars debian/codeblocks/usr/lib/codeblocks/plugins/libprojectsimporter.so debian/codeblocks/usr/lib/codeblocks/plugins/libabbreviations.so debian/codeblocks/usr/lib/codeblocks/plugins/libAstyle.so debian/codeblocks/usr/lib/codeblocks/plugins/libclangd_client.so debian/codeblocks/usr/lib/codeblocks/plugins/liboccurrenceshighlighting.so debian/codeblocks/usr/lib/codeblocks/plugins/libautosave.so debian/codeblocks/usr/lib/codeblocks/plugins/libcompiler.so debian/codeblocks/usr/lib/codeblocks/plugins/libscriptedwizard.so debian/codeblocks/usr/lib/codeblocks/plugins/libopenfileslist.so debian/codeblocks/usr/lib/codeblocks/plugins/libdefaultmimehandler.so debian/codeblocks/usr/lib/codeblocks/plugins/libdebugger.so debian/codeblocks/usr/lib/codeblocks/plugins/libtodo.so debian/codeblocks/usr/lib/codeblocks/plugins/libclasswizard.so debian/codeblocks/usr/bin/cb_share_config debian/codeblocks/usr/bin/codeblocks debian/codeblocks/usr/bin/cb_console_runner returned exit code 2
dh_shlibdeps: error: Aborting due to earlier error
make: *** [/usr/share/cdbs/1/rules/debhelper.mk:338: binary-predeb-IMPL/codeblocks] Error 25
dpkg-buildpackage: error: fakeroot debian/rules binary subprocess returned exit status 2
--- End code ---


Anyone got any ideas or pointers as I find the "dpkg-buildpackage -us -uc" build step not nice to trouble shoot.  I built wxWidgets 3.2.0 locally and installed it, so I may not have done the install correctly in that I "just" ran "make install".


BTW the "dpkg-buildpackage -us -uc" build step does not work on WSL2, so if you know how to get it to work can you please let me know then I can do the builds in WSL2 instead of on a virtual machine....

Miguel Gimenez:
I know nothing about Debian package creation, but this

--- Code: ---Hint: check if the library actually comes from a package.
--- End code ---
suggests you need to install wxWidgets 3.2 using a package, not compiling it yourself.

wxWidgets 3.2 is a stable version, so I hope Debian and Ubuntu will soon make packages to replace the current wx3.0 ones.

blauzahn:
On my local ubuntu machines I also compile wxwidgets trunk regularly via bootstrap/configure/make and install it via a comparably simplistic target in my Makefile:


--- Code: ---checkinstall:
checkinstall --pkgname=wxwidgets_trunk --default $(MAKE) install

--- End code ---

This is not the canonical (pun not intended) debian way but at least I get a dpkg which is uninstalled cleanly when I rerun this the next time.

I also do this with cb itself as well as with other programs like cppcheck.

blauzahn:
In order for the installation, mentioned in my previous post, to work properly, wxwidgets and cb have to be configured accordingly. I install wxwidgets in /opt, so that it does not collide with the wxwidgets version coming with ubuntu. This is quite primitive but I have used it for years and still use it to this day.

For wxwidgets:

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

config:
-mkdir -p $(BUILD)
(cd $(BUILD) && ../$(TRUNK)/configure --prefix=$(WX_PREFIX) --with-cxx=14)
# --enable-stl  triggers compile-problem in codeblocks
# see: http://forums.codeblocks.org/index.php/topic,21763.msg148002.html#msg148002

install:
mkdir -p $(WX_PREFIX)
(cd $(BUILD) && $(MAKE) install)
echo $(WX_PREFIX)/lib >/etc/ld.so.conf.d/wxwidgets.conf
ldconfig

--- End code ---

and cb:

--- Code: ---PREFIX=/usr/local
WX_PREFIX=/opt/wx
build=build
trunk=trunk

config:
@mkdir -p $(build)
(cd $(build) && \
  LT_SYS_LIBRARY_PATH=$(WX_PREFIX)/lib \
  CC=${CC} CXX=${CXX} ../$(trunk)/configure \
  --prefix=$(PREFIX) \
  --with-wx-config=$(WX_PREFIX)/bin/wx-config --with-wx-prefix=$(WX_PREFIX) \
    --disable-code-completion \
  --with-contrib-plugins=all,-NassiShneiderman)

--- End code ---

AndrewCot:
Thanks for the posts.

The checkinstall worked and created the deb package and installed it so the files are part of the packages (verified via "dpkg -S <filename>" commands).
After updating the wxWidget build to install in /opt/wx I get the same error, but the error now referencing the /opt/wx/lib files :

--- Code: ---dpkg-shlibdeps: warning: cannot find library libcodeblocks.so needed by debian/codeblocks/usr/lib/codeblocks/plugins/libabbreviations.so (ELF format: 'elf64-x86-64' abi: '0201003e00000000'; RPATH: '')
dpkg-shlibdeps: error: no dependency information found for /opt/wx/lib/libwx_gtk3u_xrc-3.2.so.0 (used by debian/codeblocks/usr/lib/codeblocks/plugins/libabbreviations.so)
Hint: check if the library actually comes from a package.
dh_shlibdeps: error: dpkg-shlibdeps -Tdebian/codeblocks.substvars -l/opt/wx/lib debian/codeblocks/usr/lib/codeblocks/plugins/libprojectsimporter.so debian/codeblocks/usr/lib/codeblocks/plugins/libabbreviations.so debian/codeblocks/usr/lib/codeblocks/plugins/libAstyle.so debian/codeblocks/usr/lib/codeblocks/plugins/libclangd_client.so debian/codeblocks/usr/lib/codeblocks/plugins/liboccurrenceshighlighting.so debian/codeblocks/usr/lib/codeblocks/plugins/libautosave.so debian/codeblocks/usr/lib/codeblocks/plugins/libcompiler.so debian/codeblocks/usr/lib/codeblocks/plugins/libscriptedwizard.so debian/codeblocks/usr/lib/codeblocks/plugins/libopenfileslist.so debian/codeblocks/usr/lib/codeblocks/plugins/libdefaultmimehandler.so debian/codeblocks/usr/lib/codeblocks/plugins/libdebugger.so debian/codeblocks/usr/lib/codeblocks/plugins/libtodo.so debian/codeblocks/usr/lib/codeblocks/plugins/libclasswizard.so debian/codeblocks/usr/bin/cb_share_config debian/codeblocks/usr/bin/codeblocks debian/codeblocks/usr/bin/cb_console_runner returned exit code 2
dh_shlibdeps: error: Aborting due to earlier error

--- End code ---


I the /opt/wx/lib/libwx_gtk3u_xrc-3.2.so.0 is part of the wxwidgetstrunk package as per the following:
--- Code: ---ubuntu@Ubuntu2204:~/Code/CodeBLocks_Private_Experimental_GCC$ dpkg -S /opt/wx/lib/libwx_gtk3u_xrc-3.2.so.0
wxwidgetstrunk: /opt/wx/lib/libwx_gtk3u_xrc-3.2.so.0

--- End code ---

The debian build process uses the following commands:

--- Code: ---./update_revision.sh
./bootstrap
./debian/setup_control.sh
dpkg-buildpackage -us -uc
--- End code ---


The boostrap/configure/make process works.
The wx-config is configured for wxWidgets 3.2.0.


Any more ideas?

Navigation

[0] Message Index

[#] Next page

Go to full version