Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 761415 - app-backup/bareos-19.2.9: python-fd.cc:1054:15: error: ‘PyInt_AsLong’ was not declared in this scope; did you mean ‘PyLong_AsLong’?
Summary: app-backup/bareos-19.2.9: python-fd.cc:1054:15: error: ‘PyInt_AsLong’ was not...
Status: RESOLVED NEEDINFO
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: AMD64 Linux
: Normal normal
Assignee: Marc Schiffbauer
URL:
Whiteboard:
Keywords: PATCH, PMASKED
Depends on: 761667
Blocks:
  Show dependency tree
 
Reported: 2020-12-23 17:53 UTC by Marko Weber Bürgermeister
Modified: 2022-06-20 11:14 UTC (History)
5 users (show)

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


Attachments
build log (build.log,375.25 KB, text/x-log)
2020-12-23 17:53 UTC, Marko Weber Bürgermeister
Details
Build with new python (bareos_python.patch,11.75 KB, patch)
2020-12-31 09:50 UTC, Dmitry Nemov
Details | Diff
Bump fd from 19.2.9 to 20.0.1 with python compile and tread fix (bareos_fd_to_20.0.1_with_python_fix.patch.gz,226.32 KB, patch)
2021-03-20 19:31 UTC, master_volkov
Details | Diff
Bump fd from 19.2.9 to 20.0.1 with python compile and tread fix 2 (bareos_fd_to_20.0.1_with_python_fix_2.patch.gz,228.52 KB, patch)
2021-05-12 21:29 UTC, master_volkov
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Marko Weber Bürgermeister 2020-12-23 17:53:03 UTC
Created attachment 679335 [details]
build log

* Messages for package app-backup/bareos-19.2.9:

 * ERROR: app-backup/bareos-19.2.9::gentoo failed (compile phase):
 *   ninja -v -j8 -l0 failed
 * 
 * Call stack:
 *     ebuild.sh, line  125:  Called src_compile
 *   environment, line 3117:  Called cmake_src_compile
 *   environment, line 1212:  Called cmake_build
 *   environment, line 1181:  Called eninja
 *   environment, line 1633:  Called die
 * The specific snippet of code:
 *       "$@" || die "${nonfatal_args[@]}" "${*} failed"
 * 
 * If you need support, post the output of `emerge --info '=app-backup/bareos-19.2.9::gentoo'`,
 * the complete build log and the output of `emerge -pqv '=app-backup/bareos-19.2.9::gentoo'`.
 * The complete build log is located at '/var/tmp/portage/app-backup/bareos-19.2.9/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/app-backup/bareos-19.2.9/temp/environment'.
 * Working directory: '/var/tmp/portage/app-backup/bareos-19.2.9/work/bareos-19.2.9_build'
 * S: '/var/tmp/portage/app-backup/bareos-19.2.9/work/bareos-Release-19.2.9'



emerge --info '=app-backup/bareos-19.2.9::gentoo'
Portage 3.0.9 (python 3.8.6-final-0, default/linux/amd64/17.1, gcc-9.3.0, glibc-2.32-r3, 5.9.15_horn-5.9.15 x86_64)
=================================================================
                         System Settings
=================================================================
System uname: Linux-5.9.15_horn-5.9.15-x86_64-Intel-R-_Core-TM-_i7-2600_CPU_@_3.40GHz-with-glibc2.2.5
KiB Mem:    16328176 total,  11339908 free
KiB Swap:   16777208 total,  16777208 free
Timestamp of repository gentoo: Tue, 22 Dec 2020 17:30:01 +0000
Head commit of repository gentoo: 6621959b7f8369a38b7e4952ba4178c06c75099a
sh bash 5.0_p18
ld GNU ld (Gentoo 2.34 p6) 2.34.0
app-shells/bash:          5.0_p18::gentoo
dev-lang/perl:            5.30.3::gentoo
dev-lang/python:          3.7.9::gentoo, 3.8.6::gentoo, 3.9.0::gentoo
dev-util/cmake:           3.17.4-r1::gentoo
sys-apps/baselayout:      2.7::gentoo
sys-apps/openrc:          0.42.1::gentoo
sys-apps/sandbox:         2.20::gentoo
sys-devel/autoconf:       2.69-r5::gentoo
sys-devel/automake:       1.16.2-r1::gentoo
sys-devel/binutils:       2.34-r2::gentoo
sys-devel/gcc:            9.3.0-r2::gentoo
sys-devel/gcc-config:     2.3.2-r1::gentoo
sys-devel/libtool:        2.4.6-r6::gentoo
sys-devel/make:           4.3::gentoo
sys-kernel/linux-headers: 5.4-r1::gentoo (virtual/os-headers)
sys-libs/glibc:           2.32-r3::gentoo
Repositories:

