Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 163912 - net-mail/freepops-0.0.99 broken and can't build since upgrade to dev-lang/lua-5.1.1
Summary: net-mail/freepops-0.0.99 broken and can't build since upgrade to dev-lang/lua...
Status: RESOLVED UPSTREAM
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: High major (vote)
Assignee: Daniel Black (RETIRED)
URL: http://freepops.diludovico.it/announc...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-01-26 14:46 UTC by Olivier Castan
Modified: 2007-01-27 13:16 UTC (History)
2 users (show)

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


Attachments
freepops-0.0.99.ebuild patch (freepops-0.0.99.ebuild.diff,431 bytes, patch)
2007-01-26 18:47 UTC, Olivier Castan
Details | Diff
Patch made to use the system version of lua (freepops-0.0.99-system-lua.patch,9.01 KB, patch)
2007-01-27 10:50 UTC, Olivier Castan
Details | Diff
Patch to deal with luaopen_* problem (freepops-0.0.99-lua-5.1.patch,2.01 KB, patch)
2007-01-27 10:51 UTC, Olivier Castan
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Olivier Castan 2007-01-26 14:46:06 UTC
Since move from dev-lang/lua-5.0.3 to dev-lang/lua-5.1.1

net-mail/freepops is broken and the rebuild fails :
>>> Emerging (1 of 1) net-mail/freepops-0.0.99 to /
 * freepops-0.0.99.tar.gz MD5 ;-) ...                                    [ ok ]
 * freepops-0.0.99.tar.gz RMD160 ;-) ...                                 [ ok ]
 * freepops-0.0.99.tar.gz SHA1 ;-) ...                                   [ ok ]
 * freepops-0.0.99.tar.gz SHA256 ;-) ...                                 [ ok ]
 * freepops-0.0.99.tar.gz size ;-) ...                                   [ ok ]
 * checking ebuild checksums ;-) ...                                     [ ok ]
 * checking auxfile checksums ;-) ...                                    [ ok ]
 * checking miscfile checksums ;-) ...                                   [ ok ]
 * checking freepops-0.0.99.tar.gz ;-) ...                               [ ok ]
>>> Unpacking source...
>>> Unpacking freepops-0.0.99.tar.gz to /home/portage/tmp/portage/net-mail/freepops-0.0.99/work
 * Applying freepops-0.0.97-system-lua.patch ...                         [ ok ]
>>> Source unpacked.
>>> Compiling source in /home/portage/tmp/portage/net-mail/freepops-0.0.99/work/freepops-0.0.99 ...
building luacompat
[...]
building freepopsd
 building dep for luabox.c
 building dep for freepops.c
 building dep for engine.c
 compiling engine.c -> engine.o
 compiling freepops.c -> freepops.o
 compiling luabox.c -> luabox.c:47: erreur: ‘luaopen_loadlib’ undeclared here (not in a function)
make[1]: *** [luabox.o] Erreur 1
make: *** [src] Erreur 2

!!! ERROR: net-mail/freepops-0.0.99 failed.
Call stack:
  ebuild.sh, line 1611:   Called dyn_compile
  ebuild.sh, line 968:   Called qa_call 'src_compile'
  environment, line 3030:   Called src_compile
  freepops-0.0.99.ebuild, line 35:   Called die

!!! make failed
!!! If you need support, post the topmost build error, and the call stack if relevant.
!!! A complete build log is located at '/home/portage/tmp/portage/net-mail/freepops-0.0.99/temp/build.log'.

According to lua-5.1.1 documentation :
* Changes from version 5.0 to 5.1
  -------------------------------
  Language:
  + new module system.
  + new semantics for control variables of fors.
  + new semantics for setn/getn.
  + new syntax/semantics for varargs.
  + new long strings and comments.
  + new `mod' operator (`%')
  + new length operator #t
  + metatables for all types
  API:
  + new functions: lua_createtable, lua_get(set)field, lua_push(to)integer.
  + user supplies memory allocator (lua_open becomes lua_newstate).
  + luaopen_* functionst must be called through Lua.

Looks like freepops code must be patched, but I not familiar with lua and don't understand what should be done.
I think the dependency for freepops-0.9.9 should be changed to "<dev-lang/lua-1.1"


Reproducible: Always

Steps to Reproduce:




