Skip to content

CRLF causes confusing bugs in compilation #17836

Closed
@DanielEScherzer

Description

@DanielEScherzer

Description

  • Clone of 6ccb35ec9444ecf43378c8eeb23ae3266aaa4d41 with clean git status
  • Environment/existing PHP: 8.3.9
  • make clean
  • make distclean
  • ./buildconf
root@a8efcafe4e96:/usr/src/php# ./buildconf
buildconf: Checking installation
buildconf: autoconf version 2.71 (ok)
buildconf: Cleaning cache and configure files
buildconf: Rebuilding configure
buildconf: Rebuilding main/php_config.h.in
buildconf: Run ./configure to proceed with customizing the PHP build.
  • ./configure --enable-debug (config.log copied in /var/www/html/20250216-config.log in case any of the contents would be useful)
  • make install > /var/www/html/install.log (normally I would use -j16 but wanted to make sure none of the errors were caused by splitting up the jobs)

Noted in the standard output (line 598):

  • ERROR (/usr/src/php/Zend/zend_vm_def.h:26): Invalid ZEND_VM_HELPER definition.

Standard error:

root@a8efcafe4e96:/usr/src/php# make install > /var/www/html/install.log
/usr/bin/ld: cannot find ext/pcre/: file format not recognized
/usr/bin/ld: cannot find .o: No such file or directory
/usr/bin/ld: cannot find ext/pcre/pcre2lib/pcre2_auto_possess.o: No such file or directory
/usr/bin/ld: cannot find ext/pcre/pcre2lib/pcre2_chartables.o: No such file or directory
/usr/bin/ld: cannot find ext/pcre/pcre2lib/pcre2_chkdint.o: No such file or directory
/usr/bin/ld: cannot find ext/pcre/pcre2lib/pcre2_compile.o: No such file or directory
/usr/bin/ld: cannot find ext/pcre/pcre2lib/pcre2_compile_class.o: No such file or directory
/usr/bin/ld: cannot find ext/pcre/pcre2lib/pcre2_config.o: No such file or directory
/usr/bin/ld: cannot find ext/pcre/pcre2lib/pcre2_context.o: No such file or directory
/usr/bin/ld: cannot find ext/pcre/pcre2lib/pcre2_convert.o: No such file or directory
/usr/bin/ld: cannot find ext/pcre/pcre2lib/pcre2_dfa_match.o: No such file or directory
/usr/bin/ld: cannot find ext/pcre/pcre2lib/pcre2_error.o: No such file or directory
/usr/bin/ld: cannot find ext/pcre/pcre2lib/pcre2_extuni.o: No such file or directory
/usr/bin/ld: cannot find ext/pcre/pcre2lib/pcre2_find_bracket.o: No such file or directory
/usr/bin/ld: cannot find ext/pcre/pcre2lib/pcre2_jit_compile.o: No such file or directory
/usr/bin/ld: cannot find ext/pcre/pcre2lib/pcre2_maketables.o: No such file or directory
/usr/bin/ld: cannot find ext/pcre/pcre2lib/pcre2_match_data.o: No such file or directory
/usr/bin/ld: cannot find ext/pcre/pcre2lib/pcre2_match.o: No such file or directory
/usr/bin/ld: cannot find ext/pcre/pcre2lib/pcre2_newline.o: No such file or directory
/usr/bin/ld: cannot find ext/pcre/pcre2lib/pcre2_ord2utf.o: No such file or directory
/usr/bin/ld: cannot find ext/pcre/pcre2lib/pcre2_pattern_info.o: No such file or directory
/usr/bin/ld: cannot find ext/pcre/pcre2lib/pcre2_script_run.o: No such file or directory
/usr/bin/ld: cannot find ext/pcre/pcre2lib/pcre2_serialize.o: No such file or directory
/usr/bin/ld: cannot find ext/pcre/pcre2lib/pcre2_string_utils.o: No such file or directory
/usr/bin/ld: cannot find ext/pcre/pcre2lib/pcre2_study.o: No such file or directory
/usr/bin/ld: cannot find ext/pcre/pcre2lib/pcre2_substitute.o: No such file or directory
/usr/bin/ld: cannot find ext/pcre/pcre2lib/pcre2_substring.o: No such file or directory
/usr/bin/ld: cannot find ext/pcre/pcre2lib/pcre2_tables.o: No such file or directory
/usr/bin/ld: cannot find ext/pcre/pcre2lib/pcre2_ucd.o: No such file or directory
/usr/bin/ld: cannot find ext/pcre/pcre2lib/pcre2_valid_utf.o: No such file or directory
/usr/bin/ld: cannot find ext/pcre/pcre2lib/pcre2_xclass.o: No such file or directory
collect2: error: ld returned 1 exit status
make: *** [Makefile:265: sapi/cli/php] Error 1

But I expected this output instead:

[no errors]

Also, ext/pcre/ also has a weird entry:

root@a8efcafe4e96:/usr/src/php# ls -la ext/pcre/
total 364
-rw-r--r-- 1 root root   4258 Feb 17 03:19 ''$'\r''.dep'
drwxrwxrwx 1 root root   4096 Feb 17 03:20  .
drwxrwxrwx 1 root root   4096 Feb 14 05:02  ..
drwxr-xr-x 1 root root   4096 Feb 17 03:20  .libs
-rwxrwxrwx 1 root root     40 Aug 27 23:28  CREDITS
-rwxrwxrwx 1 root root   1327 Feb 17 01:51  config.w32
-rwxrwxrwx 1 root root   4436 Feb 17 01:51  config0.m4
drwxrwxrwx 1 root root   4096 Feb 17 03:20  pcre2lib
-rwxrwxrwx 1 root root  91160 Feb 17 01:51  php_pcre.c
-rwxrwxrwx 1 root root   1934 Aug 27 23:28  php_pcre.def
-rw-r--r-- 1 root root   3840 Feb 17 03:20  php_pcre.dep
-rwxrwxrwx 1 root root   3786 Feb 13 02:28  php_pcre.h
-rw-r--r-- 1 root root    324 Feb 17 03:20  php_pcre.lo
-rw-r--r-- 1 root root 229808 Feb 17 03:20  php_pcre.o
-rwxrwxrwx 1 root root   3475 Feb 13 02:28  php_pcre.stub.php
-rwxrwxrwx 1 root root   6375 Feb 17 01:12  php_pcre_arginfo.h
drwxrwxrwx 1 root root   4096 Feb 17 01:51  tests

Environment

I am running in a docker image (php:8.3.9-apache with some extra packages installed)

root@a8efcafe4e96:/usr/src/php# lsb_release -a
No LSB modules are available.
Distributor ID: Debian
Description:    Debian GNU/Linux 12 (bookworm)
Release:        12
Codename:       bookworm
root@a8efcafe4e96:/usr/src/php# uname -a
Linux a8efcafe4e96 5.15.133.1-microsoft-standard-WSL2 #1 SMP Thu Oct 5 21:02:42 UTC 2023 x86_64 GNU/Linux

PHP Version

6ccb35e

Operating System

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions