Author Topic: Installing Code::Blocks from source on Linux  (Read 7162 times)

Offline cobramostar

  • Single posting newcomer
  • *
  • Posts: 1
Installing Code::Blocks from source on Linux
« on: October 11, 2024, 11:01:53 pm »
I tried to follow the procedures from the page https://wiki.codeblocks.org/index.php?title=Installing_Code::Blocks_from_source_on_Linux#Code::Blocks_installation , but from this part I didn't succeed because it asked me for sudo user, in fact it didn't want to miss cmd without sudo user

Code
$ update-alternatives --install /usr/bin/wx-config wx-config /opt/wx/2.8/bin/wx-config 50

has anyone been able to install Code::Blocks using these instructions ?

I would be grateful for any help

Offline Wkerry

  • Multiple posting newcomer
  • *
  • Posts: 78
Re: Installing Code::Blocks from source on Linux
« Reply #1 on: October 12, 2024, 09:57:41 am »
Have a read of the following as they are way more up to date than the wiki page:
https://github.com/PBfordev/wxpbguide
https://forums.wxwidgets.org/viewtopic.php?t=47061


This previous thread may be of some use:
https://forums.codeblocks.org/index.php?topic=25811.0

Offline Krice

  • Almost regular
  • **
  • Posts: 159
Re: Installing Code::Blocks from source on Linux
« Reply #2 on: March 12, 2025, 12:25:46 pm »
I've tried to compile C::B in Fedora (from svn), I get this error, how to decipher it?

Code
/usr/bin/ld: warning: libtiff.so.5, needed by /usr/local/lib/libwx_gtk3u_aui-3.2.so, not found (try using -rpath or -rpath-link)
/usr/bin/ld: /usr/local/lib/libwx_gtk3u_core-3.2.so: undefined reference to `TIFFGetVersion@LIBTIFF_4.0'
/usr/bin/ld: /usr/local/lib/libwx_gtk3u_core-3.2.so: undefined reference to `TIFFReadDirectory@LIBTIFF_4.0'
/usr/bin/ld: /usr/local/lib/libwx_gtk3u_core-3.2.so: undefined reference to `TIFFReadRGBAImageOriented@LIBTIFF_4.0'
/usr/bin/ld: /usr/local/lib/libwx_gtk3u_core-3.2.so: undefined reference to `TIFFDefaultStripSize@LIBTIFF_4.0'
/usr/bin/ld: /usr/local/lib/libwx_gtk3u_core-3.2.so: undefined reference to `TIFFWriteScanline@LIBTIFF_4.0'
/usr/bin/ld: /usr/local/lib/libwx_gtk3u_core-3.2.so: undefined reference to `_TIFFfree@LIBTIFF_4.0'
/usr/bin/ld: /usr/local/lib/libwx_gtk3u_core-3.2.so: undefined reference to `TIFFGetField@LIBTIFF_4.0'
/usr/bin/ld: /usr/local/lib/libwx_gtk3u_core-3.2.so: undefined reference to `TIFFScanlineSize@LIBTIFF_4.0'
/usr/bin/ld: /usr/local/lib/libwx_gtk3u_core-3.2.so: undefined reference to `TIFFClose@LIBTIFF_4.0'
/usr/bin/ld: /usr/local/lib/libwx_gtk3u_core-3.2.so: undefined reference to `TIFFClientOpen@LIBTIFF_4.0'
/usr/bin/ld: /usr/local/lib/libwx_gtk3u_core-3.2.so: undefined reference to `TIFFRGBAImageOK@LIBTIFF_4.0'
/usr/bin/ld: /usr/local/lib/libwx_gtk3u_core-3.2.so: undefined reference to `TIFFGetFieldDefaulted@LIBTIFF_4.0'
/usr/bin/ld: /usr/local/lib/libwx_gtk3u_core-3.2.so: undefined reference to `TIFFSetField@LIBTIFF_4.0'
/usr/bin/ld: /usr/local/lib/libwx_gtk3u_core-3.2.so: undefined reference to `TIFFSetWarningHandler@LIBTIFF_4.0'
/usr/bin/ld: /usr/local/lib/libwx_gtk3u_core-3.2.so: undefined reference to `TIFFSetErrorHandler@LIBTIFF_4.0'
/usr/bin/ld: /usr/local/lib/libwx_gtk3u_core-3.2.so: undefined reference to `_TIFFmalloc@LIBTIFF_4.0'
/usr/bin/ld: /usr/local/lib/libwx_gtk3u_core-3.2.so: undefined reference to `TIFFSetDirectory@LIBTIFF_4.0'
/usr/bin/ld: /usr/local/lib/libwx_gtk3u_core-3.2.so: undefined reference to `TIFFReadScanline@LIBTIFF_4.0'
collect2: error: ld returned 1 exit status
make[3]: *** [Makefile:731: codeblocks] Error 1
make[3]: Leaving directory '/home/krice/programs/cb/trunk/src/src'
make[2]: *** [Makefile:867: all-recursive] Error 1
make[2]: Leaving directory '/home/krice/programs/cb/trunk/src/src'
make[1]: *** [Makefile:539: all-recursive] Error 1
make[1]: Leaving directory '/home/krice/programs/cb/trunk/src'
make: *** [Makefile:671: all-recursive] Error 1

