Skip to content

Add correct shared library naming on OS X - #7687

Closed
sxa wants to merge 1 commit into
nodejs:masterfrom
sxa:sharedlib-osx
Closed

Add correct shared library naming on OS X#7687
sxa wants to merge 1 commit into
nodejs:masterfrom
sxa:sharedlib-osx

Conversation

@sxa

@sxasxa commented Jul 12, 2016

Copy link
Copy Markdown
Member
Checklist
  • make -j4 test (UNIX), or vcbuild test nosign (Windows) passes
  • commit message follows commit guidelines
Affected core subsystem(s)

Build system

Description of change

The build system currently creates a shared library on OS/X with the same name as on Linux
i.e. libnode.so.48. This is inconsistent with the conventions on OS/X which uses libnode.48.dylib
This change modifies the build process and install.py (used by make binary) to build with the
correct name on OS/X when the --shared configure parameter is used. Without these changes,
"make binary" with CONFIG_FLAGS=--shared fails on the install.py step

@nodejs-github-botnodejs-github-bot added the build Issues and PRs related to build files or the CI. label Jul 12, 2016
@addaleaxaddaleax added the macos Issues and PRs related to the macOS platform / OSX. label Jul 12, 2016
@rvagg

Copy link
Copy Markdown
Member

sgtm, @nodejs/build?

Comment threadtools/install.py Outdated

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Style: space before ==. You can fold the if into the preceding else, saves a level of indent.

(In case you're not a pythonista, the keyword is elif.)

@bnoordhuis

Copy link
Copy Markdown
Member

It's kind of nasty to duplicate the logic in two places. It's arguably better to set a variable in configure and use that.

@sxa

sxa commented Jul 13, 2016

Copy link
Copy Markdown
MemberAuthor

True @bnoordhuis - I was just following the same pattern that was already in place for splitting Windows/Linux. I'll look at modifying it to use a variable for the shlib filename as you suggest (although it may still be cleaner overall to have the darwin-specific switch for the directory prefix in install.py instead of having that passed through) I'm looking separately at AIX too which generally uses .a as the suffix so abstracting this out as you suggest will make that simpler.

@sxa

sxa commented Jul 15, 2016

Copy link
Copy Markdown
MemberAuthor

@bnoordhuis Updates done to have the shared lib suffixes differences only into configure. In theory we could abstract this over windows as well and use a prefix variable too, but I'd propose that be done separately if we want it.

Comment threadconfigure Outdated

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you make sure lines stay < 80 columns?

@ChALkeR

ChALkeR commented Jul 16, 2016

Copy link
Copy Markdown
Member

OS/X
OSX

Nit: «macOS». Or «OS X».

Comment threadtools/install.py Outdated

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Style nit: '.'

@bnoordhuis

bnoordhuis commented Jul 18, 2016

Copy link
Copy Markdown
Member

LGTM with nit. Can you rebase and squash?

EDIT: Note that the commit log should conform to the guidelines from CONTRIBUTING.md.

@sxa
sxaforce-pushed the sharedlib-osx branch 3 times, most recently from 2ca7ded to 4edb4cbCompareJuly 18, 2016 17:29
@sxa

sxa commented Jul 18, 2016

Copy link
Copy Markdown
MemberAuthor

Should all be good now - have adjusted the commit log too.

@ChALkeR

Copy link
Copy Markdown
Member

The commit message should have a build: prefix on the first line.

@sxasxa changed the title Add correct shared library naming on OS/XAdd correct shared library naming on OS XJul 19, 2016
@jasnell

Copy link
Copy Markdown
Member

@nodejs/build ... any further thoughts on this?
It LGTM

@bnoordhuis

Copy link
Copy Markdown
Member

Still LGTM but s/Add/add/ on the first line of the commit log. Whoever lands this can fix that up.

@jasnell

Copy link
Copy Markdown
Member

@mhdawson

Copy link
Copy Markdown
Member

LGTM, @jasnell you planning to land ? I'll try to take a look tomorrow AM and land if you have not already.

@jasnell

Copy link
Copy Markdown
Member

Go for it. I'm stepping away from the laptop for a while tonight

On Thursday, August 4, 2016, Michael Dawson notifications@github.com
wrote:

LGTM, @jasnellhttps://github.com/jasnell you planning to land ? I'll
try to take a look tomorrow AM and land if you have not already.


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
#7687 (comment), or mute
the thread
https://github.com/notifications/unsubscribe-auth/AAa2eQhzEGrPO9GlNaqzBH-B0woVNVYsks5qcpgZgaJpZM4JKqr2
.

@mhdawson

Copy link
Copy Markdown
Member

CI run had some failures, don't think they are related, but just in case: https://ci.nodejs.org/job/node-test-pull-request/3538/

@mhdawson

Copy link
Copy Markdown
Member

@sxa555, Was just about to land but seems that the windows shared lib patch was landed and there is now a conflict. Can you rebase and then let me know and I'll land.

@jbergstroem

Copy link
Copy Markdown
Member

LGTM with commit message nit (ref Bens comment)

The build system currently creates a shared library on OS X with the
same name as on Linux i.e. libnode.so.48. This is inconsistent with
the conventions on OS X which uses libnode.48.so This commit changes
the build process and install.py (used by make binary) to build with
the correct name on OS X when the --shared configure parameter is used.
mhdawson pushed a commit that referenced this pull request Aug 9, 2016
The build system currently creates a shared library on OS X with the
same name as on Linux i.e. libnode.so.48. This is inconsistent with
the conventions on OS X which uses libnode.48.so This commit changes
the build process and install.py (used by make binary) to build with
the correct name on OS X when the --shared configure parameter is used.
PR-URL: #7687
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
@mhdawson

Copy link
Copy Markdown
Member

Landed as a722205

@mhdawsonmhdawson closed this Aug 9, 2016
@cjihrigcjihrig mentioned this pull request Aug 10, 2016
cjihrig pushed a commit that referenced this pull request Aug 10, 2016
The build system currently creates a shared library on OS X with the
same name as on Linux i.e. libnode.so.48. This is inconsistent with
the conventions on OS X which uses libnode.48.so This commit changes
the build process and install.py (used by make binary) to build with
the correct name on OS X when the --shared configure parameter is used.
PR-URL: #7687
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Conflicts:
node.gyp
@cjihrigcjihrig mentioned this pull request Aug 11, 2016
@MylesBorins

Copy link
Copy Markdown
Contributor

This is not landing cleanly on v4.x. Would someone be willing to do a manual backport?

@sxa

sxa commented Oct 4, 2016

Copy link
Copy Markdown
MemberAuthor

@thealphanerd Yeah I'll take a look at it - I have a set of changes kicking around that I've used to get it working on V4 already. It was on my list to push them back when I get some time :-)

