ITADN
Perl/perl5/Issues

invalid preprocessing directive #HAS_FDOPENDIR

#24530Closedvortexilation 创建于 2026-07-03
Needs Triage
V
vortexilationcommented
<!-- Note: you can also replace the whole content with a file generated by the perlbug utility; perlbug reports by email are no longer supported. Be sure to enclose your perl configuration in a fenced code block to preserve formatting: https://help.github.com/en/github/writing-on-github/creating-and-highlighting-code-blocks --> <!-- If your bug is about a Perl core module rather than a core language feature, please enter its name after. --> Module: configuration **Description** Getting the following when compiling perl for OpenWrt x86_64 : ``` checking whether ccache x86_64-openwrt-linux-gnu-g++ accepts -g... In file included from perl.h:46, from op.c:163: config.h:127:3: error: invalid preprocessing directive #HAS_FDOPENDIR 127 | # HAS_FDOPENDIR /**/ | ^~~~~~~~~~~~~ ccache x86_64-openwrt-linux-gnu-gcc -mtune=tigerlake -march=tigerlake -O2 -fno-caller-saves -fno-plt -mtune=tigerlake -march=tigerlake -O2 -fhonour-copts -fmacro-prefix-map=/home/nameless/works/openwrt/build_dir/target-x86_64_glibc_nameless/coreutils-9.11=coreutils-9.11 -flto=auto -fno-fat-lto-objects -Wl,-z,max-page-size=4096 -Wformat -Werror=format-security -fstack-protector -D_FORTIFY_SOURCE=2 -Wl,-z,pack-relative-relocs -std=gnu17 -Wl,--as-needed -L/home/nameless/works/openwrt/staging_dir/toolchain-x86_64_gcc-16.1.1_glibc/usr/lib -L/home/nameless/works/openwrt/staging_dir/toolchain-x86_64_gcc-16.1.1_glibc/lib -fuse-ld=bfd -flto=auto -fuse-linker-plugin -zmax-page-size=4096 -zpack-relative-relocs -o src/uniq src/uniq.o src/libver.a lib/libcoreutils.a lib/libcoreutils.a make[4]: *** [makefile:319: opmini.o] Error 1 make[4]: Leaving directory '/home/nameless/works/openwrt/build_dir/target-x86_64_glibc_nameless/perl/perl-5.40.4' make[3]: *** [Makefile:168: /home/nameless/works/openwrt/build_dir/target-x86_64_glibc_nameless/perl/perl-5.40.4/.built] Error 2 make[3]: Leaving directory '/home/nameless/works/openwrt/feeds/packages/lang/perl' ``` **Steps to Reproduce** Use gcc 16.1.0 and glibc master to crosscompiling perl for OpenWrt x86_64. Host is debian sid It appear it also [experiencing ](https://github.com/NixOS/nixpkgs/blob/master/pkgs/development/interpreters/perl/cross-fdopendir.patch)it on NixOS. But don't know how apply the patch. OpenWrt Makefile for perl, available in [here](https://github.com/openwrt/packages/blob/master/lang/perl/Makefile). **Expected behavior** Perl able to build completely
关闭于 2026-07-03 3 条评论