kphp icon indicating copy to clipboard operation
kphp copied to clipboard

Compilation terminated due to errors, when compile my.php

Open ghost opened this issue 2 years ago • 6 comments

wsl:ubuntu 22.04

Starting php to cpp transpiling...

Starting make...
objs cnt = 14
objs cnt = 10
Compiling stage started...
  0% [total jobs 18] [left jobs 18] [running jobs 0] [waiting jobs 4]
  5% [total jobs 18] [left jobs 17] [running jobs 5] [waiting jobs 3]
 11% [total jobs 18] [left jobs 16] [running jobs 5] [waiting jobs 2]
 16% [total jobs 18] [left jobs 15] [running jobs 5] [waiting jobs 2]
 22% [total jobs 18] [left jobs 14] [running jobs 5] [waiting jobs 2]
 27% [total jobs 18] [left jobs 13] [running jobs 5] [waiting jobs 2]
 33% [total jobs 18] [left jobs 12] [running jobs 5] [waiting jobs 2]
 38% [total jobs 18] [left jobs 11] [running jobs 5] [waiting jobs 2]
 44% [total jobs 18] [left jobs 10] [running jobs 5] [waiting jobs 2]
 50% [total jobs 18] [left jobs 9] [running jobs 5] [waiting jobs 2]
 55% [total jobs 18] [left jobs 8] [running jobs 5] [waiting jobs 2]
 61% [total jobs 18] [left jobs 7] [running jobs 5] [waiting jobs 2]
 66% [total jobs 18] [left jobs 6] [running jobs 4] [waiting jobs 2]
 72% [total jobs 18] [left jobs 5] [running jobs 3] [waiting jobs 1]
 77% [total jobs 18] [left jobs 4] [running jobs 3] [waiting jobs 1]
 83% [total jobs 18] [left jobs 3] [running jobs 2] [waiting jobs 1]
 88% [total jobs 18] [left jobs 2] [running jobs 1] [waiting jobs 0]
 94% [total jobs 18] [left jobs 1] [running jobs 1] [waiting jobs 0]
100% [total jobs 18] [left jobs 0] [running jobs 0] [waiting jobs 0]
Linking stage started...
lto-wrapper: warning: using serial compilation of 7 LTRANS jobs
during RTL pass: final
../../../../opt/ssd/agent/teamcity-agent/work/caaa4737e280e43b/build/lib/connect.c: In function ‘verifyconnect’:
../../../../opt/ssd/agent/teamcity-agent/work/caaa4737e280e43b/build/lib/connect.c:546:1: internal compiler error: in ix86_print_operand_address_as, at config/i386/i386.c:13598
0xd13dc1 internal_error(char const*, ...)
        ???:0
0xd0dd9f fancy_abort(char const*, int, char const*)
        ???:0
0x114cc5e output_operand(rtx_def*, int)
        ???:0
