Code::Blocks Forums

User forums => Help => Topic started by: nostromo on November 30, 2006, 09:23:47 AM

Title: Compile errors in Slackware 10.2
Post by: nostromo on November 30, 2006, 09:23:47 AM
I read the wiki about installing C::B from source and I also tried to find
some answers searching this forum but I couldn't find any.
I tried to install the the package for Slackware which I found here
(codeblocks-1.0.0.svn.3253-i686-1jsa.tgz) and it worked out of a box,
but when I try to build my own package from source then I get some errors.
I have installed wxGTK-2.6.3-i486-1asz.tgz which I found at linuxpackages
and I downloaded latest SVN build of C::B build 3295.
After 'make' I get these errors:

*****************************************************************************
ccoptionsdlg.cpp: In member function `bool
   CCOptionsDlg::ValidateReplacementToken(wxString&, wxString&)':
ccoptionsdlg.cpp:149: error: `wxRegEx' undeclared (first use this function)
ccoptionsdlg.cpp:149: error: (Each undeclared identifier is reported only once
   for each function it appears in.)
ccoptionsdlg.cpp:149: error: syntax error before `(' token
ccoptionsdlg.cpp:152: error: `re' undeclared (first use this function)
make[4]: *** [ccoptionsdlg.lo] Error 1
make[4]: Leaving directory `/usr/src/rpm/SOURCES/codeblocks-rev3295/src/plugins/codecompletion'
make[3]: *** [all-recursive] Error 1
make[3]: Leaving directory `/usr/src/rpm/SOURCES/codeblocks-rev3295/src/plugins/codecompletion'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/usr/src/rpm/SOURCES/codeblocks-rev3295/src/plugins'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/usr/src/rpm/SOURCES/codeblocks-rev3295/src'
make: *** [all-recursive] Error 1
********************************************************************************

Please help me to understand how to compile it. I especially beg those
who are using Slackware to help me.

I must say that C::B is very good software for me because it has such great
features which are very helpfull for people who are trying to learn cpp like me.
Title: Re: Compile errors in Slackware 10.2
Post by: killerbot on November 30, 2006, 09:29:47 AM
this should already been have fixed in a later revision --> update your sources again please
Title: Re: Compile errors in Slackware 10.2
Post by: manciuleas on November 30, 2006, 12:01:29 PM
Hi,

I had similar problems when compiling codeblocks on Slackware 11.0 using the wxGTK package you mentioned. It turned out that the wxGTK package misses some libraries, so I had to compile the whole wxWidgets stuff on my own. Afterwards it compiled without problems. I used the scripts (wxwidget.SlackBuild) found at http://www.slackbuilds.net/forum/viewtopic.php?pid=957 and the sources from http://prdownloads.sourceforge.net/wxwindows/wxWidgets-2.6.3.tar.gz.

Regards
Title: Re: Compile errors in Slackware 10.2
Post by: nostromo on November 30, 2006, 01:04:33 PM
@manciuleas
and how did you implement/use that script?
I tried to run it in unpacked wxwidget dir but it gave me:
impossible d'exécuter ce programme !

I don't speak French so I couldn't understand what do I need to
with it.
Title: Re: Compile errors in Slackware 10.2
Post by: manciuleas on November 30, 2006, 01:15:36 PM
This means that you ran the script as root. Either run it as an ordinary user or comment the following lines in the script:

# ------------------------------
# Action !
# ------------------------------
# est-ce l'utilisateur root ?
# if test $UID -eq 0; then
#     echo "impossible d'exécuter ce programme !"
#     exit
# else

....

#fi (on the last line)
Title: Re: Compile errors in Slackware 10.2
Post by: nostromo on November 30, 2006, 05:23:48 PM
No that didn't help me. I also tried to build wxGTK in the way it
was mentioned in wiki. I installed it and then I tried to build C::B
,without success because in the end I got these errors:

**********************************************************************
macrosmanager.cpp: In member function `void
   MacrosManager::ReplaceMacros(wxString&, ProjectBuildTarget*, bool)':
macrosmanager.cpp:356: error: `LoadBufferRedirectOutput' undeclared (first use
   this function)
macrosmanager.cpp:356: error: (Each undeclared identifier is reported only once
   for each function it appears in.)
