Forum Moderators: bakedjake

Message Too Old, No Replies

Problem with make on RedHat

similar errors when trying to install different programs

         

AprilS

9:08 am on Jul 30, 2004 (gmt 0)

10+ Year Member



I am having problems installing programs on our new dedicated running RedHat Enterprise.

I first thought it was a problem with "postfix" - so then I went to install qmail (which "make" worked fine and did for some other programs too) - but now I'm trying to install "maildrop" and I'm getting very similar errors as I was getting when trying to install postfix.

I have LITERALLY spent the past 48 'working' hours looking all over online to find a solution.

I don't understand the errors I'm getting - but I'm assuming it is due to some sort of compiler missing or not setup correctly out of the box (server is new).

If you need more info PLEASE let me know - but to save space - below are the last few lines when running "make"

/downloads/qmailrocks/maildrop-1.6.3/maildrop/maildrop.C:23: undefined reference to `__gxx_personality_v0'
libmdcommon.a(mio.o)(.text+0x1c1): In function `Mio::~Mio [in-charge deleting]()':
/downloads/qmailrocks/maildrop-1.6.3/maildrop/mio.C:65: undefined reference to `operator delete(void*)'
libmdcommon.a(mio.o)(.text+0x78a): In function `MioStdio::~MioStdio [in-charge deleting]()':
/downloads/qmailrocks/maildrop-1.6.3/maildrop/mio.C:233: undefined reference to `operator delete(void*)'
libmdcommon.a(mio.o)(.gnu.linkonce.d._ZTI3Mio+0x0): In function `mopen(char const*, int, unsigned)':
/downloads/qmailrocks/maildrop-1.6.3/maildrop/mio.C:15: undefined reference to `vtable for __cxxabiv1::__class_type_info'
libmdcommon.a(mio.o)(.gnu.linkonce.d._ZTI8MioStdio+0x0):/downloads/qmailrocks/maildrop-1.6.3/maildrop/mio.C:15: undefined reference to `vtable for __cxxabiv1::__si_class_type_info'
libmdcommon.a(mio.o)(.eh_frame+0x12):/downloads/qmailrocks/maildrop-1.6.3/maildrop/mio.C:18: undefined reference to `__gxx_personality_v0'
libmdcommon.a(tempfile.o)(.text+0xc5): In function `TempFile::~TempFile [not-in-charge]()':
/downloads/qmailrocks/maildrop-1.6.3/maildrop/tempfile.C:22: undefined reference to `operator delete[](void*)'
libmdcommon.a(tempfile.o)(.text+0x115): In function `TempFile::~TempFile [in-charge]()':
/downloads/qmailrocks/maildrop-1.6.3/maildrop/tempfile.C:22: undefined reference to `operator delete[](void*)'
libmdcommon.a(tempfile.o)(.text+0x16d): In function `TempFile::~TempFile [in-charge deleting]()':
/downloads/qmailrocks/maildrop-1.6.3/maildrop/tempfile.C:22: undefined reference to `operator delete[](void*)'
libmdcommon.a(tempfile.o)(.text+0x244): In function `TempFile::name(char const*)':
/downloads/qmailrocks/maildrop-1.6.3/maildrop/tempfile.C:64: undefined reference to `operator new[](unsigned)'
libmdcommon.a(tempfile.o)(.text+0x289):/downloads/qmailrocks/maildrop-1.6.3/maildrop/tempfile.C:57: undefined reference to `operator delete[](void*)'
libmdcommon.a(tempfile.o)(.text+0x163): In function `TempFile::~TempFile [in-charge deleting]()':
/downloads/qmailrocks/maildrop-1.6.3/maildrop/tempfile.C:25: undefined reference to `operator delete(void*)'
libmdcommon.a(tempfile.o)(.gnu.linkonce.d._ZTI8TempFile+0x0):/downloads/qmailrocks/maildrop-1.6.3/maildrop/tempfile.C:7: undefined reference to `vtable for __cxxabiv1::__si_class_type_info'
libmdcommon.a(tempfile.o)(.eh_frame+0x11):/downloads/qmailrocks/maildrop-1.6.3/maildrop/tempfile.C:12: undefined reference to `__gxx_personality_v0'
collect2: ld returned 1 exit status
make[1]: *** [maildrop] Error 1
make[1]: Leaving directory `/downloads/qmailrocks/maildrop-1.6.3/maildrop'
make: *** [check-recursive] Error 1

When I do

rpm -qa ¦ grep "gcc"
I get...
gcc-c++-3.2.3-20
libgcc-3.2.3-20
gcc-3.2.3-20

When I do

whereis g++
I get...
g++: /usr/bin/g++ /usr/local/bin/g++ /usr/share/man/man1/g++.1.gz

PLEASE HELP!

MattyMoose

4:37 pm on Jul 30, 2004 (gmt 0)

10+ Year Member



What were the very first errors?

Usually the first errors lead to more that are based on the first few... Can you post those?

But otherwise, I've seen this *type* of problem before, but I can't remember specifically any fixes for it.

Please post the first few lines of the errors.

-MM

AprilS

6:59 pm on Jul 30, 2004 (gmt 0)

10+ Year Member



Here are the first few lines:

make all-gmake-check FOO=BAR
make[1]: Entering directory `/downloads/qmailrocks/maildrop-1.6.3'
make[1]: Leaving directory `/downloads/qmailrocks/maildrop-1.6.3'
Making all in numlib
make[1]: Entering directory `/downloads/qmailrocks/maildrop-1.6.3/numlib'
make all-am
make[2]: Entering directory `/downloads/qmailrocks/maildrop-1.6.3/numlib'
make[2]: Leaving directory `/downloads/qmailrocks/maildrop-1.6.3/numlib'
make[1]: Leaving directory `/downloads/qmailrocks/maildrop-1.6.3/numlib'
Making all in liblock
make[1]: Entering directory `/downloads/qmailrocks/maildrop-1.6.3/liblock'
make all-am
make[2]: Entering directory `/downloads/qmailrocks/maildrop-1.6.3/liblock'
make[2]: Leaving directory `/downloads/qmailrocks/maildrop-1.6.3/liblock'
make[1]: Leaving directory `/downloads/qmailrocks/maildrop-1.6.3/liblock'
Making all in rfc822
make[1]: Entering directory `/downloads/qmailrocks/maildrop-1.6.3/rfc822'
make all-am
make[2]: Entering directory `/downloads/qmailrocks/maildrop-1.6.3/rfc822'
make[2]: Leaving directory `/downloads/qmailrocks/maildrop-1.6.3/rfc822'
make[1]: Leaving directory `/downloads/qmailrocks/maildrop-1.6.3/rfc822'
Making all in rfc2045
make[1]: Entering directory `/downloads/qmailrocks/maildrop-1.6.3/rfc2045'
make all-am
make[2]: Entering directory `/downloads/qmailrocks/maildrop-1.6.3/rfc2045'
make[2]: Leaving directory `/downloads/qmailrocks/maildrop-1.6.3/rfc2045'
make[1]: Leaving directory `/downloads/qmailrocks/maildrop-1.6.3/rfc2045'
Making all in maildir
make[1]: Entering directory `/downloads/qmailrocks/maildrop-1.6.3/maildir'
make all-am
make[2]: Entering directory `/downloads/qmailrocks/maildrop-1.6.3/maildir'
make[2]: Leaving directory `/downloads/qmailrocks/maildrop-1.6.3/maildir'
make[1]: Leaving directory `/downloads/qmailrocks/maildrop-1.6.3/maildir'
Making all in maildrop
make[1]: Entering directory `/downloads/qmailrocks/maildrop-1.6.3/maildrop'
make all-am
make[2]: Entering directory `/downloads/qmailrocks/maildrop-1.6.3/maildrop'
g++ -g -O2 -I./../rfc822 -I./../rfc2045 -I.. -I./.. -Wall -o maildrop deliver.o deliverdotlock.o dotlockmaildrop.o filelock.o filter.o formatmbox.o globaltimer.o lexer.o log.o maildir.o main.o message.o messageinfo.o pipefds.o re.o recipe.o recipenode.o recipeparse.o reeval.o rematch.o rematchmsg.o rematchstr.o search.o token.o varlist.o libmdcommon.a ../maildir/libmaildir.a ../rfc822/librfc822.a ../numlib/libnumlib.a ../liblock/liblock.a `cat ../maildir/maildir.libdeps`
deliver.o(.text+0xa5): In function `delivery(char const*)':
/downloads/qmailrocks/maildrop-1.6.3/maildrop/deliver.C:246: undefined reference to `operator delete[](void*)'
deliver.o(.text+0xb5):/downloads/qmailrocks/maildrop-1.6.3/maildrop/deliver.C:246: undefined reference to `operator delete[](void*)'
deliver.o(.text+0x38a): In function `delivery(char const*)':
/downloads/qmailrocks/maildrop-1.6.3/maildrop/buffer.h:25: undefined reference to `operator delete[](void*)'
deliver.o(.text+0x398):/downloads/qmailrocks/maildrop-1.6.3/maildrop/buffer.h:25: undefined reference to `operator delete[](void*)'
deliver.o(.text+0x3a6):/downloads/qmailrocks/maildrop-1.6.3/maildrop/buffer.h:25: undefined reference to `operator delete[](void*)'
deliver.o(.text+0x3b4):/downloads/qmailrocks/maildrop-1.6.3/maildrop/buffer.h:25: more undefined references to `operator delete[](void*)' follow
deliver.o(.text+0x53d): In function `delivery(char const*)':
/downloads/qmailrocks/maildrop-1.6.3/maildrop/deliver.C:207: undefined reference to `__cxa_allocate_exception'
deliver.o(.text+0x54e):/downloads/qmailrocks/maildrop-1.6.3/maildrop/deliver.C:207: undefined reference to `typeinfo for char const*'
deliver.o(.text+0x554):/downloads/qmailrocks/maildrop-1.6.3/maildrop/deliver.C:207: undefined reference to `__cxa_throw'
deliver.o(.text+0x5d0):/downloads/qmailrocks/maildrop-1.6.3/maildrop/deliver.C:195: undefined reference to `__cxa_allocate_exception'
deliver.o(.text+0x6f2): In function `delivery(char const*)':

AprilS

6:34 pm on Aug 4, 2004 (gmt 0)

10+ Year Member



Ok, now I'm desparate! I've had this server for month now and everything has been working for quite some time but the email. I need to get it going asap.

If no one has any idea what could be causing the compile errors - could someone refer me to another help site? Does anyone know of a site like webmaster world, but for people programming in C/C++? Even though I'm installing a package - I just need help.

I have looked ALL over the web - search after search - and even looked in books - but nothing describes WHY I'm getting those compile errors.

Thank you for any assistance you can provide!

MattyMoose

7:01 pm on Aug 4, 2004 (gmt 0)

10+ Year Member



One thing that you may want to look at is the dependencies for maildrop, since you're compiling it from hand...

What configure options did you give to configure?

In the meantime, I'll have a look at what maildrop depends on (ie: what needs to be installed before maildrop will compile or run)

Another thing that may be missing is the g++ libraries.
you have libgcc-3.2.3-20, but I wonder if there's a libgcc-c++ or anything of the like. I'll have a look.

But for the moment, what do you need maildrop for? It's only used to parse incoming emails and performs actions on them -- can you do without that functionality?

marcs

7:05 pm on Aug 4, 2004 (gmt 0)

10+ Year Member



Try adding -lsdtc++ to the link libraries. Kind of looks like your compiler is trying to compile C++ as C.

Addint that to the link libraries may fix this.

AprilS

11:37 pm on Aug 4, 2004 (gmt 0)

10+ Year Member



Thank you for your responses:

I am using the following options when configuring

./configure --prefix=/usr/local --exec-prefix=/usr/local --enable-maildrop-uid=root --enable-maildrop-gid=vchkpw --enable-maildirquota

I tried doing an "up2date libgcc-c++" but up2date couldn't find that package. I will also look to see if it is available elsewhere.

marcs: I know this may sound "dumb" - but how do I add "-lsdtc++" to the link libraries?

AprilS

9:01 pm on Aug 5, 2004 (gmt 0)

10+ Year Member



I've read a couple posts online with "similar" (not exact) problems. And a few times I came accross someone saying to use an older compiler - like gcc-2.95. Would this solve the problem? If so, how do you install an older version and have your system use it as the default? This also makes me nervous as I've ready it can really hose things installing another compiler.

I would like to try marcs's suggestion and add libstdc++ to the link libraries.... but I'm not sure how to do so. Any Suggestions?

MattyMoose

9:48 pm on Aug 5, 2004 (gmt 0)

10+ Year Member




This also makes me nervous as I've ready it can really hose things installing another compiler.

Yep, I've seen some systems get pretty messed up changing gcc. It's not recommended, especially just for one application to get working.


I would like to try marcs's suggestion and add libstdc++ to the link libraries.... but I'm not sure how to do so. Any Suggestions?

To add that library to your compile options, I usually edit the Makefile that comes with the app. There may be another way (through CFLAGS/CPPFLAGS in the shell, I believe).

I usually look for a line that starts with:
CXXFLAGS
and will look something like this:
CXXFLAGS = -O -pipe -mcpu=pentiumpro -prefer-pic
(it may either be CXXFLAGS or CPPFLAGS)
What you can try is adding "-lsdtc++" (no quotes) to the end of that line, and try your make again.

I'm not sure why it's not trying to include those libraries, though...

And again, do you *need* maildrop for any specific functionality, or is it the next step in the instructions? Do you have a URL for the instructions?

-MM

AprilS

10:44 pm on Aug 5, 2004 (gmt 0)

10+ Year Member



MattyMoose - Thank you for your reply. In the Makefile there was a line
CPPFLAGS =
So then I changed it to
CPPFLAGS = -lsdtc++
and ran make again, but got the same errors.

Yes, I'm just following the next step of instructions [blush]. I was referred to a resource called Qmail Rocks - which is basically a tutorial that is a combination of all the good Qmail tutorials online. Even though I'm stuck on step 7.... I have to say it does ROCK, as it was going VERY SMOOTH...until I hit this roadblock. Below is a URL to the instruction 7 I'm stuck on (maildrop):

[qmailrocks.org...]

If it's something I can go back and install later without a problem, I would definately continue on with the instructions.

drbrain

10:51 pm on Aug 5, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



CPPFLAGS is for the C preprocessor, not for the C++ compiler. Use CXXFLAGS for the C++ compiler.

MattyMoose

10:52 pm on Aug 5, 2004 (gmt 0)

10+ Year Member




If it's something I can go back and install later without a problem, I would definately continue on with the instructions.

To quote the page you linked to:


Maildrop is a mail filtering agent which can be used to filter messages as they arrive on the server. You will probably notice, once this installation in complete, that you don't really use maildrop. However, it's a cool tool and it's worth having around if you ever decide to get crazy with filtering your imcoming mail.

So, no, you can go ahead and skip it and move on. :)

MattyMoose

10:54 pm on Aug 5, 2004 (gmt 0)

10+ Year Member




CPPFLAGS is for the C preprocessor, not for the C++ compiler. Use CXXFLAGS for the C++ compiler.

Thanks DrBrain, I never knew the distinction before!

-MM

AprilS

11:00 pm on Aug 5, 2004 (gmt 0)

10+ Year Member



Ya, I was just trying to get it going for spam filter.... BUT I just moved on and ...... Compile ERRORS :(

./configure --enable-cgibindir=/path/to/your/cgi-bin --enable-htmldir=/path/to/your/html/directory
....with my correct paths in of course ;-)

Here is the output from doing the "make && make install-strip"

make all-am
make[1]: Entering directory `/downloads/qmailrocks/qmailadmin-1.2.1'
source='qmailadmin.c' object='qmailadmin.o' libtool=no \
depfile='.deps/qmailadmin.Po' tmpdepfile='.deps/qmailadmin.TPo' \
depmode=gcc3 /bin/sh ./depcomp \
gcc -I. -I. -I. -I. -g -O2 -c `test -f 'qmailadmin.c' ¦¦ echo './'`qmailadmin.c
qmailadmin.c:28:29: vpopmail_config.h: No such file or directory
qmailadmin.c:36:22: vpopmail.h: No such file or directory
qmailadmin.c:37:19: vauth.h: No such file or directory
qmailadmin.c:38:21: vlimits.h: No such file or directory
qmailadmin.c: In function `main':
qmailadmin.c:143: warning: assignment makes pointer from integer without a cast
qmailadmin.c:226: warning: assignment makes pointer from integer without a cast
qmailadmin.c:234: dereferencing pointer to incomplete type
qmailadmin.c:238: dereferencing pointer to incomplete type
qmailadmin.c: In function `init_globals':
qmailadmin.c:386: `VPOPMAIL_UMASK' undeclared (first use in this function)
qmailadmin.c:386: (Each undeclared identifier is reported only once
qmailadmin.c:386: for each function it appears in.)
/usr/include/sys/stat.h: At top level:
qmailadmin.c:73: storage size of `Limits' isn't known
make[1]: *** [qmailadmin.o] Error 1
make[1]: Leaving directory `/downloads/qmailrocks/qmailadmin-1.2.1'
make: *** [all] Error 2

drbrain

11:15 pm on Aug 5, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



qmailadmin.c:28:29: vpopmail_config.h: No such file or directory

qmailadmin.c:28 looks something like this:

#include <vpopmail.h>

Which means that vpopmail is to be found in a system include dir.

Did you install vpopmail like it says to do in the INSTALL file?

AprilS

11:39 pm on Aug 5, 2004 (gmt 0)

10+ Year Member



Yes, I installed vpopmail as per the instructions. I just did a locate on "vpopmail" and it did the .h files that appeared in the compile error.
/home/vpopmail/include/vpopmail_config.h
/home/vpopmail/include/vpopmail.h

SHOOT - SORRY - I wasn't logged in as root on that one...thats why it couldn't see the files.

AprilS

9:58 pm on Aug 8, 2004 (gmt 0)

10+ Year Member



MORE compile errors!
OK - Now I'm installing Courier-imap and I get another compile error:

make all-gmake-check FOO=BAR
make[1]: Entering directory `/downloads/qmailrocks/courier-imap-3.0.5'
make[1]: Leaving directory `/downloads/qmailrocks/courier-imap-3.0.5'
Making all in numlib
make[1]: Entering directory `/downloads/qmailrocks/courier-imap-3.0.5/numlib'
make all-am
make[2]: Entering directory `/downloads/qmailrocks/courier-imap-3.0.5/numlib'
make[2]: Leaving directory `/downloads/qmailrocks/courier-imap-3.0.5/numlib'
make[1]: Leaving directory `/downloads/qmailrocks/courier-imap-3.0.5/numlib'
Making all in bdbobj
make[1]: Entering directory `/downloads/qmailrocks/courier-imap-3.0.5/bdbobj'
make all-am
make[2]: Entering directory `/downloads/qmailrocks/courier-imap-3.0.5/bdbobj'
g++ -g -O2 -o testbdb testbdb.o libbdbobj.a -ldb
testbdb.o(.eh_frame+0x12):/downloads/qmailrocks/courier-imap-3.0.5/bdbobj/testbdb.C:9: undefined reference to `__gxx_personality_v0'
collect2: ld returned 1 exit status
make[2]: *** [testbdb] Error 1
make[2]: Leaving directory `/downloads/qmailrocks/courier-imap-3.0.5/bdbobj'
make[1]: *** [all] Error 2
make[1]: Leaving directory `/downloads/qmailrocks/courier-imap-3.0.5/bdbobj'
make: *** [all-recursive] Error 1

What is going on? I haven't been able to compile postfix, maildrop and now courier-imap.

AprilS

7:10 am on Aug 9, 2004 (gmt 0)

10+ Year Member



YAAAAAAA!

OK - So, "I'm" Happy - and hopefully I can save someone from the 4 weeks of anguish I went through with this problem!

The solution I was able to come up with is adding the following line towards the top of my "Configure" files (before running configure)

LDFLAGS=-lstdc++

Adding this one line to my configure file(s) has allowed me to go back and install quite a few programs I have been trying to install in the past month.