Programming This 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.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
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.
|
 |
12-01-2009, 09:22 AM
|
#1
|
Member
Registered: Feb 2009
Posts: 52
Rep:
|
installing codeblocks on centos 5.4
I am trying to install codeblocks on centos5.4
I am following the tutorial from :
PHP Code:
http://wiki.codeblocks.org/index.php?title=Installing_Code::Blocks_from_source_on_RPM_based_distributions
I on the section that says:
Code:
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?
|
|
|
12-01-2009, 11:18 AM
|
#2
|
Senior Member
Registered: Dec 2005
Location: London, ON, Canada
Distribution: Arch, Ubuntu, Slackware, OpenBSD, FreeBSD
Posts: 1,853
Rep:
|
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.
|
|
|
12-01-2009, 01:27 PM
|
#3
|
Member
Registered: Feb 2009
Posts: 52
Original Poster
Rep:
|
Quote:
Originally Posted by indienick
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.
|
I first tried the tutorial:
http://wiki.codeblocks.org/index.php..._distributions
and
with no luck
went on to
http://vunh.blogspot.com/2009/05/cod...in-centos.html
but doesn't seem to do the trick
Code:
------------------------------------------------------
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]#
|
|
|
12-01-2009, 02:42 PM
|
#4
|
LQ 5k Club
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,520
|
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
.....
|
|
|
12-01-2009, 02:47 PM
|
#5
|
Member
Registered: Feb 2009
Posts: 52
Original Poster
Rep:
|
Quote:
Originally Posted by knudfl
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
and idc about my formatting but thanks

