LINK is setted to riscv64-unknown-elf-gcc， but env.Program execute use ld

LINK is setted to riscv64-unknown-elf-gcc， but env.Program execute use ld.
I use env.Dump(）get below outputs:
  'LINK': 'riscv64-unknown-elf-gcc',   'LINKCOM': '$LINK -o $TARGET $LINKFLAGS $__RPATH $SOURCES $_LIBDIRFLAGS '              '$_LIBFLAGS',   'LINKFLAGS': ' '                '-march=rv64imafdcv_zicbom_zicbop_zicboz_zicond1p0_zihintntl0p2_zihintpause_zawrs_zfa0p1_zfbfmin0p8_zfh_zca_zcb_zcd_zba_zbb_zbc_zbs_zvfbfmin0p8_zvfbfwma0p8_svinval_svpbmt_xtheadc_xtheadvdot '                '-mabi=lp64d -mtune=c920 -nostartfiles -lc -lgcc -lm -T '                '/ssd_fes/jiongz/desktop/github/diff_ip_vv/pc801_c920_ip_vv/smart_run/tests/lib/init/linker.lcf '                '-L '                '/ssd_fes/jiongz/desktop/github/diff_ip_vv/pc801_c920_ip_vv/smart_run/tests/lib/init',
Could anyone help me about this issue?

Curious why your target arch spec looks so odd? I'd expect just rv64i?  Is this including all the build options or something?
-march=rv64imafdcv_zicbom_zicbop_zicboz_zicond1p0_zihintntl0p2_zihintpause_zawrs_zfa0p1_zfbfmin0p8_zfh_zca_zcb_zcd_zba_zbb_zbc_zbs_zvfbfmin0p8_zvfbfwma0p8_svinval_svpbmt_xtheadc_xtheadvdot

While most builds using a gcc toolcchain use the special variable $SMARTLINK it should certainly be possible to set $LINK to something more specific - we do it in many tests in the regression test suite.  The smart link concept is to basically use the same program as is being used for compilation (so the same as $CC if it's C code, $CXX if it's C++, etc). Have you tried that?
It's not SCons executing ld: it issues the expanded version of the $LINKCOM command. If the program you invoke there goes on and calls other programs, that's it's business. Sounds like possibly the gcc build (presumably this is a cross-build toolchain?) isn't configured in a way that it's picking up the linker binary you expect. Based on the naming from above, would be expecting it to look for riscv64-unknown-elf-ld.

@zhajio1988  base questions first

Which version of SCons?
Which version of Python?
Which operating system are you on?
Can you provide a small reproducer?

Can you run scons --debug=presub and paste the debug information just prior to your build failure (don't build in parallel for this)?

Curious why your target arch spec looks so odd? I'd expect just rv64i? Is this including all the build options or something?
-march=rv64imafdcv_zicbom_zicbop_zicboz_zicond1p0_zihintntl0p2_zihintpause_zawrs_zfa0p1_zfbfmin0p8_zfh_zca_zcb_zcd_zba_zbb_zbc_zbs_zvfbfmin0p8_zvfbfwma0p8_svinval_svpbmt_xtheadc_xtheadvdot

While most builds using a gcc toolcchain use the special variable $SMARTLINK it should certainly be possible to set $LINK to something more specific - we do it in many tests in the regression test suite. The smart link concept is to basically use the same program as is being used for compilation (so the same as $CC if it's C code, $CXX if it's C++, etc). Have you tried that?
It's not SCons executing ld: it issues the expanded version of the $LINKCOM command. If the program you invoke there goes on and calls other programs, that's it's business. Sounds like possibly the gcc build (presumably this is a cross-build toolchain?) isn't configured in a way that it's picking up the linker binary you expect. Based on the naming from above, would be expecting it to look for riscv64-unknown-elf-ld.

@mwichmann The -march option is copied from T-head‘s makefile. ld command finally point to ”/opt/picocom/ThirdParty_Libs/T-head/C920_R2S0P21/C920_R2S0_manuals_and_tools/manuals_and_tools/08_toolchain_900_series_cpu_toolchain/V2.8.0/Xuantie-900-gcc-elf-newlib-x86_64-V2.8.0/bin/../lib/gcc/riscv64-unknown-elf/10.4.0/../../../../riscv64-unknown-elf/bin/ld”

Hi @bdbaddog
Thanks for your replay.

Which version of SCons?
SCons: v<IP_ADDRESS>c688f694c644b61342670ce92977bf4a396c0d4, Sun, 07 Jul 2024 16:52:07 -0700, by bdbaddog on M1Dog2021
Which version of Python?
Python 3.11.4 (main, Jul  5 2023, 13:45:01) [GCC 11.2.0] on linux
Which operating system are you on?
Linux lushan 3.10.0-957.el7.x86_64 #1 SMP Thu Nov 8 23:39:32 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux
Can you provide a small reproducer?
I will try to do this.

Can you run scons --debug=presub and paste the debug information just prior to your build failure (don't build in parallel for this)?

Building build/arch/t-head/barrier.o with action:
$CC -o $TARGET -c $CFLAGS $CCFLAGS $_CCCOMCOM $SOURCES
CC build/arch/t-head/barrier.o
Building build/arch/t-head/cache.o with action:
$CC -o $TARGET -c $CFLAGS $CCFLAGS $_CCCOMCOM $SOURCES
CC build/arch/t-head/cache.o
Building build/lib/clib/fputc.o with action:
$CC -o $TARGET -c $CFLAGS $CCFLAGS $_CCCOMCOM $SOURCES
CC build/lib/clib/fputc.o
[01m[K/opt/picocom/ThirdParty_Libs/T-head/C920_R2S0P21/C920_R2S0_manuals_and_tools/manuals_and_tools/08_toolchain_900_series_cpu_toolchain/V2.8.0/Xuantie-900-gcc-elf-newlib-x86_64-V2.8.0/riscv64-unknown-elf/include/stdio.h:[m[K In function '[01m[Kfputc[m[K':
[01m[Ktests/lib/clib/fputc.c:19:1:[m[K [01;35m[Kwarning: [m[Kcontrol reaches end of non-void function [[01;35m[K-Wreturn-type[m[K]
19 | [01;35m[K}[m[K
| [01;35m[K^[m[K
Building build/lib/clib/intc.o with action:
$CC -o $TARGET -c $CFLAGS $CCFLAGS $_CCCOMCOM $SOURCES
CC build/lib/clib/intc.o
[01m[Ktests/lib/clib/intc.c:[m[K In function '[01m[Kck_intc_init[m[K':
[01m[Ktests/lib/clib/intc.c:9:34:[m[K [01;35m[Kwarning: [m[Kinitialization of '[01m[Kint *[m[K' from '[01m[Kint[m[K' makes pointer from integer without a cast [[01;35m[K-Wint-conversion[m[K]
9 | #define APB_BASE                 [01;35m[K0x10000000[m[K
|                                  [01;35m[K^~[m[K
[01m[Ktests/lib/clib/intc.c:15:17:[m[K [01;36m[Knote: [m[Kin expansion of macro '[01m[KAPB_BASE[m[K'
15 |     int *picr = [01;36m[KAPB_BASE[m[K;
|                 [01;36m[K^~[m[K
[01m[Ktests/lib/clib/intc.c:10:34:[m[K [01;35m[Kwarning: [m[Kinitialization of '[01m[Kint *[m[K' from '[01m[Kint[m[K' makes pointer from integer without a cast [[01;35m[K-Wint-conversion[m[K]
10 | #define INTC_BASE                [01;35m[K0x10010000[m[K
|                                  [01;35m[K^~[m[K
[01m[Ktests/lib/clib/intc.c:19:22:[m[K [01;36m[Knote: [m[Kin expansion of macro '[01m[KINTC_BASE[m[K'
19 |         int *piser = [01;36m[KINTC_BASE[m[K + 0x10;
|                      [01;36m[K^[m[K
Building build/lib/clib/uart.o with action:
$CC -o $TARGET -c $CFLAGS $CCFLAGS $_CCCOMCOM $SOURCES
CC build/lib/clib/uart.o
[01m[Ktests/lib/clib/uart.c:[m[K In function '[01m[Kck_uart_status[m[K':
[01m[Ktests/lib/clib/uart.c:203:18:[m[K [01;35m[Kwarning: [m[K'[01m[Kuart_lsr[m[K' is used uninitialized in this function [[01;35m[K-Wuninitialized[m[K]
203 |     if (uart_lsr [01;35m[K&[m[K CK_LSR_TEMT)
|                  [01;35m[K^[m[K
Building build/lib/clib/vtimer.o with action:
$CC -o $TARGET -c $CFLAGS $CCFLAGS $_CCCOMCOM $SOURCES
CC build/lib/clib/vtimer.o
[01m[Ktests/lib/clib/vtimer.c:[m[K In function '[01m[Ksim_end[m[K':
[01m[Ktests/lib/clib/vtimer.c:21:12:[m[K [01;35m[Kwarning: [m[Kassignment to '[01m[Kint *[m[K' from '[01m[Kunsigned int[m[K' makes pointer from integer without a cast [[01;35m[K-Wint-conversion[m[K]
21 |   END_ADDR [01;35m[K=[m[K 0xA001FF48;
|            [01;35m[K^[m[K
[01m[Ktests/lib/clib/vtimer.c:24:13:[m[K [01;35m[Kwarning: [m[Kunsigned conversion from '[01m[Klong int[m[K' to '[01m[Kunsigned int[m[K' changes value from '[01m[K18324075042[m[K' to '[01m[K1144205858[m[K' [[01;35m[K-Woverflow[m[K]
24 |   END_DATA= [01;35m[K0x444333222[m[K;
|             [01;35m[K^~~[m[K
Building build/lib/init/core_cp0.o with action:
$CC $ASPPFLAGS $CPPFLAGS $_CPPDEFFLAGS $_CPPINCFLAGS -c -o $TARGET $SOURCES
AS build/lib/init/core_cp0.o
Building build/lib/init/core_ifu.o with action:
$CC $ASPPFLAGS $CPPFLAGS $_CPPDEFFLAGS $_CPPINCFLAGS -c -o $TARGET $SOURCES
AS build/lib/init/core_ifu.o
Building build/lib/init/core_l2c.o with action:
$CC $ASPPFLAGS $CPPFLAGS $_CPPDEFFLAGS $_CPPINCFLAGS -c -o $TARGET $SOURCES
AS build/lib/init/core_l2c.o
Building build/lib/init/core_lsu.o with action:
$CC $ASPPFLAGS $CPPFLAGS $_CPPDEFFLAGS $_CPPINCFLAGS -c -o $TARGET $SOURCES
AS build/lib/init/core_lsu.o
Building build/lib/init/core_mmu.o with action:
$CC $ASPPFLAGS $CPPFLAGS $_CPPDEFFLAGS $_CPPINCFLAGS -c -o $TARGET $SOURCES
AS build/lib/init/core_mmu.o
Building build/lib/init/core_plic.o with action:
$CC $ASPPFLAGS $CPPFLAGS $_CPPDEFFLAGS $_CPPINCFLAGS -c -o $TARGET $SOURCES
AS build/lib/init/core_plic.o
Building build/lib/init/core_t_extension.o with action:
$CC $ASPPFLAGS $CPPFLAGS $_CPPDEFFLAGS $_CPPINCFLAGS -c -o $TARGET $SOURCES
AS build/lib/init/core_t_extension.o
Building build/lib/init/core_vec.o with action:
$CC $ASPPFLAGS $CPPFLAGS $_CPPDEFFLAGS $_CPPINCFLAGS -c -o $TARGET $SOURCES
AS build/lib/init/core_vec.o
Building build/lib/init/crt0.o with action:
$CC $ASPPFLAGS $CPPFLAGS $_CPPDEFFLAGS $_CPPINCFLAGS -c -o $TARGET $SOURCES
AS build/lib/init/crt0.o
Building build/lib/init/stress_inst.o with action:
$CC $ASPPFLAGS $CPPFLAGS $_CPPDEFFLAGS $_CPPINCFLAGS -c -o $TARGET $SOURCES
AS build/lib/init/stress_inst.o
Building build/lib/newlib_wrap/__dtostr.o with action:
$CC -o $TARGET -c $CFLAGS $CCFLAGS $_CCCOMCOM $SOURCES
CC build/lib/newlib_wrap/__dtostr.o
Building build/lib/newlib_wrap/__isinf.o with action:
$CC -o $TARGET -c $CFLAGS $CCFLAGS $_CCCOMCOM $SOURCES
CC build/lib/newlib_wrap/__isinf.o
Building build/lib/newlib_wrap/__isnan.o with action:
$CC -o $TARGET -c $CFLAGS $CCFLAGS $_CCCOMCOM $SOURCES
CC build/lib/newlib_wrap/__isnan.o
Building build/lib/newlib_wrap/__lltostr.o with action:
$CC -o $TARGET -c $CFLAGS $CCFLAGS $_CCCOMCOM $SOURCES
CC build/lib/newlib_wrap/__lltostr.o
Building build/lib/newlib_wrap/__ltostr.o with action:
$CC -o $TARGET -c $CFLAGS $CCFLAGS $_CCCOMCOM $SOURCES
CC build/lib/newlib_wrap/__ltostr.o
Building build/lib/newlib_wrap/__v_printf.o with action:
$CC -o $TARGET -c $CFLAGS $CCFLAGS $_CCCOMCOM $SOURCES
CC build/lib/newlib_wrap/__v_printf.o
Building build/lib/newlib_wrap/fprintf.o with action:
$CC -o $TARGET -c $CFLAGS $CCFLAGS $_CCCOMCOM $SOURCES
CC build/lib/newlib_wrap/fprintf.o
Building build/lib/newlib_wrap/getc.o with action:
$CC -o $TARGET -c $CFLAGS $CCFLAGS $_CCCOMCOM $SOURCES
CC build/lib/newlib_wrap/getc.o
Building build/lib/newlib_wrap/getchar.o with action:
$CC -o $TARGET -c $CFLAGS $CCFLAGS $_CCCOMCOM $SOURCES
CC build/lib/newlib_wrap/getchar.o
Building build/lib/newlib_wrap/printf.o with action:
$CC -o $TARGET -c $CFLAGS $CCFLAGS $_CCCOMCOM $SOURCES
CC build/lib/newlib_wrap/printf.o
Building build/lib/newlib_wrap/putc.o with action:
$CC -o $TARGET -c $CFLAGS $CCFLAGS $_CCCOMCOM $SOURCES
CC build/lib/newlib_wrap/putc.o
Building build/lib/newlib_wrap/putchar.o with action:
$CC -o $TARGET -c $CFLAGS $CCFLAGS $_CCCOMCOM $SOURCES
CC build/lib/newlib_wrap/putchar.o
Building build/lib/newlib_wrap/puts.o with action:
$CC -o $TARGET -c $CFLAGS $CCFLAGS $_CCCOMCOM $SOURCES
CC build/lib/newlib_wrap/puts.o
Building build/lib/newlib_wrap/snprintf.o with action:
$CC -o $TARGET -c $CFLAGS $CCFLAGS $_CCCOMCOM $SOURCES
CC build/lib/newlib_wrap/snprintf.o
Building build/lib/newlib_wrap/sprintf.o with action:
$CC -o $TARGET -c $CFLAGS $CCFLAGS $_CCCOMCOM $SOURCES
CC build/lib/newlib_wrap/sprintf.o
Building build/lib/newlib_wrap/vfprintf.o with action:
$CC -o $TARGET -c $CFLAGS $CCFLAGS $_CCCOMCOM $SOURCES
CC build/lib/newlib_wrap/vfprintf.o
Building build/lib/newlib_wrap/vprintf.o with action:
$CC -o $TARGET -c $CFLAGS $CCFLAGS $_CCCOMCOM $SOURCES
CC build/lib/newlib_wrap/vprintf.o
Building build/lib/newlib_wrap/vsnprintf.o with action:
$CC -o $TARGET -c $CFLAGS $CCFLAGS $_CCCOMCOM $SOURCES
CC build/lib/newlib_wrap/vsnprintf.o
Building build/lib/newlib_wrap/vsprintf.o with action:
$CC -o $TARGET -c $CFLAGS $CCFLAGS $_CCCOMCOM $SOURCES
CC build/lib/newlib_wrap/vsprintf.o
Building build/tests/hello_world/hello_world.o with action:
$CC -o $TARGET -c $CFLAGS $CCFLAGS $_CCCOMCOM $SOURCES
CC build/tests/hello_world/hello_world.o
[01m[Ktests/cases/hello_world/hello_world.c:[m[K In function '[01m[Kmain[m[K':
[01m[Ktests/cases/hello_world/hello_world.c:39:1:[m[K [01;35m[Kwarning: [m[Kthis '[01m[Kelse[m[K' clause does not guard... [[01;35m[K-Wmisleading-indentation[m[K]
39 | [01;35m[Kelse[m[K
| [01;35m[K^~[m[K
[01m[Ktests/cases/hello_world/hello_world.c:41:3:[m[K [01;36m[Knote: [m[K...this statement, but the latter is misleadingly indented as if it were guarded by the '[01m[Kelse[m[K'
41 |   [01;36m[Kprintf[m[K("after ASM c is changed to %d!\n",c);
|   [01;36m[K^~[m[K
Building hello_world.elf with action:
$LINK -o $TARGET $LINKFLAGS $__RPATH $SOURCES $_LIBDIRFLAGS $_LIBFLAGS
LINK hello_world.elf
/opt/picocom/ThirdParty_Libs/T-head/C920_R2S0P21/C920_R2S0_manuals_and_tools/manuals_and_tools/08_toolchain_900_series_cpu_toolchain/V2.8.0/Xuantie-900-gcc-elf-newlib-x86_64-V2.8.0/bin/../lib/gcc/riscv64-unknown-elf/10.4.0/../../../../riscv64-unknown-elf/bin/ld: /opt/picocom/ThirdParty_Libs/T-head/C920_R2S0P21/C920_R2S0_manuals_and_tools/manuals_and_tools/08_toolchain_900_series_cpu_toolchain/V2.8.0/Xuantie-900-gcc-elf-newlib-x86_64-V2.8.0/bin/../lib/gcc/riscv64-unknown-elf/10.4.0/../../../../riscv64-unknown-elf/lib/rv64imafdcv_zfh_xtheadc/lp64d/crt0.o: in function _start': (.text+0x0): undefined reference to __global_pointer$'
/opt/picocom/ThirdParty_Libs/T-head/C920_R2S0P21/C920_R2S0_manuals_and_tools/manuals_and_tools/08_toolchain_900_series_cpu_toolchain/V2.8.0/Xuantie-900-gcc-elf-newlib-x86_64-V2.8.0/bin/../lib/gcc/riscv64-unknown-elf/10.4.0/../../../../riscv64-unknown-elf/bin/ld: (.text+0x8): undefined reference to _edata' /opt/picocom/ThirdParty_Libs/T-head/C920_R2S0P21/C920_R2S0_manuals_and_tools/manuals_and_tools/08_toolchain_900_series_cpu_toolchain/V2.8.0/Xuantie-900-gcc-elf-newlib-x86_64-V2.8.0/bin/../lib/gcc/riscv64-unknown-elf/10.4.0/../../../../riscv64-unknown-elf/bin/ld: (.text+0x10): undefined reference to _end'
/opt/picocom/ThirdParty_Libs/T-head/C920_R2S0P21/C920_R2S0_manuals_and_tools/manuals_and_tools/08_toolchain_900_series_cpu_toolchain/V2.8.0/Xuantie-900-gcc-elf-newlib-x86_64-V2.8.0/bin/../lib/gcc/riscv64-unknown-elf/10.4.0/../../../../riscv64-unknown-elf/bin/ld: (.text+0x32): undefined reference to __libc_init_array' /opt/picocom/ThirdParty_Libs/T-head/C920_R2S0P21/C920_R2S0_manuals_and_tools/manuals_and_tools/08_toolchain_900_series_cpu_toolchain/V2.8.0/Xuantie-900-gcc-elf-newlib-x86_64-V2.8.0/bin/../lib/gcc/riscv64-unknown-elf/10.4.0/../../../../riscv64-unknown-elf/bin/ld: (.text+0x44): undefined reference to exit'
collect2: error: ld returned 1 exit status
scons: *** [hello_world.elf] Error 1

Can you run scons --debug=presub and paste the debug information just prior to your build failure (don't build in parallel for this)?

Building build/arch/t-head/barrier.o with action:
$CC -o $TARGET -c $CFLAGS $CCFLAGS $_CCCOMCOM $SOURCES
CC build/arch/t-head/barrier.o
Building build/arch/t-head/cache.o with action:
$CC -o $TARGET -c $CFLAGS $CCFLAGS $_CCCOMCOM $SOURCES
CC build/arch/t-head/cache.o
Building build/lib/clib/fputc.o with action:
$CC -o $TARGET -c $CFLAGS $CCFLAGS $_CCCOMCOM $SOURCES
CC build/lib/clib/fputc.o
/opt/picocom/ThirdParty_Libs/T-head/C920_R2S0P21/C920_R2S0_manuals_and_tools/manuals_and_tools/08_toolchain_900_series_cpu_toolchain/V2.8.0/Xuantie-900-gcc-elf-newlib-x86_64-V2.8.0/riscv64-unknown-elf/include/stdio.h: In function 'fputc':
tests/lib/clib/fputc.c:19:1: warning: control reaches end of non-void function [-Wreturn-type]
19 | }
| ^
Building build/lib/clib/intc.o with action:
$CC -o $TARGET -c $CFLAGS $CCFLAGS $_CCCOMCOM $SOURCES
CC build/lib/clib/intc.o
tests/lib/clib/intc.c: In function 'ck_intc_init':
tests/lib/clib/intc.c:9:34: warning: initialization of 'int *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
9 | #define APB_BASE                 0x10000000
|                                  ^~~~~~~~~~
tests/lib/clib/intc.c:15:17: note: in expansion of macro 'APB_BASE'
15 |     int *picr = APB_BASE;
|                 ^~~~~~~~
tests/lib/clib/intc.c:10:34: warning: initialization of 'int *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
10 | #define INTC_BASE                0x10010000
|                                  ^~~~~~~~~~
tests/lib/clib/intc.c:19:22: note: in expansion of macro 'INTC_BASE'
19 |         int *piser = INTC_BASE + 0x10;
|                      ^~~~~~~~~
Building build/lib/clib/uart.o with action:
$CC -o $TARGET -c $CFLAGS $CCFLAGS $_CCCOMCOM $SOURCES
CC build/lib/clib/uart.o
tests/lib/clib/uart.c: In function 'ck_uart_status':
tests/lib/clib/uart.c:203:18: warning: 'uart_lsr' is used uninitialized in this function [-Wuninitialized]
203 |     if (uart_lsr & CK_LSR_TEMT)
|                  ^
Building build/lib/clib/vtimer.o with action:
$CC -o $TARGET -c $CFLAGS $CCFLAGS $_CCCOMCOM $SOURCES
CC build/lib/clib/vtimer.o
tests/lib/clib/vtimer.c: In function 'sim_end':
tests/lib/clib/vtimer.c:21:12: warning: assignment to 'int *' from 'unsigned int' makes pointer from integer without a cast [-Wint-conversion]
21 |   END_ADDR = 0xA001FF48;
|            ^
tests/lib/clib/vtimer.c:24:13: warning: unsigned conversion from 'long int' to 'unsigned int' changes value from '18324075042' to '1144205858' [-Woverflow]
24 |   END_DATA= 0x444333222;
|             ^~~~~~~~~~~
Building build/lib/init/core_cp0.o with action:
$CC $ASPPFLAGS $CPPFLAGS $_CPPDEFFLAGS $_CPPINCFLAGS -c -o $TARGET $SOURCES
AS build/lib/init/core_cp0.o
Building build/lib/init/core_ifu.o with action:
$CC $ASPPFLAGS $CPPFLAGS $_CPPDEFFLAGS $_CPPINCFLAGS -c -o $TARGET $SOURCES
AS build/lib/init/core_ifu.o
Building build/lib/init/core_l2c.o with action:
$CC $ASPPFLAGS $CPPFLAGS $_CPPDEFFLAGS $_CPPINCFLAGS -c -o $TARGET $SOURCES
AS build/lib/init/core_l2c.o
Building build/lib/init/core_lsu.o with action:
$CC $ASPPFLAGS $CPPFLAGS $_CPPDEFFLAGS $_CPPINCFLAGS -c -o $TARGET $SOURCES
AS build/lib/init/core_lsu.o
Building build/lib/init/core_mmu.o with action:
$CC $ASPPFLAGS $CPPFLAGS $_CPPDEFFLAGS $_CPPINCFLAGS -c -o $TARGET $SOURCES
AS build/lib/init/core_mmu.o
Building build/lib/init/core_plic.o with action:
$CC $ASPPFLAGS $CPPFLAGS $_CPPDEFFLAGS $_CPPINCFLAGS -c -o $TARGET $SOURCES
AS build/lib/init/core_plic.o
Building build/lib/init/core_t_extension.o with action:
$CC $ASPPFLAGS $CPPFLAGS $_CPPDEFFLAGS $_CPPINCFLAGS -c -o $TARGET $SOURCES
AS build/lib/init/core_t_extension.o
Building build/lib/init/core_vec.o with action:
$CC $ASPPFLAGS $CPPFLAGS $_CPPDEFFLAGS $_CPPINCFLAGS -c -o $TARGET $SOURCES
AS build/lib/init/core_vec.o
Building build/lib/init/crt0.o with action:
$CC $ASPPFLAGS $CPPFLAGS $_CPPDEFFLAGS $_CPPINCFLAGS -c -o $TARGET $SOURCES
AS build/lib/init/crt0.o
Building build/lib/init/stress_inst.o with action:
$CC $ASPPFLAGS $CPPFLAGS $_CPPDEFFLAGS $_CPPINCFLAGS -c -o $TARGET $SOURCES
AS build/lib/init/stress_inst.o
Building build/lib/newlib_wrap/__dtostr.o with action:
$CC -o $TARGET -c $CFLAGS $CCFLAGS $_CCCOMCOM $SOURCES
CC build/lib/newlib_wrap/__dtostr.o
Building build/lib/newlib_wrap/__isinf.o with action:
$CC -o $TARGET -c $CFLAGS $CCFLAGS $_CCCOMCOM $SOURCES
CC build/lib/newlib_wrap/__isinf.o
Building build/lib/newlib_wrap/__isnan.o with action:
$CC -o $TARGET -c $CFLAGS $CCFLAGS $_CCCOMCOM $SOURCES
CC build/lib/newlib_wrap/__isnan.o
Building build/lib/newlib_wrap/__lltostr.o with action:
$CC -o $TARGET -c $CFLAGS $CCFLAGS $_CCCOMCOM $SOURCES
CC build/lib/newlib_wrap/__lltostr.o
Building build/lib/newlib_wrap/__ltostr.o with action:
$CC -o $TARGET -c $CFLAGS $CCFLAGS $_CCCOMCOM $SOURCES
CC build/lib/newlib_wrap/__ltostr.o
Building build/lib/newlib_wrap/__v_printf.o with action:
$CC -o $TARGET -c $CFLAGS $CCFLAGS $_CCCOMCOM $SOURCES
CC build/lib/newlib_wrap/__v_printf.o
Building build/lib/newlib_wrap/fprintf.o with action:
$CC -o $TARGET -c $CFLAGS $CCFLAGS $_CCCOMCOM $SOURCES
CC build/lib/newlib_wrap/fprintf.o
Building build/lib/newlib_wrap/getc.o with action:
$CC -o $TARGET -c $CFLAGS $CCFLAGS $_CCCOMCOM $SOURCES
CC build/lib/newlib_wrap/getc.o
Building build/lib/newlib_wrap/getchar.o with action:
$CC -o $TARGET -c $CFLAGS $CCFLAGS $_CCCOMCOM $SOURCES
CC build/lib/newlib_wrap/getchar.o
Building build/lib/newlib_wrap/printf.o with action:
$CC -o $TARGET -c $CFLAGS $CCFLAGS $_CCCOMCOM $SOURCES
CC build/lib/newlib_wrap/printf.o
Building build/lib/newlib_wrap/putc.o with action:
$CC -o $TARGET -c $CFLAGS $CCFLAGS $_CCCOMCOM $SOURCES
CC build/lib/newlib_wrap/putc.o
Building build/lib/newlib_wrap/putchar.o with action:
$CC -o $TARGET -c $CFLAGS $CCFLAGS $_CCCOMCOM $SOURCES
CC build/lib/newlib_wrap/putchar.o
Building build/lib/newlib_wrap/puts.o with action:
$CC -o $TARGET -c $CFLAGS $CCFLAGS $_CCCOMCOM $SOURCES
CC build/lib/newlib_wrap/puts.o
Building build/lib/newlib_wrap/snprintf.o with action:
$CC -o $TARGET -c $CFLAGS $CCFLAGS $_CCCOMCOM $SOURCES
CC build/lib/newlib_wrap/snprintf.o
Building build/lib/newlib_wrap/sprintf.o with action:
$CC -o $TARGET -c $CFLAGS $CCFLAGS $_CCCOMCOM $SOURCES
CC build/lib/newlib_wrap/sprintf.o
Building build/lib/newlib_wrap/vfprintf.o with action:
$CC -o $TARGET -c $CFLAGS $CCFLAGS $_CCCOMCOM $SOURCES
CC build/lib/newlib_wrap/vfprintf.o
Building build/lib/newlib_wrap/vprintf.o with action:
$CC -o $TARGET -c $CFLAGS $CCFLAGS $_CCCOMCOM $SOURCES
CC build/lib/newlib_wrap/vprintf.o
Building build/lib/newlib_wrap/vsnprintf.o with action:
$CC -o $TARGET -c $CFLAGS $CCFLAGS $_CCCOMCOM $SOURCES
CC build/lib/newlib_wrap/vsnprintf.o
Building build/lib/newlib_wrap/vsprintf.o with action:
$CC -o $TARGET -c $CFLAGS $CCFLAGS $_CCCOMCOM $SOURCES
CC build/lib/newlib_wrap/vsprintf.o
Building build/tests/hello_world/hello_world.o with action:
$CC -o $TARGET -c $CFLAGS $CCFLAGS $_CCCOMCOM $SOURCES
CC build/tests/hello_world/hello_world.o
tests/cases/hello_world/hello_world.c: In function 'main':
tests/cases/hello_world/hello_world.c:39:1: warning: this 'else' clause does not guard... [-Wmisleading-indentation]
39 | else
| ^~~~
tests/cases/hello_world/hello_world.c:41:3: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'else'
41 |   printf("after ASM c is changed to %d!\n",c);
|   ^~~~~~
Building hello_world.elf with action:
$LINK -o $TARGET $LINKFLAGS $__RPATH $SOURCES $_LIBDIRFLAGS $_LIBFLAGS
LINK hello_world.elf
/opt/picocom/ThirdParty_Libs/T-head/C920_R2S0P21/C920_R2S0_manuals_and_tools/manuals_and_tools/08_toolchain_900_series_cpu_toolchain/V2.8.0/Xuantie-900-gcc-elf-newlib-x86_64-V2.8.0/bin/../lib/gcc/riscv64-unknown-elf/10.4.0/../../../../riscv64-unknown-elf/bin/ld: /opt/picocom/ThirdParty_Libs/T-head/C920_R2S0P21/C920_R2S0_manuals_and_tools/manuals_and_tools/08_toolchain_900_series_cpu_toolchain/V2.8.0/Xuantie-900-gcc-elf-newlib-x86_64-V2.8.0/bin/../lib/gcc/riscv64-unknown-elf/10.4.0/../../../../riscv64-unknown-elf/lib/rv64imafdcv_zfh_xtheadc/lp64d/crt0.o: in function _start': (.text+0x0): undefined reference to __global_pointer$'
/opt/picocom/ThirdParty_Libs/T-head/C920_R2S0P21/C920_R2S0_manuals_and_tools/manuals_and_tools/08_toolchain_900_series_cpu_toolchain/V2.8.0/Xuantie-900-gcc-elf-newlib-x86_64-V2.8.0/bin/../lib/gcc/riscv64-unknown-elf/10.4.0/../../../../riscv64-unknown-elf/bin/ld: (.text+0x8): undefined reference to _edata' /opt/picocom/ThirdParty_Libs/T-head/C920_R2S0P21/C920_R2S0_manuals_and_tools/manuals_and_tools/08_toolchain_900_series_cpu_toolchain/V2.8.0/Xuantie-900-gcc-elf-newlib-x86_64-V2.8.0/bin/../lib/gcc/riscv64-unknown-elf/10.4.0/../../../../riscv64-unknown-elf/bin/ld: (.text+0x10): undefined reference to _end'
/opt/picocom/ThirdParty_Libs/T-head/C920_R2S0P21/C920_R2S0_manuals_and_tools/manuals_and_tools/08_toolchain_900_series_cpu_toolchain/V2.8.0/Xuantie-900-gcc-elf-newlib-x86_64-V2.8.0/bin/../lib/gcc/riscv64-unknown-elf/10.4.0/../../../../riscv64-unknown-elf/bin/ld: (.text+0x32): undefined reference to __libc_init_array' /opt/picocom/ThirdParty_Libs/T-head/C920_R2S0P21/C920_R2S0_manuals_and_tools/manuals_and_tools/08_toolchain_900_series_cpu_toolchain/V2.8.0/Xuantie-900-gcc-elf-newlib-x86_64-V2.8.0/bin/../lib/gcc/riscv64-unknown-elf/10.4.0/../../../../riscv64-unknown-elf/bin/ld: (.text+0x44): undefined reference to exit'
collect2: error: ld returned 1 exit status
scons: *** [hello_world.elf] Error 1

@bdbaddog
scons_demo.tar.gz
Attached is a small example, please help to look at it thanks.
Below is the log:
Building lib/clib/fputc.o with action:
$CC -o $TARGET -c $CFLAGS $CCFLAGS $_CCCOMCOM $SOURCES
/opt/picocom/ThirdParty_Libs/T-head/C920_R2S0P21/C920_R2S0_manuals_and_tools/manuals_and_tools/08_toolchain_900_series_cpu_toolchain/V2.8.0/Xuantie-900-gcc-elf-newlib-x86_64-V2.8.0/bin/riscv64-unknown-elf-gcc -o lib/clib/fputc.o -c -O1 -g -Wall -Ilib/clib -Ilib/newlib_wrap -Ilib/init lib/clib/fputc.c
/opt/picocom/ThirdParty_Libs/T-head/C920_R2S0P21/C920_R2S0_manuals_and_tools/manuals_and_tools/08_toolchain_900_series_cpu_toolchain/V2.8.0/Xuantie-900-gcc-elf-newlib-x86_64-V2.8.0/riscv64-unknown-elf/include/stdio.h: In function 'fputc':
lib/clib/fputc.c:19:1: warning: control reaches end of non-void function [-Wreturn-type]
19 | }
| ^
Building lib/clib/intc.o with action:
$CC -o $TARGET -c $CFLAGS $CCFLAGS $_CCCOMCOM $SOURCES
/opt/picocom/ThirdParty_Libs/T-head/C920_R2S0P21/C920_R2S0_manuals_and_tools/manuals_and_tools/08_toolchain_900_series_cpu_toolchain/V2.8.0/Xuantie-900-gcc-elf-newlib-x86_64-V2.8.0/bin/riscv64-unknown-elf-gcc -o lib/clib/intc.o -c -O1 -g -Wall -Ilib/clib -Ilib/newlib_wrap -Ilib/init lib/clib/intc.c
lib/clib/intc.c: In function 'ck_intc_init':
lib/clib/intc.c:9:34: warning: initialization of 'int *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
9 | #define APB_BASE                 0x10000000
|                                  ^~~~~~~~~~
lib/clib/intc.c:15:17: note: in expansion of macro 'APB_BASE'
15 |     int *picr = APB_BASE;
|                 ^~~~~~~~
lib/clib/intc.c:10:34: warning: initialization of 'int *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
10 | #define INTC_BASE                0x10010000
|                                  ^~~~~~~~~~
lib/clib/intc.c:19:22: note: in expansion of macro 'INTC_BASE'
19 |         int *piser = INTC_BASE + 0x10;
|                      ^~~~~~~~~
Building lib/clib/uart.o with action:
$CC -o $TARGET -c $CFLAGS $CCFLAGS $_CCCOMCOM $SOURCES
/opt/picocom/ThirdParty_Libs/T-head/C920_R2S0P21/C920_R2S0_manuals_and_tools/manuals_and_tools/08_toolchain_900_series_cpu_toolchain/V2.8.0/Xuantie-900-gcc-elf-newlib-x86_64-V2.8.0/bin/riscv64-unknown-elf-gcc -o lib/clib/uart.o -c -O1 -g -Wall -Ilib/clib -Ilib/newlib_wrap -Ilib/init lib/clib/uart.c
lib/clib/uart.c: In function 'ck_uart_status':
lib/clib/uart.c:203:18: warning: 'uart_lsr' is used uninitialized in this function [-Wuninitialized]
203 |     if (uart_lsr & CK_LSR_TEMT)
|                  ^
Building lib/clib/vtimer.o with action:
$CC -o $TARGET -c $CFLAGS $CCFLAGS $_CCCOMCOM $SOURCES
/opt/picocom/ThirdParty_Libs/T-head/C920_R2S0P21/C920_R2S0_manuals_and_tools/manuals_and_tools/08_toolchain_900_series_cpu_toolchain/V2.8.0/Xuantie-900-gcc-elf-newlib-x86_64-V2.8.0/bin/riscv64-unknown-elf-gcc -o lib/clib/vtimer.o -c -O1 -g -Wall -Ilib/clib -Ilib/newlib_wrap -Ilib/init lib/clib/vtimer.c
lib/clib/vtimer.c: In function 'sim_end':
lib/clib/vtimer.c:21:12: warning: assignment to 'int *' from 'unsigned int' makes pointer from integer without a cast [-Wint-conversion]
21 |   END_ADDR = 0xA001FF48;
|            ^
lib/clib/vtimer.c:24:13: warning: unsigned conversion from 'long int' to 'unsigned int' changes value from '18324075042' to '1144205858' [-Woverflow]
24 |   END_DATA= 0x444333222;
|             ^~~~~~~~~~~
Building lib/newlib_wrap/__dtostr.o with action:
$CC -o $TARGET -c $CFLAGS $CCFLAGS $_CCCOMCOM $SOURCES
/opt/picocom/ThirdParty_Libs/T-head/C920_R2S0P21/C920_R2S0_manuals_and_tools/manuals_and_tools/08_toolchain_900_series_cpu_toolchain/V2.8.0/Xuantie-900-gcc-elf-newlib-x86_64-V2.8.0/bin/riscv64-unknown-elf-gcc -o lib/newlib_wrap/__dtostr.o -c -O1 -g -Wall -Ilib/clib -Ilib/newlib_wrap -Ilib/init lib/newlib_wrap/__dtostr.c
Building lib/newlib_wrap/__isinf.o with action:
$CC -o $TARGET -c $CFLAGS $CCFLAGS $_CCCOMCOM $SOURCES
/opt/picocom/ThirdParty_Libs/T-head/C920_R2S0P21/C920_R2S0_manuals_and_tools/manuals_and_tools/08_toolchain_900_series_cpu_toolchain/V2.8.0/Xuantie-900-gcc-elf-newlib-x86_64-V2.8.0/bin/riscv64-unknown-elf-gcc -o lib/newlib_wrap/__isinf.o -c -O1 -g -Wall -Ilib/clib -Ilib/newlib_wrap -Ilib/init lib/newlib_wrap/__isinf.c
Building lib/newlib_wrap/__isnan.o with action:
$CC -o $TARGET -c $CFLAGS $CCFLAGS $_CCCOMCOM $SOURCES
/opt/picocom/ThirdParty_Libs/T-head/C920_R2S0P21/C920_R2S0_manuals_and_tools/manuals_and_tools/08_toolchain_900_series_cpu_toolchain/V2.8.0/Xuantie-900-gcc-elf-newlib-x86_64-V2.8.0/bin/riscv64-unknown-elf-gcc -o lib/newlib_wrap/__isnan.o -c -O1 -g -Wall -Ilib/clib -Ilib/newlib_wrap -Ilib/init lib/newlib_wrap/__isnan.c
Building lib/newlib_wrap/__lltostr.o with action:
$CC -o $TARGET -c $CFLAGS $CCFLAGS $_CCCOMCOM $SOURCES
/opt/picocom/ThirdParty_Libs/T-head/C920_R2S0P21/C920_R2S0_manuals_and_tools/manuals_and_tools/08_toolchain_900_series_cpu_toolchain/V2.8.0/Xuantie-900-gcc-elf-newlib-x86_64-V2.8.0/bin/riscv64-unknown-elf-gcc -o lib/newlib_wrap/__lltostr.o -c -O1 -g -Wall -Ilib/clib -Ilib/newlib_wrap -Ilib/init lib/newlib_wrap/__lltostr.c
Building lib/newlib_wrap/__ltostr.o with action:
$CC -o $TARGET -c $CFLAGS $CCFLAGS $_CCCOMCOM $SOURCES
/opt/picocom/ThirdParty_Libs/T-head/C920_R2S0P21/C920_R2S0_manuals_and_tools/manuals_and_tools/08_toolchain_900_series_cpu_toolchain/V2.8.0/Xuantie-900-gcc-elf-newlib-x86_64-V2.8.0/bin/riscv64-unknown-elf-gcc -o lib/newlib_wrap/__ltostr.o -c -O1 -g -Wall -Ilib/clib -Ilib/newlib_wrap -Ilib/init lib/newlib_wrap/__ltostr.c
Building lib/newlib_wrap/__v_printf.o with action:
$CC -o $TARGET -c $CFLAGS $CCFLAGS $_CCCOMCOM $SOURCES
/opt/picocom/ThirdParty_Libs/T-head/C920_R2S0P21/C920_R2S0_manuals_and_tools/manuals_and_tools/08_toolchain_900_series_cpu_toolchain/V2.8.0/Xuantie-900-gcc-elf-newlib-x86_64-V2.8.0/bin/riscv64-unknown-elf-gcc -o lib/newlib_wrap/__v_printf.o -c -O1 -g -Wall -Ilib/clib -Ilib/newlib_wrap -Ilib/init lib/newlib_wrap/__v_printf.c
Building lib/newlib_wrap/fprintf.o with action:
$CC -o $TARGET -c $CFLAGS $CCFLAGS $_CCCOMCOM $SOURCES
/opt/picocom/ThirdParty_Libs/T-head/C920_R2S0P21/C920_R2S0_manuals_and_tools/manuals_and_tools/08_toolchain_900_series_cpu_toolchain/V2.8.0/Xuantie-900-gcc-elf-newlib-x86_64-V2.8.0/bin/riscv64-unknown-elf-gcc -o lib/newlib_wrap/fprintf.o -c -O1 -g -Wall -Ilib/clib -Ilib/newlib_wrap -Ilib/init lib/newlib_wrap/fprintf.c
Building lib/newlib_wrap/getc.o with action:
$CC -o $TARGET -c $CFLAGS $CCFLAGS $_CCCOMCOM $SOURCES
/opt/picocom/ThirdParty_Libs/T-head/C920_R2S0P21/C920_R2S0_manuals_and_tools/manuals_and_tools/08_toolchain_900_series_cpu_toolchain/V2.8.0/Xuantie-900-gcc-elf-newlib-x86_64-V2.8.0/bin/riscv64-unknown-elf-gcc -o lib/newlib_wrap/getc.o -c -O1 -g -Wall -Ilib/clib -Ilib/newlib_wrap -Ilib/init lib/newlib_wrap/getc.c
Building lib/newlib_wrap/getchar.o with action:
$CC -o $TARGET -c $CFLAGS $CCFLAGS $_CCCOMCOM $SOURCES
/opt/picocom/ThirdParty_Libs/T-head/C920_R2S0P21/C920_R2S0_manuals_and_tools/manuals_and_tools/08_toolchain_900_series_cpu_toolchain/V2.8.0/Xuantie-900-gcc-elf-newlib-x86_64-V2.8.0/bin/riscv64-unknown-elf-gcc -o lib/newlib_wrap/getchar.o -c -O1 -g -Wall -Ilib/clib -Ilib/newlib_wrap -Ilib/init lib/newlib_wrap/getchar.c
Building lib/newlib_wrap/printf.o with action:
$CC -o $TARGET -c $CFLAGS $CCFLAGS $_CCCOMCOM $SOURCES
/opt/picocom/ThirdParty_Libs/T-head/C920_R2S0P21/C920_R2S0_manuals_and_tools/manuals_and_tools/08_toolchain_900_series_cpu_toolchain/V2.8.0/Xuantie-900-gcc-elf-newlib-x86_64-V2.8.0/bin/riscv64-unknown-elf-gcc -o lib/newlib_wrap/printf.o -c -O1 -g -Wall -Ilib/clib -Ilib/newlib_wrap -Ilib/init lib/newlib_wrap/printf.c
Building lib/newlib_wrap/putc.o with action:
$CC -o $TARGET -c $CFLAGS $CCFLAGS $_CCCOMCOM $SOURCES
/opt/picocom/ThirdParty_Libs/T-head/C920_R2S0P21/C920_R2S0_manuals_and_tools/manuals_and_tools/08_toolchain_900_series_cpu_toolchain/V2.8.0/Xuantie-900-gcc-elf-newlib-x86_64-V2.8.0/bin/riscv64-unknown-elf-gcc -o lib/newlib_wrap/putc.o -c -O1 -g -Wall -Ilib/clib -Ilib/newlib_wrap -Ilib/init lib/newlib_wrap/putc.c
Building lib/newlib_wrap/putchar.o with action:
$CC -o $TARGET -c $CFLAGS $CCFLAGS $_CCCOMCOM $SOURCES
/opt/picocom/ThirdParty_Libs/T-head/C920_R2S0P21/C920_R2S0_manuals_and_tools/manuals_and_tools/08_toolchain_900_series_cpu_toolchain/V2.8.0/Xuantie-900-gcc-elf-newlib-x86_64-V2.8.0/bin/riscv64-unknown-elf-gcc -o lib/newlib_wrap/putchar.o -c -O1 -g -Wall -Ilib/clib -Ilib/newlib_wrap -Ilib/init lib/newlib_wrap/putchar.c
Building lib/newlib_wrap/puts.o with action:
$CC -o $TARGET -c $CFLAGS $CCFLAGS $_CCCOMCOM $SOURCES
/opt/picocom/ThirdParty_Libs/T-head/C920_R2S0P21/C920_R2S0_manuals_and_tools/manuals_and_tools/08_toolchain_900_series_cpu_toolchain/V2.8.0/Xuantie-900-gcc-elf-newlib-x86_64-V2.8.0/bin/riscv64-unknown-elf-gcc -o lib/newlib_wrap/puts.o -c -O1 -g -Wall -Ilib/clib -Ilib/newlib_wrap -Ilib/init lib/newlib_wrap/puts.c
Building lib/newlib_wrap/snprintf.o with action:
$CC -o $TARGET -c $CFLAGS $CCFLAGS $_CCCOMCOM $SOURCES
/opt/picocom/ThirdParty_Libs/T-head/C920_R2S0P21/C920_R2S0_manuals_and_tools/manuals_and_tools/08_toolchain_900_series_cpu_toolchain/V2.8.0/Xuantie-900-gcc-elf-newlib-x86_64-V2.8.0/bin/riscv64-unknown-elf-gcc -o lib/newlib_wrap/snprintf.o -c -O1 -g -Wall -Ilib/clib -Ilib/newlib_wrap -Ilib/init lib/newlib_wrap/snprintf.c
Building lib/newlib_wrap/sprintf.o with action:
$CC -o $TARGET -c $CFLAGS $CCFLAGS $_CCCOMCOM $SOURCES
/opt/picocom/ThirdParty_Libs/T-head/C920_R2S0P21/C920_R2S0_manuals_and_tools/manuals_and_tools/08_toolchain_900_series_cpu_toolchain/V2.8.0/Xuantie-900-gcc-elf-newlib-x86_64-V2.8.0/bin/riscv64-unknown-elf-gcc -o lib/newlib_wrap/sprintf.o -c -O1 -g -Wall -Ilib/clib -Ilib/newlib_wrap -Ilib/init lib/newlib_wrap/sprintf.c
Building lib/newlib_wrap/vfprintf.o with action:
$CC -o $TARGET -c $CFLAGS $CCFLAGS $_CCCOMCOM $SOURCES
/opt/picocom/ThirdParty_Libs/T-head/C920_R2S0P21/C920_R2S0_manuals_and_tools/manuals_and_tools/08_toolchain_900_series_cpu_toolchain/V2.8.0/Xuantie-900-gcc-elf-newlib-x86_64-V2.8.0/bin/riscv64-unknown-elf-gcc -o lib/newlib_wrap/vfprintf.o -c -O1 -g -Wall -Ilib/clib -Ilib/newlib_wrap -Ilib/init lib/newlib_wrap/vfprintf.c
Building lib/newlib_wrap/vprintf.o with action:
$CC -o $TARGET -c $CFLAGS $CCFLAGS $_CCCOMCOM $SOURCES
/opt/picocom/ThirdParty_Libs/T-head/C920_R2S0P21/C920_R2S0_manuals_and_tools/manuals_and_tools/08_toolchain_900_series_cpu_toolchain/V2.8.0/Xuantie-900-gcc-elf-newlib-x86_64-V2.8.0/bin/riscv64-unknown-elf-gcc -o lib/newlib_wrap/vprintf.o -c -O1 -g -Wall -Ilib/clib -Ilib/newlib_wrap -Ilib/init lib/newlib_wrap/vprintf.c
Building lib/newlib_wrap/vsnprintf.o with action:
$CC -o $TARGET -c $CFLAGS $CCFLAGS $_CCCOMCOM $SOURCES
/opt/picocom/ThirdParty_Libs/T-head/C920_R2S0P21/C920_R2S0_manuals_and_tools/manuals_and_tools/08_toolchain_900_series_cpu_toolchain/V2.8.0/Xuantie-900-gcc-elf-newlib-x86_64-V2.8.0/bin/riscv64-unknown-elf-gcc -o lib/newlib_wrap/vsnprintf.o -c -O1 -g -Wall -Ilib/clib -Ilib/newlib_wrap -Ilib/init lib/newlib_wrap/vsnprintf.c
Building lib/newlib_wrap/vsprintf.o with action:
$CC -o $TARGET -c $CFLAGS $CCFLAGS $_CCCOMCOM $SOURCES
/opt/picocom/ThirdParty_Libs/T-head/C920_R2S0P21/C920_R2S0_manuals_and_tools/manuals_and_tools/08_toolchain_900_series_cpu_toolchain/V2.8.0/Xuantie-900-gcc-elf-newlib-x86_64-V2.8.0/bin/riscv64-unknown-elf-gcc -o lib/newlib_wrap/vsprintf.o -c -O1 -g -Wall -Ilib/clib -Ilib/newlib_wrap -Ilib/init lib/newlib_wrap/vsprintf.c
Building hello_world.o with action:
$CC -o $TARGET -c $CFLAGS $CCFLAGS $_CCCOMCOM $SOURCES
/opt/picocom/ThirdParty_Libs/T-head/C920_R2S0P21/C920_R2S0_manuals_and_tools/manuals_and_tools/08_toolchain_900_series_cpu_toolchain/V2.8.0/Xuantie-900-gcc-elf-newlib-x86_64-V2.8.0/bin/riscv64-unknown-elf-gcc -o hello_world.o -c -O1 -g -Wall -Ilib/clib -Ilib/newlib_wrap -Ilib/init hello_world.c
hello_world.c: In function 'main':
hello_world.c:39:1: warning: this 'else' clause does not guard... [-Wmisleading-indentation]
39 | else
| ^~~~
hello_world.c:41:3: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'else'
41 |   printf("after ASM c is changed to %d!\n",c);
|   ^~~~~~
Building lib/init/core_cp0.o with action:
$AS $ASFLAGS -o $TARGET $SOURCES
/opt/picocom/ThirdParty_Libs/T-head/C920_R2S0P21/C920_R2S0_manuals_and_tools/manuals_and_tools/08_toolchain_900_series_cpu_toolchain/V2.8.0/Xuantie-900-gcc-elf-newlib-x86_64-V2.8.0/bin/riscv64-unknown-elf-gcc -g -o lib/init/core_cp0.o lib/init/core_cp0.s
/opt/picocom/ThirdParty_Libs/T-head/C920_R2S0P21/C920_R2S0_manuals_and_tools/manuals_and_tools/08_toolchain_900_series_cpu_toolchain/V2.8.0/Xuantie-900-gcc-elf-newlib-x86_64-V2.8.0/bin/../lib/gcc/riscv64-unknown-elf/10.4.0/../../../../riscv64-unknown-elf/bin/ld: /opt/picocom/ThirdParty_Libs/T-head/C920_R2S0P21/C920_R2S0_manuals_and_tools/manuals_and_tools/08_toolchain_900_series_cpu_toolchain/V2.8.0/Xuantie-900-gcc-elf-newlib-x86_64-V2.8.0/bin/../lib/gcc/riscv64-unknown-elf/10.4.0/../../../../riscv64-unknown-elf/lib/rv64imafdc_zfh_xtheadc/lp64d/crt0.o: in function .L0 ': (.text+0x38): undefined reference to main'
collect2: error: ld returned 1 exit status
scons: *** [lib/init/core_cp0.o] Error 1

At a first glance, the setting of AS seems dodgy - you normally don't want to use gcc as "the assembler". At least in the snip just above, you have:
Building lib/init/core_cp0.o with action:
  $AS $ASFLAGS -o $TARGET $SOURCES
LONGPREFIX/bin/riscv64-unknown-elf-gcc -g -o lib/init/core_cp0.o lib/init/core_cp0.s

and then an error from the linker, indicating it's trying to make a program out of it, rather than an object:
ZZZ/lp64d/crt0.o: in function `.L0 ':
(.text+0x38): undefined reference to `main'
collect2: error: ld returned 1 exit status

I'd expect the line from building this object file from assembly to look like:
LONGPREFIX/bin/riscv64-unknown-elf-as -g -o lib/init/core_cp0.o lib/init/core_cp0.s

Maybe if you try that change first, we can see if there are other issues.

EDITED: that is, in the SConstruct, make a change like:
-AS      = PREFIX + 'gcc'
+AS      = PREFIX + 'as'

Thanks for your help. @mwichmann
After EDITED AS      = PREFIX + 'as'
Report below logs:

Building lib/init/core_cp0.o with action:
$AS $ASFLAGS -o $TARGET $SOURCES
/opt/picocom/ThirdParty_Libs/T-head/C920_R2S0P21/C920_R2S0_manuals_and_tools/manuals_and_tools/08_toolchain_900_series_cpu_toolchain/V2.8.0/Xuantie-900-gcc-elf-newlib-x86_64-V2.8.0/bin/riscv64-unknown-elf-as -g -o lib/init/core_cp0.o lib/init/core_cp0.s
Building lib/init/core_ifu.o with action:
$AS $ASFLAGS -o $TARGET $SOURCES
/opt/picocom/ThirdParty_Libs/T-head/C920_R2S0P21/C920_R2S0_manuals_and_tools/manuals_and_tools/08_toolchain_900_series_cpu_toolchain/V2.8.0/Xuantie-900-gcc-elf-newlib-x86_64-V2.8.0/bin/riscv64-unknown-elf-as -g -o lib/init/core_ifu.o lib/init/core_ifu.s
Building lib/init/core_l2c.o with action:
$AS $ASFLAGS -o $TARGET $SOURCES
/opt/picocom/ThirdParty_Libs/T-head/C920_R2S0P21/C920_R2S0_manuals_and_tools/manuals_and_tools/08_toolchain_900_series_cpu_toolchain/V2.8.0/Xuantie-900-gcc-elf-newlib-x86_64-V2.8.0/bin/riscv64-unknown-elf-as -g -o lib/init/core_l2c.o lib/init/core_l2c.s
Building lib/init/core_lsu.o with action:
$AS $ASFLAGS -o $TARGET $SOURCES
/opt/picocom/ThirdParty_Libs/T-head/C920_R2S0P21/C920_R2S0_manuals_and_tools/manuals_and_tools/08_toolchain_900_series_cpu_toolchain/V2.8.0/Xuantie-900-gcc-elf-newlib-x86_64-V2.8.0/bin/riscv64-unknown-elf-as -g -o lib/init/core_lsu.o lib/init/core_lsu.s
Building lib/init/core_mmu.o with action:
$AS $ASFLAGS -o $TARGET $SOURCES
/opt/picocom/ThirdParty_Libs/T-head/C920_R2S0P21/C920_R2S0_manuals_and_tools/manuals_and_tools/08_toolchain_900_series_cpu_toolchain/V2.8.0/Xuantie-900-gcc-elf-newlib-x86_64-V2.8.0/bin/riscv64-unknown-elf-as -g -o lib/init/core_mmu.o lib/init/core_mmu.s
Building lib/init/core_plic.o with action:
$AS $ASFLAGS -o $TARGET $SOURCES
/opt/picocom/ThirdParty_Libs/T-head/C920_R2S0P21/C920_R2S0_manuals_and_tools/manuals_and_tools/08_toolchain_900_series_cpu_toolchain/V2.8.0/Xuantie-900-gcc-elf-newlib-x86_64-V2.8.0/bin/riscv64-unknown-elf-as -g -o lib/init/core_plic.o lib/init/core_plic.s
Building lib/init/core_t_extension.o with action:
$AS $ASFLAGS -o $TARGET $SOURCES
/opt/picocom/ThirdParty_Libs/T-head/C920_R2S0P21/C920_R2S0_manuals_and_tools/manuals_and_tools/08_toolchain_900_series_cpu_toolchain/V2.8.0/Xuantie-900-gcc-elf-newlib-x86_64-V2.8.0/bin/riscv64-unknown-elf-as -g -o lib/init/core_t_extension.o lib/init/core_t_extension.s
Building lib/init/core_vec.o with action:
$AS $ASFLAGS -o $TARGET $SOURCES
/opt/picocom/ThirdParty_Libs/T-head/C920_R2S0P21/C920_R2S0_manuals_and_tools/manuals_and_tools/08_toolchain_900_series_cpu_toolchain/V2.8.0/Xuantie-900-gcc-elf-newlib-x86_64-V2.8.0/bin/riscv64-unknown-elf-as -g -o lib/init/core_vec.o lib/init/core_vec.s
Building lib/init/crt0.o with action:
$AS $ASFLAGS -o $TARGET $SOURCES
/opt/picocom/ThirdParty_Libs/T-head/C920_R2S0P21/C920_R2S0_manuals_and_tools/manuals_and_tools/08_toolchain_900_series_cpu_toolchain/V2.8.0/Xuantie-900-gcc-elf-newlib-x86_64-V2.8.0/bin/riscv64-unknown-elf-as -g -o lib/init/crt0.o lib/init/crt0.s
lib/init/crt0.s: Assembler messages:
lib/init/crt0.s:9: Error: can't open core_init.h for reading: No such file or directory
lib/init/crt0.s:136: Error: unrecognized opcode sync' lib/init/crt0.s:147: Error: unrecognized opcode sync'
scons: *** [lib/init/crt0.o] Error 1

Definitely making progress, a header-include problem should just require adding to the right SCons construction variable. @bdbaddog - is $CPPATH applied to assembler, too?

@bdbaddog
(myenv) lushan: /ssd_fes/jiongz/desktop/github/sifive/scons_demo$ /opt/picocom/ThirdParty_Libs/T-head/C920_R2S0P21/C920_R2S0_manuals_and_tools/manuals_and_tools/08_toolchain_900_series_cpu_toolchain/V2.8.0/Xuantie-900-gcc-elf-newlib-x86_64-V2.8.0/bin/riscv64-unknown-elf-as -g -o lib/init/crt0.o lib/init/crt0.s
lib/init/crt0.s: Assembler messages:
lib/init/crt0.s:9: Error: can't open core_init.h for reading: No such file or directory
lib/init/crt0.s:136: Error: unrecognized opcode sync' lib/init/crt0.s:147: Error: unrecognized opcode sync'
Actually, I've been using gcc to compile .s files, and I don't have this problem with gcc.

I changed to scons flow from an old makefile that had the following code in it.
CC      = ${TOOL_EXTENSION}/riscv64-unknown-elf-gcc
AS      = ${TOOL_EXTENSION}/riscv64-unknown-elf-as
LINK    = ${TOOL_EXTENSION}/riscv64-unknown-elf-ld
OBJDUMP = ${TOOL_EXTENSION}/riscv64-unknown-elf-objdump
OBJCOPY = ${TOOL_EXTENSION}/riscv64-unknown-elf-objcopy
CONVERT	=../tests/bin/Srec2vmem
%.o : %.c
	${CC} -c ${CFLAGS} -o $@ $<

%.o : %.s
	${CC} -c ${CFLAGS} -o $@ $<

%.o : %.S
	${CC} -c ${CFLAGS} -o $@ $<

${FILE}.elf : ${OBJECTS} linker.lcf
	${CC} ${LINKFLAGS} ${LINKLIBS} ${OBJECTS} -o $@ -lm

What you can look at is the .s file compiled with riscv64-unknown-elf-gcc

Try adding this at line 160
env['ASCOM'] = env['ASPPCOM']

@bdbaddog

Building lib/clib/fputc.o with action:
$CC -o $TARGET -c $CFLAGS $CCFLAGS $_CCCOMCOM $SOURCES
/opt/picocom/ThirdParty_Libs/T-head/C920_R2S0P21/C920_R2S0_manuals_and_tools/manuals_and_tools/08_toolchain_900_series_cpu_toolchain/V2.8.0/Xuantie-900-gcc-elf-newlib-x86_64-V2.8.0/bin/riscv64-unknown-elf-gcc -o lib/clib/fputc.o -c -O1 -g -Wall -Ilib/clib -Ilib/newlib_wrap -Ilib/init lib/clib/fputc.c
/opt/picocom/ThirdParty_Libs/T-head/C920_R2S0P21/C920_R2S0_manuals_and_tools/manuals_and_tools/08_toolchain_900_series_cpu_toolchain/V2.8.0/Xuantie-900-gcc-elf-newlib-x86_64-V2.8.0/riscv64-unknown-elf/include/stdio.h: In function 'fputc':
lib/clib/fputc.c:19:1: warning: control reaches end of non-void function [-Wreturn-type]
19 | }
| ^
Building lib/clib/intc.o with action:
$CC -o $TARGET -c $CFLAGS $CCFLAGS $_CCCOMCOM $SOURCES
/opt/picocom/ThirdParty_Libs/T-head/C920_R2S0P21/C920_R2S0_manuals_and_tools/manuals_and_tools/08_toolchain_900_series_cpu_toolchain/V2.8.0/Xuantie-900-gcc-elf-newlib-x86_64-V2.8.0/bin/riscv64-unknown-elf-gcc -o lib/clib/intc.o -c -O1 -g -Wall -Ilib/clib -Ilib/newlib_wrap -Ilib/init lib/clib/intc.c
lib/clib/intc.c: In function 'ck_intc_init':
lib/clib/intc.c:9:34: warning: initialization of 'int *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
9 | #define APB_BASE                 0x10000000
|                                  ^~~~~~~~~~
lib/clib/intc.c:15:17: note: in expansion of macro 'APB_BASE'
15 |     int *picr = APB_BASE;
|                 ^~~~~~~~
lib/clib/intc.c:10:34: warning: initialization of 'int *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
10 | #define INTC_BASE                0x10010000
|                                  ^~~~~~~~~~
lib/clib/intc.c:19:22: note: in expansion of macro 'INTC_BASE'
19 |         int *piser = INTC_BASE + 0x10;
|                      ^~~~~~~~~
Building lib/clib/uart.o with action:
$CC -o $TARGET -c $CFLAGS $CCFLAGS $_CCCOMCOM $SOURCES
/opt/picocom/ThirdParty_Libs/T-head/C920_R2S0P21/C920_R2S0_manuals_and_tools/manuals_and_tools/08_toolchain_900_series_cpu_toolchain/V2.8.0/Xuantie-900-gcc-elf-newlib-x86_64-V2.8.0/bin/riscv64-unknown-elf-gcc -o lib/clib/uart.o -c -O1 -g -Wall -Ilib/clib -Ilib/newlib_wrap -Ilib/init lib/clib/uart.c
lib/clib/uart.c: In function 'ck_uart_status':
lib/clib/uart.c:203:18: warning: 'uart_lsr' is used uninitialized in this function [-Wuninitialized]
203 |     if (uart_lsr & CK_LSR_TEMT)
|                  ^
Building lib/clib/vtimer.o with action:
$CC -o $TARGET -c $CFLAGS $CCFLAGS $_CCCOMCOM $SOURCES
/opt/picocom/ThirdParty_Libs/T-head/C920_R2S0P21/C920_R2S0_manuals_and_tools/manuals_and_tools/08_toolchain_900_series_cpu_toolchain/V2.8.0/Xuantie-900-gcc-elf-newlib-x86_64-V2.8.0/bin/riscv64-unknown-elf-gcc -o lib/clib/vtimer.o -c -O1 -g -Wall -Ilib/clib -Ilib/newlib_wrap -Ilib/init lib/clib/vtimer.c
lib/clib/vtimer.c: In function 'sim_end':
lib/clib/vtimer.c:21:12: warning: assignment to 'int *' from 'unsigned int' makes pointer from integer without a cast [-Wint-conversion]
21 |   END_ADDR = 0xA001FF48;
|            ^
lib/clib/vtimer.c:24:13: warning: unsigned conversion from 'long int' to 'unsigned int' changes value from '18324075042' to '1144205858' [-Woverflow]
24 |   END_DATA= 0x444333222;
|             ^~~~~~~~~~~
Building lib/newlib_wrap/__dtostr.o with action:
$CC -o $TARGET -c $CFLAGS $CCFLAGS $_CCCOMCOM $SOURCES
/opt/picocom/ThirdParty_Libs/T-head/C920_R2S0P21/C920_R2S0_manuals_and_tools/manuals_and_tools/08_toolchain_900_series_cpu_toolchain/V2.8.0/Xuantie-900-gcc-elf-newlib-x86_64-V2.8.0/bin/riscv64-unknown-elf-gcc -o lib/newlib_wrap/__dtostr.o -c -O1 -g -Wall -Ilib/clib -Ilib/newlib_wrap -Ilib/init lib/newlib_wrap/__dtostr.c
Building lib/newlib_wrap/__isinf.o with action:
$CC -o $TARGET -c $CFLAGS $CCFLAGS $_CCCOMCOM $SOURCES
/opt/picocom/ThirdParty_Libs/T-head/C920_R2S0P21/C920_R2S0_manuals_and_tools/manuals_and_tools/08_toolchain_900_series_cpu_toolchain/V2.8.0/Xuantie-900-gcc-elf-newlib-x86_64-V2.8.0/bin/riscv64-unknown-elf-gcc -o lib/newlib_wrap/__isinf.o -c -O1 -g -Wall -Ilib/clib -Ilib/newlib_wrap -Ilib/init lib/newlib_wrap/__isinf.c
Building lib/newlib_wrap/__isnan.o with action:
$CC -o $TARGET -c $CFLAGS $CCFLAGS $_CCCOMCOM $SOURCES
/opt/picocom/ThirdParty_Libs/T-head/C920_R2S0P21/C920_R2S0_manuals_and_tools/manuals_and_tools/08_toolchain_900_series_cpu_toolchain/V2.8.0/Xuantie-900-gcc-elf-newlib-x86_64-V2.8.0/bin/riscv64-unknown-elf-gcc -o lib/newlib_wrap/__isnan.o -c -O1 -g -Wall -Ilib/clib -Ilib/newlib_wrap -Ilib/init lib/newlib_wrap/__isnan.c
Building lib/newlib_wrap/__lltostr.o with action:
$CC -o $TARGET -c $CFLAGS $CCFLAGS $_CCCOMCOM $SOURCES
/opt/picocom/ThirdParty_Libs/T-head/C920_R2S0P21/C920_R2S0_manuals_and_tools/manuals_and_tools/08_toolchain_900_series_cpu_toolchain/V2.8.0/Xuantie-900-gcc-elf-newlib-x86_64-V2.8.0/bin/riscv64-unknown-elf-gcc -o lib/newlib_wrap/__lltostr.o -c -O1 -g -Wall -Ilib/clib -Ilib/newlib_wrap -Ilib/init lib/newlib_wrap/__lltostr.c
Building lib/newlib_wrap/__ltostr.o with action:
$CC -o $TARGET -c $CFLAGS $CCFLAGS $_CCCOMCOM $SOURCES
/opt/picocom/ThirdParty_Libs/T-head/C920_R2S0P21/C920_R2S0_manuals_and_tools/manuals_and_tools/08_toolchain_900_series_cpu_toolchain/V2.8.0/Xuantie-900-gcc-elf-newlib-x86_64-V2.8.0/bin/riscv64-unknown-elf-gcc -o lib/newlib_wrap/__ltostr.o -c -O1 -g -Wall -Ilib/clib -Ilib/newlib_wrap -Ilib/init lib/newlib_wrap/__ltostr.c
Building lib/newlib_wrap/__v_printf.o with action:
$CC -o $TARGET -c $CFLAGS $CCFLAGS $_CCCOMCOM $SOURCES
/opt/picocom/ThirdParty_Libs/T-head/C920_R2S0P21/C920_R2S0_manuals_and_tools/manuals_and_tools/08_toolchain_900_series_cpu_toolchain/V2.8.0/Xuantie-900-gcc-elf-newlib-x86_64-V2.8.0/bin/riscv64-unknown-elf-gcc -o lib/newlib_wrap/__v_printf.o -c -O1 -g -Wall -Ilib/clib -Ilib/newlib_wrap -Ilib/init lib/newlib_wrap/__v_printf.c
Building lib/newlib_wrap/fprintf.o with action:
$CC -o $TARGET -c $CFLAGS $CCFLAGS $_CCCOMCOM $SOURCES
/opt/picocom/ThirdParty_Libs/T-head/C920_R2S0P21/C920_R2S0_manuals_and_tools/manuals_and_tools/08_toolchain_900_series_cpu_toolchain/V2.8.0/Xuantie-900-gcc-elf-newlib-x86_64-V2.8.0/bin/riscv64-unknown-elf-gcc -o lib/newlib_wrap/fprintf.o -c -O1 -g -Wall -Ilib/clib -Ilib/newlib_wrap -Ilib/init lib/newlib_wrap/fprintf.c
Building lib/newlib_wrap/getc.o with action:
$CC -o $TARGET -c $CFLAGS $CCFLAGS $_CCCOMCOM $SOURCES
/opt/picocom/ThirdParty_Libs/T-head/C920_R2S0P21/C920_R2S0_manuals_and_tools/manuals_and_tools/08_toolchain_900_series_cpu_toolchain/V2.8.0/Xuantie-900-gcc-elf-newlib-x86_64-V2.8.0/bin/riscv64-unknown-elf-gcc -o lib/newlib_wrap/getc.o -c -O1 -g -Wall -Ilib/clib -Ilib/newlib_wrap -Ilib/init lib/newlib_wrap/getc.c
Building lib/newlib_wrap/getchar.o with action:
$CC -o $TARGET -c $CFLAGS $CCFLAGS $_CCCOMCOM $SOURCES
/opt/picocom/ThirdParty_Libs/T-head/C920_R2S0P21/C920_R2S0_manuals_and_tools/manuals_and_tools/08_toolchain_900_series_cpu_toolchain/V2.8.0/Xuantie-900-gcc-elf-newlib-x86_64-V2.8.0/bin/riscv64-unknown-elf-gcc -o lib/newlib_wrap/getchar.o -c -O1 -g -Wall -Ilib/clib -Ilib/newlib_wrap -Ilib/init lib/newlib_wrap/getchar.c
Building lib/newlib_wrap/printf.o with action:
$CC -o $TARGET -c $CFLAGS $CCFLAGS $_CCCOMCOM $SOURCES
/opt/picocom/ThirdParty_Libs/T-head/C920_R2S0P21/C920_R2S0_manuals_and_tools/manuals_and_tools/08_toolchain_900_series_cpu_toolchain/V2.8.0/Xuantie-900-gcc-elf-newlib-x86_64-V2.8.0/bin/riscv64-unknown-elf-gcc -o lib/newlib_wrap/printf.o -c -O1 -g -Wall -Ilib/clib -Ilib/newlib_wrap -Ilib/init lib/newlib_wrap/printf.c
Building lib/newlib_wrap/putc.o with action:
$CC -o $TARGET -c $CFLAGS $CCFLAGS $_CCCOMCOM $SOURCES
/opt/picocom/ThirdParty_Libs/T-head/C920_R2S0P21/C920_R2S0_manuals_and_tools/manuals_and_tools/08_toolchain_900_series_cpu_toolchain/V2.8.0/Xuantie-900-gcc-elf-newlib-x86_64-V2.8.0/bin/riscv64-unknown-elf-gcc -o lib/newlib_wrap/putc.o -c -O1 -g -Wall -Ilib/clib -Ilib/newlib_wrap -Ilib/init lib/newlib_wrap/putc.c
Building lib/newlib_wrap/putchar.o with action:
$CC -o $TARGET -c $CFLAGS $CCFLAGS $_CCCOMCOM $SOURCES
/opt/picocom/ThirdParty_Libs/T-head/C920_R2S0P21/C920_R2S0_manuals_and_tools/manuals_and_tools/08_toolchain_900_series_cpu_toolchain/V2.8.0/Xuantie-900-gcc-elf-newlib-x86_64-V2.8.0/bin/riscv64-unknown-elf-gcc -o lib/newlib_wrap/putchar.o -c -O1 -g -Wall -Ilib/clib -Ilib/newlib_wrap -Ilib/init lib/newlib_wrap/putchar.c
Building lib/newlib_wrap/puts.o with action:
$CC -o $TARGET -c $CFLAGS $CCFLAGS $_CCCOMCOM $SOURCES
/opt/picocom/ThirdParty_Libs/T-head/C920_R2S0P21/C920_R2S0_manuals_and_tools/manuals_and_tools/08_toolchain_900_series_cpu_toolchain/V2.8.0/Xuantie-900-gcc-elf-newlib-x86_64-V2.8.0/bin/riscv64-unknown-elf-gcc -o lib/newlib_wrap/puts.o -c -O1 -g -Wall -Ilib/clib -Ilib/newlib_wrap -Ilib/init lib/newlib_wrap/puts.c
Building lib/newlib_wrap/snprintf.o with action:
$CC -o $TARGET -c $CFLAGS $CCFLAGS $_CCCOMCOM $SOURCES
/opt/picocom/ThirdParty_Libs/T-head/C920_R2S0P21/C920_R2S0_manuals_and_tools/manuals_and_tools/08_toolchain_900_series_cpu_toolchain/V2.8.0/Xuantie-900-gcc-elf-newlib-x86_64-V2.8.0/bin/riscv64-unknown-elf-gcc -o lib/newlib_wrap/snprintf.o -c -O1 -g -Wall -Ilib/clib -Ilib/newlib_wrap -Ilib/init lib/newlib_wrap/snprintf.c
Building lib/newlib_wrap/sprintf.o with action:
$CC -o $TARGET -c $CFLAGS $CCFLAGS $_CCCOMCOM $SOURCES
/opt/picocom/ThirdParty_Libs/T-head/C920_R2S0P21/C920_R2S0_manuals_and_tools/manuals_and_tools/08_toolchain_900_series_cpu_toolchain/V2.8.0/Xuantie-900-gcc-elf-newlib-x86_64-V2.8.0/bin/riscv64-unknown-elf-gcc -o lib/newlib_wrap/sprintf.o -c -O1 -g -Wall -Ilib/clib -Ilib/newlib_wrap -Ilib/init lib/newlib_wrap/sprintf.c
Building lib/newlib_wrap/vfprintf.o with action:
$CC -o $TARGET -c $CFLAGS $CCFLAGS $_CCCOMCOM $SOURCES
/opt/picocom/ThirdParty_Libs/T-head/C920_R2S0P21/C920_R2S0_manuals_and_tools/manuals_and_tools/08_toolchain_900_series_cpu_toolchain/V2.8.0/Xuantie-900-gcc-elf-newlib-x86_64-V2.8.0/bin/riscv64-unknown-elf-gcc -o lib/newlib_wrap/vfprintf.o -c -O1 -g -Wall -Ilib/clib -Ilib/newlib_wrap -Ilib/init lib/newlib_wrap/vfprintf.c
Building lib/newlib_wrap/vprintf.o with action:
$CC -o $TARGET -c $CFLAGS $CCFLAGS $_CCCOMCOM $SOURCES
/opt/picocom/ThirdParty_Libs/T-head/C920_R2S0P21/C920_R2S0_manuals_and_tools/manuals_and_tools/08_toolchain_900_series_cpu_toolchain/V2.8.0/Xuantie-900-gcc-elf-newlib-x86_64-V2.8.0/bin/riscv64-unknown-elf-gcc -o lib/newlib_wrap/vprintf.o -c -O1 -g -Wall -Ilib/clib -Ilib/newlib_wrap -Ilib/init lib/newlib_wrap/vprintf.c
Building lib/newlib_wrap/vsnprintf.o with action:
$CC -o $TARGET -c $CFLAGS $CCFLAGS $_CCCOMCOM $SOURCES
/opt/picocom/ThirdParty_Libs/T-head/C920_R2S0P21/C920_R2S0_manuals_and_tools/manuals_and_tools/08_toolchain_900_series_cpu_toolchain/V2.8.0/Xuantie-900-gcc-elf-newlib-x86_64-V2.8.0/bin/riscv64-unknown-elf-gcc -o lib/newlib_wrap/vsnprintf.o -c -O1 -g -Wall -Ilib/clib -Ilib/newlib_wrap -Ilib/init lib/newlib_wrap/vsnprintf.c
Building lib/newlib_wrap/vsprintf.o with action:
$CC -o $TARGET -c $CFLAGS $CCFLAGS $_CCCOMCOM $SOURCES
/opt/picocom/ThirdParty_Libs/T-head/C920_R2S0P21/C920_R2S0_manuals_and_tools/manuals_and_tools/08_toolchain_900_series_cpu_toolchain/V2.8.0/Xuantie-900-gcc-elf-newlib-x86_64-V2.8.0/bin/riscv64-unknown-elf-gcc -o lib/newlib_wrap/vsprintf.o -c -O1 -g -Wall -Ilib/clib -Ilib/newlib_wrap -Ilib/init lib/newlib_wrap/vsprintf.c
Building hello_world.o with action:
$CC -o $TARGET -c $CFLAGS $CCFLAGS $_CCCOMCOM $SOURCES
/opt/picocom/ThirdParty_Libs/T-head/C920_R2S0P21/C920_R2S0_manuals_and_tools/manuals_and_tools/08_toolchain_900_series_cpu_toolchain/V2.8.0/Xuantie-900-gcc-elf-newlib-x86_64-V2.8.0/bin/riscv64-unknown-elf-gcc -o hello_world.o -c -O1 -g -Wall -Ilib/clib -Ilib/newlib_wrap -Ilib/init hello_world.c
hello_world.c: In function 'main':
hello_world.c:39:1: warning: this 'else' clause does not guard... [-Wmisleading-indentation]
39 | else
| ^~~~
hello_world.c:41:3: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'else'
41 |   printf("after ASM c is changed to %d!\n",c);
|   ^~~~~~
Building lib/init/core_cp0.o with action:
$CC $ASPPFLAGS $CPPFLAGS $_CPPDEFFLAGS $_CPPINCFLAGS -c -o $TARGET $SOURCES
/opt/picocom/ThirdParty_Libs/T-head/C920_R2S0P21/C920_R2S0_manuals_and_tools/manuals_and_tools/08_toolchain_900_series_cpu_toolchain/V2.8.0/Xuantie-900-gcc-elf-newlib-x86_64-V2.8.0/bin/riscv64-unknown-elf-gcc -g -Ilib/clib -Ilib/newlib_wrap -Ilib/init -c -o lib/init/core_cp0.o lib/init/core_cp0.s
Building lib/init/core_ifu.o with action:
$CC $ASPPFLAGS $CPPFLAGS $_CPPDEFFLAGS $_CPPINCFLAGS -c -o $TARGET $SOURCES
/opt/picocom/ThirdParty_Libs/T-head/C920_R2S0P21/C920_R2S0_manuals_and_tools/manuals_and_tools/08_toolchain_900_series_cpu_toolchain/V2.8.0/Xuantie-900-gcc-elf-newlib-x86_64-V2.8.0/bin/riscv64-unknown-elf-gcc -g -Ilib/clib -Ilib/newlib_wrap -Ilib/init -c -o lib/init/core_ifu.o lib/init/core_ifu.s
Building lib/init/core_l2c.o with action:
$CC $ASPPFLAGS $CPPFLAGS $_CPPDEFFLAGS $_CPPINCFLAGS -c -o $TARGET $SOURCES
/opt/picocom/ThirdParty_Libs/T-head/C920_R2S0P21/C920_R2S0_manuals_and_tools/manuals_and_tools/08_toolchain_900_series_cpu_toolchain/V2.8.0/Xuantie-900-gcc-elf-newlib-x86_64-V2.8.0/bin/riscv64-unknown-elf-gcc -g -Ilib/clib -Ilib/newlib_wrap -Ilib/init -c -o lib/init/core_l2c.o lib/init/core_l2c.s
Building lib/init/core_lsu.o with action:
$CC $ASPPFLAGS $CPPFLAGS $_CPPDEFFLAGS $_CPPINCFLAGS -c -o $TARGET $SOURCES
/opt/picocom/ThirdParty_Libs/T-head/C920_R2S0P21/C920_R2S0_manuals_and_tools/manuals_and_tools/08_toolchain_900_series_cpu_toolchain/V2.8.0/Xuantie-900-gcc-elf-newlib-x86_64-V2.8.0/bin/riscv64-unknown-elf-gcc -g -Ilib/clib -Ilib/newlib_wrap -Ilib/init -c -o lib/init/core_lsu.o lib/init/core_lsu.s
Building lib/init/core_mmu.o with action:
$CC $ASPPFLAGS $CPPFLAGS $_CPPDEFFLAGS $_CPPINCFLAGS -c -o $TARGET $SOURCES
/opt/picocom/ThirdParty_Libs/T-head/C920_R2S0P21/C920_R2S0_manuals_and_tools/manuals_and_tools/08_toolchain_900_series_cpu_toolchain/V2.8.0/Xuantie-900-gcc-elf-newlib-x86_64-V2.8.0/bin/riscv64-unknown-elf-gcc -g -Ilib/clib -Ilib/newlib_wrap -Ilib/init -c -o lib/init/core_mmu.o lib/init/core_mmu.s
Building lib/init/core_plic.o with action:
$CC $ASPPFLAGS $CPPFLAGS $_CPPDEFFLAGS $_CPPINCFLAGS -c -o $TARGET $SOURCES
/opt/picocom/ThirdParty_Libs/T-head/C920_R2S0P21/C920_R2S0_manuals_and_tools/manuals_and_tools/08_toolchain_900_series_cpu_toolchain/V2.8.0/Xuantie-900-gcc-elf-newlib-x86_64-V2.8.0/bin/riscv64-unknown-elf-gcc -g -Ilib/clib -Ilib/newlib_wrap -Ilib/init -c -o lib/init/core_plic.o lib/init/core_plic.s
Building lib/init/core_t_extension.o with action:
$CC $ASPPFLAGS $CPPFLAGS $_CPPDEFFLAGS $_CPPINCFLAGS -c -o $TARGET $SOURCES
/opt/picocom/ThirdParty_Libs/T-head/C920_R2S0P21/C920_R2S0_manuals_and_tools/manuals_and_tools/08_toolchain_900_series_cpu_toolchain/V2.8.0/Xuantie-900-gcc-elf-newlib-x86_64-V2.8.0/bin/riscv64-unknown-elf-gcc -g -Ilib/clib -Ilib/newlib_wrap -Ilib/init -c -o lib/init/core_t_extension.o lib/init/core_t_extension.s
Building lib/init/core_vec.o with action:
$CC $ASPPFLAGS $CPPFLAGS $_CPPDEFFLAGS $_CPPINCFLAGS -c -o $TARGET $SOURCES
/opt/picocom/ThirdParty_Libs/T-head/C920_R2S0P21/C920_R2S0_manuals_and_tools/manuals_and_tools/08_toolchain_900_series_cpu_toolchain/V2.8.0/Xuantie-900-gcc-elf-newlib-x86_64-V2.8.0/bin/riscv64-unknown-elf-gcc -g -Ilib/clib -Ilib/newlib_wrap -Ilib/init -c -o lib/init/core_vec.o lib/init/core_vec.s
Building lib/init/crt0.o with action:
$CC $ASPPFLAGS $CPPFLAGS $_CPPDEFFLAGS $_CPPINCFLAGS -c -o $TARGET $SOURCES
/opt/picocom/ThirdParty_Libs/T-head/C920_R2S0P21/C920_R2S0_manuals_and_tools/manuals_and_tools/08_toolchain_900_series_cpu_toolchain/V2.8.0/Xuantie-900-gcc-elf-newlib-x86_64-V2.8.0/bin/riscv64-unknown-elf-gcc -g -Ilib/clib -Ilib/newlib_wrap -Ilib/init -c -o lib/init/crt0.o lib/init/crt0.s
Building lib/init/stress_inst.o with action:
$CC $ASPPFLAGS $CPPFLAGS $_CPPDEFFLAGS $_CPPINCFLAGS -c -o $TARGET $SOURCES
/opt/picocom/ThirdParty_Libs/T-head/C920_R2S0P21/C920_R2S0_manuals_and_tools/manuals_and_tools/08_toolchain_900_series_cpu_toolchain/V2.8.0/Xuantie-900-gcc-elf-newlib-x86_64-V2.8.0/bin/riscv64-unknown-elf-gcc -g -Ilib/clib -Ilib/newlib_wrap -Ilib/init -c -o lib/init/stress_inst.o lib/init/stress_inst.s
Building build/main.elf with action:
$LINK -o $TARGET $LINKFLAGS $__RPATH $SOURCES $_LIBDIRFLAGS $_LIBFLAGS
/opt/picocom/ThirdParty_Libs/T-head/C920_R2S0P21/C920_R2S0_manuals_and_tools/manuals_and_tools/08_toolchain_900_series_cpu_toolchain/V2.8.0/Xuantie-900-gcc-elf-newlib-x86_64-V2.8.0/bin/riscv64-unknown-elf-gcc -o build/main.elf -nostartfiles -lc -lgcc -lm -T ./lib/init/linker.lcf -march=rv64imafdcv_zicbom_zicbop_zicboz_zicond1p0_zihintntl0p2_zihintpause_zawrs_zfa0p1_zfbfmin0p8_zfh_zca_zcb_zcd_zba_zbb_zbc_zbs_zvfbfmin0p8_zvfbfwma0p8_svinval_svpbmt_xtheadc_xtheadvdot -mabi=lp64d -mtune=c920 lib/clib/fputc.o lib/clib/intc.o lib/clib/uart.o lib/clib/vtimer.o lib/newlib_wrap/__dtostr.o lib/newlib_wrap/__isinf.o lib/newlib_wrap/__isnan.o lib/newlib_wrap/__lltostr.o lib/newlib_wrap/__ltostr.o lib/newlib_wrap/__v_printf.o lib/newlib_wrap/fprintf.o lib/newlib_wrap/getc.o lib/newlib_wrap/getchar.o lib/newlib_wrap/printf.o lib/newlib_wrap/putc.o lib/newlib_wrap/putchar.o lib/newlib_wrap/puts.o lib/newlib_wrap/snprintf.o lib/newlib_wrap/sprintf.o lib/newlib_wrap/vfprintf.o lib/newlib_wrap/vprintf.o lib/newlib_wrap/vsnprintf.o lib/newlib_wrap/vsprintf.o hello_world.o lib/init/core_cp0.o lib/init/core_ifu.o lib/init/core_l2c.o lib/init/core_lsu.o lib/init/core_mmu.o lib/init/core_plic.o lib/init/core_t_extension.o lib/init/core_vec.o lib/init/crt0.o lib/init/stress_inst.o
/opt/picocom/ThirdParty_Libs/T-head/C920_R2S0P21/C920_R2S0_manuals_and_tools/manuals_and_tools/08_toolchain_900_series_cpu_toolchain/V2.8.0/Xuantie-900-gcc-elf-newlib-x86_64-V2.8.0/bin/../lib/gcc/riscv64-unknown-elf/10.4.0/../../../../riscv64-unknown-elf/bin/ld: /opt/picocom/ThirdParty_Libs/T-head/C920_R2S0P21/C920_R2S0_manuals_and_tools/manuals_and_tools/08_toolchain_900_series_cpu_toolchain/V2.8.0/Xuantie-900-gcc-elf-newlib-x86_64-V2.8.0/bin/../lib/gcc/riscv64-unknown-elf/10.4.0/../../../../riscv64-unknown-elf/lib/rv64imafdcv_zfh_xtheadc/lp64d/crt0.o: in function _start': (.text+0x0): undefined reference to __global_pointer$'
/opt/picocom/ThirdParty_Libs/T-head/C920_R2S0P21/C920_R2S0_manuals_and_tools/manuals_and_tools/08_toolchain_900_series_cpu_toolchain/V2.8.0/Xuantie-900-gcc-elf-newlib-x86_64-V2.8.0/bin/../lib/gcc/riscv64-unknown-elf/10.4.0/../../../../riscv64-unknown-elf/bin/ld: (.text+0x8): undefined reference to _edata' /opt/picocom/ThirdParty_Libs/T-head/C920_R2S0P21/C920_R2S0_manuals_and_tools/manuals_and_tools/08_toolchain_900_series_cpu_toolchain/V2.8.0/Xuantie-900-gcc-elf-newlib-x86_64-V2.8.0/bin/../lib/gcc/riscv64-unknown-elf/10.4.0/../../../../riscv64-unknown-elf/bin/ld: (.text+0x10): undefined reference to _end'
/opt/picocom/ThirdParty_Libs/T-head/C920_R2S0P21/C920_R2S0_manuals_and_tools/manuals_and_tools/08_toolchain_900_series_cpu_toolchain/V2.8.0/Xuantie-900-gcc-elf-newlib-x86_64-V2.8.0/bin/../lib/gcc/riscv64-unknown-elf/10.4.0/../../../../riscv64-unknown-elf/bin/ld: (.text+0x32): undefined reference to __libc_init_array' /opt/picocom/ThirdParty_Libs/T-head/C920_R2S0P21/C920_R2S0_manuals_and_tools/manuals_and_tools/08_toolchain_900_series_cpu_toolchain/V2.8.0/Xuantie-900-gcc-elf-newlib-x86_64-V2.8.0/bin/../lib/gcc/riscv64-unknown-elf/10.4.0/../../../../riscv64-unknown-elf/bin/ld: (.text+0x44): undefined reference to exit'
collect2: error: ld returned 1 exit status
scons: *** [build/main.elf] Error 1

@zhajio1988 - Please skip including the whole build log, and just include the failed command and it's errors/warnings.. much easier to read..
Also now your issue is no longer SCons related I think.
A quick google of the __global_pointer$ error above finds this.
https://stackoverflow.com/questions/62198590/riscv32-unknown-elf-linker-error-after-reading-linker-script-undefined-referen

@bdbaddog
Yes, It does have nothing to do with scons anymore, I'm seeing what's going on, thanks a lot!

I'm going to close this issue as it was really about your usage of SCons and not a defect with SCons itself.
In the future it's preferred to bring such issues to our mailing list or our discord server, and not file a bug until the maintainers have determined it's not a user issue.
You can find how to get to the mailing list or discord server here: https://scons.org/contact.html

@bdbaddog
Finally，my SCons can work now， thank you very much.

@zhajio1988 glad @mwichmann and I could help.

I'll move it over to Conversations (will have the same number but won't be listed in issues)


Gallery-component

make a gallery component for the home page to display featured adoptions

Can I work on this issue please? Do you have a folder of images to work from?

Hii, you can use sample pet images as of now, once we are ready with the database we will be updating you with the new images.

Hello @majjikishore007 @AnandDhakane01
If no one is working on this, can I work?


ResourceLabelFormatter for custom TextDocumentContentProvider's scheme ignored after first call to showTextDocument()

Type: Bug

Merge this into the cowsay example's package.json (in vscode-extension-samples/virtual-document-sample):

{
  "contributes": {
    "resourceLabelFormatters": [
      {
        "scheme": "cowsay",
        "formatting": {
            "label": "ZZ${path}ZZ"
        }
      }
    ]
  }
}

Run the sample, activate the cowsay command, and enter "fubar".
The new editor is correctly titled ZZfubarZZ. Now click the custom action cowsay (↹) button in the editor toolbar.
A second editor is opened, correctly titled ZZrabufZZ. Click its cowsay (↹) button.

Problem
The first editor's title has now reverted to fubar, ignoring the formatting specified by the resourceLabelFormatter.
Now, if you click the cowsay (↹) button again, the other editor's title also reverts and becomes rabuf.
Expect
The editor titles should continue respecting the specified resource formatting, even after repeated calls to vscode.window.showTextDocument.

VS Code version: Code 1.73.1<PHONE_NUMBER>f055b99068d3688932416f2346dd3b, 2022-11-09T04:27:29.066Z)
OS version: Windows_NT x64 10.0.22621
Modes:
Sandboxed: No

System Info

Item
Value

CPUs
Intel(R) Core(TM) i9-9980HK CPU @ 2.40GHz (16 x 2400)

GPU Status
2d_canvas: enabledcanvas_oop_rasterization: disabled_offdirect_rendering_display_compositor: disabled_off_okgpu_compositing: enabledmultiple_raster_threads: enabled_onopengl: enabled_onrasterization: enabledraw_draw: disabled_off_okskia_renderer: enabled_onvideo_decode: enabledvideo_encode: enabledvulkan: disabled_offwebgl: enabledwebgl2: enabledwebgpu: disabled_off

Load (avg)
undefined

Memory (System)
31.73GB (8.81GB free)

Process Argv
--crash-reporter-id 3ee742d4-1f45-4a7e-a3d2-f8bab955b8ab

Screen Reader
no

VM
0%

Extensions (30)

Extension
Author (truncated)
Version

Bookmarks
ale
13.3.1

ascii-tree-generator
apr
1.2.4

transformer
dak
1.12.1

vscode-jq-playground
dav
4.3.5

vscode-eslint
dba
2.2.6

xml
Dot
2.5.1

gitlens
eam
13.1.1

prettier-vscode
esb
9.10.3

lex-flex-yacc-bison
fau
0.0.3

auto-close-tag
for
0.5.14

kaitai-struct-vscode
fud
0.8.1

jq-syntax-highlighting
jq-
0.0.2

vscode-JS-CSS-HTML-formatter
lon
0.2.3

rainbow-csv
mec
3.3.0

vscode-aql
mon
1.7.1

vscode-docker
ms-
1.23.1

csharp
ms-
1.25.2

isort
ms-
2022.8.0

python
ms-
2022.18.2

vscode-pylance
ms-
2022.11.40

remote-wsl
ms-
0.72.0

cpptools
ms-
1.12.4

vscode-gitextensions
pmi
1.1.0

java
red
1.13.0

vscode-yaml
red
1.10.1

rust-analyzer
rus
0.3.1301

code-settings-sync
Sha
3.4.3

vscode-lldb
vad
1.8.1

vscode-java-debug
vsc
0.47.0

scriban
xoo
1.2.1

A/B Experiments
vsliv368cf:30146710
vsreu685:30147344
python383cf:30185419
vspor879:30202332
vspor708:30202333
vspor363:30204092
vstes516:30244333
vslsvsres303:30308271
pythonvspyl392:30443607
vserr242:30382549
pythontb:30283811
vsjup518:30340749
pythonptprofiler:30281270
vshan820:30294714
vstes263:30335439
vscorecescf:30445987
pythondataviewer:30285071
vscod805:30301674
binariesv615:30325510
bridge0708:30335490
bridge0723:30353136
cmake_vspar411:30581797
vsaa593cf:30376535
pythonvs932:30410667
cppdebug:30492333
vsclangdc:30486549
c4g48928:30535728
dsvsc012cf:30540253
azure-dev_surveyone:30548225
pyindex848cf:30577861
nodejswelcome1:30587005
282f8724:30602487
gswce1:30612156
iaj6b796:30613358
dbltrim-noruby:30604474
f6dab269:30613381

Merge this into the cowsay example's package.json

That API is still proposed, so I am surprised it works at all by just pasting this. Did you also enrol into the corresponding proposal?

@isidorn who owns this now?

Merge this into the cowsay example's package.json

That API is still proposed, so I am surprised it works at all by just pasting this. Did you also enrol into the corresponding proposal?

Interesting. And I'm surprised, in turn, to find out it's only still "proposed." To wit, it's documented as part of the contribution docs here with no mention of proposed status and, more importantly, it seems to work (modulo this bug report) in non-preview builds, so... not sure how I was supposed to know it's not fully supported yet...? :smile:
In any case, would be lovely to see a fix if indeed the idea is to keep the feature in the production product as a fully fledged extension feature.

add a specific "file" extension to my scheme's uri's for my virtual documents

What's so bad about that? That's how "normal" files work as well

@jrieken this was owned by Jackson. And I think once he left the team it passed on over with the explorer to @lramos15

add a specific "file" extension to my scheme's uri's for my virtual documents

What's so bad about that? That's how "normal" files work as well

Well, "bad" isn't exactly the term I'd use. I'd call it inappropriate: definitionally, virtual documents aren't files and, so, it's kind of unfortunate to force them to adopt file extensions just to activate a language mode when all of the other overrides for openDocument provide for specifying the language id. Heck, even createOutputPanel lets me create a read-only document - without a file extension - while also specifying its language id.
In my case, the virtual document is not a file and I don't want to give the impression - visually or otherwise - that it is. Also, as a secondary concern I don't want the tab bar to be more cluttered or the tabs wider than they really need to be.
I want to have a singleton view and I want to show output from the "most recent" run of my custom command. My editor title wants to be something like "Most Recent Result". The output format happens to be JSON, so there's no real reason for me to construct a custom web view and, indeed, it's a better experience for my end-user to be able to use the native editor rendering and features relating to JSON documents. One could argue that an output panel is appropriate, and I agree, however my output is long (not wide) and doesn't lend itself as well to being locked away in an oft-hidden bottom panel. One could also argue maybe it should be a custom view so that it can be docked in a side panel... except again this is just plain-ol' JSON... so why would I want to go create a custom rendering view, when I have an excellent JSON editor/renderer already built into VSCode?
So, yeah, it'd be lovely if I could just open my virtual document by custom-registered scheme and assign it 'jsonc' language mode all in one go, without having to artificially apply a file extension that I don't really need or want.

@jrieken I'm a little confused as to what aspect of this issue has inspired you to convert into a feature request and make subject to voting/closure. Can you help clear this up?
I've originally reported a feature bug, and not a proposal for any new functionality:

Either in a feature you consider to be in 'proposed' status, in which event a previous case for the feature will have
been made already (otherwise it wouldn't exist?)... so, there shouldn't be any need to re-justify its existence.
Or in a feature that shows some evidence of being in a 'production' status:

Presence in online documentation without any signaling of incomplete/preview status
Presence in production (non-insiders) builds
Lack of protection behind enabledApiProposals or any other similar mechanism

There may be some ideas I've articulated in follow-up discussion that you might perceive as new feature proposals and -- if you think it worthwhile -- I'd be happy to submit those ideas separately. But the core of this issue remains a bug report in existing functionality. I believe this issue should be moved back to a bug workflow and ultimately be repaired, regardless of the merits of anything else aside from the bug report discussed here.
Can you help clarify what's going on with this bug? Thanks in advance!

This feature request has not yet received the 20 community upvotes it takes to make to our backlog. 10 days to go. To learn more about how we handle feature requests, please see our documentation.
Happy Coding!

:slightly_frowning_face: In the last 60 days, this feature request has received less than 20 community upvotes and we closed it. Still a big Thank You to you for taking the time to create this issue! To learn more about how we handle feature requests, please see our documentation.
Happy Coding!


Failure executing build

I'm submitting a ...  (check one with "x")
[X] bug report => search github for a similar issue or PR before submitting
[ ] feature request
[ ] support request => Please do not submit support request here, instead see use [gitter](https://gitter.im/mgechev/angular2-seed) or [stackoverflow](https://stackoverflow.com/questions/tagged/angular2)

Current behavior

During step 4 in the steps to reproduce below, the following output is produced:
angular-seed-build-prod | [20:10:09] Deleted dist/tmp
angular-seed-build-prod | [20:10:09] Finished 'clean.prod' after 479 ms
angular-seed-build-prod | [20:10:09] Starting 'tslint'...
angular-seed-build-prod |
angular-seed-build-prod | src/client/app/components/app.routes.ts[7, 1]: expected an assignment or function call
angular-seed-build-prod | src/client/app/components/app.routes.ts[7, 3]: Missing semicolon
angular-seed-build-prod |
angular-seed-build-prod |
angular-seed-build-prod | src/client/app/shared/registry/reducers/index.ts[1, 36]: file should end with a newline
angular-seed-build-prod |
angular-seed-build-prod |
angular-seed-build-prod | src/client/app/shared/registry/common/states/index.ts[3, 34]: file should end with a newline
angular-seed-build-prod |
angular-seed-build-prod |
angular-seed-build-prod | src/client/app/shared/registry/dog/services/dog.service.ts[43, 35]: missing whitespace
angular-seed-build-prod |
angular-seed-build-prod | [20:10:17] Finished 'tslint' after 8.19 s
angular-seed-build-prod | [20:10:17] Starting 'build.assets.prod'...
angular-seed-build-prod | [20:10:18] Finished 'build.assets.prod' after 825 ms
angular-seed-build-prod | [20:10:18] Starting 'build.html_css'...
angular-seed-build-prod | [20:10:20] Finished 'build.html_css' after 2.54 s
angular-seed-build-prod | [20:10:20] Starting 'copy.prod'...
angular-seed-build-prod | [20:10:21] Finished 'copy.prod' after 849 ms
angular-seed-build-prod | [20:10:21] Starting 'build.js.prod'...
angular-seed-build-prod | dist/tmp/app/shared/test/shorthand/ng2-jasmine.ts(20,19): error TS2314: Generic type 'Matchers<T>' requires 1 type argument(s).
angular-seed-build-prod | dist/tmp/app/shared/test/shorthand/ng2-jasmine.ts(21,24): error TS2314: Generic type 'Matchers<T>' requires 1 type argument(s).
angular-seed-build-prod | [20:10:27] TypeScript: 2 semantic errors
angular-seed-build-prod | [20:10:27] TypeScript: emit succeeded (with errors)
angular-seed-build-prod |
angular-seed-build-prod | npm info lifecycle<EMAIL_ADDRESS>Failed to exec build.prod script
angular-seed-build-prod | npm ERR! Linux 4.9.12-moby
angular-seed-build-prod | npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "run" "build.prod"
angular-seed-build-prod | npm ERR! node v6.6.0
angular-seed-build-prod | npm ERR! npm  v3.10.3
angular-seed-build-prod | npm ERR! code ELIFECYCLE
angular-seed-build-prod | npm ERR<EMAIL_ADDRESS>build.prod: `gulp build.prod --color --env-config prod --build-type prod`
angular-seed-build-prod | npm ERR! Exit status 1
angular-seed-build-prod | npm ERR!
angular-seed-build-prod | npm ERR! Failed at the<EMAIL_ADDRESS>build.prod script 'gulp build.prod --color --env-config prod --build-type prod'.
angular-seed-build-prod | npm ERR! Make sure you have the latest version of node.js and npm installed.
angular-seed-build-prod | npm ERR! If you do, this is most likely a problem with the angular-seed-advanced package,
angular-seed-build-prod | npm ERR! not with npm itself.
angular-seed-build-prod | npm ERR! Tell the author that this fails on your system:
angular-seed-build-prod | npm ERR!     gulp build.prod --color --env-config prod --build-type prod
angular-seed-build-prod | npm ERR! You can get information on how to open an issue for this project with:
angular-seed-build-prod | npm ERR!     npm bugs angular-seed-advanced
angular-seed-build-prod | npm ERR! Or if that isn't available, you can get their info via:
angular-seed-build-prod | npm ERR!     npm owner ls angular-seed-advanced
angular-seed-build-prod | npm ERR! There is likely additional logging output above.
angular-seed-build-prod |
angular-seed-build-prod | npm ERR! Please include the following file with any support request:
angular-seed-build-prod | npm ERR!     /home/app/angular-seed/npm-debug.log
angular-seed-build-prod exited with code 1

Expected behavior

step 4 completes without outputting an error and stopping.
Minimal reproduction of the problem with instructions

Download project
npm install
docker-compose -f docker-compose.production.yml build
docker-compose -f docker-compose.production.yml up angular-seed

What is the motivation / use case for changing the behavior?

Please tell us about your environment:

OS: MacOSX Sierra
IDE: VS Code
Package Manager: NPM

Angular Seed Version: aaaaf75

efb2fcedc6

Node: node --version = 6.6.0

@pavlovich thanks - just pushed up remaining syntax issue - you may need to rebuild your docker image but verified here of it working 👍


Make lamports per signature dynamic

Is your feature request related to a problem? Please describe.
Solana will in the near future introduce more complex transaction fee pricing and there won't be a singular "lamports per signature" value. Transactions will be priced more accurately based on the compute units they consume.
Describe the solution you'd like
Octane would need to pull the fees from the chain for each transaction as it isn't reliable to assume a fee in advance. This is not an issue right now but for future proofing this is important.

Adding on to that, it would be good to adjust how token amount is configured to adapt for the new fee model.

Token amount should be configured using a tokens per lamport model, so if the fee increases, the token amount should increase proportionally.
We might want to potentially add a "slippage" parameter of some sort to accurately reflect the lack of reliability for assuming fees. For instance, if the fees aren't consistent from more recent transactions, the token amount should be higher to account for this discrepancy in case the fee ends up being higher than expected.
Not really related to fee model, but in general, the conversion rates between Solana and the token change, so although the Octane relayer manager could update the configuration every few hours or once a day, it might be good to have a way to dynamically pull data from DEXes for the conversion rate between tokens and Solana if trading pairs exist (for instance, we could have a parameter for a Serum market).

If there is any time where the fee to send through Octane is cheaper than sending directly, this is an arbitrage opportunity especially for bots that send a lot of transactions on the network. It's probably better to lean on the side of charging a bit more for the transaction in the token (in terms of #2 and #3) rather than less, since if a relayer is found to be giving discounts on transactions, the relayer's wallet might be drained fairly quickly.

The relayer would also want an economic incentive (haven't figured out the economic model in detail but there must be some form of payment? I'd expect this to be reflected in the exchange rate).
As to point 2. "Slippage" it would be nice to have a "max fee" but with the final fee being dynamic up to that max amount based on the actual final fee on the network.
Would also be cool to add options for relayers to auto-convert the received tokens to SOL through a DEX, this way they benefit from the slightly better exchange rate with no future exchange risk

This is kind of mentioned in #5 but it may be possible to structure the tx so that the user has to swap for SOL then pay the relayer in kind instead.
However this doesn't leave as much headroom for compute or accounts in the tx. We'd probably want to get some numbers on compute use.
I've had some inbound interest from games and other platforms that have some kind of utility token that they'd like to use for gas.
I also think for something like USDC, a merchant using Solana Pay would be happy to pay tx fees for purchases at the merchant, so the fee model doesn't necessarily need to be complex upfront.
What do you think about us working on specific use cases / endpoints like this before approaching the general relayer use case first?

The idea for most of this is that we could have multiple endpoints that do different things and someone running Octane can choose between them and configure, so the structure and security IMO is more important than the specifics.

it may be possible to structure the tx so that the user has to swap for SOL then pay the relayer in kind instead.

I don't think this would work, but it's not for the reasons you mentioned (compute and account limits). In swapping SPL tokens to SOL, swap accounts need to be set up, which requires a rent fee. If the user pays for the rent fee, they must already have SOL to do that and could have just paid the transaction fee as normal (without a relayer), and if the relayer pays for the rent fee, then the user can just close the account in the next transaction to refund the rent cost back to them, so people could use this loophole to gain a lot of free SOL from the relayer's wallet.

I've had some inbound interest from games and other platforms that have some kind of utility token that they'd like to use for gas.
I also think for something like USDC, a merchant using Solana Pay would be happy to pay tx fees for purchases at the merchant, so the fee model doesn't necessarily need to be complex upfront.

I was thinking exactly that, Solana Pay and games were the two use-cases that first came to mind when thinking about where Octane could be used. In fact, @SolBlazeOrg was already planning on hosting a USDC fee paying system for Solana Pay based on Octane, which would further reduce the friction for adoption on the merchant side if the SolBlaze Octane relayer was integrated at the wallet level.

The idea for most of this is that we could have multiple endpoints that do different things and someone running Octane can choose between them and configure, so the structure and security IMO is more important than the specifics.

I think that might be best given all of the different ways a relayer could operate (stablecoins, non-stable SPL tokens, a range of multiple possible SPL tokens, feeless if user only interacts with specific program, etc.).

In swapping SPL tokens to SOL, swap accounts need to be set up, which requires a rent fee.

I think this may only be true for some DEXs. I don't believe AMM-style DEXs like Orca or Raydium require this. https://github.com/Bonfida/dex-v4/pull/30 in the dev branch of Serum appears to implements an atomic Swap instruction that doesn't seem to require an account being created for the user. Perhaps I don't follow?

if the relayer pays for the rent fee, then the user can just close the account in the next transaction to refund the rent cost back to them, so people could use this loophole to gain a lot of free SOL from the relayer's wallet.

This seems relatively simple to prevent with Octane's instruction inspection -- just make sure the user included an instruction to close the account in the same transaction and refund it to Octane. The complexity of structuring this tx can be handled by a dapp or wallet.

If there's a way to do it without an account, that could work, or yes we could have an instruction to close the account with the refund to Octane to ensure that a user can't steal the rent fees from Octane. However, that will still add extra instructions and compute, so it won't be super optimized and will likely be suited for more simple transactions. However, this same method could be used to allow for feeless swaps using Octane, which could be an interesting use-case.


Role blocks when docker is already installed

Recent versions of the docker setup script by Rancher has a 20sec sleep implemented when docker is already installed. This causes this role to block 20sec on each run once docker is set up.
Possible solution: Only run the "Execute docker setup script" step when no /usr/bin/docker is present.
This would also alleviate the issue that when the installed version is more recent than the default in this playbook, the playbook won't crash anymore (it currently does that because the script tries to downgrade docker which fails)

@marcusianlevine you did the whole Rancher installation script integration. What do you think?

Agree with @mhutter that this behavior is not ideal and to maintain idempotency we should be checking if Docker is installed before trying to run the setup script.
I think this fix makes sense, but two edge cases come to mind:

If there is already a statically linked version of the Docker client binary for whatever reason on the host being configured
Deliberately re-running the role to upgrade an existing Docker installation. I understand downgrading is currently broken, but upgrading should work.

As long as there is an override flag to force the setup script to run even if a /usr/bin/docker binary is present we should make this the default behavior.

Good points from @marcusianlevine.

This could be mitigated by checking for dockerd instead. Do you think this would take care of this edge case?
I could add a parameter like upgrade_docker which would force the script to be updated and run - as far as I observed this would not work at the moment either, because the script is only downloaded once.

@mhutter

Yes, that addresses the case I was concerned about here.
This sounds like a good solution to me. I'm not sure what you mean when you say the "script is only downloaded once." If one intends to install a different version of Docker with this role, an override for the docker_version parameter and the script checksum would be provided, in which case the get_url module would detect that the destination checksum does not match the specified checksum and re-download the file.

I think once these changes are reflected in PR #17 we can merge in

I updated #17 to address the issues.


Error: keySid is required

I got through the install, got the success on the /setup screen. Went to log in as an agent, and got this error:
Error: keySid is required
at new AccessToken (/var/www/twilio-contact-center/node_modules/twilio/lib/AccessToken.js:73:24)
at /var/www/twilio-contact-center/controllers/agents.js:55:23
at /var/www/twilio-contact-center/node_modules/twilio/node_modules/q/q.js:1920:17
at flush (/var/www/twilio-contact-center/node_modules/twilio/node_modules/q/q.js:108:17)
at process._tickCallback (node.js:355:11)
Is this because of a node module update?
I'm not using the IP Messaging piece, so I don't have those env vars set. Not sure if that matters.

Looks like the IP Messaging Keys are required even if you aren't planning on using them. I'll close this out :)


lyne-timetable-duration

state: in progress
figma: https://www.figma.com/file/oA9B5W6w0449gtItDzLS86/00%3A-Components?node-id=360%3A735437
dev: https://lyne.sbb.ch/components/lyne-timetable-duration
ux quality-check
code quality-check
refactoring (optionaly)
testing

Feature Description
We want to review/refactor the lyne-button implementation.
Figma Spec

dev: https://lyne.sbb.ch/components/lyne-timetable-duration

References

Design Spec
Technical Spec

Definition of Done

[ ]  ux quality-check
[ ]  Code quality-check
[ ]  Refactoring (optionaly)
[ ]  Testing
[ ]  Component is implemented
[ ]  Tests are implemented
[ ]  E2E Tests are implemented
[ ]  Storybook stories are implemented
[ ]  Navigation via keyboard is tested
[ ]  Screen reader output is tested
[ ]  High-contrast is tested
[ ]  Remaining accessibility is tested
[ ]  UX approved

Will be tracked/decided in #1901


[Doc] Tweak the doc for DisabledByDefault config

Follow up #11689.
I read back through the configuration doc and noticed that the description of DisabledByDefault behavior was not strict.
This PR updates the doc to consider Lint/Syntax which is always enabled.
This makes the description consistent with:

There is one exception from the general rule above and that is Lint/Syntax,
a special cop that checks for syntax errors before the other cops are invoked.
It cannot be disabled and its severity (fatal) cannot be changed in configuration.

https://docs.rubocop.org/rubocop/1.46/configuration.html#severity

Before submitting the PR make sure the following are checked:

[x] The PR relates to only one subject with a clear title and description in grammatically correct, complete sentences.
[x] Wrote good commit messages.
[ ] Commit message starts with [Fix #issue-number] (if the related issue exists).
[x] Feature branch is up-to-date with master (if not - rebase it).
[x] Squashed related commits together.
[ ] Added tests.
[x] Ran bundle exec rake default. It executes all tests and runs RuboCop on its own code.
[ ] Added an entry (file) to the changelog folder named {change_type}_{change_description}.md if the new code introduces user-observable changes. See changelog entry format for details.

Thanks!


Parameter validation for asset creation is too strict

Hi, and thanks for creating this library, it's been really helpful in migrating some of our projects from Azure Media Services to MK.IO.
While most of the migrations was fairly smooth, there are some minor thing I've noticed that are not consistent with both old AMS API and MK.IO API:

The first one is the requirement to pass a non-null container name when creating new assets. Being able to provide it is certainly useful when migrating existing assets that have already been transcoded (so we can select existing Azure Storage containers) but less so when content managers want to upload new assets to the service. From my observations, MK.IO API will happily accept creation requests with properties.container not set in the request body and autogenerate one that looks like asset-{assetId}, which is similar to what AMS did but currently not achieveable with this library because we don't know the assetId before its creation. While having this is not by any means a requirement for us, we would appreciate being able to keep container names in sync with related assets and without having to use alternateIds for this.

The library rejects attempts to create assets (and possibly other resources) with spaces in their names. Because the name usually ends up as the last segment in API request path, I can easily work around this by doing dumb name.Replace(" ", "%20") URL encoding before calling relevant methods but I think it would be much simpler if the library did this internally on its own.

Many thanks for your input.
I will test your comments 1 and 2 and will update the SDK accordingly.

Hi @Saancreed, version  should bring what you asked for.

Thank you, we will upgrade to that version sometime next week. I'll let you know if we find any problems but the code changes look good (assuming that there's no need to manually perform any URL encoding) so for now I suppose this issue can be closed.


External NAT IP mapping support

Support external IP mappings for host interface IPs
The external IP must not be behind a CGNAT and port-forwarding for incoming UDP packets from WgPort on from the external IP to WgPort on the host interface IP must be present. This can take form of:

single port-forwarding rule from external IP to host interface IP
1:1 DNAT mapping ExternalIP to host interface IP
NAT DMZ to host interface IP.

Configuration
A special value of stun will use the STUN server's XORMappedAddress to set the External IP value; this is for installations behind dynamic DHCP assuming the above restrictions are met.
A single mapping will take the form of external[/internal]

external (required):

external IP address or stun to use STUN to determine the external IP address

internal (optional)

the host interface IP address or an interface name
if the "internal" argument is present and "stun" is specified for external, the STUN request will be generated by a connection originating from the specified host interface IP

Examples:
 "stun"                 => all interface IPs will be mapped to external IP reported by stun
 "<IP_ADDRESS>"          => all interfaces IPs will be mapped to external IP of <IP_ADDRESS>
 "stun/eth0"            => IPv4 assigned to interface eth0 will be mapped to external IP reported by stun
 "stun/<IP_ADDRESS>"        => interface IP <IP_ADDRESS> will be mapped to external IP reported by stun
 "<IP_ADDRESS>/eth0"     => IPv4 assigned to interface eth0 will be mapped to external IP of <IP_ADDRESS>
 "<IP_ADDRESS>/<IP_ADDRESS>" => interface IP <IP_ADDRESS> will be mapped to external IP of <IP_ADDRESS>

 Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.You have signed the CLA already but the status is still pending? Let us recheck it.

The Release checks failed because of updated go.sum file. This usually means that go.mod was updated and your local go.sum wasn't pushed


feat(ExtensionDetails): Display revision hyperlink

Before
After

cc: @lassoan  @jamesobutler

This is very useful, thank you!


Remove redundant code

Description
Remove redundant code
Type of change
Please delete options that are not relevant.

[ ] Bug fix (non-breaking change which fixes an issue)
[ ] New feature (non-breaking change which adds functionality)
[ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
[ ] This change requires a documentation update

How Has This Been Tested?
Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration

[ ] Test A
[ ] Test B

Test Configuration:

Firmware version:
Hardware:
Toolchain:
SDK:

Checklist:
Please delete options that are not relevant.

[ ] I have performed a self-review of my code
[ ] I have commented my code, particularly in hard-to-understand areas
[ ] I have made corresponding changes to the documentation
[ ] My changes generate no new warnings
[ ] I have added tests that prove my fix is effective or that my feature works
[ ] New and existing unit tests pass locally with my changes
[ ] Any dependent changes have been merged and published in downstream modules
[ ] If adding new functionality, I have discussed my implementation with the community using the linked GitHub issue
[x] I have signed and submitted the ICLA and if needed, the CCLA. See Contributing for details.

(Rebased on main to resolve conflicts)

Apparently someone else needs to review now since I resolved against other changes... :-/ @snazy if you get a chance maybe?


The job exceeded the maximum time limit for jobs, and has been terminated.

So I don't think there's much to do about this. Building this takes more than an hour and reaches time limit from Travis. You might have to run the build script locally for it to work.
Possible option to get this working in the could:

Use github actions. They may have a higher public limit for build minutes

Feel free to contribute

Ok I couldn't wait. Here's the github-actions job in progress: https://github.com/GabLeRoux/macos-crossover-cloud-build/runs/1589360065 :)

Well I confirm that Github Actions MacOS builds time limit is higher than an hour. It's been running for more than 2h now 🎉