wasmerio / wasmer-php

🐘🕸️ WebAssembly runtime for PHP
https://wasmerio.github.io/wasmer-php/wasm/
MIT License
1k stars 42 forks source link

collect2: error: ld returned 1 exit status #142

Open shijunti19 opened 3 years ago

shijunti19 commented 3 years ago
                                  ^
/bin/sh /longteng/soft/wasmer-php/ext/libtool --mode=compile cc -I. -I/longteng/soft/wasmer-php/ext -I/longteng/soft/wasmer-php/ext/include -I/longteng/soft/wasmer-php/ext/main -I/longteng/soft/wasmer-php/ext -I/www/server/php/80/include/php -I/www/server/php/80/include/php/main -I/www/server/php/80/include/php/TSRM -I/www/server/php/80/include/php/Zend -I/www/server/php/80/include/php/ext -I/www/server/php/80/include/php/ext/date/lib  -DHAVE_CONFIG_H  -g -O2    -c /longteng/soft/wasmer-php/ext/src/api/types/limits.c -o src/api/types/limits.lo 
 cc -I. -I/longteng/soft/wasmer-php/ext -I/longteng/soft/wasmer-php/ext/include -I/longteng/soft/wasmer-php/ext/main -I/longteng/soft/wasmer-php/ext -I/www/server/php/80/include/php -I/www/server/php/80/include/php/main -I/www/server/php/80/include/php/TSRM -I/www/server/php/80/include/php/Zend -I/www/server/php/80/include/php/ext -I/www/server/php/80/include/php/ext/date/lib -DHAVE_CONFIG_H -g -O2 -c /longteng/soft/wasmer-php/ext/src/api/types/limits.c  -fPIC -DPIC -o src/api/types/.libs/limits.o
/bin/sh /longteng/soft/wasmer-php/ext/libtool --mode=compile cc -I. -I/longteng/soft/wasmer-php/ext -I/longteng/soft/wasmer-php/ext/include -I/longteng/soft/wasmer-php/ext/main -I/longteng/soft/wasmer-php/ext -I/www/server/php/80/include/php -I/www/server/php/80/include/php/main -I/www/server/php/80/include/php/TSRM -I/www/server/php/80/include/php/Zend -I/www/server/php/80/include/php/ext -I/www/server/php/80/include/php/ext/date/lib  -DHAVE_CONFIG_H  -g -O2    -c /longteng/soft/wasmer-php/ext/src/api/types/memorytype.c -o src/api/types/memorytype.lo 
 cc -I. -I/longteng/soft/wasmer-php/ext -I/longteng/soft/wasmer-php/ext/include -I/longteng/soft/wasmer-php/ext/main -I/longteng/soft/wasmer-php/ext -I/www/server/php/80/include/php -I/www/server/php/80/include/php/main -I/www/server/php/80/include/php/TSRM -I/www/server/php/80/include/php/Zend -I/www/server/php/80/include/php/ext -I/www/server/php/80/include/php/ext/date/lib -DHAVE_CONFIG_H -g -O2 -c /longteng/soft/wasmer-php/ext/src/api/types/memorytype.c  -fPIC -DPIC -o src/api/types/.libs/memorytype.o
