-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
update nodejs portfiles, enable ccache, use macports libraries where possible #28819
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
base: master
Are you sure you want to change the base?
Conversation
Notifying maintainers: |
added libuv @ryandesign i hate git so much. you guys can deal with this nonsense. building nodejs20 on lion while i pass out later |
this is a well-known bug on lion that relates to posix_spawn and FD_CLOEXEC, which only works on 10.8 and above (maybe 10.6 too, not sure)
provided nodejs20/zettlr build log to show the panic issue has been fixed. i would appreciate any contributor's adjustments to the version macros to ensure they're working right. in short, for libuv:
|
seems to work by using an older-style. also use the CloseallFDsOnExec that originated in chrome, which will close all FDs after execution. though they say it's not safe in multithreaded applications, it worked for quite some time and is better than nothing. all that's left is ensuring clang-19 uses the latest ld throughout. seems to call ld127 at the end :/
- also make all systems use the up-to-date macports libuv, for uniformity.
since there's some discussion as to whether libuv or libuv-devel will be getting the update, i have copied the patch to both versions. as it stands a newer libuv is needed for some ports. it may make sense to just use libuv-devel for node at this time.
it looks like buildbot already takes care of this or something?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These are only the things that stood out to me in your nodejs14 changes. I didn't look at the other ports.
lang/nodejs14/Portfile
Outdated
file mkdir ${workpath}/zlib-inc ${workpath}/cares-inc | ||
file copy ${prefix}/include/zconf.h ${prefix}/include/zlib.h \ | ||
${workpath}/zlib-inc/ | ||
system "cp ${prefix}/include/*ares*.h ${workpath}/cares-inc" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's preferable to use native Tcl code when possible instead of using system
. In this case, this can probably be done with (untested):
system "cp ${prefix}/include/*ares*.h ${workpath}/cares-inc" | |
copy {*}[glob ${prefix}/include/*ares*.h] ${workpath}/cares-inc |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
whoops i thought i had incorporated this, but i'll do this at the end with the outstanding libuv 'tarball' -> release change
lang/nodejs14/Portfile
Outdated
|
||
# V8 only supports ARM and IA-32 processors | ||
supported_archs i386 x86_64 arm64 | ||
|
||
universal_variant no | ||
|
||
# "V8 doesn't like cache." | ||
configure.ccache no | ||
configure.ccache yes |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is the default; you could remove this line.
configure.ccache yes |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
dun
lang/nodejs14/Portfile
Outdated
depends_lib-append path:lib/pkgconfig/icu-uc.pc:icu \ | ||
port:python${py_ver_nodot} \ | ||
port:zlib | ||
path:lib/libz.dylib:zlib \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unless something changed while I wasn't looking, the zlib port is the only port that installs lib/libz.dylib, so there's no reason to change port:zlib
to path:lib/libz.dylib:zlib
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
dun.
and you were right: it was a nodejs issue. seems certain versions had this header, but older and newer ones did not lol. so typical of these guys lol
port:zlib | ||
path:lib/libz.dylib:zlib \ | ||
path:lib/libuv.dylib:libuv \ | ||
port:openssl \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This port includes the openssl portgroup so you're not supposed to have to include the openssl dependency yourself; the portgroup does it for you.
port:openssl \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
dun
lang/nodejs14/Portfile
Outdated
configure.args-append --shared-openssl-includes=${prefix}/libexec/openssl3/include/openssl | ||
configure.args-append --shared-openssl-libpath=${prefix}/libexec/openssl3/lib |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This port includes the openssl portgroup so it was correct to use its functions to get the include and library paths; that should not have been changed.
configure.args-append --shared-openssl-includes=${prefix}/libexec/openssl3/include/openssl | |
configure.args-append --shared-openssl-libpath=${prefix}/libexec/openssl3/lib | |
configure.args-append --shared-openssl-includes=[openssl::include_dir] | |
configure.args-append --shared-openssl-libpath=[openssl::lib_dir] |
Since it looks like you want to switch from openssl 1.1 to 3, change this line near the top of the Portfile:
openssl.branch 1.1
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i actually didn't care what openssl version was used, but you are right i should just use the macros that come with the portgroup. so that's what i did.
i didn't change openssl's inclusion otherwise.
lang/nodejs14/Portfile
Outdated
set py_ver 3.10 | ||
set py_ver_nodot [string map {. {}} ${py_ver}] | ||
|
||
depends_build-append port:pkgconfig |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The build is failing because python310 was not found.
depends_build-append port:pkgconfig | |
depends_build-append port:pkgconfig \ | |
port:python${py_ver_nodot} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
dun
devel/libuv/Portfile
Outdated
revision 1 | ||
checksums rmd160 40cf693021f7584ff4aeffcbf2020d0e00139005 \ | ||
sha256 2ceca1a7577633cf92794db5bf5512370f6cd45a5746d6e14f8c20aeab0a547b \ | ||
size 1691252 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This doesn't look like it's aligned correctly, and it has trailing whitespace.
size 1691252 | |
size 1691252 |
However, please follow the instructions in the comment and change github.tarball_from
from tarball
to either releases
or archive
, whichever is correct for this software; then the checksums will change again.
Since you are increasing the version
, the revision
should be 0
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i will do this change at the very end because of the volume of other things that were changed.
like the star on the top of the tree, we will put it on together, my dear rydye @ryandesign
Responding to the question you asked in a commit message:
Buildbot and GitHub Actions run MacPorts. MacPorts does not automatically use autoreconf. If this software needs autoreconf to be done, or if you are patching files that comprise an autoconf-based build system, the portfile must run autoreconf. |
well when i was testing locally it did require autoconf, but its' possible that macports is grabbing it correctly and i was doing something wrong.
i assume i was doing it wrong because that error went away once i removed the autoconf calls.
… On Jul 16, 2025, at 6:31 PM, Ryan Carsten Schmidt ***@***.***> wrote:
ryandesign
left a comment
(macports/macports-ports#28819)
Responding to the question you asked in a commit message:
remove autoreconf command for libuv-devel
it looks like buildbot already takes care of this or something?
Buildbot and GitHub Actions run MacPorts. MacPorts does not automatically use autoreconf. If this software needs autoreconf to be done, or if you are patching files that comprise an autoconf-based build system, the portfile must run autoreconf.
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you were mentioned.
|
thanks pal. proud to announce the new spiffy macports-libcxx holds up well to all of the nodejses, unlike the existing one which cannot cope with the lack of __cxa_thread_atexit, whereas mine, whilst not fully there (i would like the symbol pulled automatically from the dylib instead of shoehorning in the static), can pull the symbol out of the static libcxxabi.
well, i blew it because i didn't put in ${prefix} instead of /opt/local when linking libc++abi.a, so i have to hope this is the star on the tree commit here's to hoping it works
this is more of a 'touch' commit than anything, because buildbot reports macos 13 building fine, so i don't know why 14/15 wouldn't also be okay unless it has to do with my decision to force update stale commits. so here is a fresh commit to see if clears buildbot's confusion
everything looks good @ryandesign maybe it was my decision to amend previous commits that previously were missing things. i just pushed a fresh commit to rule this out. i don't see why 14/15 would have errors if 13 is ok. |
yes yes rydye @ryandesign i may have missed the slightly-different patch for nodejs16, and i may have forgotten the include directives for zlib on nodejs24, which probably would explaint he failures on both hoping for all green baby let's go
weirdness
whatever CMON LET'S GO ALL GREEN i got a few tracks queued up for the occasion, rootie @jmroot
there was "regression" in clang20 at some point, and i assume the snapshot of APPUL clang contained it, as the other two don't fail on nodejs24 (well, at least 15 doesn't on the last run). so we force clang-19 on macos15 for nodejs24. rootie @jmroot if this finishes when i'm in bed (and you'll obviously be up and at it), wait to crack those Fosters kegs cc @ryandesign
clang-mp-19 here's to hoping. the only outstanding issue is macos14 and nodejs24
hoping this works. otherwise i need your input @ryandesign as to how to force nodejs24+macos14 to use clang-mp-19. i assume i should have been using configure.{cc,cxx,cpp} to force them all along, and not compiler.blacklist
rootie @jmroot is that Fosters on ice? has it even arrived? i guess i can use Jet - Hey kids as the pre-drink/primer. cc @ryandesign looks like we good to go fam. time to flip them switches like daz and kurupt and get this show ROLLIN' |
please see my follow-up to @ryandesign's ticket here:
https://trac.macports.org/ticket/71475#comment:17
as it stands, with the forthcoming pull this is the status:
the outstanding issues are now:
Type(s)
Tested on
macOS 10.7.5 11G63 x86_64
Xcode 4.6.2 4H1003
Verification
Have you
port lint
?sudo port test
?sudo port -vst install
?