0x114aa04 output_asm_insn(char const*, rtx_def**)
        ???:0
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See <file:///usr/share/doc/gcc-11/README.Bugs> for instructions.
lto-wrapper: fatal error: g++ returned 1 exit status
compilation terminated.
/usr/bin/ld: error: lto-wrapper failed
collect2: error: ld returned 1 exit status
pid [1166401] failed or terminated : return code 1
Failed [g++  -o /home/v/projects/kphp-project/kphp_out/server -Wl,--whole-archive -Wl,--start-group /home/v/projects/kphp-project/kphp_out/objs/vars_reset.src_my7348a02980de0bba.o /home/v/projects/kphp-project/kphp_out/objs/main.o /home/v/projects/kphp-project/kphp_out/objs/init_php_scripts.o /home/v/projects/kphp-project/kphp_out/objs/_shape_keys.o /home/v/projects/kphp-project/kphp_out/objs/vars.o /home/v/projects/kphp-project/kphp_out/objs/_tagger.o /home/v/projects/kphp-project/kphp_out/objs/o_55_d12fc4acd4e00f47.o /home/v/projects/kphp-project/kphp_out/objs/o_57_5497b566a8c8cf7f.o /home/v/projects/kphp-project/kphp_out/objs/o_vars_0_f0d514d0f1758740.o /home/v/projects/kphp-project/kphp_out/objs/o_vars_reset_8e340577612ddf4a.o /usr/share/vkontakte/kphp_source/objs/libkphp-full-runtime.a  -Wl,--end-group -Wl,--no-whole-archive -L/usr/share/vkontakte/kphp_source//objs/flex -ggdb -no-pie /opt/curl7600/lib/libcurl.a -L /usr/local/lib -l:libpcre.a -l:libre2.a -l:libyaml-cpp.a -l:libh3.a -l:libz.a -l:libzstd.a -l:libnghttp2.a -l:libkphp-timelib.a -l:libssl.a -l:libcrypto.a -l:libnuma.a -l:libvk-flex-data.a -lpthread -lm -ldl -lrt -rdynamic]
Make failed. Waiting for 0 children

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Compilation error at stage: Make, gen by make.cpp:447
  unknown file:0

Linking stage failure

Compilation terminated due to errors

ghost avatar Sep 03 '23 09:09 ghost

@v1v1tang, сan you send the code that you should compile?

Tsygankov-Slava avatar Sep 18 '23 13:09 Tsygankov-Slava

@v1v1tang, сan you send the code that you should compile?

This code, but I compile by official docker work fine. https://vkcom.github.io/kphp/kphp-basics/compile-sample-script.html

markbaka avatar Sep 18 '23 13:09 markbaka

@v1v1tang, сan you send the code that you should compile?

This code, but I compile by official docker work fine. https://vkcom.github.io/kphp/kphp-basics/compile-sample-script.html

You installed kphp from deb package or compiled from sources?

andarut avatar Sep 18 '23 14:09 andarut

@v1v1tang, сan you send the code that you should compile?

This code, but I compile by official docker work fine. https://vkcom.github.io/kphp/kphp-basics/compile-sample-script.html

You installed kphp from deb package or compiled from sources?

From deb. WSL2(Ubuntu 22.04) on windows11.

VanceTate avatar Sep 18 '23 15:09 VanceTate

Same issue:

docker run --volume $(pwd):/app mamchyts/benchmark:latest kphp --mode=cli /app/prime-number/php/cmd.php --output-file /app/prime-number/php/cmd.php_bin
Starting php to cpp transpiling...

Starting make...
Compiling pch stage started...
objs cnt = 14
objs cnt = 10
Compiling stage started...
  0% [total jobs 18] [left jobs 18] [running jobs 0] [waiting jobs 4]
  5% [total jobs 18] [left jobs 17] [running jobs 13] [waiting jobs 4]
 11% [total jobs 18] [left jobs 16] [running jobs 12] [waiting jobs 4]
 16% [total jobs 18] [left jobs 15] [running jobs 11] [waiting jobs 4]
 22% [total jobs 18] [left jobs 14] [running jobs 10] [waiting jobs 4]
 27% [total jobs 18] [left jobs 13] [running jobs 9] [waiting jobs 4]
 33% [total jobs 18] [left jobs 12] [running jobs 8] [waiting jobs 3]
 38% [total jobs 18] [left jobs 11] [running jobs 8] [waiting jobs 2]
 44% [total jobs 18] [left jobs 10] [running jobs 8] [waiting jobs 2]
 50% [total jobs 18] [left jobs 9] [running jobs 7] [waiting jobs 2]
 55% [total jobs 18] [left jobs 8] [running jobs 6] [waiting jobs 2]
 61% [total jobs 18] [left jobs 7] [running jobs 5] [waiting jobs 1]
 66% [total jobs 18] [left jobs 6] [running jobs 5] [waiting jobs 1]
 72% [total jobs 18] [left jobs 5] [running jobs 4] [waiting jobs 1]
 77% [total jobs 18] [left jobs 4] [running jobs 3] [waiting jobs 1]
 83% [total jobs 18] [left jobs 3] [running jobs 2] [waiting jobs 1]
 88% [total jobs 18] [left jobs 2] [running jobs 1] [waiting jobs 1]
 94% [total jobs 18] [left jobs 1] [running jobs 0] [waiting jobs 0]
100% [total jobs 18] [left jobs 0] [running jobs 0] [waiting jobs 0]
Linking stage started...
lto-wrapper: warning: using serial compilation of 7 LTRANS jobs
during RTL pass: final
opt/ssd/agent/teamcity-agent/work/caaa4737e280e43b/build/lib/connect.c: In function 'verifyconnect':
opt/ssd/agent/teamcity-agent/work/caaa4737e280e43b/build/lib/connect.c:546:1: internal compiler error: in ix86_print_operand_address_as, at config/i386/i386.c:13598
0x7fa689f8cd8f __libc_start_call_main
        ../sysdeps/nptl/libc_start_call_main.h:58
0x7fa689f8ce3f __libc_start_main_impl
        ../csu/libc-start.c:392
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See <file:///usr/share/doc/gcc-11/README.Bugs> for instructions.
lto-wrapper: fatal error: g++ returned 1 exit status
compilation terminated.
/usr/bin/ld: error: lto-wrapper failed
collect2: error: ld returned 1 exit status
pid [80] failed or terminated : return code 1
Failed [g++  -o /kphp_out/cli -Wl,--whole-archive -Wl,--start-group /kphp_out/objs/_tagger.o /kphp_out/objs/_shape_keys.o /kphp_out/objs/init_php_scripts.o /kphp_out/objs/vars.o /kphp_out/objs/vars_reset.src_cmd41d81e3fead191b0.o /kphp_out/objs/main.o /kphp_out/objs/o_24_84f99a5e064b1349.o /kphp_out/objs/o_57_5497b566a8c8cf7f.o /kphp_out/objs/o_vars_0_f0d514d0f1758740.o /kphp_out/objs/o_vars_reset_ad3856c0240f5830.o /usr/share/vkontakte/kphp_source/objs/libkphp-full-runtime.a  -Wl,--end-group -Wl,--no-whole-archive -L/usr/share/vkontakte/kphp_source//objs/flex -ggdb -no-pie /opt/curl7600/lib/libcurl.a -L /usr/local/lib -l:libpcre.a -l:libre2.a -l:libyaml-cpp.a -l:libh3.a -l:libz.a -l:libzstd.a -l:libnghttp2.a -l:libkphp-timelib.a -l:libssl.a -l:libcrypto.a -l:libnuma.a -l:libvk-flex-data.a -lpthread -lm -ldl -lrt -rdynamic]
Make failed. Waiting for 0 children

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Compilation error at stage: Make, gen by make.cpp:447
  unknown file:0

Linking stage failure

Compilation terminated due to errors

Repro steps: src - https://github.com/mamchyts/benchmark/blob/master/prime-number/php/cmd.php

docker run mamchyts/benchmark:latest kphp --version 2>&1 && echo '' && \
docker run --volume $(pwd):/app mamchyts/benchmark:latest kphp --mode=cli /app/prime-number/php/cmd.php --output-file /app/prime-number/php/cmd.php_bin &> /dev/null && \
docker run --volume $(pwd):/app mamchyts/benchmark:latest bash -c 'time -p /app/prime-number/php/cmd.php_bin --Xkphp-options -u root 10000 2>&1'

PS: KPHP installation - https://github.com/mamchyts/benchmark/blob/master/Dockerfile

RUN wget -qO /etc/apt/trusted.gpg.d/vkpartner.asc https://artifactory-external.vkpartner.ru/artifactory/api/gpg/key/public \
    && echo "deb [arch=amd64] https://artifactory-external.vkpartner.ru/artifactory/kphp jammy main" | tee /etc/apt/sources.list.d/vkpartner.list \
    && apt update \
    && apt install --yes kphp vk-tl-tools

mamchyts avatar Nov 13 '23 17:11 mamchyts

Any updates? Still not working.

mamchyts avatar Jan 31 '24 11:01 mamchyts