/bin/sh /longteng/soft/wasmer-php/ext/libtool --mode=compile cc -I. -I/longteng/soft/wasmer-php/ext -I/longteng/soft/wasmer-php/ext/include -I/longteng/soft/wasmer-php/ext/main -I/longteng/soft/wasmer-php/ext -I/www/server/php/80/include/php -I/www/server/php/80/include/php/main -I/www/server/php/80/include/php/TSRM -I/www/server/php/80/include/php/Zend -I/www/server/php/80/include/php/ext -I/www/server/php/80/include/php/ext/date/lib  -DHAVE_CONFIG_H  -g -O2    -c /longteng/soft/wasmer-php/ext/src/api/types/tabletype.c -o src/api/types/tabletype.lo 
 cc -I. -I/longteng/soft/wasmer-php/ext -I/longteng/soft/wasmer-php/ext/include -I/longteng/soft/wasmer-php/ext/main -I/longteng/soft/wasmer-php/ext -I/www/server/php/80/include/php -I/www/server/php/80/include/php/main -I/www/server/php/80/include/php/TSRM -I/www/server/php/80/include/php/Zend -I/www/server/php/80/include/php/ext -I/www/server/php/80/include/php/ext/date/lib -DHAVE_CONFIG_H -g -O2 -c /longteng/soft/wasmer-php/ext/src/api/types/tabletype.c  -fPIC -DPIC -o src/api/types/.libs/tabletype.o
/longteng/soft/wasmer-php/ext/src/api/types/tabletype.c: In function ‘zif_wasm_tabletype_element’:
/longteng/soft/wasmer-php/ext/src/api/types/tabletype.c:49:28: warning: assignment discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
     valtype->inner.valtype = wasm_tabletype_element(WASMER_RES_P_INNER(tabletype_val, tabletype));
                            ^
/bin/sh /longteng/soft/wasmer-php/ext/libtool --mode=compile cc -I. -I/longteng/soft/wasmer-php/ext -I/longteng/soft/wasmer-php/ext/include -I/longteng/soft/wasmer-php/ext/main -I/longteng/soft/wasmer-php/ext -I/www/server/php/80/include/php -I/www/server/php/80/include/php/main -I/www/server/php/80/include/php/TSRM -I/www/server/php/80/include/php/Zend -I/www/server/php/80/include/php/ext -I/www/server/php/80/include/php/ext/date/lib  -DHAVE_CONFIG_H  -g -O2    -c /longteng/soft/wasmer-php/ext/src/api/types/valkind.c -o src/api/types/valkind.lo 
 cc -I. -I/longteng/soft/wasmer-php/ext -I/longteng/soft/wasmer-php/ext/include -I/longteng/soft/wasmer-php/ext/main -I/longteng/soft/wasmer-php/ext -I/www/server/php/80/include/php -I/www/server/php/80/include/php/main -I/www/server/php/80/include/php/TSRM -I/www/server/php/80/include/php/Zend -I/www/server/php/80/include/php/ext -I/www/server/php/80/include/php/ext/date/lib -DHAVE_CONFIG_H -g -O2 -c /longteng/soft/wasmer-php/ext/src/api/types/valkind.c  -fPIC -DPIC -o src/api/types/.libs/valkind.o
/bin/sh /longteng/soft/wasmer-php/ext/libtool --mode=compile cc -I. -I/longteng/soft/wasmer-php/ext -I/longteng/soft/wasmer-php/ext/include -I/longteng/soft/wasmer-php/ext/main -I/longteng/soft/wasmer-php/ext -I/www/server/php/80/include/php -I/www/server/php/80/include/php/main -I/www/server/php/80/include/php/TSRM -I/www/server/php/80/include/php/Zend -I/www/server/php/80/include/php/ext -I/www/server/php/80/include/php/ext/date/lib  -DHAVE_CONFIG_H  -g -O2    -c /longteng/soft/wasmer-php/ext/src/api/types/valtype.c -o src/api/types/valtype.lo 
 cc -I. -I/longteng/soft/wasmer-php/ext -I/longteng/soft/wasmer-php/ext/include -I/longteng/soft/wasmer-php/ext/main -I/longteng/soft/wasmer-php/ext -I/www/server/php/80/include/php -I/www/server/php/80/include/php/main -I/www/server/php/80/include/php/TSRM -I/www/server/php/80/include/php/Zend -I/www/server/php/80/include/php/ext -I/www/server/php/80/include/php/ext/date/lib -DHAVE_CONFIG_H -g -O2 -c /longteng/soft/wasmer-php/ext/src/api/types/valtype.c  -fPIC -DPIC -o src/api/types/.libs/valtype.o
