Compiling Problems

First off I want to say that I'm a novice at this.

I'm trying to compile a software program and it worked perfect before with RHEL 3, gcc 3.2.3. Here's a small history.

1) When compiling in the past with gcc 3.2.3 the person that wrote the software said he wrote it using gcc 3.3 and 3.4, so he used this to be compatable with gcc 3.2.3.

perl -pi -ne 's/atomic_word\.h/atomicity.h/' ./*.h ./*.cc

2) The problem is... I'm now on RHEL 4, with gcc 3.4.5 and it's not compiling. I did run up2date -i compat-libstdc++-33 to install gcc 3.2.3 but it's not picking that up either.

I apologize for rambling here, but I want to be sure I'm explaining this properly.

Thanks,
Fireman54
Fireman54Asked:
Who is Participating?
 
ravenplCommented:
> The problem is, I don't know how to tell this program how to grab the gcc 3.2.3 instead of the gcc 3.4.5
up2date -i compat-gcc-32 compat-gcc-32-c++
then instead gcc or g++ You have to call gcc32 or g++32
0
 
ravenplCommented:
And what's the error while compiling?
It's common, that each next version of gcc is more strict on c++ standads(syntax).
0
 
Fireman54Author Commented:
[root@domain emse]# make
make  all-recursive
make[1]: Entering directory `/root/respondatamailer/fum/emse'
Making all in src
make[2]: Entering directory `/root/respondatamailer/fum/emse/src'
source='main.cc' object='main.o' libtool=no \
depfile='.deps/main.Po' tmpdepfile='.deps/main.TPo' \
depmode=gcc3 /bin/sh ../depcomp \
g++ -DHAVE_CONFIG_H -I. -I. -I..   -I/usr/mysql/include/mysql  -O3 -fomit-frame-pointer -DHOSTNAME_CHECK='"srv9.net"' -DWEBDOMAIN='"srv9.net"' -DMAILDOMAIN='"srv9.net"' -c -o main.o `test -f 'main.cc' || echo './'`main.cc
In file included from mailq.h:12,
                 from main.cc:17:
cmd.h:13: error: explicit qualification in declaration of `void emse::cmd::list_emails(i::conn*, std::string)'
cmd.h:15: error: explicit qualification in declaration of `void emse::cmd::fini()'
make[2]: *** [main.o] Error 1
make[2]: Leaving directory `/root/respondatamailer/fum/emse/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/root/respondatamailer/fum/emse'
make: *** [all] Error 2
0
Introducing Cloud Class® training courses

Tech changes fast. You can learn faster. That’s why we’re bringing professional training courses to Experts Exchange. With a subscription, you can access all the Cloud Class® courses to expand your education, prep for certifications, and get top-notch instructions.

 
ravenplCommented:
> explicit qualification in declaration of `void emse::cmd::list_emails(i::conn*, std::string)'
You can't declare member of one namespace in another one(it was possible earlier)
Consider:
namespace B {
        int A::f();     // Declaration
}
What is declared. Is it B::A::f(), or B::f()? That's why it's forbidden.

Either compile using older gcc or ask the author of the code to fix it, or fix it by Yourself.
0
 
Fireman54Author Commented:
I have no way of getting ahold of the author. So compiling it with gcc 3.2.3 would work for me.

I don't know if you remember me from the other day when you gave me the answer... up2date -i compat-libstdc++-33 . So I have gcc 3.2.3 on my server. The problem is, I don't know how to tell this program how to grab the gcc 3.2.3 instead of the gcc 3.4.5.

0
 
Fireman54Author Commented:
Ok, I ran up2date -i compat-gcc-32 compat-gcc-32-c++

Now please tell me how to call gcc32 or g++32 when compiling. I'm real new at this (very new), I don't know where to call it from.

Thanks,
0
 
Fireman54Author Commented:
Ravenpl... gcc and g++ are both referenced in the 'configure' file. Is this where I'll be changing it, and which one... gcc or g++ ?
0
 
ravenplCommented:
If You use it with configure, try
CC=gcc32 CXX=g++32 ./configure more options
otherwise edit makefile and change gcc calls

Also, You may change the configure scipt itself (as You suggested) - change both gcc & g++
0
 
Fireman54Author Commented:
Ravenpl... Thank you very much, it worked perfectly.

0
 
ravenplCommented:
Glad I could help
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.