The following issue has been RESOLVED. 
====================================================================== 
http://www.dbmail.org/mantis/view.php?id=281 
====================================================================== 
Reported By:                kouta
Assigned To:                paul
====================================================================== 
Project:                    DBMail
Issue ID:                   281
Category:                   General
Reproducibility:            always
Severity:                   minor
Priority:                   normal
Status:                     resolved
Resolution:                 fixed
Fixed in Version:           2.0 branch
====================================================================== 
Date Submitted:             07-Nov-05 15:16 CET
Last Modified:              22-Dec-05 13:45 CET
====================================================================== 
Summary:                    compilation problem on FreeBSD-4.x ?
Description: 
when i try to compile dbmail 2.0-r1905 on FreeBSD 4.11, i get the following
error:
===
ranlib .libs/libdbmail.a
creating libdbmail.la
(cd .libs && rm -f libdbmail.la && ln -s ../libdbmail.la libdbmail.la)
cc -DHAVE_CONFIG_H -I. -I. -I.    -fomit-frame-pointer -O -pipe
-march=pentiumpro -fPIC -I/usr/local/include/mysql -W -Wall
-Wpointer-arith -Wstrict-prototypes -c main.c
main.c: In function `main':
main.c:422: syntax error before `dsnuser'
gmake[2]: *** [main.o]
&http://www.dbmail.org/mantis/view.php?id=1054;&http://www.dbmail.org/mantis/view.php?id=1096;&http://www.dbmail.org/mantis/view.php?id=1080;&http://www.dbmail.org/mantis/view.php?id=1073;&http://www.dbmail.org/mantis/view.php?id=1082;&http://www.dbmail.org/mantis/view.php?id=1072;
1
gmake[2]: Leaving directory
`/usr/home/mark/port-updates/dbmail/work/dbmail-2.0.7'
gmake[1]: *** [all-recursive]
&http://www.dbmail.org/mantis/view.php?id=1054;&http://www.dbmail.org/mantis/view.php?id=1096;&http://www.dbmail.org/mantis/view.php?id=1080;&http://www.dbmail.org/mantis/view.php?id=1073;&http://www.dbmail.org/mantis/view.php?id=1082;&http://www.dbmail.org/mantis/view.php?id=1072;
1
gmake[1]: Leaving directory
`/usr/home/mark/port-updates/dbmail/work/dbmail-2.0.7'
gmake: *** [all-recursive-am]
&http://www.dbmail.org/mantis/view.php?id=1054;&http://www.dbmail.org/mantis/view.php?id=1096;&http://www.dbmail.org/mantis/view.php?id=1080;&http://www.dbmail.org/mantis/view.php?id=1073;&http://www.dbmail.org/mantis/view.php?id=1082;&http://www.dbmail.org/mantis/view.php?id=1072;
2
*** Error code 2
===

after commenting "deliver_to_user_t dsnuser;" on line 422, compilation
went ok.
====================================================================== 

---------------------------------------------------------------------- 
 mike - 20-Dec-05 21:47  
---------------------------------------------------------------------- 
GCC 3.4.2 is fine meaning that FBSD 5.* and 6.* each build ok but 4.*
BSD(ultra-stable legacy build) with GCC 2.95 fails. Installing GCC 3.4.*
cures problem but that has other significant ramifications for FBSD 4.*.

Problem seems to be 2.95 reads "continue;" block differently.. (I am not a
"C" person but seems to me I recall a simple little hing about the earlier
compiler vs new and that syntax. What was it? Anyone?) 

---------------------------------------------------------------------- 
 paul - 21-Dec-05 09:53  
---------------------------------------------------------------------- 
Please use a not-so-ancient version. This has been fixed long ago. 

---------------------------------------------------------------------- 
 kouta - 22-Dec-05 08:20  
---------------------------------------------------------------------- 
Sorry, paul, but in what version exactly have it been fixed?
I'm using latest revision of 2.0.7 from repository and it seems to have
same problems with gcc2.95.
Or did you mean that it is fixed in 2.1.x and that 2.0.x won't get support
now? 

---------------------------------------------------------------------- 
 paul - 22-Dec-05 09:55  
---------------------------------------------------------------------- 
My mistake. I misread your report. Removing the line in question is a valid
solution I think. Please update from dbmail_2_0_branch and try again. 

---------------------------------------------------------------------- 
 kouta - 22-Dec-05 12:13  
---------------------------------------------------------------------- 
It seems to me that this change is also required:
Index: main.c
===================================================================
--- main.c      (revision 1942)
+++ main.c      (working copy)
@@ -422,7 +422,13 @@
                        dsnuser_init(&dsnuser);
                        dsnuser.address = dm_strdup((char *) tmp->data);
 
-                       list_nodeadd(&dsnusers, &dsnuser, 
sizeof(deliver_to_user_t));
+                       if (list_nodeadd(&dsnusers, &dsnuser, 
sizeof(deliver_to_user_t)) == 0)
{
+                               trace(TRACE_ERROR,
+                                     "main(): list_nodeadd reports out of 
memory"
+                                     " while adding email addresses");
+                               exitcode = EX_TEMPFAIL;
+                               goto freeall;
+                       }
                }
        }

* added *
I alse uploaded diff because it is shown incorrectly here.
PS: Also, I'll test repository changes on Monday and will merge them to
freebsd-port if everything is ok.

 

---------------------------------------------------------------------- 
 paul - 22-Dec-05 13:44  
---------------------------------------------------------------------- 
check on return value added. 

Issue History 
Date Modified   Username       Field                    Change               
====================================================================== 
07-Nov-05 15:16 kouta          New Issue                                    
20-Dec-05 21:47 mike           Note Added: 0000958                          
21-Dec-05 09:53 paul           Note Added: 0000959                          
21-Dec-05 09:58 paul           Status                   new => resolved     
21-Dec-05 09:58 paul           Resolution               open => fixed       
21-Dec-05 09:58 paul           Fixed in Version          => 2.0.7           
22-Dec-05 08:20 kouta          Status                   resolved => feedback
22-Dec-05 08:20 kouta          Resolution               fixed => reopened   
22-Dec-05 08:20 kouta          Note Added: 0000960                          
22-Dec-05 09:55 paul           Note Added: 0000961                          
22-Dec-05 12:08 kouta          Note Added: 0000962                          
22-Dec-05 12:10 kouta          Note Edited: 0000962                         
22-Dec-05 12:10 kouta          File Added: dbm20_k1.diff                    
22-Dec-05 12:13 kouta          Note Edited: 0000962                         
22-Dec-05 13:44 paul           Note Added: 0000963                          
22-Dec-05 13:45 paul           Assigned To               => paul            
22-Dec-05 13:45 paul           Status                   feedback => resolved
22-Dec-05 13:45 paul           Resolution               reopened => fixed   
22-Dec-05 13:45 paul           Fixed in Version         2.0.7 => 2.0 branch 
======================================================================

Reply via email to