# emerge --info
Portage 2.1.2-r4 (default-linux/amd64/2006.1, gcc-4.1.1, glibc-2.5-r0, 2.6.19-gentoo-r4 x86_64)
=================================================================
System uname: 2.6.19-gentoo-r4 x86_64 AMD Athlon(tm) 64 X2 Dual Core Processor 4200+
Gentoo Base System version 1.12.9
Timestamp of tree: Fri, 26 Jan 2007 12:50:01 +0000
dev-java/java-config: 1.3.7, 2.0.31-r3
dev-lang/python:     2.4.4
dev-python/pycrypto: 2.0.1-r5
sys-apps/sandbox:    1.2.18.1
sys-devel/autoconf:  2.13, 2.61
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10
sys-devel/binutils:  2.17
sys-devel/gcc-config: 1.3.14
sys-devel/libtool:   1.5.22
virtual/os-headers:  2.6.19.2-r1
ACCEPT_KEYWORDS="amd64 ~amd64"
AUTOCLEAN="yes"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=k8 -O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/share/X11/xkb /usr/share/config"
CONFIG_PROTECT_MASK="/etc/env.d /etc/env.d/java/ /etc/gconf /etc/java-config/vms/ /etc/revdep-rebuild /etc/terminfo /etc/texmf/web2c"
CXXFLAGS="-march=k8 -O2 -pipe"
DISTDIR="/home/portage/distfiles"
FEATURES="autoconfig distlocks metadata-transfer sandbox sfperms strict"
GENTOO_MIRRORS="http://ftp.belnet.be/mirror/rsync.gentoo.org/gentoo/ ftp://ftp.belnet.be/mirror/rsync.gentoo.org/gentoo/ http://gentoo.modulix.net/gentoo/ http://ftp.club-internet.fr/pub/mirrors/gentoo http://linux.rz.ruhr-uni-bochum.de/download/gentoo-mirror/ ftp://linux.rz.ruhr-uni-bochum.de/gentoo-mirror/ http://mirror.switch.ch/ftp/mirror/gentoo/ ftp://mirror.switch.ch/mirror/gentoo/ "
LANG="fr_FR.UTF-8"
LC_ALL="fr_FR.UTF-8"
LINGUAS="fr fr_FR en en_GB"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
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"
PORTAGE_TMPDIR="/home/portage/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://rsync.europe.gentoo.org/gentoo-portage"
USE="X X509 a52 aac aalib accessibility acl acpi acpi4linux aiglx aio alsa amd64 amr apm asf async audiofile auth autoipd avahi bash-completion berkdb bitmap-fonts bogofilter bonjour bonobo branding browserplugin bzip2 cairo canvas caps cdda cdio cdparanoia cdr chroot cle266 cli codecs console cpulimit cracklib crypt css cups curl dbus dga dillo directfb diskio divx djvu dlloader dmi dnd dri dts dv dvd dvdr dvdread dvi eds elf enca encode erandom esd exif expat faac faad fam fame fat fbcon ffmpeg firefox flac flash font-server foomaticdb fortran fr gd gdbm ggi gif gimp gimpprint glitz glut gmedia gmp gnome gnome-print gnomecanvas gnomedb gnutls gphoto2 gpm graphviz gsl gstreamer gtk gtk2 gtkhtml gzip hal hfs howl-compat hpn iconv imagemagick imlib imlib2 ipv6 isdnlog java javascript jbig jce jikes jp2 jpeg jpeg2k junit kerberos kqemu lcms ldap libcaca libg++ lirc live logrotate lua lzo mad mailwrapper matroska md5sum mdnsresponder-compat mfd-rewrites mikmod mime mjpeg mng modplug mono motif moznoirc moznomail mozsvg mp3 mp4 mpeg mpeg2 mpeg4 mplayer msn nas nautilus ncurses network nls nntp nptl nptlonly nsplugin ntfs ntlm oav offensive ofx ogg openexr opengl oss pam pango pascal pcap pcre pdf perl physfs pie png ppds pppd print python qt qt3 qt4 quicktime rar readline reflection rle rtc rtsp samba scanner sdl session sftp sftplogging silc skins slang slp smbkrb5passwd smime smp smux sox spamassassin speex spell spl sqlite sqlite3 ssl startup-notification stencil-buffer stream subtitles svg svgz swat sysfs syslog t1lib tcl tcltk tcpd tetex tga theora threads tiff tk tools transcode truetype truetype-fonts tv_check type1 type1-fonts udev unicode upnp usb v4l v4l2 vcd vim vim-syntax vim-with-x vlm vorbis wma wma123 wmf wmp x264 xanim xcb xcomposite xface xforms xine xml xml2 xorg xosd xprint xrandr xv xvid xvmc yv12 zeroconf zip 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" ELIBC="glibc" INPUT_DEVICES="keyboard mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="fr fr_FR en en_GB" LIRC_DEVICES="mceusb2" USERLAND="GNU" VIDEO_CARDS="ati nv fbdev vga vesa radeon fglrx nvidia vmware"
Unset:  CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LDFLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 1 Olivier Castan 2007-01-26 14:57:26 UTC
Sorry for the mess in the suggested correction :
freepops-0.0.99 ebuild should be changed with "<dev-lang/lua-5.1"

