ProgrammingThis forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
install Code::Blocks
Download the Source RPM
1. Download the Source RPM from www.codeblocks.org/downloads.shtml
Note: the SRPM is currently unavailable (latest version being the old RC2), use SVN:
Prepare SRPM package from SVN (if needed)
1. You need to get the latest sources from SVN www.codeblocks.org/source_code.shtml
svn checkout svn://svn.berlios.de/codeblocks/trunk
2. go into trunk, if you haven't already done it.
3. run these three commands in this order
./bootstrap
./configure --enable-contrib
make dist
the last one will create a .tar.gz archive that contains the sources.
4. copy the archive to the directory $RPM_TOPDIR/SOURCES
sudo mv codeblocks-trunk-r*.tar.gz $RPM_TOPDIR/SOURCES
5. build the source RPM, or copy spec to $RPM_TOPDIR/SPECS
rpmbuild -bs codeblocks.spec
This will create a source package in the directory $RPM_TOPDIR/SRPMS/.
and I get get this
Code:
[root@localhost trunk]# ./bootstrap
aclocal:configure.in:77: warning: macro `AM_OPTIONS_WXCONFIG' not found in library
aclocal:configure.in:78: warning: macro `AM_PATH_WXCONFIG' not found in library
configure.in:77: error: possibly undefined macro: AM_OPTIONS_WXCONFIG
If this token and others are legitimate, please use m4_pattern_allow.
See the Autoconf documentation.
configure.in:78: error: possibly undefined macro: AM_PATH_WXCONFIG
it seems that the previous step installations all succeded
and ideas?
Do you have the wxWidgets libraries (and headers) installed? It seems that m4 is looking for some macros that would have been defined by wxWidgets, if they were installed.
Do you have the wxWidgets libraries (and headers) installed? It seems that m4 is looking for some macros that would have been defined by wxWidgets, if they were installed.
------------------------------------------------------
The installation of wxWidgets is finished. On certain
platforms (e.g. Linux) you'll now have to run ldconfig
if you installed a shared library and also modify the
LD_LIBRARY_PATH (or equivalent) environment variable.
wxWidgets comes with no guarantees and doesn't claim
to be suitable for any purpose.
Read the wxWidgets Licence on licencing conditions.
------------------------------------------------------
[root@localhost build_gtk2_shared_monolithic_unicode]# ldconfig
[root@localhost build_gtk2_shared_monolithic_unicode]# exit
exit
[root@localhost build_gtk2_shared_monolithic_unicode]# cd opt
-bash: cd: opt: No such file or directory
[root@localhost build_gtk2_shared_monolithic_unicode]# cd
[root@localhost ~]# wx-config --prefix
/usr/local
[root@localhost ~]# wx-config --libs
-L/usr/local/lib -pthread -lwx_gtk2_xrc-2.6 -lwx_gtk2_qa-2.6 -lwx_gtk2_html-2.6 -lwx_gtk2_adv-2.6 -lwx_gtk2_core-2.6 -lwx_base_xml-2.6 -lwx_base_net-2.6 -lwx_base-2.6
[root@localhost ~]# which wx-config
/usr/local/bin/wx-config
[root@localhost ~]# cd
[root@localhost ~]# cd /home/eaicurtis/Desktop
[root@localhost Desktop]# cd trunk
[root@localhost trunk]# ./bootstrap
aclocal:configure.in:77: warning: macro `AM_OPTIONS_WXCONFIG' not found in library
aclocal:configure.in:78: warning: macro `AM_PATH_WXCONFIG' not found in library
configure.in:77: error: possibly undefined macro: AM_OPTIONS_WXCONFIG
If this token and others are legitimate, please use m4_pattern_allow.
See the Autoconf documentation.
configure.in:78: error: possibly undefined macro: AM_PATH_WXCONFIG
[root@localhost trunk]#
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,511
Rep:
Codeblocks , CentOS 5.x
Can you do us a favour? Please remove the PHP tags,
post # 1 , line 3.
The formatting of this page is terrible because of
those tags. And an URL needs no tagging ...
.....
.....
From post # 3 it seems you are trying to use wxGTK-2.6,
though your "codeblocks" link says ' wxGTK-2.8.7 '.
Why not do # yum install wxGTK-devel
.. and get version 2.8.10 with the right options ?
I got wxGTK-devel 2.8.10 from the rpmforge.repo
It isn't monolitic, all 14 libs are separate (default).
Monolitic means one huge chunk, 20 MB library.
--enable-xrc is enabled by default.
2.8.10-1.rf is build with --enable-unicode.
Codeblocks compiles OK with wxGTK-devel 2.8.10
.....
Can you do us a favour? Please remove the PHP tags,
post # 1 , line 3.
The formatting of this page is terrible because of
those tags. And an URL needs no tagging ...
.....
.....
From post # 3 it seems you are trying to use wxGTK-2.6,
though your "codeblocks" link says ' wxGTK-2.8.7 '.
Why not do # yum install wxGTK-devel
.. and get version 2.8.10 with the right options ?
I got wxGTK-devel 2.8.10 from the rpmforge.repo
It isn't monolitic, all 14 libs are separate (default).
Monolitic means one huge chunk, 20 MB library.
--enable-xrc is enabled by default.
2.8.10-1.rf is build with --enable-unicode.
Codeblocks compiles OK with wxGTK-devel 2.8.10
.....
It would be wonderful if wxGTK worked from yum... however since I have been spending all day trying to do it this way... good chance I tried that first
[root@localhost ~]# yum install wxGTK-devel
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* addons: ftp.linux.ncsu.edu
* base: mirror.steadfast.net
* extras: mirror.ubiquityservers.com
* updates: mirror.cs.vt.edu
Setting up Install Process
No package wxGTK-devel available.
Nothing to do
I would like to bring this out of archive status:
I decided to install the C::B on centos5.2 rpm built.
I'm using ththeir wiki as a source of info and got as far as to building the RPM from SRPM.
I run rpmbuild --rebuild as a regular user, and after some time with zillions of messages on the screen i'm getting :
Code:
pwd
/home/oracle/rpm/trunk
[oracle@server trunk]$ more ~/.rpmmacros
%_signature gpg
%_gpg_name AZ
%_topdir %(echo "$HOME")/rpm/redhat
%_smp_mflags -j3
%__arch_install_post /usr/lib/rpm/check-rpaths /usr/lib/rpm/check-buildroot
%_tmppath /tmp/oracle/rpm
%_tmppath /tmp/oracle/rpm
rpmbuild --rebuild /home/oracle/rpm/redhat/SRPMS/codeblocks-1.0_0.svn.6897-0.el5.src.rpm
<skip>
../../src/include/projectloader.h:19: warning: dereferencing type-punned pointer will break strict-aliasing rules
g++ -DHAVE_CONFIG_H -I. -I../../src/include -I/usr/lib/wx/include/gtk2-unicode-release-2.8 -I/usr/include/wx-2.8 -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -D__WXGTK__ -pthread -I../../src/include -I../../src/sdk/wxscintilla/include -I../../src/sdk/wxpropgrid/include -I../../src/include/tinyxml -I../../src/include/scripting/include -I../../src/include/scripting/sqplus -I../../src/include/mozilla_chardet -Ulinux -Uunix -O2 -ffast-math -DCB_AUTOCONF -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m32 -march=i386 -mtune=generic -fasynchronous-unwind-tables -DCB_PRECOMP -Winvalid-pch -fPIC -DPIC -fexceptions -MT cbstatusbar.lo -MD -MP -MF .deps/cbstatusbar.Tpo -c cbstatusbar.cpp -fPIC -DPIC -o .libs/cbstatusbar.o
cbstatusbar.cpp:22:25: error: cbstatusbar.h: No such file or directory
cbstatusbar.cpp:24: error: invalid use of undefined type 'struct cbStatusBar'
./cbplugin.h:54: error: forward declaration of 'struct cbStatusBar'
/usr/include/wx-2.8/wx/generic/statusbr.h:100: error: 'const wxEventTable wxStatusBar::sm_eventTable' is protected
cbstatusbar.cpp:24: error: within this context
cbstatusbar.cpp:24: error: incomplete type 'cbStatusBar' used in nested name specifier
cbstatusbar.cpp:24: error: invalid use of undefined type 'struct cbStatusBar'
./cbplugin.h:54: error: forward declaration of 'struct cbStatusBar'
cbstatusbar.cpp: In member function 'const wxEventTable* cbStatusBar::GetEventTable() const':
cbstatusbar.cpp:24: error: incomplete type 'cbStatusBar' used in nested name specifier
cbstatusbar.cpp: At global scope:
cbstatusbar.cpp:24: error: invalid use of undefined type 'struct cbStatusBar'
./cbplugin.h:54: error: forward declaration of 'struct cbStatusBar'
cbstatusbar.cpp:24: error: incomplete type 'cbStatusBar' used in nested name specifier
cbstatusbar.cpp:24: error: invalid use of undefined type 'struct cbStatusBar'
./cbplugin.h:54: error: forward declaration of 'struct cbStatusBar'
cbstatusbar.cpp: In member function 'wxEventHashTable& cbStatusBar::GetEventHashTable() const':
cbstatusbar.cpp:24: error: incomplete type 'cbStatusBar' used in nested name specifier
cbstatusbar.cpp: At global scope:
cbstatusbar.cpp:24: error: invalid use of undefined type 'struct cbStatusBar'
./cbplugin.h:54: error: forward declaration of 'struct cbStatusBar'
cbstatusbar.cpp:25: error: incomplete type 'cbStatusBar' used in nested name specifier
cbstatusbar.cpp:30: error: invalid use of undefined type 'struct cbStatusBar'
./cbplugin.h:54: error: forward declaration of 'struct cbStatusBar'
cbstatusbar.cpp:31: confused by earlier errors, bailing out
make[3]: *** [cbstatusbar.lo] Error 1
make[3]: *** Waiting for unfinished jobs....
mv -f .deps/cbproject.Tpo .deps/cbproject.Plo
make[3]: Leaving directory `/home/oracle/rpm/redhat/BUILD/codeblocks-10.05svn6897/src/sdk'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/home/oracle/rpm/redhat/BUILD/codeblocks-10.05svn6897/src/sdk'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/oracle/rpm/redhat/BUILD/codeblocks-10.05svn6897/src'
make: *** [all-recursive] Error 1
error: Bad exit status from /tmp/oracle/rpm/rpm-tmp.12434 (%build)
wget http://download.fedora.redhat.com/pu...4.fc14.src.rpm
> > codeblocks-10.05-4.fc14.src.rpm :
Unpack the SRC.RPM to "/home/oracle/rpm/redhat/SOURCES/"
... and run 'rpmbuild -bb codeblocks_el55.spec' from any location.
(codeblocks_el55.spec is from the unpacked codeblocks-10.05-src.tar.bz2.
Two "typos" were edited in lines 6 and 52.)
(And the original file codeblocks.spec was renamed to "....el55.spec".)
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,511
Rep:
Post # 10.
Inside the codeblocks-10.05-4.fc14.src.rpm you have ..
codeblocks-10.05-src.tar.bz2, codeblocks.spec, etc. etc.
This codeblocks.spec makes some error(s) on CentOS 5.
Inside the unpacked codeblocks-10.05-src.tar.bz2 is another codeblocks.spec file.
That's the one I used. The two edits were :
Line 6 : A reference to 'svn_version', but no definition to refer to.
Meaning : The package(s) would be named like 'codeblocks-1.0.0%svn_version%0el55.rpm
( I also edited 'version' to 10.05 in the Version line.)
Line 52 said : codeblocks-10.05-release.tar.bz2. The actual name is codeblocks-10.05-src.tar.bz2.
..
Inside the codeblocks-10.05-4.fc14.src.rpm you have ..
codeblocks-10.05-src.tar.bz2, codeblocks.spec, etc. etc.
This codeblocks.spec makes some error(s) on CentOS 5.
Inside the unpacked codeblocks-10.05-src.tar.bz2 is another codeblocks.spec file.
That's the one I used. The two edits were :
Line 6 : A reference to 'svn_version', but no definition to refer to.
Meaning : The package(s) would be named like 'codeblocks-1.0.0%svn_version%0el55.rpm
( I also edited 'version' to 10.05 in the Version line.)
Line 52 said : codeblocks-10.05-release.tar.bz2. The actual name is codeblocks-10.05-src.tar.bz2.
..
i see now. I'll update the spec from tar with your recommendations and see if it works tonight.
Thank you!
You can just use the already edited file, attached to post #9 : codeblocks_el55.spec.txt
Click it, and it can be downloaded.
..
hmm.
Code:
wget ftp://download.fedora.redhat.com/pub/fedora/linux/releases/14/Everything/source/SRPMS/codeblocks-10.05-4.fc14.src.rpm
[oracle@server rpm]$ rpm -ihv codeblocks-10.05-4.fc14.src.rpm
warning: codeblocks-10.05-4.fc14.src.rpm: Header V3 RSA/SHA256 signature: NOKEY, key ID 97a1071f
1:codeblocks warning: user mockbuild does not exist - using root
warning: group mockbuild does not exist - using root
########################################### [100%]
error: unpacking of archive failed on file /home/oracle/rpm/redhat/SOURCES/codeblocks-10.05-D.patch;4d09674b: cpio: MD5 sum mismatch
and after 30 minutes of rpmbuild's gibberish i for 3 rpm and installation was painless.
knudfl, thank you very much for your tips - without them i would not be able to get this done.
Last edited by DBabo; 12-15-2010 at 11:40 PM.
Reason: solution:
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.