Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 634712 - >=net-dns/bind-9.11.1_p3 will not rebuild: incompatable shebang
Summary: >=net-dns/bind-9.11.1_p3 will not rebuild: incompatable shebang
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: AMD64 Linux
: Normal normal (vote)
Assignee: Mikle Kolyada
URL:
Whiteboard:
Keywords:
: 667136 676130 692858 (view as bug list)
Depends on:
Blocks:
 
Reported: 2017-10-19 02:02 UTC by deference
Modified: 2021-05-29 14:56 UTC (History)
13 users (show)

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


Attachments
emerge --info (emergeinfo-bind.txt,32.15 KB, text/plain)
2017-10-19 02:03 UTC, deference
Details
build.log bzip2 compressed (build-bind.txt.bz2,29.75 KB, text/plain)
2017-10-19 02:04 UTC, deference
Details

Note You need to log in before you can comment on or make changes to this bug.
Description deference 2017-10-19 02:02:39 UTC
[ebuild   R   ] net-dns/bind-9.11.1_p3  USE="berkdb caps dlz dnstap doc filter-aaaa fixed-rrset geoip gost gssapi idn ipv6 json lmdb nslint odbc postgres python rpz ssl static-libs threads urandom xml zlib -ldap (-libressl) -mysql (-seccomp) (-selinux)" PYTHON_TARGETS="python2_7* python3_4 (-python3_5) (-python3_6)" 

The file has incompatible shebang:
file: /usr/lib/python-exec/python2.7/dnssec-checkds
current shebang: #!/usr/bin/python3.4
requested impl: python2.7
Comment 1 deference 2017-10-19 02:03:22 UTC
Created attachment 499184 [details]
emerge --info
Comment 2 deference 2017-10-19 02:04:59 UTC
Created attachment 499186 [details]
build.log bzip2 compressed
Comment 3 Michael Kefeder 2017-11-29 16:11:16 UTC
I can confirm this bug, also true for net-dns/bind-9.11.2

Using `eselect python set X` to change default python from 3.x to 2.7 is a workaround to have the emergeing work.

tried another workaround, where I kept my 3.x as main python version and only set python-2.7 in a emerge environment:

/etc/portage/env/python2.conf:
PYTHON_SINGLE_TARGET="python2_7"
PYTHON_TARGETS="python2_7"
USE_PYTHON="2.7"

/etc/portage/package.env:
net-dns/bind python2.conf

does not work, same shebang error appears!

