Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > Developer Center > Help compile Metamail?

Help compile Metamail?
Thread Tools
Xeo
Moderator Emeritus
Join Date: Mar 2001
Location: Austin, MN, USA
Status: Offline
Reply With Quote
Jun 5, 2003, 10:13 AM
 
I'm trying to set up a method of receiving e-mails and automatically saving the attachments as files. To do this, I am going to use a fetchmail, procmail, and metamail combination.

Fetchmail and procmail are already in OS X but metamail is not. I am having difficulty compiling metamail. Usually, if it doesn't compile on the first try, or I don't have step by step instructions to follow, I am lost.

Please help me get this installed. I don't know how to make it configure properly.

I am using the source on this page

Here is what I get when I follow the instructions of just typing "make":

Code:
(cd metamail ; make CONFIGDIR=../. CFLAGS="-g -I. " CC="cc" LDLIBS="") rm -f metamail.o cc -c -I../. -g -I. metamail.c metamail.c: In function `main': metamail.c:306: warning: passing arg 2 of `signal' from incompatible pointer type metamail.c:308: warning: passing arg 2 of `signal' from incompatible pointer type metamail.c:309: warning: passing arg 2 of `signal' from incompatible pointer type metamail.c:310: warning: passing arg 2 of `signal' from incompatible pointer type metamail.c:311: warning: passing arg 2 of `signal' from incompatible pointer type metamail.c:313: warning: passing arg 2 of `signal' from incompatible pointer type metamail.c:314: warning: passing arg 2 of `signal' from incompatible pointer type metamail.c:316: warning: passing arg 2 of `signal' from incompatible pointer type metamail.c:317: warning: passing arg 2 of `signal' from incompatible pointer type metamail.c:321: warning: passing arg 2 of `signal' from incompatible pointer type rm -f codes.o cc -c -I../. -g -I. codes.c rm -f uue.o cc -c -I../. -g -I. uue.c rm -f shared.o cc -c -I../. -g -I. shared.c rm -f putenv.o cc -c -I../. -g -I. putenv.c rm -f metamail cc -I../. -g -I. -o metamail metamail.o putenv.o codes.o uue.o shared.o ld: Undefined symbols: _gtty _stty make[1]: *** [metamail] Error 1 make: *** [basics] Error 2
Usually a "configure" file sets up the program before making but this one doesn't have that. What is the problem and how do I manually fix it?

[edit] Maybe progress... I've been searching for other people who have "undefined symbols" of _gtty and _stty and one solution is to use "termios" instead. However, I have no idea where to edit the code to make it use that. Where do I include it? What code should I change so it doesn't look for the tty's? Is this even on the right track?

Thanks.
(Last edited by Xeo; Jun 5, 2003 at 10:44 AM. )
     
Senior User
Join Date: Nov 2000
Status: Offline
Reply With Quote
Jun 5, 2003, 11:07 AM
 
I haven't tested if it works after this, but it does compile correctly (albeit with the original signal warnings still in place).

Add the following lines of code to the top of the src/metamail/metamail.c file:

Code:
#define stty(fd,buf) ioctl(fd,TIOCSETP,buf) #define gtty(fd,buf) ioctl(fd,TIOCGETP,buf)
- proton
     
Xeo  (op)
Moderator Emeritus
Join Date: Mar 2001
Location: Austin, MN, USA
Status: Offline
Reply With Quote
Jun 5, 2003, 01:26 PM
 
Well, I've never used metamail before, but that did let it compile correctly. And it appears to work too. I used it on some of their test files and it was able to read the attachments and save them as files and everything good like that.

I will post back later if it makes everything work.

Thanks so much.
     
   
Thread Tools
Forum Links
Forum Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Top
Privacy Policy
All times are GMT -5. The time now is 03:39 PM.
All contents of these forums © 1995-2011 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.7 © 2000-2011, Jelsoft Enterprises Ltd., Content Relevant URLs by vBSEO 3.3.2