@MylesBorins

Copy link
Copy Markdown
Contributor

ping @sxa555

@MylesBorinsMylesBorins added this to the v4.6.2 milestone Oct 24, 2016
@sxa

sxa commented Oct 26, 2016

Copy link
Copy Markdown
MemberAuthor

@thealphanerd ping accepted :-) We don't currently have any of the shared library stuff in v4.x so it's not a trivial matter of just doing the name change for OS/X. I do want to get it into V4 though and have got a bit of time for it now (and as per earlier comment I have had it working - just need to get a PR in for it).

@MylesBorins

Copy link
Copy Markdown
Contributor

@sxa555 awesome! Keep me in the loop if you need any support at all

@MylesBorinsMylesBorins modified the milestones: v4.7.0, v4.6.2Oct 26, 2016
@MylesBorinsMylesBorins removed this from the 4.7.0 milestone Nov 14, 2016
sxa pushed a commit to sxa/node that referenced this pull request Nov 16, 2016
WIP: Add soname & fix make install
PR-URL: nodejs#6994
Ref: nodejs#9385
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Fedor Indutny <fedor@indutny.com>
The build system currently creates a shared library on OS X with the
same name as on Linux i.e. libnode.so.48. This is inconsistent with
the conventions on OS X which uses libnode.48.dylib This commit changes
the build process and install.py (used by make binary) to build with
the correct name on OS X when the --shared configure parameter is used.
PR-URL: nodejs#7687
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
sxa pushed a commit to sxa/node that referenced this pull request Nov 16, 2016
PR-URL: nodejs#7687
Ref: nodejs#9385
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Fedor Indutny <fedor@indutny.com>
The build system currently creates a shared library on OS X with the
same name as on Linux i.e. libnode.so.48. This is inconsistent with
the conventions on OS X which uses libnode.48.dylib This commit changes
the build process and install.py (used by make binary) to build with
the correct name on OS X when the --shared configure parameter is used.
PR-URL: nodejs#7687
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
sxa pushed a commit to sxa/node that referenced this pull request Nov 18, 2016
WIP: Add soname & fix make install
PR-URL: nodejs#6994
Ref: nodejs#9385
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Fedor Indutny <fedor@indutny.com>
The build system currently creates a shared library on OS X with the
same name as on Linux i.e. libnode.so.48. This is inconsistent with
the conventions on OS X which uses libnode.48.dylib This commit changes
the build process and install.py (used by make binary) to build with
the correct name on OS X when the --shared configure parameter is used.
PR-URL: nodejs#7687
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

buildIssues and PRs related to build files or the CI.macosIssues and PRs related to the macOS platform / OSX.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

10 participants

@sxa@rvagg@bnoordhuis@ChALkeR@jasnell@mhdawson@jbergstroem@MylesBorins@addaleax@nodejs-github-bot