Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 205447 - net-mail/ezmlm-idx-mysql-0.40-r2 fails to compile
Summary: net-mail/ezmlm-idx-mysql-0.40-r2 fails to compile
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Net-Mail Packages
: 248077 (view as bug list)
Depends on: 251383
Blocks: gcc-4.3
  Show dependency tree
Reported: 2008-01-12 12:44 UTC by Evil Compile Person
Modified: 2009-01-02 09:45 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Note You need to log in before you can comment on or make changes to this bug.
Description Evil Compile Person 2008-01-12 12:44:03 UTC
rm -f tryvfork.o tryvfork
./compile ezmlm-gate.c
ezmlm-gate.c: In function 'main':
ezmlm-gate.c:90: warning: return type of 'main' is not 'int'
./compile checktag.c `head -n 1 conf-sqlcc`
checktag.c: In function 'checktag':
checktag.c:68: warning: return discards qualifiers from pointer target type
checktag.c:70: warning: return discards qualifiers from pointer target type
checktag.c:75: warning: return discards qualifiers from pointer target type
checktag.c:90: warning: return discards qualifiers from pointer target type
checktag.c:92: warning: return discards qualifiers from pointer target type
checktag.c:95: warning: return discards qualifiers from pointer target type
./compile issub.c `head -n 1 conf-sqlcc`
./compile logmsg.c `head -n 1 conf-sqlcc`
logmsg.c: In function 'logmsg':
logmsg.c:52: warning: return discards qualifiers from pointer target type
./compile subscribe.c `head -n 1 conf-sqlcc`
In file included from subscribe.c:17:
log.h:4: warning: conflicting types for built-in function 'log'
./compile opensql.c `head -n 1 conf-sqlcc`
opensql.c: In function 'opensql':
opensql.c:95: error: lvalue required as left operand of assignment
opensql.c:99: warning: return discards qualifiers from pointer target type
make: *** [opensql.o] Error 1
 * ERROR: net-mail/ezmlm-idx-mysql-0.40-r2 failed.

Portage 2.1.4_rc14 (default-linux/amd64/2007.0, gcc-4.2.2, glibc-2.7-r1, 2.6.23-gentoo-r1 x86_64)
System uname: 2.6.23-gentoo-r1 x86_64 AMD Athlon(tm) 64 X2 Dual Core Processor 3800+
Timestamp of tree: Mon, 07 Jan 2008 19:00:08 +0000
app-shells/bash:     3.2_p33
dev-lang/python:     2.5.1-r5
sys-apps/baselayout: 1.12.10-r5
sys-devel/autoconf:  2.61-r1
sys-devel/automake:  1.10
sys-devel/binutils:  2.18-r1
sys-devel/gcc-config: 1.4.0-r4
sys-devel/libtool:   1.5.24
virtual/os-headers:  2.6.23-r3
ACCEPT_KEYWORDS="amd64 ~amd64"
CFLAGS="-O2 -pipe"
CONFIG_PROTECT="/etc /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/kde/svn/env /usr/kde/svn/share/config /usr/kde/svn/shutdown /usr/share/config"
CONFIG_PROTECT_MASK="/etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/revdep-rebuild /etc/terminfo /etc/texmf/web2c /etc/udev/rules.d"
CXXFLAGS="-O2 -pipe"
FEATURES="buildpkg distlocks metadata-transfer sandbox sfperms strict unmerge-orphans userfetch"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --delete-after --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --filter=H_**/files/digest-*"
USE="X acl amd64 berkdb bitmap-fonts cli cracklib crypt cups dri fortran gcj gdbm gpm iconv ipv6 isdnlog midi mmx mudflap ncurses nls nptl nptlonly objc openmp pam pcre perl pppd python readline reflection session spl sse sse2 ssl tcpd truetype-fonts type1-fonts unicode xorg zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" ELIBC="glibc" INPUT_DEVICES="keyboard mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" USERLAND="GNU" VIDEO_CARDS="vga"
Comment 1 Tres 'RiverRat' Melton 2008-05-07 11:25:49 UTC
I'm having the same problem.  It appears that the offending line is:

    if (!((MYSQL *) psql = mysql_init((MYSQL *) 0)))

And the error is:

opensql.c:95: error: lvalue required as left operand of assignment

The problem is that extended lvalues were deprecated in gcc 3.4 and went away in 4.0.  The solution is to not use cheesy coding tricks.  The following works with gcc versions >= 4.0:

--- opensql.c.orig      2008-05-07 04:54:35.000000000 -0600
+++ opensql.c   2008-05-07 04:55:02.000000000 -0600
@@ -31,6 +31,7 @@
   char *pw = (char *) 0;
   unsigned int j;
   char *cp;
+  MYSQL *psql = (MYSQL *) 0;
   if (!stralloc_copys(&fn,dbname)) return ERR_NOMEM;
   if (fn.len == ourdb.len && !str_diffn(ourdb.s,fn.s,fn.len)) {
@@ -92,7 +93,7 @@
     if (!*table) return ERR_NO_TABLE;
   if (!psql) {
-    if (!((MYSQL *) psql = mysql_init((MYSQL *) 0)))
+    if (!( psql = mysql_init((MYSQL *) 0)))
         return ERR_NOMEM;                                      /* init */
     if (!(mysql_real_connect((MYSQL *) psql, host, user, pw, db,
        (unsigned int) port, 0, CLIENT_COMPRESS)))              /* conn */

ALSO, this package overwrites the files from net-mail/ezmlm-idx so the two of them should block each other.  Bug #220735
Comment 2 Peter Alfredsen (RETIRED) gentoo-dev 2008-12-17 22:58:24 UTC
*** Bug 248077 has been marked as a duplicate of this bug. ***
Comment 3 Peter Alfredsen (RETIRED) gentoo-dev 2008-12-17 22:59:21 UTC
@net-mail herd, CC treecleaners or find a fix.
Comment 4 Benedikt Böhm (RETIRED) gentoo-dev 2009-01-02 09:45:47 UTC
masked for removal in bug 251383