Tested and it works for freepops but it breaks dev-lang/swig-1.3.31 and media-gfx/graphviz-2.8-r2
Comment 2 Olivier Castan 2007-01-26 18:35:08 UTC
Using various source of information:
http://lua-users.org/lists/lua-l/2006-06/msg00127.html
I've modified luabox.c to mimic linit.c from lua distro
I had to rework a lot freepops-0.0.97-system-lua.patch since it was only patching includes for lua.h but not lauxlib.h and lualib.h leading to a terrible mess.
Then the module luaexpat failed to link. I found the explanation:
http://lua-users.org/lists/lua-l/2006-06/msg00328.html
and added some lines to patch the luaexpat-1.0.1.diff patch included with the original tarball !

Now everything is building fine... but I can't get my mail. Error logged is:
Fri Jan 26 19:18:20 2007 freepopsd: PID: Maintaining pid file "/var/run/freepopsd.pid"
Fri Jan 26 19:18:20 2007 freepopsd: DBG(popserver.c, 182): [3526] ?? Ip address 127.0.0.1 real port 2000
Fri Jan 26 19:19:01 2007 freepopsd: DBG(popserver.c, 182): [3526] ?? Ip address 127.0.0.1 real port 2000
Fri Jan 26 19:19:01 2007 freepopsd: DBG(popserver.c, 182): [3526] -> +OK FreePOPs/0.0.99 pop3 server ready
Fri Jan 26 19:19:01 2007 freepopsd: DBG(popserver.c, 182): [3526] <- USER XXXX@YYYYYYY
Fri Jan 26 19:19:01 2007 freepopsd: DBG(popserver.c, 182): [3526] -> -ERR UNKNOWN ERROR, PLEASE FIX
Fri Jan 26 19:19:01 2007 freepopsd: POPSERVER: UNKNOWN ERROR, PLEASE FIX

I think dependency from external lua should be dropped if >= lua-5.1 (since lua-5.0.2 is included)
Comment 3 Olivier Castan 2007-01-26 18:47:06 UTC
Created attachment 108221 [details, diff]
freepops-0.0.99.ebuild patch

Here is a patch for the ebuild to get a working freepopsd
Comment 4 Daniel Black (RETIRED) gentoo-dev 2007-01-27 04:24:49 UTC
using the included lua library is a security liability. if there is a lua fault than finding those applications, like this one that package their own is painful.

As such i've added a dependency on <lua-5.1

I tried getting it working with lua-5.1 but failed to resolve the luaL_findstring -> luaL_checkoption and the loadlib function deprecation.

Should you be able to resolve these two i'll happly put another post lua-5.1 version in.

I've hopefully fixed the headers in freepops-0.0.99-r1.
Comment 5 Daniel Black (RETIRED) gentoo-dev 2007-01-27 04:58:13 UTC
well - could just wait for the next release.
http://freepops.diludovico.it/announcements-annunci/5355-upcoming-freepops-0-2-0-a.html
Comment 6 Olivier Castan 2007-01-27 10:50:45 UTC
Created attachment 108268 [details, diff]
Patch made to use the system version of lua

I've noticed freepops is a mess with a lot of other packages included...
Here are the patches I made to have a built but not functionnal freepops
Comment 7 Olivier Castan 2007-01-27 10:51:54 UTC
Created attachment 108269 [details, diff]
Patch to deal with luaopen_* problem
Comment 8 Daniel Black (RETIRED) gentoo-dev 2007-01-27 12:03:26 UTC
nice - are these how freepops-0.2.0.tar.gz(daily builds) manage lua-5.1?

I'm tempted just to wait until freepops-0.2.0 is final before doing more work on this.
Comment 9 Olivier Castan 2007-01-27 13:16:01 UTC
No I've done it on my own, looking into lua user lists. But, I would hardly say it's a success... It builds but does not work correctly !!!
I think it would be hard to debug since there are both lua code and a lot of lua extensions written in C.
I think you'd better wait till freepops-0.2.0 release
Maybe a category dev-lua should be created to manage popular extensions ?