Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

tools: fix riscv64 build failed #52888

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Conversation

luyahan
Copy link
Contributor

@luyahan luyahan commented May 8, 2024

fix #52678

@nodejs-github-bot
Copy link
Collaborator

Review requested:

  • @nodejs/gyp
  • @nodejs/v8-update

@nodejs-github-bot nodejs-github-bot added needs-ci PRs that need a full CI run. tools Issues and PRs related to the tools directory. v8 engine Issues and PRs related to the V8 dependency. labels May 8, 2024
@luyahan luyahan force-pushed the fix-failed branch 2 times, most recently from ff7cd6a to 2674676 Compare May 8, 2024 09:16
@sxa
Copy link
Member

sxa commented May 10, 2024

I had a try with your branch with GCC10 from Ubuntu 20.04/riscv64 and run into an issue with a number of symbols when building the test code - is that expected and do you get the same failure? I don't think I've seen these before.

../deps/googletest/include/gtest/internal/gtest-port.h: In function 'int testing::internal::posix::RmDir(const char*)':
../deps/googletest/include/gtest/internal/gtest-port.h:2053:44: error: 'rmdir' was not declared in this scope; did you mean 'simdutf::internal::rmdir'?
../deps/googletest/include/gtest/internal/gtest-port.h: In function 'int testing::internal::posix::DoIsATTY(int)':
../deps/googletest/include/gtest/internal/gtest-port.h:2084:38: error: 'isatty' was not declared in this scope; did you mean 'simdutf::internal::isatty'?
../deps/googletest/include/gtest/internal/gtest-port.h: In function 'int testing::internal::posix::ChDir(const char*)':
../deps/googletest/include/gtest/internal/gtest-port.h:2113:44: error: 'chdir' was not declared in this scope; did you mean 'simdutf::internal::chdir'?
../deps/googletest/include/gtest/internal/gtest-port.h: In function 'int testing::internal::posix::Read(int, void*, unsigned int)':
../deps/googletest/include/gtest/internal/gtest-port.h:2135:27: error: 'read' was not declared in this scope; did you mean 'simdutf::internal::read'?
../deps/googletest/include/gtest/internal/gtest-port.h: In function 'int testing::internal::posix::Write(int, const void*, unsigned int)':
../deps/googletest/include/gtest/internal/gtest-port.h:2138:27: error: 'write' was not declared in this scope; did you mean 'simdutf::internal::write'?
../deps/googletest/include/gtest/internal/gtest-port.h: In function 'int testing::internal::posix::Close(int)':
../deps/googletest/include/gtest/internal/gtest-port.h:2140:35: error: 'close' was not declared in this scope; did you mean 'simdutf::internal::close'?

EDIT: I'm going to be away for the next 2½ weeks - so until June - so if I don't respond to any further queries on this, that will be why

@andreas-schwab
Copy link
Contributor

Why does that check for host_arch=="arm64" or target_arch=="arm64"?

hack3ric added a commit to hack3ric/archriscv-packages that referenced this pull request May 26, 2024
- Backport nodejs/node#52888
- Seems crash when building with gcc had fixed, use GCC again.
hack3ric added a commit to hack3ric/archriscv-packages that referenced this pull request May 26, 2024
- Backport nodejs/node#52888
- Seems crash when building with gcc had fixed, use GCC again.
felixonmars pushed a commit to felixonmars/archriscv-packages that referenced this pull request May 26, 2024
- Backport nodejs/node#52888
- Seems crash when building with gcc had fixed, use GCC again.
@richardlau richardlau added the riscv64 Issues and PRs related to the riscv64 architecture. label Jun 11, 2024
@luyahan
Copy link
Contributor Author

luyahan commented Jun 19, 2024

Why does that check for host_arch=="arm64" or target_arch=="arm64"?

Thanks. I had fix this.

@nodejs-github-bot
Copy link
Collaborator

@sxa
Copy link
Member

sxa commented Aug 7, 2024

CI: https://ci.nodejs.org/job/node-test-pull-request/60910/

LGTM - three failures - all passed on first re-run. First two are marked flakey:

@luyahan Before I approve (it fixes the build failure for me on a recent gcc) is there a reason why this PR appears to add extra files into the x64 build as well? I would expect this fox to only be in riscv64 specific sections.

@wojiushixiaobai
Copy link

wojiushixiaobai commented Oct 4, 2024

@luyahan
Hello,

can you add the repair code for the loong64 architecture?
loong64 also needs this patch.

Thanks you.

        ['v8_target_arch=="loong64"', {
          'sources': [
            '<!@pymod_do_main(GN-scraper "<(V8_ROOT)/BUILD.gn"  "\\"v8_base_without_compiler.*?v8_enable_wasm_gdb_remote_debugging.*?v8_current_cpu == \\"loong64\\".*?sources \\+= ")',
          ],
          'conditions': [
            ['v8_enable_webassembly==1', {
              'conditions': [
                ['(_toolset=="host" and host_arch=="arm64" or _toolset=="target" and target_arch=="arm64") or (_toolset=="host" and host_arch=="loong64" or _toolset=="target" and target_arch=="loong64") or (_toolset=="host" and host_arch=="x64" or _toolset=="target" and target_arch=="x64")', {
                  'sources': [
                    '<(V8_ROOT)/src/trap-handler/handler-inside-posix.cc',
                    '<(V8_ROOT)/src/trap-handler/handler-outside-posix.cc',
                  ],
                }],
                ['(_toolset=="host" and host_arch=="x64" or _toolset=="target" and target_arch=="x64") and (OS=="linux")', {
                  'sources': [
                    '<(V8_ROOT)/src/trap-handler/handler-outside-simulator.cc',
                  ],
                }],
              ],
            }],
          ],
        }],

image

MingcongBai pushed a commit to AOSC-Tracking/node that referenced this pull request Oct 23, 2024
Fix build failure on riscv64 since v22.

Ref: nodejs#52888
Ref: nodejs#52678
MingcongBai added a commit to AOSC-Dev/aosc-os-abbs that referenced this pull request Oct 23, 2024
@tuler
Copy link

tuler commented Oct 24, 2024

Is the riscv build for 22 still broken waiting for this to be reviewed?

MingcongBai added a commit to AOSC-Dev/aosc-os-abbs that referenced this pull request Oct 30, 2024
MingcongBai added a commit to AOSC-Dev/aosc-os-abbs that referenced this pull request Oct 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs-ci PRs that need a full CI run. riscv64 Issues and PRs related to the riscv64 architecture. tools Issues and PRs related to the tools directory. v8 engine Issues and PRs related to the V8 dependency.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

riscv64 build failure in 22.0.0
7 participants