Offline Miguel Gimenez

  • Developer
  • Lives here!
  • *****
  • Posts: 1697
Re: Installing Code::Blocks from source on Linux
« Reply #3 on: March 12, 2025, 01:17:53 pm »
Looks like a dependency of wxWidgets, not of C::B.

Try installing package libtiff-dev (or whatever name Fedora uses for the package).

Offline Krice

  • Almost regular
  • **
  • Posts: 159
Re: Installing Code::Blocks from source on Linux
« Reply #4 on: March 12, 2025, 02:08:41 pm »
These libtiff packages are already installed:

libtiff.x86_64         4.6.0-6.fc41 fedora
libtiff-devel.x86_64  4.6.0-6.fc41 fedora

Offline Miguel Gimenez

  • Developer
  • Lives here!
  • *****
  • Posts: 1697
Re: Installing Code::Blocks from source on Linux
« Reply #5 on: March 12, 2025, 03:51:11 pm »
Does libtiff.so.5 exist in /usr/local/lib (or another searchable path)? If not, you can add a link to the proper libtiff.

Offline Krice

  • Almost regular
  • **
  • Posts: 159
Re: Installing Code::Blocks from source on Linux
« Reply #6 on: March 13, 2025, 11:18:01 am »
Libtiff is in usr/lib64 but it has libtiff.so, libtiff.so.6 and libtiff.so.6.0.2. Do I need version 5 or what. Linux library stuff is so confusing.

Offline Miguel Gimenez

  • Developer
  • Lives here!
  • *****
  • Posts: 1697
Re: Installing Code::Blocks from source on Linux
« Reply #7 on: March 13, 2025, 01:38:03 pm »
Probably copying libtiff.so.6 to libtiff.so.5 is enough, but I would ask in the wxWidgets' forum.

Offline LETARTARE

  • Lives here!
  • ****
  • Posts: 541
  • L'ami de l'homme.The friend of man.
    • LETARTARE
Re: Installing Code::Blocks from source on Linux
« Reply #8 on: Yesterday at 01:51:30 pm »
With 'Leap-15.6' we have the two versions which seem to coexist : 'libtiff.so.5' and  'libtiff.so.6'
CB-13631, plugins-sdk-2.25.0 : Collector-2.5.0, AddOnForQt-4.0.0
1- Win7 Business Pack1 64bits : wx-3.2.6, gcc-14.2.0,
2- OpenSuse::Leap-15.6-64bits : wx-3.2.6;gtk3, gcc-13.3.0,
=> !! The messages are translated by 'Deepl'

Offline cacb

  • Lives here!
  • ****
  • Posts: 540
Re: Installing Code::Blocks from source on Linux
« Reply #9 on: Yesterday at 09:17:01 pm »
For building Code::Blocks from source under Kubuntu use build_cb.sh found  at
https://gitlab.com/arnholm/cpde_3rdparty/-/tree/master/gcc/codeblocks

Maybe it is helpful to some.