/bin/sh /longteng/soft/wasmer-php/ext/libtool --mode=compile cc -I. -I/longteng/soft/wasmer-php/ext -I/longteng/soft/wasmer-php/ext/include -I/longteng/soft/wasmer-php/ext/main -I/longteng/soft/wasmer-php/ext -I/www/server/php/80/include/php -I/www/server/php/80/include/php/main -I/www/server/php/80/include/php/TSRM -I/www/server/php/80/include/php/Zend -I/www/server/php/80/include/php/ext -I/www/server/php/80/include/php/ext/date/lib  -DHAVE_CONFIG_H  -g -O2    -c /longteng/soft/wasmer-php/ext/src/wasm.c -o src/wasm.lo 
mkdir src/.libs
 cc -I. -I/longteng/soft/wasmer-php/ext -I/longteng/soft/wasmer-php/ext/include -I/longteng/soft/wasmer-php/ext/main -I/longteng/soft/wasmer-php/ext -I/www/server/php/80/include/php -I/www/server/php/80/include/php/main -I/www/server/php/80/include/php/TSRM -I/www/server/php/80/include/php/Zend -I/www/server/php/80/include/php/ext -I/www/server/php/80/include/php/ext/date/lib -DHAVE_CONFIG_H -g -O2 -c /longteng/soft/wasmer-php/ext/src/wasm.c  -fPIC -DPIC -o src/.libs/wasm.o
/bin/sh /longteng/soft/wasmer-php/ext/libtool --mode=link cc -shared -I/longteng/soft/wasmer-php/ext/include -I/longteng/soft/wasmer-php/ext/main -I/longteng/soft/wasmer-php/ext -I/www/server/php/80/include/php -I/www/server/php/80/include/php/main -I/www/server/php/80/include/php/TSRM -I/www/server/php/80/include/php/Zend -I/www/server/php/80/include/php/ext -I/www/server/php/80/include/php/ext/date/lib  -DHAVE_CONFIG_H  -g -O2    -o wasm.la -export-dynamic -avoid-version -prefer-pic -module -rpath /longteng/soft/wasmer-php/ext/modules  src/api/config.lo src/api/engine.lo src/api/store.lo src/api/wasmer.lo src/api/wat.lo src/api/objects/extern.lo src/api/objects/foreign.lo src/api/objects/func.lo src/api/objects/frame.lo src/api/objects/global.lo src/api/objects/instance.lo src/api/objects/memory.lo src/api/objects/module.lo src/api/objects/table.lo src/api/objects/trap.lo src/api/objects/val.lo src/api/types/exporttype.lo src/api/types/externtype.lo src/api/types/functype.lo src/api/types/globaltype.lo src/api/types/importtype.lo src/api/types/limits.lo src/api/types/memorytype.lo src/api/types/tabletype.lo src/api/types/valkind.lo src/api/types/valtype.lo src/wasm.lo -Wl,-rpath,/longteng/soft/wasmer-php/ext/lib -L/longteng/soft/wasmer-php/ext/lib -lwasmer
mkdir .libs
cc -shared  src/api/.libs/config.o src/api/.libs/engine.o src/api/.libs/store.o src/api/.libs/wasmer.o src/api/.libs/wat.o src/api/objects/.libs/extern.o src/api/objects/.libs/foreign.o src/api/objects/.libs/func.o src/api/objects/.libs/frame.o src/api/objects/.libs/global.o src/api/objects/.libs/instance.o src/api/objects/.libs/memory.o src/api/objects/.libs/module.o src/api/objects/.libs/table.o src/api/objects/.libs/trap.o src/api/objects/.libs/val.o src/api/types/.libs/exporttype.o src/api/types/.libs/externtype.o src/api/types/.libs/functype.o src/api/types/.libs/globaltype.o src/api/types/.libs/importtype.o src/api/types/.libs/limits.o src/api/types/.libs/memorytype.o src/api/types/.libs/tabletype.o src/api/types/.libs/valkind.o src/api/types/.libs/valtype.o src/.libs/wasm.o  -L/longteng/soft/wasmer-php/ext/lib -lwasmer  -Wl,-rpath -Wl,/longteng/soft/wasmer-php/ext/lib -Wl,-soname -Wl,wasm.so -o .libs/wasm.so
/usr/bin/ld: cannot find -lwasmer
collect2: error: ld returned 1 exit status
make: *** [Makefile:303: wasm.la] Error 1
[root@iZ94t3ix68kZ ext]# uname -r
4.18.0-193.14.2.el8_2.x86_64
[root@iZ94t3ix68kZ ext]# uname -a
Linux iZ94t3ix68kZ 4.18.0-193.14.2.el8_2.x86_64 #1 SMP Sun Jul 26 03:54:29 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
[root@iZ94t3ix68kZ ext]#  lsb_release -a
LSB Version:    :core-4.1-amd64:core-4.1-noarch
Distributor ID: CentOS
Description:    CentOS Linux release 8.2.2004 (Core) 
Release:    8.2.2004
Codename:   Core
[root@iZ94t3ix68kZ ext]# 
shijunti19 commented 3 years ago

