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

Fix / enable test/addons/dlopen-ping-pong/test.js for AIX #15243

Closed
gireeshpunathil opened this issue Sep 7, 2017 · 2 comments
Closed

Fix / enable test/addons/dlopen-ping-pong/test.js for AIX #15243

gireeshpunathil opened this issue Sep 7, 2017 · 2 comments
Labels
addons Issues and PRs related to native addons. aix Issues and PRs related to the AIX platform. test Issues and PRs related to the tests.

Comments

@gireeshpunathil
Copy link
Member

  • Version: master
  • Platform: AIX
  • Subsystem: process

PR #12794 introduced a test (test/addons/dlopen-ping-pong/test.js) case that is failing in AIX:

ld: 0711-317 ERROR: Undefined symbol: .dlopen_pong

The root cause is that while building test/addons/dlopen-ping-pong/ping.c it is not able to find the required reference to dlopen_pong that is available in another library built from test/addons/dlopen-ping-pong/binding.cc

The logic is to perform a negative test: (i) make sure that the ping.so does not resolve dlopen_pong under default conditions, (ii) gets resolved when binding.so is loaded through the feature introduced by the PR: ability to customize process.dlopen with standard RTLD_* flags.

With current test logic in AIX, there is no way to go past the linker to make the negative test, as the ping.so itself is not built due to the missing symbol( I guess other platforms where it works perform some sort of lazy loading of symbols under default configurations).

We need to identify and enable that for AIX too. -brtl seems to be a good choice, but need to study its side effects.

Will work with @ezequielgarcia to fix it.

@gireeshpunathil gireeshpunathil added aix Issues and PRs related to the AIX platform. test Issues and PRs related to the tests. labels Sep 7, 2017
@mscdex mscdex added the addons Issues and PRs related to native addons. label Sep 7, 2017
@ezequielgarcia
Copy link
Contributor

I guess other platforms where it works perform some sort of lazy loading of symbols under default configurations.

That is exactly right. In Linux, the linker won't complain if a symbol remains unresolved. On OSX, we need to pass -Wl,-undefined -Wl,dynamic_lookup.

@richardlau
Copy link
Member

#15286

@jBarz jBarz mentioned this issue Sep 9, 2017
3 tasks
Qard pushed a commit to Qard/ayo that referenced this issue Sep 21, 2017
Enable runtime linking of shared objects. This will
allow loading of symbols using the RTLD_GLOBAL flag.

PR-URL: nodejs/node#15286
Fixes: nodejs/node#15243
Reviewed-By: Gibson Fahnestock <[email protected]>
Reviewed-By: Gireesh Punathil <[email protected]>
Reviewed-By: Michael Dawson <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Qard pushed a commit to Qard/ayo that referenced this issue Sep 21, 2017
Enable runtime linking of shared objects. This will
allow loading of symbols using the RTLD_GLOBAL flag.

PR-URL: nodejs/node#15286
Fixes: nodejs/node#15243
Reviewed-By: Gibson Fahnestock <[email protected]>
Reviewed-By: Gireesh Punathil <[email protected]>
Reviewed-By: Michael Dawson <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
addons Issues and PRs related to native addons. aix Issues and PRs related to the AIX platform. test Issues and PRs related to the tests.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants