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

Build failure on platforms with libdir != /usr/lib #338

Closed
xen0n opened this issue Aug 3, 2019 · 3 comments · Fixed by #343
Closed

Build failure on platforms with libdir != /usr/lib #338

xen0n opened this issue Aug 3, 2019 · 3 comments · Fixed by #343
Milestone

Comments

@xen0n
Copy link

xen0n commented Aug 3, 2019

Environment details

  • OS: Linux/MIPS
  • OS version: 5.2
  • node-pty version: master branch

Issue description

On platforms with libdir != /usr/lib, the native binding compilation obviously fails (in this case n64 MIPS where libdir = /usr/lib64):

/usr/lib/gcc/mips64el-unknown-linux-gnu/9.1.0/../../../../mips64el-unknown-linux-gnu/bin/ld: /usr/lib/libutil.so: error adding symbols: file in wrong format
collect2: error: ld returned 1 exit status

Is there any reason the libdir must be hard-coded in binding.gyp, as libutil.so should always reside in the default libdir whose location the platform cc definitely knows about?

@Tyriar
Copy link
Member

Tyriar commented Aug 7, 2019

@deepak1556 should we just add /usr/lib64 to the list here?

node-pty/binding.gyp

Lines 59 to 60 in 7bd4c73

'-L/usr/lib',
'-L/usr/local/lib'

@xen0n
Copy link
Author

xen0n commented Aug 8, 2019

Out of curiosity, why can't the library paths simply be removed? I just removed the two arguments and the build was fixed.

@deepak1556
Copy link
Contributor

@xen0n is correct, we don't need to specify the default user library paths, it will be picked up by the build system not something gyp should worry about. Explicit path specifications are only necessary when the library is in some custom location, or we need to modify rpaths.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants