[pkg-php-pear] Bug#1085000: php-twig: FTBFS: PHP Fatal error: Cannot redeclare twig_cycle()
Santiago Vila
sanvila at debian.org
Sat Oct 12 18:48:43 BST 2024
Package: src:php-twig
Version: 3.14.0-3
Severity: serious
Tags: ftbfs
Dear maintainer:
During a rebuild of all packages in unstable, your package failed to build:
--------------------------------------------------------------------------------
[...]
debian/rules binary
dh binary
dh_update_autotools_config
dh_autoreconf
debian/rules execute_after_dh_auto_build
make[1]: Entering directory '/<<PKGBUILDDIR>>'
# php-twig-doc
sphinx-build -C \
-b html \
-D source_suffix='.rst' \
-D master_doc='index' \
-D project='php-twig-doc' \
-D copyright='by the Twig Team' \
-D version='3.14' \
-D release='3.14.0' \
-D pygments_style='sphinx' \
-D html_theme='default' \
doc debian/build-tmp/php-twig-doc
Running Sphinx v7.4.7
loading translations [en]... done
making output directory... done
Converting `source_suffix = '.rst'` to `source_suffix = {'.rst': 'restructuredtext'}`.
building [mo]: targets for 0 po files that are out of date
writing output...
building [html]: targets for 128 source files that are out of date
updating environment: [new config] 128 added, 0 changed, 0 removed
reading sources... [ 1%] advanced
reading sources... [ 2%] api
reading sources... [ 2%] coding_standards
reading sources... [ 3%] deprecated
reading sources... [ 4%] filters/abs
reading sources... [ 5%] filters/batch
reading sources... [ 5%] filters/capitalize
reading sources... [ 6%] filters/column
reading sources... [ 7%] filters/convert_encoding
reading sources... [ 8%] filters/country_name
reading sources... [ 9%] filters/currency_name
reading sources... [ 9%] filters/currency_symbol
reading sources... [ 10%] filters/data_uri
reading sources... [ 11%] filters/date
reading sources... [ 12%] filters/date_modify
reading sources... [ 12%] filters/default
reading sources... [ 13%] filters/escape
reading sources... [ 14%] filters/filter
reading sources... [ 15%] filters/find
reading sources... [ 16%] filters/first
reading sources... [ 16%] filters/format
reading sources... [ 17%] filters/format_currency
reading sources... [ 18%] filters/format_date
reading sources... [ 19%] filters/format_datetime
reading sources... [ 20%] filters/format_number
reading sources... [ 20%] filters/format_time
reading sources... [ 21%] filters/html_to_markdown
reading sources... [ 22%] filters/index
reading sources... [ 23%] filters/inky_to_html
reading sources... [ 23%] filters/inline_css
reading sources... [ 24%] filters/join
reading sources... [ 25%] filters/json_encode
reading sources... [ 26%] filters/keys
reading sources... [ 27%] filters/language_name
reading sources... [ 27%] filters/last
reading sources... [ 28%] filters/length
reading sources... [ 29%] filters/locale_name
reading sources... [ 30%] filters/lower
reading sources... [ 30%] filters/map
reading sources... [ 31%] filters/markdown_to_html
reading sources... [ 32%] filters/merge
reading sources... [ 33%] filters/nl2br
reading sources... [ 34%] filters/number_format
reading sources... [ 34%] filters/plural
reading sources... [ 35%] filters/raw
reading sources... [ 36%] filters/reduce
reading sources... [ 37%] filters/replace
reading sources... [ 38%] filters/reverse
reading sources... [ 38%] filters/round
reading sources... [ 39%] filters/shuffle
reading sources... [ 40%] filters/singular
reading sources... [ 41%] filters/slice
reading sources... [ 41%] filters/slug
reading sources... [ 42%] filters/sort
reading sources... [ 43%] filters/spaceless
reading sources... [ 44%] filters/split
reading sources... [ 45%] filters/striptags
reading sources... [ 45%] filters/timezone_name
reading sources... [ 46%] filters/title
reading sources... [ 47%] filters/trim
reading sources... [ 48%] filters/u
reading sources... [ 48%] filters/upper
reading sources... [ 49%] filters/url_encode
reading sources... [ 50%] functions/attribute
reading sources... [ 51%] functions/block
reading sources... [ 52%] functions/constant
reading sources... [ 52%] functions/country_names
reading sources... [ 53%] functions/country_timezones
reading sources... [ 54%] functions/currency_names
reading sources... [ 55%] functions/cycle
reading sources... [ 55%] functions/date
reading sources... [ 56%] functions/dump
reading sources... [ 57%] functions/enum_cases
reading sources... [ 58%] functions/html_classes
reading sources... [ 59%] functions/html_cva
reading sources... [ 59%] functions/include
reading sources... [ 60%] functions/index
reading sources... [ 61%] functions/language_names
reading sources... [ 62%] functions/locale_names
reading sources... [ 62%] functions/max
reading sources... [ 63%] functions/min
reading sources... [ 64%] functions/parent
reading sources... [ 65%] functions/random
reading sources... [ 66%] functions/range
reading sources... [ 66%] functions/script_names
reading sources... [ 67%] functions/source
reading sources... [ 68%] functions/template_from_string
reading sources... [ 69%] functions/timezone_names
reading sources... [ 70%] index
reading sources... [ 70%] installation
reading sources... [ 71%] internals
reading sources... [ 72%] intro
reading sources... [ 73%] recipes
reading sources... [ 73%] tags/apply
reading sources... [ 74%] tags/autoescape
reading sources... [ 75%] tags/block
reading sources... [ 76%] tags/cache
reading sources... [ 77%] tags/deprecated
reading sources... [ 77%] tags/do
reading sources... [ 78%] tags/embed
reading sources... [ 79%] tags/extends
reading sources... [ 80%] tags/flush
reading sources... [ 80%] tags/for
reading sources... [ 81%] tags/from
reading sources... [ 82%] tags/if
reading sources... [ 83%] tags/import
reading sources... [ 84%] tags/include
reading sources... [ 84%] tags/index
reading sources... [ 85%] tags/macro
reading sources... [ 86%] tags/sandbox
reading sources... [ 87%] tags/set
reading sources... [ 88%] tags/types
reading sources... [ 88%] tags/use
reading sources... [ 89%] tags/verbatim
reading sources... [ 90%] tags/with
reading sources... [ 91%] templates
reading sources... [ 91%] tests/constant
reading sources... [ 92%] tests/defined
reading sources... [ 93%] tests/divisibleby
reading sources... [ 94%] tests/empty
reading sources... [ 95%] tests/even
reading sources... [ 95%] tests/index
reading sources... [ 96%] tests/iterable
reading sources... [ 97%] tests/mapping
reading sources... [ 98%] tests/null
reading sources... [ 98%] tests/odd
reading sources... [ 99%] tests/sameas
reading sources... [100%] tests/sequence
looking for now-outdated files... none found
pickling environment... done
checking consistency... /<<PKGBUILDDIR>>/doc/filters/find.rst: WARNING: document isn't included in any toctree
/<<PKGBUILDDIR>>/doc/tests/mapping.rst: WARNING: document isn't included in any toctree
/<<PKGBUILDDIR>>/doc/tests/sequence.rst: WARNING: document isn't included in any toctree
done
preparing documents... done
copying assets...
copying static files... done
copying extra files... done
copying assets: done
writing output... [ 1%] advanced
writing output... [ 2%] api
writing output... [ 2%] coding_standards
writing output... [ 3%] deprecated
writing output... [ 4%] filters/abs
writing output... [ 5%] filters/batch
writing output... [ 5%] filters/capitalize
writing output... [ 6%] filters/column
writing output... [ 7%] filters/convert_encoding
writing output... [ 8%] filters/country_name
writing output... [ 9%] filters/currency_name
writing output... [ 9%] filters/currency_symbol
writing output... [ 10%] filters/data_uri
writing output... [ 11%] filters/date
writing output... [ 12%] filters/date_modify
writing output... [ 12%] filters/default
writing output... [ 13%] filters/escape
writing output... [ 14%] filters/filter
writing output... [ 15%] filters/find
writing output... [ 16%] filters/first
writing output... [ 16%] filters/format
writing output... [ 17%] filters/format_currency
writing output... [ 18%] filters/format_date
writing output... [ 19%] filters/format_datetime
writing output... [ 20%] filters/format_number
writing output... [ 20%] filters/format_time
writing output... [ 21%] filters/html_to_markdown
writing output... [ 22%] filters/index
writing output... [ 23%] filters/inky_to_html
writing output... [ 23%] filters/inline_css
writing output... [ 24%] filters/join
writing output... [ 25%] filters/json_encode
writing output... [ 26%] filters/keys
writing output... [ 27%] filters/language_name
writing output... [ 27%] filters/last
writing output... [ 28%] filters/length
writing output... [ 29%] filters/locale_name
writing output... [ 30%] filters/lower
writing output... [ 30%] filters/map
writing output... [ 31%] filters/markdown_to_html
writing output... [ 32%] filters/merge
writing output... [ 33%] filters/nl2br
writing output... [ 34%] filters/number_format
writing output... [ 34%] filters/plural
writing output... [ 35%] filters/raw
writing output... [ 36%] filters/reduce
writing output... [ 37%] filters/replace
writing output... [ 38%] filters/reverse
writing output... [ 38%] filters/round
writing output... [ 39%] filters/shuffle
writing output... [ 40%] filters/singular
writing output... [ 41%] filters/slice
writing output... [ 41%] filters/slug
writing output... [ 42%] filters/sort
writing output... [ 43%] filters/spaceless
writing output... [ 44%] filters/split
writing output... [ 45%] filters/striptags
writing output... [ 45%] filters/timezone_name
writing output... [ 46%] filters/title
writing output... [ 47%] filters/trim
writing output... [ 48%] filters/u
writing output... [ 48%] filters/upper
writing output... [ 49%] filters/url_encode
writing output... [ 50%] functions/attribute
writing output... [ 51%] functions/block
writing output... [ 52%] functions/constant
writing output... [ 52%] functions/country_names
writing output... [ 53%] functions/country_timezones
writing output... [ 54%] functions/currency_names
writing output... [ 55%] functions/cycle
writing output... [ 55%] functions/date
writing output... [ 56%] functions/dump
writing output... [ 57%] functions/enum_cases
writing output... [ 58%] functions/html_classes
writing output... [ 59%] functions/html_cva
writing output... [ 59%] functions/include
writing output... [ 60%] functions/index
writing output... [ 61%] functions/language_names
writing output... [ 62%] functions/locale_names
writing output... [ 62%] functions/max
writing output... [ 63%] functions/min
writing output... [ 64%] functions/parent
writing output... [ 65%] functions/random
writing output... [ 66%] functions/range
writing output... [ 66%] functions/script_names
writing output... [ 67%] functions/source
writing output... [ 68%] functions/template_from_string
writing output... [ 69%] functions/timezone_names
writing output... [ 70%] index
writing output... [ 70%] installation
writing output... [ 71%] internals
writing output... [ 72%] intro
writing output... [ 73%] recipes
writing output... [ 73%] tags/apply
writing output... [ 74%] tags/autoescape
writing output... [ 75%] tags/block
writing output... [ 76%] tags/cache
writing output... [ 77%] tags/deprecated
writing output... [ 77%] tags/do
writing output... [ 78%] tags/embed
writing output... [ 79%] tags/extends
writing output... [ 80%] tags/flush
writing output... [ 80%] tags/for
writing output... [ 81%] tags/from
writing output... [ 82%] tags/if
writing output... [ 83%] tags/import
writing output... [ 84%] tags/include
writing output... [ 84%] tags/index
writing output... [ 85%] tags/macro
writing output... [ 86%] tags/sandbox
writing output... [ 87%] tags/set
writing output... [ 88%] tags/types
writing output... [ 88%] tags/use
writing output... [ 89%] tags/verbatim
writing output... [ 90%] tags/with
writing output... [ 91%] templates
writing output... [ 91%] tests/constant
writing output... [ 92%] tests/defined
writing output... [ 93%] tests/divisibleby
writing output... [ 94%] tests/empty
writing output... [ 95%] tests/even
writing output... [ 95%] tests/index
writing output... [ 96%] tests/iterable
writing output... [ 97%] tests/mapping
writing output... [ 98%] tests/null
writing output... [ 98%] tests/odd
writing output... [ 99%] tests/sameas
writing output... [100%] tests/sequence
/<<PKGBUILDDIR>>/doc/functions/html_cva.rst:64: WARNING: Pygments lexer name 'terminal' is not known
generating indices... genindex done
writing additional pages... search done
dumping search index in English (code: en)... done
dumping object inventory... done
build succeeded, 4 warnings.
The HTML pages are in debian/build-tmp/php-twig-doc.
# php-twig
phpab \
--output src/autoload.php \
--template debian/autoload.php.tpl \
src
phpab %development% - Copyright (C) 2009 - 2024 by Arne Blankerts and Contributors
Scanning directory src
Autoload file src/autoload.php generated.
# php-twig testsuite
mkdir --parents vendor Twig/Extra
phpab --output vendor/autoload.php \
--template debian/autoload.tests.php.tpl \
tests extra/*/Tests
phpab %development% - Copyright (C) 2009 - 2024 by Arne Blankerts and Contributors
Scanning directory tests
Scanning directory extra/cache-extra/Tests
Scanning directory extra/cssinliner-extra/Tests
Scanning directory extra/html-extra/Tests
Scanning directory extra/inky-extra/Tests
Scanning directory extra/intl-extra/Tests
Scanning directory extra/markdown-extra/Tests
Scanning directory extra/string-extra/Tests
Scanning directory extra/twig-extra-bundle/Tests
Autoload file vendor/autoload.php generated.
# Mimic install path
cp -r src/* Twig
cp -r extra/cache-extra Twig/Extra/Cache
cp -r extra/cssinliner-extra Twig/Extra/CssInliner
cp -r extra/html-extra Twig/Extra/Html
cp -r extra/inky-extra Twig/Extra/Inky
cp -r extra/intl-extra Twig/Extra/Intl
cp -r extra/markdown-extra Twig/Extra/Markdown
cp -r extra/string-extra Twig/Extra/String
cp -r extra/twig-extra-bundle Twig/Extra/TwigExtraBundle
# php-twig extra
# Parts from the symfony package’s debian/rules.
mkdir --parents debian/packages_to_build debian/autoloaders
# Walk through the parts of upstream's code that should be packaged into
# separate Debian binary packages and write down a package-to-build info
# file containing shell variables for each package.
# Those files will be traverse later on in different targets of this
# makefile (debian/rules). They solely exists to not repeat the extraction
# of those variables in each of those target over and over again.
# Then, build a class loader for the package, using the template in
# debian/eb_pkg_name.autoload.php.tpl if it exists (to load dependencies).
set -e;\
for src_path in $(find -L Twig/Extra/ -mindepth 1 -maxdepth 1 -type d); do \
if [ -e $src_path/composer.json ]; then \
deb_pkg_name=php-$(cat $src_path/composer.json | jq -r '.name | tostring' | sed -r 's|/|-|'); \
if [ $(grep -c -E -e "^Package: $deb_pkg_name\$" debian/control) -ne 1 ]; then \
echo "W: No Debian package '$deb_pkg_name' defined in debian/control," 1>&2; \
echo " therefor not considering Symfony $src_path," 1>&2; \
continue; \
fi; \
echo "# This file contains some variables sourced" > debian/packages_to_build/$deb_pkg_name; \
echo "# by various targets in debian/rules" >> debian/packages_to_build/$deb_pkg_name; \
echo "deb_pkg_name='$deb_pkg_name'" >> debian/packages_to_build/$deb_pkg_name; \
echo "src_path='$src_path'" >> debian/packages_to_build/$deb_pkg_name; \
echo "twig ${deb_pkg_name#php-twig-} $src_path/autoload.php" > debian/autoloaders/$deb_pkg_name; \
phpab \
--blacklist '*\\tests\\*' \
--output $src_path/autoload.php \
--template debian/$deb_pkg_name.autoload.php.tpl \
$src_path; \
fi; \
done
phpab %development% - Copyright (C) 2009 - 2024 by Arne Blankerts and Contributors
Scanning directory Twig/Extra/Intl
Autoload file Twig/Extra/Intl/autoload.php generated.
phpab %development% - Copyright (C) 2009 - 2024 by Arne Blankerts and Contributors
Scanning directory Twig/Extra/TwigExtraBundle
Autoload file Twig/Extra/TwigExtraBundle/autoload.php generated.
phpab %development% - Copyright (C) 2009 - 2024 by Arne Blankerts and Contributors
Scanning directory Twig/Extra/Markdown
Autoload file Twig/Extra/Markdown/autoload.php generated.
phpab %development% - Copyright (C) 2009 - 2024 by Arne Blankerts and Contributors
Scanning directory Twig/Extra/Cache
Autoload file Twig/Extra/Cache/autoload.php generated.
phpab %development% - Copyright (C) 2009 - 2024 by Arne Blankerts and Contributors
Scanning directory Twig/Extra/Html
Autoload file Twig/Extra/Html/autoload.php generated.
phpab %development% - Copyright (C) 2009 - 2024 by Arne Blankerts and Contributors
Scanning directory Twig/Extra/CssInliner
Autoload file Twig/Extra/CssInliner/autoload.php generated.
phpab %development% - Copyright (C) 2009 - 2024 by Arne Blankerts and Contributors
Scanning directory Twig/Extra/String
Autoload file Twig/Extra/String/autoload.php generated.
phpab %development% - Copyright (C) 2009 - 2024 by Arne Blankerts and Contributors
Scanning directory Twig/Extra/Inky
Autoload file Twig/Extra/Inky/autoload.php generated.
make[1]: Leaving directory '/<<PKGBUILDDIR>>'
debian/rules override_dh_auto_test
make[1]: Entering directory '/<<PKGBUILDDIR>>'
SYMFONY_DEPRECATIONS_HELPER=weak phpunit
PHP Fatal error: Cannot redeclare twig_cycle() (previously declared in /<<PKGBUILDDIR>>/Twig/Resources/core.php:20) in /usr/share/php/Twig/Resources/core.php on line 24
make[1]: *** [debian/rules:76: override_dh_auto_test] Error 255
make[1]: Leaving directory '/<<PKGBUILDDIR>>'
make: *** [debian/rules:7: binary] Error 2
dpkg-buildpackage: error: debian/rules binary subprocess returned exit status 2
--------------------------------------------------------------------------------
The above is just how the build ends and not necessarily the most relevant part.
If required, the full build log is available here:
https://people.debian.org/~sanvila/build-logs/202410/
About the archive rebuild: The build was made on virtual machines from AWS,
using sbuild and a reduced chroot with only build-essential packages.
If you could not reproduce the bug please contact me privately, as I
am willing to provide ssh access to a virtual machine where the bug is
fully reproducible.
If this is really a bug in one of the build-depends, please use
reassign and affects, so that this is still visible in the BTS web
page for this package.
Thanks.
More information about the pkg-php-pear
mailing list