Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compilation terminated due to errors, when compile my.php #894

Open
ghost opened this issue Sep 3, 2023 · 6 comments
Open

Compilation terminated due to errors, when compile my.php #894

ghost opened this issue Sep 3, 2023 · 6 comments
Assignees
Labels
question This issue that requires clarification or help

Comments

@ghost
Copy link

ghost commented Sep 3, 2023

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
@Tsygankov-Slava
Copy link

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

@Danil42Russia Danil42Russia added the question This issue that requires clarification or help label Sep 18, 2023
@markbaka
Copy link

markbaka commented Sep 18, 2023

@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

@andarut
Copy link
Contributor

andarut commented Sep 18, 2023

@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 andarut pinned this issue Sep 18, 2023
@ghost
Copy link
Author

ghost commented Sep 18, 2023

@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.

@mamchyts
Copy link

mamchyts commented Nov 13, 2023

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

@DrDet DrDet unpinned this issue Nov 15, 2023
@mamchyts
Copy link

Any updates?
Still not working.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question This issue that requires clarification or help
Projects
None yet
Development

No branches or pull requests

5 participants