make[4]: *** [macrosmanager.lo] Error 1
make[4]: Leaving directory `/usr/src/rpm/SOURCES/Codeblocks-1.0-rev3315/src/sdk'
make[3]: *** [all-recursive] Error 1
make[3]: Leaving directory `/usr/src/rpm/SOURCES/Codeblocks-1.0-rev3315/src/sdk'
make[2]: *** [all] Error 2
make[2]: Leaving directory `/usr/src/rpm/SOURCES/Codeblocks-1.0-rev3315/src/sdk'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/usr/src/rpm/SOURCES/Codeblocks-1.0-rev3315/src'
make: *** [all-recursive] Error 1
***********************************************************************

I really don't know what more should I do. Please help me.

@manciuleas
when I tried your script, I managed to build a wxGTK package and I
installed it as it was but in the end after issuing ./bootstrap in C::B dir
I received an error that wxGTK is not installed!?!?!
Title: Re: Compile errors in Slackware 10.2
Post by: manciuleas on November 30, 2006, 06:23:55 PM
You should not build only the wxGTK package, but the whole wxWidgets library. Use the source I pointed you to.
Below is the wxwidgets.SlackBuild script I'm using. You have to replace -mtune with -mcpu because you're using Slack 10.2. Additionally create a file doinst.sh in the same directory where the wxwidgets.SlackBuild script and the source are and insert this command:
( cd usr/bin ; ln -sf /usr/lib/wx/config/gtk2-unicode-release-2.6 wx-config )
Don't forget to hit enter at the end of the line and also to set the execution bits (chmod +x doinst.sh).

wxwidgets.SlackBuild

*************** cut here ****************

#! /bin/bash

# SlackBuild pour construire le paquet 'wxWidgets' .tgz (Slackware).
# $Id: wxwidgets.SlackBuild,v 1.2 2006-08-25 17:51:53+02 olivier Exp $
#
# Certains paramètres sont nécessaires, afin de pouvoir
# installer plus tard wxPython.
# Choix du gui -> GTK+.
# Désactivation du support pour l'OpenGL.
#


# ------------------------------
# Variables  configurer
# ------------------------------
ARCH=${ARCH:-i486} # architecture du processeur
NAME="seb"         # initiales du contributeur (3 lettres)
BUILD=${BUILD:-2}  # version du paquet

SOURCE="wxWidgets-2.6.3.tar.gz"
OPT="--enable-gui --enable-shared --enable-optimise
--disable-debug --enable-compat24 --enable-sockets
--enable-geometry --enable-unicode --enable-display
--with-gtk2 --without-opengl --enable-threads"
#DOC=

CWD="$PWD"
PKG="$CWD/build-wxWidgets"
LOGS="$CWD/logs"


# ------------------------------
# Variables du ./configure
# ------------------------------
if test $ARCH = "i386"; then
    CPUOPT="-O2 -march=$ARCH -mtune=i686"
elif test $ARCH = "i486"; then
    CPUOPT="-O2 -march=$ARCH -mtune=i686"
elif test $ARCH = "i686"; then
    CPUOPT="-O2 -march=$ARCH -mtune=i686"
elif test $ARCH = "x86_64"; then
    CPUOPT="-O2 -march=$ARCH"
fi
PREFIX="/usr"
SYSCONFDIR="/etc"
LOCALSTATEDIR="/var"


# ------------------------------
# Fonctions
# ------------------------------
# renvoie un tableau
function splitUp()
{
    # variable
    declare -a array

    # nb total d'éléments
    n=$(echo $1 | gawk -F . '{print NF;}')

    # est-ce un tarball ?
    if test `echo $1 | cut -d . -f $(( n - 1 ))` = "tar"; then
        # le prfixe
        array=("${array
Title: Re: Compile errors in Slackware 10.2
Post by: nostromo on November 30, 2006, 09:26:00 PM
 :oops:have a problem with this:
Erreur: vérifiez les journaux dans /home/user/Download/build/logs
Title: Re: Compile errors in Slackware 10.2
Post by: manciuleas on November 30, 2006, 10:24:06 PM
This means that you have an error. Look into the log files. Have you replaced -mtune with -mcpu?
Title: Re: Compile errors in Slackware 10.2
Post by: manciuleas on November 30, 2006, 10:26:29 PM
And you should *not* unpack the sources. Just run wxwidgets.SlackBuild in the directory where you downloaded wxWidgets-2.6.3.tar.gz. And, don't forget to have doinst.sh present in the same directory.
Title: Re: Compile errors in Slackware 10.2
Post by: nostromo on November 30, 2006, 11:06:13 PM
The config-.log said:
./wxwidgets.SlackBuild.sh: line 107: ./configure: No such file or directory
Title: Re: Compile errors in Slackware 10.2
Post by: nostromo on December 01, 2006, 11:39:41 AM
I managed to build wxWidgets package, I installed it, did ldconfig.
After that, I tried to build C::B and it gave me these errors:

************************************************************************
macrosmanager.cpp: In member function `void
   MacrosManager::ReplaceMacros(wxString&, ProjectBuildTarget*, bool)':
macrosmanager.cpp:356: error: `LoadBufferRedirectOutput' undeclared (first use
   this function)
macrosmanager.cpp:356: error: (Each undeclared identifier is reported only once
   for each function it appears in.)
make[4]: *** [macrosmanager.lo] Error 1
make[4]: Leaving directory `/usr/src/rpm/SOURCES/Codeblocks-1.0-rev3315/src/sdk'
make[3]: *** [all-recursive] Error 1
make[3]: Leaving directory `/usr/src/rpm/SOURCES/Codeblocks-1.0-rev3315/src/sdk'
make[2]: *** [all] Error 2
make[2]: Leaving directory `/usr/src/rpm/SOURCES/Codeblocks-1.0-rev3315/src/sdk'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/usr/src/rpm/SOURCES/Codeblocks-1.0-rev3315/src'
make: *** [all-recursive] Error 1
**************************************************************************

and that's it. :?
I'm appealing the developers to make this little bit easier.
I spent hours and hours (more like days) trying to build this
package without any decent result.
Title: Re: Compile errors in Slackware 10.2
Post by: nostromo on December 01, 2006, 05:13:26 PM
There is some problem with the 'make', after I issued it I got those
errors that you can see in previous post. So I looked around and noticed
that there is no macrosmanager.lo, instead there was macrosmanager.loT.
Title: Re: Compile errors in Slackware 10.2
Post by: nostromo on December 03, 2006, 01:58:41 PM
Anyone, please???