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

deps: V8: fixed unable to find library -lrt #51852

Closed
wants to merge 1 commit into from

Conversation

MatteoBax
Copy link
Contributor

@MatteoBax MatteoBax commented Feb 23, 2024

Fixed #50184.
To fix it I made the following changes to the file tools/v8_gypfiles/v8.gyp :

['is_android', {
          'sources': [
            '<(V8_ROOT)/src/base/platform/platform-posix.cc',
            '<(V8_ROOT)/src/base/platform/platform-posix.h',
            '<(V8_ROOT)/src/base/platform/platform-posix-time.cc',
            '<(V8_ROOT)/src/base/platform/platform-posix-time.h',
          ],
          'link_settings': {
            'target_conditions': [
              ['_toolset=="host" and host_os=="linux"', {
                'libraries': [
-                  '-ldl',
+                  '-ldl',
+                  '-lc'
-                  '-lrt'
                ],
              }],
            ],
          },
          'target_conditions': [
            ['_toolset=="host"', {
              'sources': [
                '<(V8_ROOT)/src/base/debug/stack_trace_posix.cc',
                '<(V8_ROOT)/src/base/platform/platform-linux.cc',
              ],
            }, {
              'sources': [
                '<(V8_ROOT)/src/base/debug/stack_trace_android.cc',
                '<(V8_ROOT)/src/base/platform/platform-linux.cc',
              ],
            }],
          ],
        }],

Fix unable to find library -lrt  when building for android aarch64
@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 Feb 23, 2024
@MatteoBax MatteoBax changed the title deps: V8: fix unable to find library -lrt Fixed #50184 Feb 23, 2024
@MatteoBax MatteoBax changed the title Fixed #50184 deps: V8: fixed unable to find library -lrt Feb 23, 2024
@joyeecheung joyeecheung added the request-ci Add this label to start a Jenkins CI on a PR. label Feb 23, 2024
@github-actions github-actions bot removed the request-ci Add this label to start a Jenkins CI on a PR. label Feb 23, 2024
@nodejs-github-bot
Copy link
Collaborator

@nodejs-github-bot
Copy link
Collaborator

@nodejs-github-bot
Copy link
Collaborator

@lpinca
Copy link
Member

lpinca commented Feb 24, 2024

Duplicate of #51632?

@joyeecheung
Copy link
Member

Yes, this does link to libc explicitly though as #50184 (comment) mentioned the Android documentation said that it is not necessary.

@MatteoBax
Copy link
Contributor Author

MatteoBax commented Feb 24, 2024

Duplicate of #51632?

Yes it's the same. I hadn't checked to see if a pull request had already been opened.
My issue should also be linked there: #51632

@MeowShe
Copy link
Contributor

MeowShe commented Feb 25, 2024

Yes it's the same. I hadn't checked to see if a pull request had already been opened.
My issue should also be linked there: #51632

Linked.

@MatteoBax MatteoBax closed this Feb 25, 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. 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.

v8: "ld.lld: error: unable to find library -lrt" when building for android aarch64
5 participants