|
|
|
12-01-2009, 03:33 PM
|
#6
|
LQ 5k Club
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,520
|
Codeblocks configure :
You may save some time, this is from ./configure
.. with a wxGTK 2.6.x
Quote:
checking for wxWidgets version >= 2.8.0... no
(version 2.6.x is not new enough)
|
So minimum version is 2.8.0
About rpmforge.repo https://rpmrepo.org/RPMforge
https://rpmrepo.org/RPMforge/Using
.....
|
|
|
12-02-2009, 01:08 PM
|
#7
|
Member
Registered: Feb 2009
Posts: 52
Original Poster
Rep:
|
|
|
|
12-15-2010, 12:29 AM
|
#8
|
Member
Registered: Feb 2003
Distribution: Fedora {latest}
Posts: 568
Rep:
|
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)
i also did :
Code:
[oracle@server trunk]$ cd ..
[oracle@server rpm]$ pwd
/home/oracle/rpm
[oracle@server rpm]$ find ./ -name cbstatusbar.h
./trunk/src/include/cbstatusbar.h
Any help will be much appreciated.
P.S. It's getting too late to think clear - i hope i'm missing smth obvious. So here is the history:
Code:
mkdir /tmp/$USER/rpm
1004 echo "%_tmppath /tmp/$USER/rpm" >> .rpmmacros
1005 mkdir /tmp/oracle
1006 mkdir /tmp/$USER/rpm
1007 echo "%_tmppath /tmp/$USER/rpm" >> .rpmmacros
1008 cd ron
1009 cd rpm
1010 ls -l
1011 cd redhat/
1012 more ~/.rpmmacros
1013 cd ls -l
1014 ls -l
1015 RPM_TOPDIR=`rpm --eval %{_topdir}`
1016 wget http://prdownload.berlios.de/codeblocks/codeblocks-10.05-0.fc13.src.rpm
1017 ;s =;
1018 ls -
1019 lls -l
1020 ls -l
1021 mv ./codeblocks-10.05-0.fc13.src.rpm ../
1022 ls -l
1023 cd ..
1024 ls -
1025 ls -l
1026 mv codeblocks-10.05-0.fc13.src.rpm ./redhat/SRPMS/
1027 rpmbuild --rebuild ./redhat/SRPMS/codeblocks-10.05-0.fc13.src.rpm
1028 ls /usr/lib/libwx_gtk*
1029 pwd
1030 ;s =
1031 ls -l
1032 svn checkout svn://svn.berlios.de/codeblocks/trunk
1033 ./bootstrap
1034 cd ./trunk/
1035 ls
1036 more ./README
1037 more ./bootstrap
1038 ./bootstrap
1039 ./configure --enable-contrib
1040 make dist
1041 pwd
1042 cd ..
1043 ls -l
1044 ls -l ./redhat/SRPMS/
1045 date
1046 cd trunk/
1047 ls -rlt
1048 cp ./codeblocks-10.05svn6897.tar.bz2 ../redhat/SOURCES/
1049 cd ..
1050 ls -l
1051 cd ./trunk/
1052 ls -l
1053 ls -rtl
1054 rpmbuild -bs codeblocks.spec
1055 rpmbuild -bs codeblocks.spec
1056 rpmbuild --rebuild codeblocks-1.0_0.svn.6897-0.el5.src.rpm
1057 rpmbuild --rebuild /home/oracle/rpm/redhat/SRPMS/codeblocks-1.0_0.svn.6897-0.el5.src.rpm
Last edited by DBabo; 12-15-2010 at 12:32 AM.
|
|
|
12-15-2010, 06:18 AM
|
#9
|
LQ 5k Club
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,520
|
Post #8 @DBabo : Did you read all the above posts ?
The trick is to guess, what will fit together on CentOS 5.x :
# yum install wxGTK-devel intltool
The 'wxGTK-devel' ( version 2.8.11 ) is from the EPEL repo ..
https://fedoraproject.org/wiki/EPEL
" "Extra Packages for Enterprise Linux (EPEL).." "
https://fedoraproject.org/wiki/EPEL/FAQ#howtouse
(Suggest : disable the rpmforge.repo, if present in /etc/yum.repos.d/.)
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".)
The most easy solution is of course # yum install codeblocks
.. which will provide version : 10.05-1.el5 from EPEL.
http://wiki.centos.org/AdditionalResources/Repositories
..
Last edited by knudfl; 12-15-2010 at 06:19 AM.
|
|
1 members found this post helpful.
|
12-15-2010, 10:09 AM
|
#10
|
Member
Registered: Feb 2003
Distribution: Fedora {latest}
Posts: 568
Rep:
|
knudfl,
Quote:
Originally Posted by knudfl
Post #8 @DBabo : Did you read all the above posts ? ..
|
yes, indeed i read all the above. it's actually your post about wxGTK-2.8 ( not 2.6 as suggested on C:B wiki) that got be going.
Quote:
> Two "typos" were edited in lines 6 and 52.)
|
Do i understand correctly that the original ( from svn trunk) spec has 2 typos and they were fixed in the srpm you are referring to?
Quote:
The most easy solution is of course # yum install codeblocks
.. which will provide version : 10.05-1.el5 from EPEL.
|
oh, now that's embarrassing ....
Since i started already with the source-> rpm route, i'll give it a second try tonight. But definitely i'll try the yum route
thank you and let me know, please.
Last edited by DBabo; 12-15-2010 at 10:10 AM.
Reason: spell
|
|
|
12-15-2010, 10:34 AM
|
#11
|
LQ 5k Club
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,520
|
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.
..
|
|
|
12-15-2010, 11:02 AM
|
#12
|
Member
Registered: Feb 2003
Distribution: Fedora {latest}
Posts: 568
Rep:
|
Quote:
Originally Posted by knudfl
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.
..
|
i see now. I'll update the spec from tar with your recommendations and see if it works tonight.
Thank you!
|
|
|
12-15-2010, 11:12 AM
|
#13
|
LQ 5k Club
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,520
|
Quote:
I'll update the spec from tar with your recommendations
|
You can just use the already edited file, attached to post #9 : codeblocks_el55.spec.txt
Click it, and it can be downloaded.
..
|
|
|
12-15-2010, 09:57 PM
|
#14
|
Member
Registered: Feb 2003
Distribution: Fedora {latest}
Posts: 568
Rep:
|
Quote:
Originally Posted by knudfl
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
what am i missing today?
I'm missing a new "feature"... https://bugzilla.redhat.com/show_bug.cgi?id=490613
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:
|
|
|
12-16-2010, 06:54 AM
|
#15
|
LQ 5k Club
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,520
|
Yes, 'rpm -Uvh codeblocks-10.05-4.fc14.src.rpm' isn't working on CentOS5.
"Unpack" is 'rpm2cpio codeblocks-10.05-4.fc14.src.rpm | cpio -idmv
... as your link says.
I hoped, you would guess that by writing "Unpack to ////SOURCE/"
instead of "install". ( Post # 9.)
..
|
|
|
All times are GMT -5. The time now is 10:34 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|