Skip to content

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

@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