LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 04-04-2011, 12:12 PM   #1
Roboam León López
LQ Newbie
 
Registered: Oct 2007
Location: México City
Posts: 10

Rep: Reputation: 0
Question Failing to compile c file


Hello everyone, i trying to compile courier-imap-3.0.8 (no te latest version but that's a requirement) using gcc 4.4.5 (Debian 5) I ran:
Quote:
./configure --enable-unicode=iso-8859-1,utf-8
And went Ok with the verification, but when ran
Quote:
make
I got:
Code:
Compiling checkpassword.c
checkpassword.c: In function ‘authcheckpassword’:
checkpassword.c:66: warning: value computed is not used
checkpassword.c:69: warning: value computed is not used
checkpassword.c:71: warning: value computed is not used
Compiling cryptpassword.c
Compiling authstaticlistsearch.c
In file included from authstaticlistsearch.c:9:
/usr/include/stdio.h:397: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘&&’ token
authstaticlistsearch.c: In function ‘authstaticlist_search_string’:
authstaticlistsearch.c:138: warning: value computed is not used
authstaticlistsearch.c: In function ‘authlogin_search_string’:
authstaticlistsearch.c:169: warning: value computed is not used
authstaticlistsearch.c:180: warning: value computed is not used
authstaticlistsearch.c:188: warning: value computed is not used
authstaticlistsearch.c:191: warning: value computed is not used
authstaticlistsearch.c:193: warning: value computed is not used
authstaticlistsearch.c:224: warning: value computed is not used
authstaticlistsearch.c:235: warning: value computed is not used
authstaticlistsearch.c:241: warning: value computed is not used
authstaticlistsearch.c:243: warning: value computed is not used
authstaticlistsearch.c:247: warning: value computed is not used
authstaticlistsearch.c:251: warning: value computed is not used
make[2]: *** [authstaticlistsearch.o] Error 1
make[2]: se sale del directorio `/home/user/courier-imap-3.0.8/authlib'
make[1]: *** [all] Error 2
make[1]: se sale del directorio `/home/user/courier-imap-3.0.8/authlib'
make: *** [all-recursive] Error 1
Compiling courier-imap-3.0.8/authlib/authstaticlistsearch.c manually (gcc -o authstaticlistsearch authlib/authstaticlistsearch.c ) made similar error:
Code:
In file included from authlib/authstaticlistsearch.c:9:
/usr/include/stdio.h:397: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘&&’ token
authlib/authstaticlistsearch.c:23: error: ‘AUTHCHANGEPASS’ undeclared here (not in a function)
authlib/authstaticlistsearch.c: In function ‘openconfigfile’:
authlib/authstaticlistsearch.c:30: error: ‘O_RDONLY’ undeclared (first use in this function)
authlib/authstaticlistsearch.c:30: error: (Each undeclared identifier is reported only once
authlib/authstaticlistsearch.c:30: error: for each function it appears in.)
I could replicate the error in another debian (debian 5 or 6) box.

How should I proceed? I' clueless. My stdio.h it's OK and not corrupted
How do I get more information? google didn't help much.

My /usr/include/stdio.h:

Code:
387 #ifdef __USE_XOPEN2K8
388 /* Write formatted output to a file descriptor.
389 
390    These functions are not part of POSIX and therefore no official
391    cancellation point.  But due to similarity with an POSIX interface
392    or due to the implementation they are cancellation points and
393    therefore not marked with __THROW.  */
394 extern int vdprintf (int __fd, __const char *__restrict __fmt,
395                      _G_va_list __arg)
396      __attribute__ ((__format__ (__printf__, 2, 0)));
397 extern int dprintf (int __fd, __const char *__restrict __fmt, ...)
398      __attribute__ ((__format__ (__printf__, 2, 3)));
399 #endif

Last edited by Roboam León López; 04-04-2011 at 12:19 PM.
 
Old 04-04-2011, 12:34 PM   #2
johnsfine
LQ Guru
 
Registered: Dec 2007
Distribution: Centos
Posts: 5,286

Rep: Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197
My first guess would be something included before stdio.h defined a macro that conflicts with some non macro declaration in stdio.h

I forget exact gcc options, but you can get the preprocessed intermediate step saved to a file and find the problem line in that file and see what if anything macro expansion did to that line.

More generally, compiling old open source projects in newer versions of gcc is often harder than it is worth. I understand you don't want to use a newer version of the original source code. What about using an older version of gcc? If installed correctly, an older version of gcc can be tied together with all its associated include files and co exist on your machine with the default version. You can set an environment variable to select the older version before running make on the old source code.

Last edited by johnsfine; 04-04-2011 at 12:37 PM.
 
Old 04-04-2011, 04:38 PM   #3
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,511

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
No solution, so far. These are my notes ...

A package, i386 :
http://archive.debian.org/debian-arc...arge5_i386.deb
> courier-imap_3.0.8-4sarge5_i386.deb

Building courier-imap-3.0.8 :
cd courier-imap-3.0.8/ && zcat courier_0.47-4sarge5.diff.gz | patch -p1
http://archive.debian.org/debian-arc...sarge5.diff.gz

export CC=gcc-3.3 && ./configure && make :

Compiling authstaticlistsearch.c
In file included from authstaticlistsearch.c:9:
/usr/include/stdio.h:397: error: syntaksfejl before '&&' token
make[2]: *** [authstaticlistsearch.o] Error 1
 
Old 04-06-2011, 12:51 PM   #4
Roboam León López
LQ Newbie
 
Registered: Oct 2007
Location: México City
Posts: 10

Original Poster
Rep: Reputation: 0
Cool

Wasn't able to compile the file with gcc 4.* so I use
Code:
apt-get install courier-imap courier-imap-ssl courier-authlib-ldap courier-webadmin
And its working with version 4.9

Thanks all for your help
 
  


Reply

Tags
courier, gcc, imap



Posting 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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Failing to compile gcc at 5.5 mysky Linux From Scratch 2 10-23-2009 10:47 AM
GCC 4.1.2 failing to compile havenoidea Linux From Scratch 12 11-17-2007 07:56 AM
Compile 2.6.9 keeps failing. musicman_ace SUSE / openSUSE 6 11-27-2004 04:16 AM
Kernel compile failing due to a file I can't find GreenPenInc Libranet 7 10-21-2003 11:55 AM
xfree compile failing et1ssgmiller Linux - Software 2 02-13-2003 07:43 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 07:48 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration