Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 537248 - app-backup/amanda-3.3.3 with dev-lang/perl-5.20.1 - Amanda/Application.c: In function ‘SWIG_AsCharPtrAndSize’: /usr/lib64/perl5/5.20.1/x86_64-linux/CORE/handy.h:124:34: error: ‘bool’ undeclared (first use in this function)
Summary: app-backup/amanda-3.3.3 with dev-lang/perl-5.20.1 - Amanda/Application.c: In ...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Robin Johnson
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: perl-5.20-stable
  Show dependency tree
 
Reported: 2015-01-21 15:28 UTC by Toralf Förster
Modified: 2017-07-01 19:12 UTC (History)
14 users (show)

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


Attachments
emerge log (app-backup:amanda-3.3.5:20150121-051838.log,495.09 KB, text/plain)
2015-01-22 11:59 UTC, Toralf Förster
Details
proposed 3.3.7.p1 ebuild (amanda-3.3.7_p1.ebuild,15.68 KB, text/plain)
2015-04-01 20:49 UTC, Alan Hodgson
Details
Ebuild that applies the Trond patch from ximalas.info (amanda-3.3.3-r1.ebuild,15.76 KB, text/plain)
2015-04-02 15:46 UTC, Christopher Head
Details
diff -u patch of ebuilds (amanda.patch,1.33 KB, patch)
2015-04-03 00:05 UTC, Ian Delaney (RETIRED)
Details | Diff
Patch to amanda-3.3.5.ebuild to fix compile failure (amanda-3.3.5.ebuild.patch,1.16 KB, patch)
2015-04-03 05:05 UTC, Christopher Head
Details | Diff
Add local-amanda-perl5.20.patch (local-amanda-perl5.20.patch,4.29 KB, patch)
2015-04-03 07:24 UTC, Joost Ruis
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Toralf Förster gentoo-dev 2015-01-21 15:28:41 UTC
make[4]: Entering directory '/var/tmp/portage/app-backup/amanda-3.3.5/work/amanda-3.3.5/perl'
/bin/sh ../libtool  --tag=CC   --mode=compile x86_64-pc-linux-gnu-gcc -DHAVE_CONFIG_H -I. -I../config -I../common-src -I../common-src -I../amandad-src -I../amar-src -I../xfer-src -I../perl/amglue -I../gnulib -I../ndmp-src -I/usr/lib64/perl5/5.20.1/x86_64-linux/CORE  -I../device-src -I../server-src -I../client-src -I../recover-src  -fno-strict-aliasing -D_GNU_SOURCE -pthread -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include   -DSWIG  -O2 -pipe -fno-strict-aliasing  -c -o Application.lo `test -f 'Amanda/Application.c' || echo './'`Amanda/Application.c
libtool: compile:  x86_64-pc-linux-gnu-gcc -DHAVE_CONFIG_H -I. -I../config -I../common-src -I../common-src -I../amandad-src -I../amar-src -I../xfer-src -I../perl/amglue -I../gnulib -I../ndmp-src -I/usr/lib64/perl5/5.20.1/x86_64-linux/CORE -I../device-src -I../server-src -I../client-src -I../recover-src -fno-strict-aliasing -D_GNU_SOURCE -pthread -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -DSWIG -O2 -pipe -fno-strict-aliasing -c Amanda/Application.c  -fPIC -DPIC -o .libs/Application.o
In file included from [01m[KAmanda/Application.c:734:0[m[K:
[01m[KAmanda/Application.c:[m[K In function ‘[01m[KSWIG_AsCharPtrAndSize[m[K’:
[01m[K/usr/lib64/perl5/5.20.1/x86_64-linux/CORE/handy.h:124:34:[m[K [01;31m[Kerror: [m[K‘[01m[Kbool[m[K’ undeclared (first use in this function)
 #define cBOOL(cbool) ((cbool) ? (bool)1 : (bool)0)
[01;32m[K                                  ^[m[K
[01m[K/usr/lib64/perl5/5.20.1/x86_64-linux/CORE/perl.h:3149:62:[m[K [01;36m[Knote: [m[Kin definition of macro ‘[01m[KEXPECT[m[K’
 #  define EXPECT(expr,val)                  __builtin_expect(expr,val)
[01;32m[K                                                              ^[m[K
[01m[K/usr/lib64/perl5/5.20.1/x86_64-linux/CORE/perl.h:3153:52:[m[K [01;36m[Knote: [m[Kin expansion of macro ‘[01m[KcBOOL[m[K’
 #define LIKELY(cond)                        EXPECT(cBOOL(cond),TRUE)
[01;32m[K                                                    ^[m[K
[01m[K/usr/lib64/perl5/5.20.1/x86_64-linux/CORE/sv.h:2066:10:[m[K [01;36m[Knote: [m[Kin expansion of macro ‘[01m[KLIKELY[m[K’
      if (LIKELY((dst) != (src))) {  \
[01;32m[K          ^[m[K
[01m[K/usr/lib64/perl5/5.20.1/x86_64-linux/CORE/sv.h:2080:3:[m[K [01;36m[Knote: [m[Kin expansion of macro ‘[01m[KSvSetSV_and[m[K’
   SvSetSV_and(dst,src,/*nothing*/;)
[01;32m[K   ^[m[K
[01m[KAmanda/Application.c:1580:6:[m[K [01;36m[Knote: [m[Kin expansion of macro ‘[01m[KSvSetSV[m[K’
      SvSetSV(tmp, obj);
[01;32m[K      ^[m[K
[01m[K/usr/lib64/perl5/5.20.1/x86_64-linux/CORE/handy.h:124:34:[m[K [01;36m[Knote: [m[Keach undeclared identifier is reported only once for each function it appears in
 #define cBOOL(cbool) ((cbool) ? (bool)1 : (bool)0)
[01;32m[K                                  ^[m[K
[01m[K/usr/lib64/perl5/5.20.1/x86_64-linux/CORE/perl.h:3149:62:[m[K [01;36m[Knote: [m[Kin definition of macro ‘[01m[KEXPECT[m[K’
 #  define EXPECT(expr,val)                  __builtin_expect(expr,val)
[01;32m[K                                                              ^[m[K
[01m[K/usr/lib64/perl5/5.20.1/x86_64-linux/CORE/perl.h:3153:52:[m[K [01;36m[Knote: [m[Kin expansion of macro ‘[01m[KcBOOL[m[K’
 #define LIKELY(cond)                        EXPECT(cBOOL(cond),TRUE)
[01;32m[K                                                    ^[m[K
[01m[K/usr/lib64/perl5/5.20.1/x86_64-linux/CORE/sv.h:2066:10:[m[K [01;36m[Knote: [m[Kin expansion of macro ‘[01m[KLIKELY[m[K’
      if (LIKELY((dst) != (src))) {  \
[01;32m[K          ^[m[K
[01m[K/usr/lib64/perl5/5.20.1/x86_64-linux/CORE/sv.h:2080:3:[m[K [01;36m[Knote: [m[Kin expansion of macro ‘[01m[KSvSetSV_and[m[K’
   SvSetSV_and(dst,src,/*nothing*/;)
[01;32m[K   ^[m[K
[01m[KAmanda/Application.c:1580:6:[m[K [01;36m[Knote: [m[Kin expansion of macro ‘[01m[KSvSetSV[m[K’
      SvSetSV(tmp, obj);
[01;32m[K      ^[m[K
[01m[K/usr/lib64/perl5/5.20.1/x86_64-linux/CORE/handy.h:124:39:[m[K [01;31m[Kerror: [m[Kexpected ‘[01m[K:[m[K’ before numeric constant
 #define cBOOL(cbool) ((cbool) ? (bool)1 : (bool)0)
[01;32m[K                                       ^[m[K
[01m[K/usr/lib64/perl5/5.20.1/x86_64-linux/CORE/perl.h:3149:62:[m[K [01;36m[Knote: [m[Kin definition of macro ‘[01m[KEXPECT[m[K’
 #  define EXPECT(expr,val)                  __builtin_expect(expr,val)
[01;32m[K                                                              ^[m[K
[01m[K/usr/lib64/perl5/5.20.1/x86_64-linux/CORE/perl.h:3153:52:[m[K [01;36m[Knote: [m[Kin expansion of macro ‘[01m[KcBOOL[m[K’
 #define LIKELY(cond)                        EXPECT(cBOOL(cond),TRUE)
[01;32m[K                                                    ^[m[K
[01m[K/usr/lib64/perl5/5.20.1/x86_64-linux/CORE/sv.h:2066:10:[m[K [01;36m[Knote: [m[Kin expansion of macro ‘[01m[KLIKELY[m[K’
      if (LIKELY((dst) != (src))) {  \
[01;32m[K          ^[m[K
[01m[K/usr/lib64/perl5/5.20.1/x86_64-linux/CORE/sv.h:2080:3:[m[K [01;36m[Knote: [m[Kin expansion of macro ‘[01m[KSvSetSV_and[m[K’
   SvSetSV_and(dst,src,/*nothing*/;)
[01;32m[K   ^[m[K
[01m[KAmanda/Application.c:1580:6:[m[K [01;36m[Knote: [m[Kin expansion of macro ‘[01m[KSvSetSV[m[K’
      SvSetSV(tmp, obj);
[01;32m[K      ^[m[K
Makefile:2929: recipe for target 'Application.lo' failed
make[4]: *** [Application.lo] Error 1
make[4]: Leaving directory '/var/tmp/portage/app-backup/amanda-3.3.5/work/amanda-3.3.5/perl'
Makefile:3315: recipe for target 'all-recursive' failed
make[3]: *** [all-recursive] Error 1
make[3]: Leaving directory '/var/tmp/portage/app-backup/amanda-3.3.5/work/amanda-3.3.5/perl'
Makefile:2159: recipe for target 'all' failed
make[2]: *** [all] Error 2
make[2]: Leaving directory '/var/tmp/portage/app-backup/amanda-3.3.5/work/amanda-3.3.5/perl'
Makefile:1653: recipe for target 'all-recursive' failed
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory '/var/tmp/portage/app-backup/amanda-3.3.5/work/amanda-3.3.5'
Makefile:1577: recipe for target 'all' failed
make: *** [all] Error 2
 * ERROR: app-backup/amanda-3.3.5::gentoo failed (compile phase):
 *   emake failed
 * 
 * If you need support, post the output of `emerge --info '=app-backup/amanda-3.3.5::gentoo'`,
 * the complete build log and the output of `emerge -pqv '=app-backup/amanda-3.3.5::gentoo'`.
 * The complete build log is located at '/var/log/portage/app-backup:amanda-3.3.5:20150121-051838.log'.
 * For convenience, a symlink to the build log is located at '/var/tmp/portage/app-backup/amanda-3.3.5/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/app-backup/amanda-3.3.5/temp/environment'.
 * Working directory: '/var/tmp/portage/app-backup/amanda-3.3.5/work/amanda-3.3.5'
 * S: '/var/tmp/portage/app-backup/amanda-3.3.5/work/amanda-3.3.5'

 * GNU info directory index is up-to-date.


! ! !  This is a build bot chroot located at a hardened amd64 host ! ! !

Portage 2.2.15 (python 2.7.9-final-0, default/linux/amd64/13.0, gcc-4.9.2, glibc-2.20-r1, 3.18.2-hardened-r1 x86_64)
=================================================================
                         System Settings
=================================================================
System uname: Linux-3.18.2-hardened-r1-x86_64-Intel-R-_Core-TM-_i7-3770_CPU_@_3.40GHz-with-gentoo-2.2
KiB Mem:    16166860 total,   1089060 free
KiB Swap:   16777212 total,  16737064 free
Timestamp of tree: Tue, 20 Jan 2015 22:45:01 +0000
sh bash 4.3_p33
ld GNU ld (Gentoo 2.24 p1.4) 2.24
app-shells/bash:          4.3_p33
dev-lang/perl:            5.20.1-r4
dev-lang/python:          2.7.9-r1, 3.3.5-r1, 3.4.2
dev-util/cmake:           3.1.0
sys-apps/baselayout:      2.2
sys-apps/openrc:          0.13.8
sys-apps/sandbox:         2.6-r1
sys-devel/autoconf:       2.13, 2.69
sys-devel/automake:       1.10.3-r1, 1.11.6-r1, 1.13.4, 1.15
sys-devel/binutils:       2.24-r3
sys-devel/gcc:            4.9.2
sys-devel/gcc-config:     1.8
sys-devel/libtool:        2.4.5
sys-devel/make:           4.1-r1
sys-kernel/linux-headers: 3.18 (virtual/os-headers)
sys-libs/glibc:           2.20-r1
Repositories: gentoo
ACCEPT_KEYWORDS="amd64 ~amd64"
ACCEPT_LICENSE="*"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/gnupg/qualified.txt"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/php/apache2-php5.5/ext-active/ /etc/php/cgi-php5.5/ext-active/ /etc/php/cli-php5.5/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c"
CXXFLAGS="-O2 -pipe"
DISTDIR="/usr/portage/distfiles"
EMERGE_DEFAULT_OPTS="--nospinner --tree --quiet-build --deep --jobs 1"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-logs config-protect-if-modified distlocks ebuild-locks fixlafiles merge-sync news parallel-fetch preserve-libs protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS="http://mirror.leaseweb.com/gentoo/ http://ftp.uni-erlangen.de/pub/mirrors/gentoo http://ftp-stud.hs-esslingen.de/pub/Mirrors/gentoo/ http://gd.tuwien.ac.at/opsys/linux/gentoo/"
LANG="en_US.utf8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
MAKEOPTS="-j1"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY=""
SYNC="rsync://rsync.de.gentoo.org/gentoo-portage"
USE="acl amd64 berkdb bindist bzip2 cli cracklib crypt cxx dri fortran gdbm iconv ipv6 mbox mmx modules multilib ncurses nls nptl openmp pam pax_kernel pcre readline session sse sse2 ssl tcpd unicode zlib" ABI_X86="64" 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" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd 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 cgi cgid 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" CALLIGRA_FEATURES="kexi words flow plan sheets stage tables krita karbon braindump author" CAMERAS="ptp2" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tripmate tnt ublox ubx" INPUT_DEVICES="keyboard mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-5" PYTHON_SINGLE_TARGET="python2_7" PYTHON_TARGETS="python2_7 python3_3" RUBY_TARGETS="ruby19 ruby20" USERLAND="GNU" VIDEO_CARDS="fbdev glint intel mach64 mga nouveau nv r128 radeon savage sis tdfx trident vesa via vmware dummy v4l" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account"
Unset:  CPPFLAGS, CTARGET, INSTALL_MASK, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, USE_PYTHON


The build log is stored in /var/log/portage/_emerge_20150121-062445.log
The chroot image is amd64-unstable
Comment 1 Jeroen Roovers (RETIRED) gentoo-dev 2015-01-22 07:42:08 UTC
Please attach the entire build log to this bug report
Comment 2 Toralf Förster gentoo-dev 2015-01-22 11:59:03 UTC
Created attachment 394598 [details]
emerge log
Comment 3 Christopher Head 2015-02-08 21:52:02 UTC
Bool undeclared appears to be a well-known problem building Amanda. There’s a writeup here <http://ximalas.info/2014/10/27/amanda-3-3-2-and-undef-bool/> on how to sort it out, though patching 17 files is a suboptimal solution.
Comment 4 Nico Baggus 2015-02-08 23:04:55 UTC
starting with perl 5.20 ... i get compile errors in amanda 3.3.3-r1 as well.
Comment 5 David Mohr 2015-02-11 18:39:02 UTC
See also https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=752024 , which says that the error should go away if you regenerate the swig bindings before compiling.
Comment 6 David Mohr 2015-02-11 19:03:07 UTC
This worked for me (see comments of https://aur.archlinux.org/packages/amanda/ )

# diff -u /usr/portage/app-backup/amanda/amanda-3.3.5.ebuild amanda-3.3.5-r0.ebuild 
--- /usr/portage/app-backup/amanda/amanda-3.3.5.ebuild  2014-11-10 16:01:02.000000000 -0700
+++ amanda-3.3.5-r0.ebuild      2015-02-11 11:55:53.041009943 -0700
@@ -41,9 +41,10 @@
        >=app-text/docbook-xsl-stylesheets-1.72.0
        app-text/docbook-xml-dtd
        dev-libs/libxslt
+       perl? ( dev-lang/swig )
        "
 
-IUSE="curl gnuplot ipv6 kerberos minimal nls readline s3 samba systemd xfs"
+IUSE="curl gnuplot ipv6 kerberos minimal nls readline s3 samba systemd xfs perl"
 
 MYFILESDIR="${T}/files"
 ENVDIR="/etc/env.d"
@@ -175,6 +176,8 @@
                sed -i -e 's:^\(my $amandahomedir\)=.*:\1 = $localstatedir;:' \
                        server-src/am{addclient,serverconfig}.pl || die
        fi
+
+       use perl && touch perl/*/*.swg
 }
 
 src_configure() {
Comment 7 Gordon Pritchard 2015-02-14 00:37:13 UTC
I am really in trouble now - no Amanda for backups :-(

I hit this bug, where I couldn't compile Amanda-3.3.3-r1.  I tried keywording and moving up to unstable 3.3.5 but encountered the same emerge-failure :-(

Not knowing enough, I unmerged Amanda, ran 'perl-cleaner reallyall' and even added swig to my system.  But to no avail - I still cannot compile either 3.3.3-r1 or 3.3.5.  And I am now without Amanda :-(  This is on a central file-server.

Ouch :-(
Comment 8 David Mohr 2015-02-14 01:04:37 UTC
(In reply to Gordon Pritchard from comment #7)
> I am really in trouble now - no Amanda for backups :-(
[...]
> Ouch :-(

Hey Gordon, did you try my patch in a local overlay?
Comment 9 Ed Santiago 2015-02-14 01:11:33 UTC
(In reply to Gordon Pritchard from comment #7)
> I am really in trouble now - no Amanda for backups :-(

I can confirm that David Mohr's fix in comment 6 works with amanda-3.3.3-r1. Many, many kind thanks to him.
Comment 10 Chris Wood 2015-02-14 09:57:07 UTC
Had the same problem, updated perl and it killed amanda-3.3.3-r1 tried everything from perl cleaner to unmerging and deep world update and a delclean and updating to amanda-3.3.5.  Made a modified version (can't see the point in the extra use flag) of David Mohr patch, and 3.3.5 now builds.  Thanks.
Comment 11 Jeroen Roovers (RETIRED) gentoo-dev 2015-02-14 10:40:00 UTC
So I just prevented one production system from upgrading to dev-lang/perl-5.20.1-r4 just now, or the up and running amanda daemons would no doubt start failing.
Comment 12 Stefan G. Weichinger 2015-02-15 10:12:40 UTC
pls also note the patch provided by upstream:

http://comments.gmane.org/gmane.comp.archivers.amanda.user/40830

swig-related at least, I am not sure if it solves the problem in this specific bug. I assume there will be a new upstream release.
Comment 13 Stefan G. Weichinger 2015-02-15 10:22:32 UTC
Hm, I had that issue as well back with 3.3.6 (afai remember).

3.3.7 builds fine here, but gives me another issue ... might be my hardware though.
Comment 14 Stefan G. Weichinger 2015-02-15 10:42:41 UTC
This is the pointer to my original issue:

http://archives.zmanda.com/amanda-archives/viewtopic.php?t=7304&sid=2dc4b84e4db35ddf82ca45bbfc5b18ea
Comment 15 Stefan G. Weichinger 2015-02-15 11:06:30 UTC
pls see my current ebuilds at:

https://github.com/stefangweichinger/gentoo-overlay/tree/master/app-backup/amanda

builds fine for 3.3.7, and brings the patch by JLM
Comment 16 Stefan G. Weichinger 2015-02-15 11:16:09 UTC
Sorry for not mentioning that I included David Mohr's fix in comment 6 into my ebuilds. Thanks!
Comment 17 Stefan G. Weichinger 2015-02-15 18:35:14 UTC
There will be a new release and swig is not a dependency, see:

http://marc.info/?l=amanda-users&m=142401726800539&w=2

Maybe we can then add a new ebuild for the latest upstream release and also get rid of bug #529074 ?
Comment 18 Christopher Head 2015-02-16 05:46:52 UTC
I can confirm that 3.3.7 fixes both this bug (bool undeclared) as well as this other bug <https://github.com/zmanda/amanda/issues/62> that also showed up with Perl 5.20.
Comment 19 Jeroen Roovers (RETIRED) gentoo-dev 2015-02-16 10:07:28 UTC
3.3.7 would be just fine, but this failure is seen on stable profiles right now, so we should have a fix for 3.3.3-r1 ready.
Comment 20 Stefan G. Weichinger 2015-02-17 18:31:09 UTC
(In reply to Jeroen Roovers from comment #19)
> 3.3.7 would be just fine, but this failure is seen on stable profiles right
> now, so we should have a fix for 3.3.3-r1 ready.

I am working on an ebuild for that and discuss this with the upstream dev. Unfortunately his patches so far depend on swig-3.0.5 which isn't stable either.

Aside from that: what keeps from stabilizing some newer amanda-release?

3.3.3 is from 2013 ...
Comment 21 Stefan G. Weichinger 2015-02-17 18:53:27 UTC
cleaned up my ebuilds at:

https://github.com/stefangweichinger/gentoo-overlay/tree/master/app-backup/amanda

3.3.3-r1 and 3.3.5 don't build right now.

upstream says:

"You are using perl-5.20.
The generated swig file in 3.3.3 will not work with perl-5.20.
You must regenerate them.
You need swig-3.0.2 or newer"

stable gentoo means: perl-5.20, swig-2.0.9

Ideas, anyone?
Comment 22 Gordon Pritchard 2015-02-17 23:01:03 UTC
> 3.3.3-r1 and 3.3.5 don't build right now.

I can confirm that amanda-3.3.3-r1 *DOES NOT* currently build, still, with perl-5.20 :-(

I still get:

Makefile:2701: recipe for target 'Application.lo' failed
make[4]: *** [Application.lo] Error 1
In file included from Amanda/Cmdline.c:734:0:
Amanda/Cmdline.c: In function ‘SWIG_AsCharPtrAndSize’:
/usr/lib64/perl5/5.20.1/x86_64-linux/CORE/handy.h:124:34: error: ‘bool’ undeclared (first use in this function)
 #define cBOOL(cbool) ((cbool) ? (bool)1 : (bool)0)


:-(

For now, I followed the earlier suggestion by Jeroen Roovers:  I am preventing several dozen other (amd64-stable) servers from upgrading beyond perl-5.18, to maintain operation :-O
Comment 23 Gordon Pritchard 2015-03-03 14:45:00 UTC
I find that now I cannot hold back perl - other system components are demanding an update to perl-5.20.  It is a difficult decision, more so when running "stable":  to completely stop updating a system in order to maintain Amanda backups... or to update and lose the safety-net of Amanda backups :-(

To abandon updating, or forego backups... what a painful decision when choosing "stable" stream :-(

If a patched version of Amanda compiles and works, I ask that it be made available to "stable", relieving this difficult deadlock.
Comment 24 Dustin J. Mitchell 2015-03-06 14:21:04 UTC
I'm going on two weeks with no backups, and that sucks.  As I understand it, there's no version of Amanda in portage that will build at this point.

From reading the above, it sounds like one option is to re-generate the SWIG outputs using a newer SWIG, then capture that as a patch and apply it in the ebuild (thereby avoiding the need for SWIG).  Or perhaps JLM can release an upstream release that has been built against Perl-5.20 ("Amanda-3.3.5-pl520") and we can build from that release.  If JLM's OK with that I would be willing to make the build as a one-off.  I don't really know what the build automation for upstream Amanda looks like these days.

Is Amanda-3.3.7 an option?  Or would it have the same issues?
Comment 25 Christopher Head 2015-03-06 16:41:00 UTC
When I tried making my own 3.3.7 ebuild, I got segfaults in the taper. I didn’t want to say anything before this, since my ebuild may very well have been terrible, but be aware that this is a possible problem.
Comment 26 Piotr Sikora 2015-03-07 17:02:22 UTC

Perl-5.20 , amanda-3.3.3-r1 swig-2.0.9  

this patch work for me:
https://bz-attachments.freebsd.org/attachment.cgi?id=149027&action=diff&collapsed=&context=patch&format=raw&headers=1
Comment 27 Christopher Head 2015-03-07 19:12:21 UTC
(In reply to Piotr Sikora from comment #26)
> 
> Perl-5.20 , amanda-3.3.3-r1 swig-2.0.9  
> 
> this patch work for me:
> https://bz-attachments.freebsd.org/attachment.
> cgi?id=149027&action=diff&collapsed=&context=patch&format=raw&headers=1

I am doing the same thing with one difference: I had to keyword-unmask perl-5.20.2, because if I didn’t, amreport would segfault (possibly https://github.com/zmanda/amanda/issues/62, though the patch listed there didn’t help me). On the other hand, if I installed amanda-3.3.7, then taper would segfault instead, if I remember correctly, including with Perl 5.20.2.
Comment 28 Stefan G. Weichinger 2015-03-08 15:34:09 UTC
The 3.3.7p1 ebuild in my github repo compiles and works.

-> for the people without backups ... as quick fix
Comment 29 Ian Delaney (RETIRED) gentoo-dev 2015-03-09 07:49:14 UTC
(In reply to Stefan G. Weichinger from comment #28)
> The 3.3.7p1 ebuild in my github repo compiles and works.
> 
> -> for the people without backups ... as quick fix

well that's looking like a possible fix for this. After all of 28 comments, the title doesn't designate version(s) and as jer has indicated there are 2 levels that need to work, both stable and testing, which brings us back to comment 26. Are these both ready for testing?  Can you please make either full new ebuilds or patches of ebuilds plus new patches for new patched ebuilds?
Comment 30 Piotr Sikora 2015-03-09 11:32:14 UTC
Ebuild from Stefan G. Weichinger  works better for me..
but also 3.3.3 witch patch from comment 26 work for me too ... but without amreport 
amreport[17727]: segfault at 0 ip 000072ca6c3ee124 sp 00007fff15b8cb00 error 4 in libperl.so.5.20.1[7fca5c2e5000+196000]

but amdump works fine.
Comment 31 Christopher Head 2015-03-10 04:36:33 UTC
(In reply to Piotr Sikora from comment #30)
> Ebuild from Stefan G. Weichinger  works better for me..
> but also 3.3.3 witch patch from comment 26 work for me too ... but without
> amreport 
> amreport[17727]: segfault at 0 ip 000072ca6c3ee124 sp 00007fff15b8cb00 error
> 4 in libperl.so.5.20.1[7fca5c2e5000+196000]
> 
> but amdump works fine.

Same situation I encountered. Try Perl 5.20.2 instead of 5.20.1 if you want to fix it.
Comment 32 Ian Delaney (RETIRED) gentoo-dev 2015-03-26 11:14:48 UTC
(In reply to Christopher Head from comment #31)
> (In reply to Piotr Sikora from comment #30)
> > Ebuild from Stefan G. Weichinger  works better for me..
> > but also 3.3.3 witch patch from comment 26 work for me too ... but without
> > amreport 
> > amreport[17727]: segfault at 0 ip 000072ca6c3ee124 sp 00007fff15b8cb00 error
> > 4 in libperl.so.5.20.1[7fca5c2e5000+196000]
> > 
> > but amdump works fine.
> 
> Same situation I encountered. Try Perl 5.20.2 instead of 5.20.1 if you want
> to fix it.

I attempted for some time to get a run from the above and ran into a variety of issues:

1. amanda-3.3.7_p1.ebuild; 
   The mirror://sourceforge/amanda/amanda-3.3.7p1.tar.gz requires reduction by bash expandable vars.  3.3.7p1 != 3.3.7_p1 so usually use of MY_PN, MY_P is used to set this.
2  IUSE= has been shifted way below uts usual location.
3   S="/var/tmp/portage/app-backup/amanda-3.3.7_p1/work/amanda-3.3.7p1" !!!
Here is my $PORTAGE_TMPDIR
/mnt/gen2/TmpDir
You need use a bash expandable var that will work in anyone's system
S="{WORKDIR}/${P/_/}" os some such
4. The order of the phases is changed.  You should have 
src_unpack pkg_setup src_prepare
5. The patch in amanda-3.3.7_p1.ebuild is a different one all together to the one in amanda-3.3.6.ebuild.  I was considering preparing a bump to 3.3.6 however all the above and no info explaining the status or origin of the patches simply created too many unanswered questions.

IF the source of this confusion pertains to the version of dev-lang/perl, the deps ought set this to enforce the version declared to work, namely Perl 5.20.2 yet all I see in the deps is >=dev-lang/perl-5.6.

I gave up in despair.

Copying ebuilds out of personal overlays is doable but these are far from ready to go.  Ideally they ought be cleaned up, the phases set in the usual order and attache in the bug here, not left to be fished out of a personal overlay,
Comment 33 Christopher Head 2015-03-27 07:30:16 UTC
(In reply to Ian Delaney from comment #32)
> > Same situation I encountered. Try Perl 5.20.2 instead of 5.20.1 if you want
> > to fix it.
> 
> I attempted for some time to get a run from the above and ran into a variety
> of issues:
> 
> 1. amanda-3.3.7_p1.ebuild; 
> 5. The patch in amanda-3.3.7_p1.ebuild is a different one all together to
> the one in amanda-3.3.6.ebuild.  I was considering preparing a bump to 3.3.6
> however all the above and no info explaining the status or origin of the
> patches simply created too many unanswered questions.
> 
> IF the source of this confusion pertains to the version of dev-lang/perl,
> the deps ought set this to enforce the version declared to work, namely Perl
> 5.20.2 yet all I see in the deps is >=dev-lang/perl-5.6.
> 
> I gave up in despair.

I didn’t do anything so ambitious. I just wanted Amanda to work, so I use dev-lang/perl-5.20.2 and app-backup/amanda-3.3.3-r1, both from the official tree. The latter is the stable-keyworded version, and I had to unkeyword the former to eliminate crashes.
Comment 34 Gordon Pritchard 2015-04-01 19:51:06 UTC
(In reply to Ian Delaney from comment #32)

> > I gave up in despair.


(In reply to Christopher Head from comment #33)
 
> I didn’t do anything so ambitious. I just wanted Amanda to work, so I use
> dev-lang/perl-5.20.2 and app-backup/amanda-3.3.3-r1, both from the official
> tree. The latter is the stable-keyworded version, and I had to unkeyword the
> former to eliminate crashes.

I am despairing, like Ian.

I tried the recipe that Christopher provides, without success :-(  I still get:

In file included from Amanda/Cmdline.c:734:0:
Amanda/Cmdline.c: In function ‘SWIG_AsCharPtrAndSize’:
/usr/lib64/perl5/5.20.2/x86_64-linux/CORE/handy.h:124:34: error: ‘bool’ undeclared (first use in this function)
 #define cBOOL(cbool) ((cbool) ? (bool)1 : (bool)0)
                                  ^

In addition to unkeywording dev-lang/perl-5.20.2, I also had to unkeyword these two required dependencies:  virtual/perl-File-Spec and virtual/perl-Storable

But alas - I could not get app-backup/amanda-3.3.3-r1 to build to completion.

I also "just wanted Amanda to work", but across a number of servers... again, I respectfully ask that *something buildable* be provided in Portage.
Comment 35 Alan Hodgson 2015-04-01 20:49:17 UTC
Created attachment 400354 [details]
proposed 3.3.7.p1 ebuild

A proposed ebuild for amanda 3.3.7p1, tested with perl 5.20.1-r4
Comment 36 Alan Hodgson 2015-04-01 20:51:09 UTC
(In reply to Alan Hodgson from comment #35)
> Created attachment 400354 [details]
> proposed 3.3.7.p1 ebuild
> 
> A proposed ebuild for amanda 3.3.7p1, tested with perl 5.20.1-r4

3.3.7p1 builds and runs with this ebuild, using the current perl-5.20.1-r4. It's a very simple modification of the existing 3.3.5 ebuild, no patches.

I don't currently run gentoo on my tape server, so it's not super well tested, but it works to do backups and restores in production on a client machine.

I also setup a simple test server with vtapes, and taper works, too.
Comment 37 Christopher Head 2015-04-02 04:23:29 UTC
(In reply to Gordon Pritchard from comment #34)
> I tried the recipe that Christopher provides, without success :-(  I still
> get:
> 
> In file included from Amanda/Cmdline.c:734:0:
> Amanda/Cmdline.c: In function ‘SWIG_AsCharPtrAndSize’:
> /usr/lib64/perl5/5.20.2/x86_64-linux/CORE/handy.h:124:34: error: ‘bool’
> undeclared (first use in this function)
>  #define cBOOL(cbool) ((cbool) ? (bool)1 : (bool)0)

Sounds like you didn’t follow my note in Comment 3. You have to download that patch from Ximalas and apply it to the Amanda source tree. Since the Amanda ebuild doesn’t do an epatch_user, the easiest way I found to accomplish that is to start the emerge, wait until it gets into running configure, suspend the emerge process with Ctrl+Z, and go into the Portage temp directory and apply the patch before resuming the emerge.
Comment 38 Ian Delaney (RETIRED) gentoo-dev 2015-04-02 14:46:15 UTC
(In reply to Christopher Head from comment #37)

> 
> Sounds like you didn’t follow my note in Comment 3. You have to download
> that patch from Ximalas and apply it to the Amanda source tree. Since the
> Amanda ebuild doesn’t do an epatch_user, the easiest way I found to
> accomplish that is to start the emerge, wait until it gets into running
> configure, suspend the emerge process with Ctrl+Z, and go into the Portage
> temp directory and apply the patch before resuming the emerge.

Please don't try to encourage others to pursue such practices.  They break the emerge process at its core.  Such a patch need be incorporated into an ebuild.  Some packages come with insourced patches, its not unheard of.  Applying patches is implicit in ebuild writing.
Comment 39 Christopher Head 2015-04-02 15:46:10 UTC
Created attachment 400406 [details]
Ebuild that applies the Trond patch from ximalas.info

I know it’s not the *right* way, but it is a much faster way to get things done than to copy the ebuild into a local overlay and then start figuring out how to get the patch applied. I would have used epatch_user, but Amanda doesn’t call it.

In contrition for my undesirable solution, please find attached the right way to do the same thing.
Comment 40 Ian Delaney (RETIRED) gentoo-dev 2015-04-02 16:30:48 UTC
(In reply to Christopher Head from comment #39)
> Created attachment 400406 [details]
> Ebuild that applies the Trond patch from ximalas.info
> 
> I know it’s not the *right* way, but it is a much faster way to get things
> done than to copy the ebuild into a local overlay and then start figuring
> out how to get the patch applied. I would have used epatch_user, but Amanda
> doesn’t call it.
> 
> In contrition for my undesirable solution, please find attached the right
> way to do the same thing.

Thanks, good. Perhaps we can look at getting epatch_user into amanda.  Yes there are many ways of getting things done, however as a gentoo dev, I can hardly endorse 'quick and dirty' hacks.  Just be aware I'm more than  content to assist you in increasing ebuild writing a la gentoo protocol. I do alot of it.  Feel free to find me in irc (I'm a python dev primarily). Shutting down now I'll look more tomorrow.
Comment 41 Gordon Pritchard 2015-04-02 17:09:04 UTC
(In reply to Christopher Head from comment #37)

> Sounds like you didn’t follow my note in Comment 3.

You are correct - I took your Comment 33 in isolation... :-(
Please don't mistake me for someone who knows what he is doing :-O



(In reply to Alan Hodgson from comment #35)

At any rate, I found time at 4am today to try the amanda-3.3.7_p1 ebuild that Alan put together, and it build with 'stable' dev-lang/perl-5.20.1-r4.  Since that was the focus of this Bug - not building - I guess this is a "fix".  I had to add the /files/* subdirectory from a Portage ebuild to get Alan's ebuild to build.

Limited testing shows that 'amcheck' and 'amdump' work as they should.  I've duplicated this success across two servers, but I'll wait a bit to roll it across all my various servers.

Thank-you!
Comment 42 Ian Delaney (RETIRED) gentoo-dev 2015-04-03 00:05:39 UTC
Created attachment 400440 [details, diff]
diff -u patch of ebuilds

without the patch;

~/cvsPortage/gentoo-x86/app-backup/amanda $ ebuild amanda-3.3.3-r2.ebuild clean compile

make[1]: Leaving directory '/mnt/gen2/TmpDir/portage/app-backup/amanda-3.3.3-r2/work/amanda-3.3.3'
Makefile:1363: recipe for target 'all' failed
make: *** [all] Error 2
 * ERROR: app-backup/amanda-3.3.3-r2::gentoo failed (compile phase):
 *   emake failed

and with patch

>>> Source compiled.

sweet taste of success. On a good thing here. Now;

epatch "${FILESDIR}/local-amanda-perl5.20.patch"

So, I 
1) reduced the name slightly without losing anything. We could go  a step further and make it amanda-3.3.3-local-perl5.20.patch but I'd rather not.
2) saved the patch to the app-backup/amanda/files dir.  This is part of what a FILESDIR is for.
3) merely shifted IUSE up to it's 'normal' spot, however this is merely a 'style thing'.

So, let's push C. Head a little further.  Can / could you make a diff in this style for amanda-3.3.5.ebuild which also fails and which also builds and installs with the patch.  The final penance, Can you make a diff to bump to amanda-3.3.6.ebuild? 

We seem to be close to a point of committing a fix for this.
Comment 43 Christopher Head 2015-04-03 05:05:04 UTC
Created attachment 400456 [details, diff]
Patch to amanda-3.3.5.ebuild to fix compile failure

Part 1 of penance: this patch applies to amanda-3.3.5.ebuild as in tree and fixes the compile error. It assumes Trond’s patch is in files/local-amanda-perl5.20.patch, same as Ian named it for 3.3.3-r1.
Comment 44 Christopher Head 2015-04-03 05:34:57 UTC
Part 2 of penance: after applying the patch in Comment 43 to amanda-3.3.5.ebuild, copying it unmodified to amanda-3.3.6.ebuild also compiles and installs properly. I haven’t tested if it works though.
Comment 45 Joost Ruis 2015-04-03 07:21:41 UTC
https://github.com/Sabayon/for-gentoo/tree/master/app-backup/amanda

Sorry I couldn't wait for the lecture in here. (o:
Comment 46 Joost Ruis 2015-04-03 07:24:06 UTC
Created attachment 400460 [details, diff]
Add local-amanda-perl5.20.patch
Comment 47 Ian Delaney (RETIRED) gentoo-dev 2015-04-03 12:53:19 UTC
(In reply to Christopher Head from comment #44)
> Part 2 of penance: after applying the patch in Comment 43 to
> amanda-3.3.5.ebuild, copying it unmodified to amanda-3.3.6.ebuild also
> compiles and installs properly. I haven’t tested if it works though.

For now I shall commit a fix for 3.3.3-r1 and 3.3.5 given that they are already added to portage.  For 3.3.6, while a copy of the ebuild with the new version name can work, it can be not broken but still be wrong.  With version bumps can come updated versions to the deps and or change of deps.

  03 Apr 2015; Ian Delaney <idella4@gentoo.org>
  +files/local-amanda-perl5.20.patch, amanda-3.3.3-r1.ebuild,
  amanda-3.3.5.ebuild:
  patch to fix build failure, sourced by proxy maintainer and C. Head from
  upstream in Bug #537248, confirmed with runtests

I note that the main proxy maintainer claims to have built both 3.3.6 & 3.3.7 however we have no actual patches to bump them.  For now I shall leave this open to receive patches for such bumps however they warrant the making of a new bug. This is already overfilled.

The patch in Comment 6 is curious.  It adds a use flag and a dep and another step in the ebuild, none of which were done to acquire the build achieved here, however the patch does appear the 'hard way'.  It appears to require the build to be done with use of the new use flag 'perl' suggesting it ought be set perl+ in IUSE.

Once again, Stefan G. Weichinger, the ebuilds in your overlay lead to substantial confusion.  A version bump to either 3.3.6 or 3.3.7 will require going through the code to ascertain and new or changed dependencies. That is predominantly what a version bump is about for more complex packages like this.  Little libs, no.  Either C. Head or Stefan G. Weichinger consider attempting making a patch in the style of a diff -u patch as I have in Comment 42.  Such a patch can be used by a dev to convert / update an ebuild inside a minute with no confusion.

C. Head you are no longer a penitent. Thank you all for your input.
Comment 48 Ian Delaney (RETIRED) gentoo-dev 2015-04-03 23:01:15 UTC
Sorry I was unaware of  Bug 529074 on last entry
Comment 49 Stefan G. Weichinger 2015-04-07 08:39:12 UTC
(In reply to Ian Delaney from comment #47)

> Once again, Stefan G. Weichinger, the ebuilds in your overlay lead to
> substantial confusion.  A version bump to either 3.3.6 or 3.3.7 will require
> going through the code to ascertain and new or changed dependencies. That is
> predominantly what a version bump is about for more complex packages like
> this.  Little libs, no.  Either C. Head or Stefan G. Weichinger consider
> attempting making a patch in the style of a diff -u patch as I have in
> Comment 42.  Such a patch can be used by a dev to convert / update an ebuild
> inside a minute with no confusion.

The ebuild in my git repo (mentioned above) builds and works and brings the used patches (which came from JLM from the amanda-core-team) with it. What to convert there?

3.3.7.p1 builds and works for me. If it is "correct", I don't know.

I only focussed to discuss the issue with JLM and come up with a working draft, I am not a dev so I leave the fine tuning and correct formatting to those who are competent to do so.
Comment 50 Kent Fredric (IRC: kent\n) (RETIRED) gentoo-dev 2017-06-30 22:42:57 UTC
The affected version 3.3.3 is still installable, despite not being usable for several years now.

-r1 version is fine, and all newer versions seem ok.

Maintainers, please clean up this version soon.
Comment 51 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2017-07-01 19:12:49 UTC
Old ebuilds removed