swoole / swoole-src

🚀 Coroutine-based concurrency library for PHP
https://www.swoole.com
Apache License 2.0
18.27k stars 3.16k forks source link

Compile and install Swoole 5.1.1, run the make test command and output a large number of errors #5229

Closed clemask closed 5 months ago

clemask commented 5 months ago

Please answer these questions before submitting your issue.

  1. What did you do? If possible, provide a simple script for reproducing the error.

run command

sudo make test

out:

Fatal error: Uncaught Error: Failed opening required '/usr/local/src/swoole-src-5.1.1/tests/include/lib/vendor/autoload.php' (include_path='.:/usr/local/php/lib/php') in /usr/local/src/swoole-src-5.1.1/tests/include/bootstrap.php:53
Stack trace:
#0 /usr/local/src/swoole-src-5.1.1/tests/swoole_pdo_sqlite/bug33841.skip.php(2): require()
#1 {main}
  thrown in /usr/local/src/swoole-src-5.1.1/tests/include/bootstrap.php on line 53 [/usr/local/src/swoole-src-5.1.1/tests/swoole_pdo_sqlite/pdo_sqlite_tostring_exception.phpt]
Warning: require(/usr/local/src/swoole-src-5.1.1/tests/include/lib/vendor/autoload.php): Failed to open stream: No such file or directory in /usr/local/src/swoole-src-5.1.1/tests/include/bootstrap.php on line 53

Fatal error: Uncaught Error: Failed opening required '/usr/local/src/swoole-src-5.1.1/tests/include/lib/vendor/autoload.php' (include_path='.:/usr/local/php/lib/php') in /usr/local/src/swoole-src-5.1.1/tests/include/bootstrap.php:53
Stack trace:
#0 /usr/local/src/swoole-src-5.1.1/tests/swoole_pdo_sqlite/bug33841.skip.php(2): require()
#1 {main}
  thrown in /usr/local/src/swoole-src-5.1.1/tests/include/bootstrap.php on line 53 [/usr/local/src/swoole-src-5.1.1/tests/swoole_pdo_sqlite/pdo_sqlite_transaction.phpt]

The error content is basically the same, the change is the **bug*.skip.php file

  1. What did you expect to see?

no error

  1. What did you see instead?

  2. What version of Swoole are you using (show your php --ri swoole)? install swoole 5.1.1

  3. What is your machine environment used (show your uname -a & php -v & gcc -v) ? uname -a

    Linux * #1 SMP Mon Nov 1 20:48:11 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux

php -v

PHP 8.2.5 (cli) (built: May  9 2023 03:59:58) (ZTS)
Copyright (c) The PHP Group
Zend Engine v4.2.5, Copyright (c) Zend Technologies
    with Zend OPcache v8.2.5, Copyright (c), by Zend Technologies

gcc -v

sing built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/libexec/gcc/x86_64-amazon-linux/4.8.5/lto-wrapper
Target: x86_64-amazon-linux
Configured with: ../configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --with-bugurl=http://bugzilla.redhat.com/bugzilla --enable-bootstrap --enable-shared --enable-threads=posix --enable-checking=release --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-gnu-unique-object --enable-linker-build-id --with-linker-hash-style=gnu --enable-languages=c,c++,fortran,ada,lto --enable-plugin --enable-initfini-array --disable-libgcj --with-isl=/builddir/build/BUILD/gcc-4.8.5-20150702/obj-x86_64-amazon-linux/isl-install --with-cloog=/builddir/build/BUILD/gcc-4.8.5-20150702/obj-x86_64-amazon-linux/cloog-install --enable-gnu-indirect-function --with-tune=generic --with-arch_32=x86-64 --build=x86_64-amazon-linux
Thread model: posix
gcc version 4.8.5 20150623 (Red Hat 4.8.5-28) (GCC)
matyhtf commented 5 months ago

If you want to run the unit test of swoole, you can use the following command

cd tests
./start.sh