Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 138495 - app-backup/bacula-1.38.9 fails to build the director, but emerge continues
Summary: app-backup/bacula-1.38.9 fails to build the director, but emerge continues
Status: RESOLVED WONTFIX
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: AMD64 Linux
: High normal (vote)
Assignee: App-Backup Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 139846 153189
  Show dependency tree
 
Reported: 2006-06-29 09:23 UTC by William Arlofski
Modified: 2007-04-04 08:39 UTC (History)
2 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description William Arlofski 2006-06-29 09:23:58 UTC
Bacula fails to build the director, but the emerge continues on and seems to finish properly with no exit errors etc.   After discovering that my /usr/sbin/bacula-dir file was missing, I found that the compilation of the dir was failing in the middle of the merge. (see log snip below)


# emerge -va bacula

These are the packages that would be merged, in order:

Calculating dependencies... done!
[ebuild  R    ] app-backup/bacula-1.38.9  USE="X bacula-console bacula-split-init logrotate postgres python readline ssl tcpd wxwindows -bacula-clientonly -bacula-nodir -bacula-nosd -doc -gnome -logwatch -mysql -sqlite -sqlite3 -static" 0 kB


# emerge --info
Portage 2.1-r1 (default-linux/amd64/2006.0, gcc-3.4.6, glibc-2.3.6-r4, 2.6.16.16 x86_64)
=================================================================
System uname: 2.6.16.16 x86_64 AMD Athlon(tm) 64 X2 Dual Core Processor 3800+
Gentoo Base System version 1.6.15
dev-lang/python:     2.3.5-r2, 2.4.2
dev-python/pycrypto: 2.0.1-r5
dev-util/ccache:     [Not Present]
dev-util/confcache:  [Not Present]
sys-apps/sandbox:    1.2.17
sys-devel/autoconf:  2.13, 2.59-r7
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2
sys-devel/binutils:  2.16.1-r2
sys-devel/gcc-config: 1.3.13-r2
sys-devel/libtool:   1.5.22
virtual/os-headers:  2.6.11-r2
ACCEPT_KEYWORDS="amd64"
AUTOCLEAN="yes"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=athlon64 -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/lib/X11/xkb /usr/lib/fax /usr/share/config /var/spool/fax/etc"
CONFIG_PROTECT_MASK="/etc/env.d /etc/gconf /etc/revdep-rebuild /etc/terminfo"
CXXFLAGS="-march=athlon64 -O2 -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoconfig distlocks metadata-transfer sandbox sfperms strict"
GENTOO_MIRRORS="http://distfiles.gentoo.org http://distro.ibiblio.org/pub/linux/distributions/gentoo"
MAKEOPTS="-j3"
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="/var/tmp"
PORTDIR="/usr/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="amd64 X a52 aac alsa arts avi berkdb bidi bitmap-fonts cli crypt cups dbus divx4linux dri dvd dvdread eds emboss encode faad ffmpeg flac foomaticdb fortran gif gpm gstreamer gtk gtk2 hal ieee1394 imlib ipv6 isdnlog jpeg kde kdeenablefinal ldap lm_sensors logrotate lzw lzw-tiff matroska mozilla mp3 mpeg mplayer ncurses nls nptl nvidia ogg opengl pam pcre pdflib perl png postgres ppds pppd python qt qt3 qt4 quicktime readline reflection sdl session spell spl ssl tcpd tiff truetype truetype-fonts type1-fonts usb vorbis wxwindows xine xorg xpm xv xvid zeroconf zlib elibc_glibc kernel_linux userland_GNU"
Unset:  CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, LC_ALL, LDFLAGS, LINGUAS, PORTAGE_RSYNC_EXTRA_OPTS, PORTDIR_OVERLAY




emerge snippet:

/usr/bin/x86_64-pc-linux-gnu-g++   -L../lib -L../cats -L../findlib -o bacula-dir
dird.o admin.o authenticate.o autoprune.o backup.o bsr.o catreq.o dird_conf.o exp
and.o fd_cmds.o getmsg.o inc_conf.o job.o jobq.o mac.o mountreq.o msgchan.o next_
vol.o newvol.o pythondir.o recycle.o restore.o run_conf.o scheduler.o sql_cmds.o
ua_acl.o ua_cmds.o ua_dotcmds.o ua_query.o ua_input.o ua_label.o ua_output.o ua_p
rune.o ua_purge.o ua_restore.o ua_run.o ua_select.o ua_server.o ua_status.o ua_tr
ee.o ua_update.o verify.o \
      -lsql -lfind -lbac -lm -L/usr/lib/python2.3/config -lpython2.3 -lutil -lrt
  -L/usr/lib -lpq -lcrypt -lpthread -ldl  \
      -lwrap  -lssl -lcrypto
/usr/lib/python2.3/config/libpython2.3.a(posixmodule.o): In function `posix_tmpna
m':
: warning: the use of `tmpnam_r' is dangerous, better use `mkstemp'
/usr/lib/python2.3/config/libpython2.3.a(posixmodule.o): In function `posix_tempn
am':
: warning: the use of `tempnam' is dangerous, better use `mkstemp'
/usr/lib/python2.3/config/libpython2.3.a(zlibmodule.o): In function `PyZlib_compr
ess':
: undefined reference to `deflateInit_'
/usr/lib/python2.3/config/libpython2.3.a(zlibmodule.o): In function `PyZlib_compr
ess':
: undefined reference to `deflateEnd'
/usr/lib/python2.3/config/libpython2.3.a(zlibmodule.o): In function `PyZlib_compr
ess':
: undefined reference to `deflate'
/usr/lib/python2.3/config/libpython2.3.a(zlibmodule.o): In function `PyZlib_compr
ess':
: undefined reference to `deflateEnd'
/usr/lib/python2.3/config/libpython2.3.a(zlibmodule.o): In function `PyZlib_compr
ess':
: undefined reference to `deflateEnd'
/usr/lib/python2.3/config/libpython2.3.a(zlibmodule.o): In function `PyZlib_decom
press':
: undefined reference to `inflateInit2_'
/usr/lib/python2.3/config/libpython2.3.a(zlibmodule.o): In function `PyZlib_decom
press':
: undefined reference to `inflate'
/usr/lib/python2.3/config/libpython2.3.a(zlibmodule.o): In function `PyZlib_decom
press':
: undefined reference to `inflateEnd'
/usr/lib/python2.3/config/libpython2.3.a(zlibmodule.o): In function `PyZlib_decom
press':
: undefined reference to `inflateEnd'
/usr/lib/python2.3/config/libpython2.3.a(zlibmodule.o): In function `PyZlib_decom
press':
: undefined reference to `inflateEnd'
/usr/lib/python2.3/config/libpython2.3.a(zlibmodule.o): In function `PyZlib_decom
press':
: undefined reference to `inflateEnd'
/usr/lib/python2.3/config/libpython2.3.a(zlibmodule.o): In function `PyZlib_compr
essobj':
: undefined reference to `deflateInit2_'
/usr/lib/python2.3/config/libpython2.3.a(zlibmodule.o): In function `PyZlib_decom
pressobj':
: undefined reference to `inflateInit2_'
/usr/lib/python2.3/config/libpython2.3.a(zlibmodule.o): In function `Comp_dealloc
':
: undefined reference to `deflateEnd'
/usr/lib/python2.3/config/libpython2.3.a(zlibmodule.o): In function `Decomp_deall
oc':
: undefined reference to `inflateEnd'
/usr/lib/python2.3/config/libpython2.3.a(zlibmodule.o): In function `PyZlib_objco
mpress':
: undefined reference to `deflate'
/usr/lib/python2.3/config/libpython2.3.a(zlibmodule.o): In function `PyZlib_objco
mpress':
: undefined reference to `deflate'
/usr/lib/python2.3/config/libpython2.3.a(zlibmodule.o): In function `PyZlib_objde
compress':
: undefined reference to `inflate'
/usr/lib/python2.3/config/libpython2.3.a(zlibmodule.o): In function `PyZlib_objde
compress':
: undefined reference to `inflate'
/usr/lib/python2.3/config/libpython2.3.a(zlibmodule.o): In function `PyZlib_flush
':
: undefined reference to `deflate'
/usr/lib/python2.3/config/libpython2.3.a(zlibmodule.o): In function `PyZlib_flush
':
: undefined reference to `deflate'
/usr/lib/python2.3/config/libpython2.3.a(zlibmodule.o): In function `PyZlib_flush
':
: undefined reference to `deflateEnd'
/usr/lib/python2.3/config/libpython2.3.a(zlibmodule.o): In function `PyZlib_unflu
sh':
: undefined reference to `inflate'
/usr/lib/python2.3/config/libpython2.3.a(zlibmodule.o): In function `PyZlib_unflu
sh':
: undefined reference to `inflateEnd'
/usr/lib/python2.3/config/libpython2.3.a(zlibmodule.o): In function `PyZlib_adler
32':
: undefined reference to `adler32'
/usr/lib/python2.3/config/libpython2.3.a(zlibmodule.o): In function `PyZlib_adler
32':
: undefined reference to `adler32'
/usr/lib/python2.3/config/libpython2.3.a(zlibmodule.o): In function `PyZlib_crc32
':
: undefined reference to `crc32'
/usr/lib/python2.3/config/libpython2.3.a(zlibmodule.o): In function `PyZlib_crc32
':
: undefined reference to `crc32'
collect2: ld returned 1 exit status
make[1]: *** [bacula-dir] Error 1
make[1]: Leaving directory `/var/tmp/portage/bacula-1.38.9/work/bacula-1.38.9/src
/dird'


====== Error in /var/tmp/portage/bacula-1.38.9/work/bacula-1.38.9/src/dird ======
Comment 1 William Arlofski 2006-07-10 16:50:41 UTC
Any update/progress on this?

Is there anyhting else I can submit to help?
Comment 2 Jakub Moc (RETIRED) gentoo-dev 2006-09-28 06:04:51 UTC
Re-assigning to herd wrt Bug 98505. Remove labmonkey from metadata.xml please.
Comment 3 Evil Compile Person 2006-10-21 08:55:45 UTC
I cannot reproduce this bug, app-backup/bacula-1.38.9 compiles and merges fine.
Comment 4 William Arlofski 2006-10-21 09:07:54 UTC
Hi  Evil Compile Person. 

Are you sure that during the bacula-dir phase of the compile there was no error? The error I see fails to compile bacula-dir, BUT the emerge continues on. 

Do you have abacula-dir binary in /usr/sbin when the compile is complete?

Thanks.
Comment 5 Paul Komarek 2007-02-10 07:36:29 UTC
I have the same issue.  Whether or not Evil Compile Person has the same problem, I think the main issue is that failures are silently ignored.  This is dangerous, especially for critical packages like backup tools!

I don't see anything strange (e.g. something which would tell make or the configure script to ignore errors) in the gentoo ebuild for bacula 1.38.9, but I'm not an ebuild expert.  If Gentoo's ebuild file cannot find a way to detect this problem (e.g. create a list of expected binaries, then check that they exist after install), perhaps we should complain to the bacula maintainers.
Comment 6 Paul Komarek 2007-02-10 07:51:22 UTC
Besides the reported errors, I'm also seeing errors in the console.  Consider this snippet:

/usr/bin/x86_64-pc-linux-gnu-g++   -c    -I. -I..  -O2 -march=athlon64 -pipe  authenticate.c
console.c:78: error: `bool tee' redeclared as different kind of symbol
/usr/include/gentoo-multilib/amd64/bits/fcntl.h:247: error: previous declaration of `int tee(int, int, size_t, unsigned int)'
console.c:78: error: declaration of `bool tee'
/usr/include/gentoo-multilib/amd64/bits/fcntl.h:247: error: conflicts with previous declaration `int tee(int, int, size_t, unsigned int)'
console.c: In function `int get_cmd(FILE*, const char*, BSOCK*, int)':
console.c:705: warning: the address of `int tee(int, int, size_t, unsigned int)', will always evaluate as `true'
console.c: In function `int teecmd(FILE*, BSOCK*)':
console.c:784: error: assignment of function `int tee(int, int, size_t, unsigned int)'
console.c:784: error: cannot convert `bool' to `int ()(int, int, size_t, unsigned int) throw ()' in assignment
console.c: In function `int outputcmd(FILE*, BSOCK*)':
console.c:791: error: assignment of function `int tee(int, int, size_t, unsigned int)'
console.c:791: error: cannot convert `bool' to `int ()(int, int, size_t, unsigned int) throw ()' in assignment
console.c: In function `int do_outputcmd(FILE*, BSOCK*)':
console.c:809: error: assignment of function `int tee(int, int, size_t, unsigned int)'
console.c:809: error: cannot convert `bool' to `int ()(int, int, size_t, unsigned int) throw ()' in assignment
console.c: In function `void sendit(const char*)':
console.c:893: warning: the address of `int tee(int, int, size_t, unsigned int)', will always evaluate as `true'
console.c:896: warning: the address of `int tee(int, int, size_t, unsigned int)', will always evaluate as `true'
make[1]: *** [console.o] Error 1
make[1]: *** Waiting for unfinished jobs....
make[1]: Leaving directory `/var/tmp/portage/app-backup/bacula-1.38.9/work/bacula-1.38.9/src/console'


  ====== Error in /var/tmp/portage/app-backup/bacula-1.38.9/work/bacula-1.38.9/src/console ======


Still, the build finishes "successfully", in the sense that ebuild returns 0 after ebuild bacula-1.38.9 compile.

Running make from my portage tmp dir, make returns 0 despite the failures.  So the problem is definitely higher-up the food chain.  Unless we grepped for Error messages, we're not going to notice bacula's build is failing.

One more thing -- my current guess is that the bacula-dir link is failing because it doesn't add -lz

Comment 7 Paul Komarek 2007-02-10 08:05:47 UTC
1) Confirmed that -lz on the director link command (run make in src/dird) fixes the dird compile problem.  bacula appears to count on the python config script to include all necessary link flags for python modules, but python isn't including -lz.  I think bacula should fix this, because it would be weird for python to include every dependency of every module installed.

2) Running make in src/dird returns error 2 when -lz is not specified.

3) Running make in the root compile directory returns 0, even on errors.  I think this is because they use a bash for-loop in their "all" target, and the errors aren't propogated back to make:

all: Makefile
        @for I in ${all_subdirs}; \
          do (cd $$I; echo "==>Entering directory `pwd`"; \
              $(MAKE) $@ || (echo ""; echo ""; echo "  ====== Error in `pwd` ======"; \
                            echo ""; echo "";)); \
        done

I didn't see any "dird" or "bacula-dir" targets in the main Makefile.  I tried running "make dird" and "make bacula-dir" in case they were implicit somewhere, but those didn't work either.  I had hoped we might be able to have the bacula ebuild script build the main components separately, so we could catch the errors they miss.

At any rate, this should probably be fixed in bacula, so everyone can reap the benefits.  I'm not sure what the bacula folks would like done with their for-loop and fancy messages, and I'm tired and want to go to bed.  So I'm leaving this for now, hoping someone else will follow-up with a real patch.
Comment 8 Paul Komarek 2007-02-10 08:16:15 UTC
One more thing -- you can fix the console compile by changing bool tee on line 78 to something like "bool mytee".  Then change all references to that boolean to "mytee", and you are set.

After that, and linking manually with -lz in src/dird, all tools build correctly.  Finishing with "ebuild bacula-1.38.9 merge" worked fine.

Note, I am getting the console problems with the "tee" variable because my build is using

  /usr/include/gentoo-multilib/amd64/bits/fcntl.h

which already declares "tee".  So maybe only amd64 people with multilib installations will hit this.  Again, I think the bacula folks should probably change their variable name, since they are the higher-level consumer.

As to why Evil Compile Person didn't get an error with bacula-dir, maybe he or she is using a different version of python, or has a somewhat different python config script, or somehow doesn't have zlib enabled for bacula builds.

-Paul
Comment 9 Paul Komarek 2007-02-10 08:24:04 UTC
I just hopped over to the bugs.bacula.org to report these problems (by referencing this thread), and noticed that they don't even allow reporting for version 1.38.9 in their version drop-down.  1.38.11 is the oldest they mention.

Maybe these are all known problems, fixed in later builds.  In that case, perhaps the right solution is to bring gentoo's bacula package up-to-date.
Comment 10 Paul Komarek 2007-02-10 18:49:04 UTC
I got a response back from the Bacula folks, on their bug 0000779 (see http://bugs.bacula.org/, login as anonymous/anonymous to view bugs).  In short,

* The tee problem was corrected a while ago, certainly by 1.38.11.  It is also fixed in later versions of fcntl.h
* The master-makefile not-returning-error problem still exists
* The link problem wasn't mentioned

In that bug, I asked whether what versions we (gentoo) should be using.  The response was that we certainly should be at 1.38.11 or later, and 2.0 as soon as possible.

If gentoo's bacula maintainer(s) decide against 1.38.11 and 2.x, then we should at least patch the "bool tee" problem in console.c, and the "-lz" problem in src/dird.  Personally, I'd rather see our time spent catching up with bacula, than maintaining old versions by ourselves.
Comment 11 João Vale 2007-03-24 15:51:08 UTC
I had the same 'tee' problem and editing console.c fixed it. About updating the ebuild, there's an open bug 130674 with an ebuild for 1.38.11.
Comment 12 Jakub Moc (RETIRED) gentoo-dev 2007-04-04 08:39:23 UTC
Only 1.36.3-r2 and 2.0.3 left in the tree. If you can reproduce w/ 2.0.3, feel free to reopen this bug.