gentoo
    location: /var/db/repos/gentoo
    sync-type: rsync
    sync-uri: rsync://rsync.gentoo.org/gentoo-portage
    priority: -1000
    sync-rsync-verify-max-age: 24
    sync-rsync-extra-opts: 
    sync-rsync-verify-jobs: 1
    sync-rsync-verify-metamanifest: yes

ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="@FREE"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=native -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/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-march=native -O2 -pipe"
DISTDIR="/var/cache/distfiles"
ENV_UNSET="CARGO_HOME DBUS_SESSION_BUS_ADDRESS DISPLAY GOBIN GOPATH PERL5LIB PERL5OPT PERLPREFIX PERL_CORE PERL_MB_OPT PERL_MM_OPT XAUTHORITY XDG_CACHE_HOME XDG_CONFIG_HOME XDG_DATA_HOME XDG_RUNTIME_DIR"
FCFLAGS="-march=native -O2 -pipe"
FEATURES="assume-digests binpkg-docompress binpkg-dostrip binpkg-logs config-protect-if-modified distlocks ebuild-locks fixlafiles ipc-sandbox merge-sync multilib-strict network-sandbox news parallel-fetch pid-sandbox preserve-libs protect-owned qa-unresolved-soname-deps sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-march=native -O2 -pipe"
GENTOO_MIRRORS="http://distfiles.gentoo.org"
LANG="en_US.utf8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
MAKEOPTS="-j8"
PKGDIR="/var/cache/binpkgs"
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 --exclude=/.git"
PORTAGE_TMPDIR="/var/tmp"
USE="acl amd64 berkdb bzip2 cli crypt dri fortran gdbm iconv ipv6 libglvnd libtirpc multilib ncurses nls nptl openmp pam pcre readline seccomp split-usr ssl tcpd unicode xattr zlib" ABI_X86="64" ADA_TARGET="gnat_2018" 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="karbon sheets words" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="mmx mmxext sse sse2" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock greis isync itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf skytraq superstar2 timing tsip tripmate tnt ublox ubx" INPUT_DEVICES="libinput" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LUA_SINGLE_TARGET="lua5-1" LUA_TARGETS="lua5-1" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php7-2 php7-3 php7-4" POSTGRES_TARGETS="postgres10 postgres11" PYTHON_SINGLE_TARGET="python3_8" PYTHON_TARGETS="python2_7 python3_8" RUBY_TARGETS="ruby25 ruby26" USERLAND="GNU" VIDEO_CARDS="amdgpu fbdev intel nouveau radeon radeonsi vesa 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:  CC, CPPFLAGS, CTARGET, CXX, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LC_ALL, LINGUAS, PORTAGE_BINHOST, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 1 INODE64 Sistemas 2020-12-24 10:43:50 UTC
Same problem, 
The problem is that Bareos 19.2.x only compiles with python 2.7
To solve install python 2.7
Comment 2 Marko Weber Bürgermeister 2020-12-24 10:58:57 UTC
(In reply to INODE64 Sistemas from comment #1)
> Same problem, 
> The problem is that Bareos 19.2.x only compiles with python 2.7
> To solve install python 2.7

gentoo just got away from python 2.7
thats not a solution for me to reinstall python 2.7
Comment 3 Marko Weber Bürgermeister 2020-12-24 11:07:11 UTC
(In reply to INODE64 Sistemas from comment #1)
> Same problem, 
> The problem is that Bareos 19.2.x only compiles with python 2.7
> To solve install python 2.7

in the ebuild i find:

# Copyright 1999-2020 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=7

PYTHON_COMPAT=( python3_{6,7,8,9} )
CMAKE_WARN_UNUSED_CLI=no
#CMAKE_REMOVE_MODULES=yes


so i dont think it needs python 2_7 , or?
Comment 4 INODE64 Sistemas 2020-12-24 11:21:13 UTC
yes change to

PYTHON_COMPAT=( python2_7 )
Comment 5 Marko Weber Bürgermeister 2020-12-29 11:20:12 UTC
(In reply to INODE64 Sistemas from comment #4)
> yes change to
> 
> PYTHON_COMPAT=( python2_7 )

do you have noticed that python 2.7 ist EOL ? and gentoo switches away from it?
So ist not the best solution to use it with python 2.7
Comment 6 Marko Weber Bürgermeister 2020-12-29 11:41:26 UTC
ninja parts that fails:

/var/tmp/portage/app-backup/bareos-19.2.9/work/bareos-Release-19.2.9/core/src/plugins/filed/python-fd.cc: In function ‘PyObject* filedaemon::PyRestorePacket_repr(filedaemon::PyRestorePacket*)’:
/var/tmp/portage/app-backup/bareos-19.2.9/work/bareos-Release-19.2.9/core/src/plugins/filed/python-fd.cc:3391:7: error: ‘PyString_FromString’ was not declared in this scope; did you mean ‘PyLong_FromString’?
 3391 |   s = PyString_FromString(buf.c_str());
      |       ^~~~~~~~~~~~~~~~~~~
      |       PyLong_FromString
/var/tmp/portage/app-backup/bareos-19.2.9/work/bareos-Release-19.2.9/core/src/plugins/filed/python-fd.cc: In function ‘PyObject* filedaemon::PyIoPacket_repr(filedaemon::PyIoPacket*)’:
/var/tmp/portage/app-backup/bareos-19.2.9/work/bareos-Release-19.2.9/core/src/plugins/filed/python-fd.cc:3465:7: error: ‘PyString_FromString’ was not declared in this scope; did you mean ‘PyLong_FromString’?
 3465 |   s = PyString_FromString(buf.c_str());
      |       ^~~~~~~~~~~~~~~~~~~
      |       PyLong_FromString
/var/tmp/portage/app-backup/bareos-19.2.9/work/bareos-Release-19.2.9/core/src/plugins/filed/python-fd.cc: In function ‘PyObject* filedaemon::PyAclPacket_repr(filedaemon::PyAclPacket*)’:
/var/tmp/portage/app-backup/bareos-19.2.9/work/bareos-Release-19.2.9/core/src/plugins/filed/python-fd.cc:3536:7: error: ‘PyString_FromString’ was not declared in this scope; did you mean ‘PyLong_FromString’?
 3536 |   s = PyString_FromString(buf.c_str());
      |       ^~~~~~~~~~~~~~~~~~~
      |       PyLong_FromString
/var/tmp/portage/app-backup/bareos-19.2.9/work/bareos-Release-19.2.9/core/src/plugins/filed/python-fd.cc: In function ‘PyObject* filedaemon::PyXattrPacket_repr(filedaemon::PyXattrPacket*)’:
/var/tmp/portage/app-backup/bareos-19.2.9/work/bareos-Release-19.2.9/core/src/plugins/filed/python-fd.cc:3582:7: error: ‘PyString_FromString’ was not declared in this scope; did you mean ‘PyLong_FromString’?
 3582 |   s = PyString_FromString(buf.c_str());


and many more
Comment 7 Dmitry Nemov 2020-12-31 09:50:46 UTC
Created attachment 680395 [details, diff]
Build with new python

Here is my patch to support newer python versions. Done quickly, but works...
Comment 8 Marko Weber Bürgermeister 2020-12-31 11:31:53 UTC
(In reply to Dmitry Nemov from comment #7)
> Created attachment 680395 [details, diff] [details, diff]
> Build with new python
> 
> Here is my patch to support newer python versions. Done quickly, but works...

can u give us a short 3 line how to use the patch?
Comment 9 Dmitry Nemov 2021-01-02 10:08:02 UTC
(In reply to Marko Weber Bürgermeister from comment #8)
> can u give us a short 3 line how to use the patch?

You can put this file in /etc/portage/patches/app-backup/bareos/bareos_python.patch, for example. Аnd try to emerge bareos again.
Comment 10 Andrew A. Sabitov 2021-01-10 18:02:49 UTC
Thanks a lot for your patch, Dmitry!
It works for me, and thanks again.
Comment 11 master_volkov 2021-03-20 19:31:03 UTC
Created attachment 692601 [details, diff]
Bump fd from 19.2.9 to 20.0.1 with python compile and tread fix
Comment 12 master_volkov 2021-03-20 19:33:03 UTC
With https://bugs.gentoo.org/attachment.cgi?id=680395 fd fail sometime by thread problem. Added patch for bump filedaemon from 19.2.9 to 20.0.1 for fix that.
Comment 13 master_volkov 2021-03-20 19:35:00 UTC
Patch in GZ (they more then 1000 Kb).

Bareos version bump to 20.0.1 not full solve my problem, because they not support mysql catalog backend anymore.

May that help someone
Comment 14 master_volkov 2021-05-12 21:29:12 UTC
Created attachment 707748 [details, diff]
Bump fd from 19.2.9 to 20.0.1 with python compile and tread fix 2

Patch version 2 in GZ (they more then 1000 Kb).

In that patch added support for python-fd plugin

May that help someone
Comment 15 Larry the Git Cow gentoo-dev 2021-08-05 08:21:40 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0f65fc8909308003cdfe8d933b06b5a054c7715e

commit 0f65fc8909308003cdfe8d933b06b5a054c7715e
Author:     David Seifert <soap@gentoo.org>
AuthorDate: 2021-08-05 08:21:27 +0000
Commit:     David Seifert <soap@gentoo.org>
CommitDate: 2021-08-05 08:21:27 +0000

    profiles: last-rite app-backup/bareos
    
    Bug: https://bugs.gentoo.org/631598
    Bug: https://bugs.gentoo.org/690024
    Bug: https://bugs.gentoo.org/735960
    Bug: https://bugs.gentoo.org/749038
    Bug: https://bugs.gentoo.org/761415
    Bug: https://bugs.gentoo.org/761667
    Bug: https://bugs.gentoo.org/778557
    Bug: https://bugs.gentoo.org/786789
    Bug: https://bugs.gentoo.org/799179
    Signed-off-by: David Seifert <soap@gentoo.org>

 profiles/package.mask | 8 ++++++++
 1 file changed, 8 insertions(+)
Comment 16 Marc Schiffbauer gentoo-dev 2021-11-27 20:42:39 UTC
(In reply to Marko Weber Bürgermeister from comment #0)
> Created attachment 679335 [details]
> build log
> 
> * Messages for package app-backup/bareos-19.2.9:
> 
>  * ERROR: app-backup/bareos-19.2.9::gentoo failed (compile phase):
>  *   ninja -v -j8 -l0 failed
>  * 


Can I assume that this is resolved for you?