I'd prefer for this to work without changing my main python interpreter, haven't found a quick way to achieve that in the ebuild or with portage environments though :/
Comment 4 Benny Pedersen 2017-12-01 04:46:04 UTC
add -python to use flag solves it
Comment 5 deference 2017-12-02 01:46:41 UTC
(In reply to Benny Pedersen from comment #4)
> add -python to use flag solves it

I could have guessed that. I was concerned that that workaround would remove needed functionality, if not now then in the future releases.

Thanks
Comment 6 William Cooke 2017-12-12 00:09:52 UTC
(In reply to deference from comment #5)
> (In reply to Benny Pedersen from comment #4)
> > add -python to use flag solves it
> 
> I could have guessed that. I was concerned that that workaround would remove
> needed functionality, if not now then in the future releases.
> 
> Thanks

I was having the same problem. It started after python 3.5 was installed and before python 3.4 was removed. I just figured out, removing python 3.4 before trying to emerge bind works. The whole time I have been trying to emerge bind, python 2.7 and python 3.5 were both installed.
Comment 7 cilly 2018-01-28 10:18:50 UTC
Same with net-dns/bind-9.11.2_p1

/bin/sh ./mkinstalldirs /var/tmp/portage/net-dns/bind-9.11.2_p1/image//usr/share/man/man1
/usr/lib/portage/python3.5/ebuild-helpers/xattr/install -c isc-config.sh /var/tmp/portage/net-dns/bind-9.11.2_p1/image//usr/bin
rm -f /var/tmp/portage/net-dns/bind-9.11.2_p1/image//usr/bin/bind9-config
ln /var/tmp/portage/net-dns/bind-9.11.2_p1/image//usr/bin/isc-config.sh /var/tmp/portage/net-dns/bind-9.11.2_p1/image//usr/bin/bind9-config
/usr/lib/portage/python3.5/ebuild-helpers/xattr/install -c -m 644 ./isc-config.sh.1 /var/tmp/portage/net-dns/bind-9.11.2_p1/image//usr/share/man/man1
rm -f /var/tmp/portage/net-dns/bind-9.11.2_p1/image//usr/share/man/man1/bind9-config.1
ln /var/tmp/portage/net-dns/bind-9.11.2_p1/image//usr/share/man/man1/isc-config.sh.1 /var/tmp/portage/net-dns/bind-9.11.2_p1/image//usr/share/man/man1/bind9-config.1
/usr/lib/portage/python3.5/ebuild-helpers/xattr/install -c -m 644 ./bind.keys /var/tmp/portage/net-dns/bind-9.11.2_p1/image//etc/bind
 * python2_7: running install_python_tools
 * python3_5: running install_python_tools
 * The file has incompatible shebang:
 *   file: /usr/lib/python-exec/python2.7/dnssec-checkds
 *   current shebang: #!/usr/bin/python3.5
 *   requested impl: python2.7
 * ERROR: net-dns/bind-9.11.2_p1::gentoo failed (install phase):
 *   python_fix_shebang: conversion of incompatible shebang requested
 *
 * Call stack:
 *     ebuild.sh, line  124:  Called src_install
 *   environment, line 4614:  Called python_replicate_script '/var/tmp/portage/net-dns/bind-9.11.2_p1/image/usr/sbin/dnssec-checkds'
 *   environment, line 4281:  Called python_foreach_impl '_python_replicate_script'
 *   environment, line 3982:  Called multibuild_foreach_variant '_python_multibuild_wrapper' '_python_replicate_script'
 *   environment, line 3047:  Called _multibuild_run '_python_multibuild_wrapper' '_python_replicate_script'
 *   environment, line 3045:  Called _python_multibuild_wrapper '_python_replicate_script'
 *   environment, line  650:  Called _python_replicate_script
 *   environment, line 4278:  Called python_fix_shebang '-q' '/var/tmp/portage/net-dns/bind-9.11.2_p1/image//usr/lib/python-exec/python2.7/dnssec-checkds'
 *   environment, line 3961:  Called die
 * The specific snippet of code:
 *                   die "${FUNCNAME}: conversion of incompatible shebang requested";
 *
 * If you need support, post the output of `emerge --info '=net-dns/bind-9.11.2_p1::gentoo'`,
 * the complete build log and the output of `emerge -pqv '=net-dns/bind-9.11.2_p1::gentoo'`.
 * The complete build log is located at '/var/tmp/portage/net-dns/bind-9.11.2_p1/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/net-dns/bind-9.11.2_p1/temp/environment'.
 * Working directory: '/var/tmp/portage/net-dns/bind-9.11.2_p1/work/bind-9.11.2-P1'
 * S: '/var/tmp/portage/net-dns/bind-9.11.2_p1/work/bind-9.11.2-P1'

>>> Failed to emerge net-dns/bind-9.11.2_p1, Log file:

>>>  '/var/tmp/portage/net-dns/bind-9.11.2_p1/temp/build.log'

Still not fixed…
Comment 8 Majed 2018-05-23 09:18:55 UTC
https://forums.gentoo.org/viewtopic-p-8222034.html#8222034
using -python in make.conf does not solve it.
Comment 9 Majed 2018-05-23 09:25:59 UTC
(In reply to Majed from comment #8)
> https://forums.gentoo.org/viewtopic-p-8222034.html#8222034
> using -python in make.conf does not solve it.

the machine with the use flags:
bindist backup cracklib mta system-crontab session openssl server jdbc extraengine jemalloc tokudb threads cvs crypt nls vmware_guest_linux any-of pdo graph mysqli dlz berkdb caps zlib python mmx sse sse2 udev apache2 php snmp mysql zlib ssl rrdcgi rrdtool sendmail sockets perl gd gd-external jpeg png gif apache2 readline cups pam symlink

causes the problem!
the other one with:
-xattr -threads elibc_glibc any-of mysqli cryptsetup pdo mmx sse sse2 symlink udev apache2 php cgi fpm ldap dlz snmp gmp mysql zlib ssl rrdcgi rrdtool sendmail sockets perl gd jpeg png gif dba svg session cli tcpd truetype

updated to python 3.6 just fine!
Comment 10 Majed 2018-05-23 09:26:51 UTC
(In reply to Majed from comment #9)
> (In reply to Majed from comment #8)
> > https://forums.gentoo.org/viewtopic-p-8222034.html#8222034
> > using -python in make.conf does not solve it.
> 
> the machine with the use flags:
> bindist backup cracklib mta system-crontab session openssl server jdbc
> extraengine jemalloc tokudb threads cvs crypt nls vmware_guest_linux any-of
> pdo graph mysqli dlz berkdb caps zlib python mmx sse sse2 udev apache2 php
> snmp mysql zlib ssl rrdcgi rrdtool sendmail sockets perl gd gd-external jpeg
> png gif apache2 readline cups pam symlink
> 
> causes the problem!
> the other one with:
> -xattr -threads elibc_glibc any-of mysqli cryptsetup pdo mmx sse sse2
> symlink udev apache2 php cgi fpm ldap dlz snmp gmp mysql zlib ssl rrdcgi
> rrdtool sendmail sockets perl gd jpeg png gif dba svg session cli tcpd
> truetype
> 
> updated to python 3.6 just fine!

with bind ofcourse!
Comment 11 5836000 2018-06-23 22:59:07 UTC
[ebuild   R    ] net-dns/bind-9.11.2_p1::gentoo  USE="berkdb caps dlz gssapi ipv6 python ssl threads urandom xml zlib -dnstap -doc -filter-aaaa -fixed-rrset -geoip -gost -idn -json -ldap -libressl -lmdb -mysql -nslint -odbc -postgres -rpz (-seccomp) (-selinux) -static-libs" PYTHON_TARGETS="python2_7 python3_6* -python3_4 -python3_5*" 0 KiB

#failed as below :
 * The file has incompatible shebang:
 *   file: //usr/lib/python-exec/python3.6/dnssec-checkds
 *   current shebang: #!/usr/bin/python2
 *   requested impl: python3.6
 * ERROR: net-dns/bind-9.11.2_p1::gentoo failed (install phase):
 *   python_fix_shebang: conversion of incompatible shebang requested

# eselect python list
Available Python interpreters, in order of preference:
  [1]   python3.5
  [2]   python3.4 (uninstalled)
  [3]   python3.6 (fallback)
  [4]   python2.7 (fallback)

#workaround was : 
eselect python set 3
emerge --resume
Comment 12 Mikle Kolyada archtester Gentoo Infrastructure gentoo-dev Security 2019-08-22 17:33:46 UTC
*** Bug 667136 has been marked as a duplicate of this bug. ***
Comment 13 Mikle Kolyada archtester Gentoo Infrastructure gentoo-dev Security 2019-08-22 17:36:11 UTC
*** Bug 676130 has been marked as a duplicate of this bug. ***
Comment 14 Mikle Kolyada archtester Gentoo Infrastructure gentoo-dev Security 2019-08-31 07:00:59 UTC
*** Bug 692858 has been marked as a duplicate of this bug. ***
Comment 15 Thomas Beutin 2019-12-23 09:28:41 UTC
The same on net-dns/bind-9.14.8:

 * python2_7: running install_python_tools
 * python3_6: running install_python_tools
 * The file has incompatible shebang:
 *   file: //usr/lib/python-exec/python2.7/dnssec-checkds
 *   current shebang: #!/usr/bin/python3.6
 *   requested impl: python2.7
 * ERROR: net-dns/bind-9.14.8::gentoo failed (install phase):
 *   python_fix_shebang: conversion of incompatible shebang requested
 * 

# eselect python list
Available Python interpreters, in order of preference:
  [1]   python3.7
  [2]   python3.6
  [3]   python2.7 (fallback)
Comment 16 Thomas Beutin 2020-01-03 13:11:40 UTC
(In reply to Thomas Beutin from comment #15)
> The same on net-dns/bind-9.14.8:
> 
>  * python2_7: running install_python_tools
>  * python3_6: running install_python_tools
>  * The file has incompatible shebang:
>  *   file: //usr/lib/python-exec/python2.7/dnssec-checkds
>  *   current shebang: #!/usr/bin/python3.6
>  *   requested impl: python2.7
>  * ERROR: net-dns/bind-9.14.8::gentoo failed (install phase):
>  *   python_fix_shebang: conversion of incompatible shebang requested
>  * 
> 
> # eselect python list
> Available Python interpreters, in order of preference:
>   [1]   python3.7
>   [2]   python3.6
>   [3]   python2.7 (fallback)

removing python:3.7 from the system, and net-dns/bind-9.14.8 compiles fine.