WASM_SHARED_LIBADD = -Wl,-rpath,/longteng/soft/wasmer-php/ext/lib -L/longteng/soft/wasmer-php/ext/lib -lwasmer

shijunti19 commented 3 years ago

PHP : /www/server/php/80/bin/php PHP_SAPI : cli PHP_VERSION : 8.0.3 ZEND_VERSION: 4.0.3 PHP_OS : Linux - Linux iZ94t3ix68kZ 4.18.0-193.14.2.el8_2.x86_64 #1 SMP Sun Jul 26 03:54:29 UTC 2020 x86_64 INI actual : /longteng/soft/wasmer-php/ext/tmp-php.ini More .INIs :

PHP : /www/server/php/80/bin/phpdbg PHP_SAPI : phpdbg PHP_VERSION : 8.0.3 ZEND_VERSION: 4.0.3 PHP_OS : Linux - Linux iZ94t3ix68kZ 4.18.0-193.14.2.el8_2.x86_64 #1 SMP Sun Jul 26 03:54:29 UTC 2020 x86_64 INI actual : /longteng/soft/wasmer-php/ext/tmp-php.ini More .INIs :

CWD : /longteng/soft/wasmer-php/ext Extra dirs : VALGRIND : Not used

jubianchi commented 3 years ago

Hello @shijunti19,

Thanks for reporting the issue. Can you confirm the solution in https://github.com/wasmerio/wasmer-php/issues/142#issuecomment-823676162 fixes the issue?

If yes, I'll send a patch for that.

jubianchi commented 3 years ago

@shijunti19 can you give me some context because I can't reproduce your issue.

On which platform are you trying to build the extension?

shijunti19 commented 3 years ago

@jubianchi PHP: Please support first My server centos8 Windows is a local test environment

CentOS can't be solved at present. It can't be compiled and used after L is changed to L

/ www / server / php / 80 / bin / php PHP_SAPI:cli PHP_VERSION:8.0.3 ZEND_VERSION:4.0.3 PHP_OS:Linux-Linux iZ94t3ix68kZ 4.18.0-193.14.2.el8_2.x86_64 #1 SMP Sun Jul 26 03:54:29 UTC 2020 x86_64 INI实际:/longteng/soft/wasmer-php/ext/tmp-php.ini

shijunti19 commented 3 years ago

@jubianchi When will it be repaired

Description: CentOS Linux release 8.2.2004 (Core) Release: 8.2.2004

Hywan commented 3 years ago

We can't set any deadline. We will work on it as soon as we will have time :-). Sorry for the long delay.