Opened 7 weeks ago

Last modified 2 weeks ago

#60106 assigned defect

nodejs12, nodejs13: error: use of undeclared identifier 'MAP_ANONYMOUS'

Reported by: dubiousjim Owned by: ci42
Priority: Normal Milestone:
Component: ports Version: 2.6.2
Keywords: snowleopard lion mountainlion mavericks yosemite haspatch Cc:
Port: nodejs13

Description (last modified by ryandesign (Ryan Schmidt))

A recent attempt to upgrade from nodejs12 @12.15.0_0 to @12.16.0_0, and an attempt to (build and) install nodejs13 @13.8.0_0 failed with a similar error. The logs for each attempt end with errors about the presence of the macro MAP_ANONYMOUS in src/large_pages/node_large_page.cc. (I've already discarded the log, and am disinclined to wait the several hours it takes to get that far in the failed build.) Apparently this macro is undefined on older OSXs. I'm using Mac 10.10.5.

I searched on that, and found this discussion, which prompted me to create the attached patch and attempt the build again. With the Portfile modified to include that patch, both nodejs12 and nodejs13 were able to build and install.

Attachments (1)

patch-anonymous.diff (544 bytes) - added by dubiousjim 7 weeks ago.
patch MAP_ANONYMOUS to fallback to MAP_ANON

Download all attachments as: .zip

Change History (3)

Changed 7 weeks ago by dubiousjim

Attachment: patch-anonymous.diff added

patch MAP_ANONYMOUS to fallback to MAP_ANON

comment:1 Changed 2 weeks ago by ryandesign (Ryan Schmidt)

Keywords: snowleopard lion mountainlion mavericks yosemite added
Summary: nodejs12/13 fail to build on older OSXnodejs12, nodejs13: error: use of undeclared identifier 'MAP_ANONYMOUS'

Here is a log showing the build failure:

https://build.macports.org/builders/ports-10.7_x86_64-builder/builds/19672/steps/install-port/logs/stdio

../src/large_pages/node_large_page.cc:337:53: error: use of undeclared identifier 'MAP_ANONYMOUS'
              PROT_READ | PROT_WRITE, MAP_PRIVATE | MAP_ANONYMOUS, -1, 0);
                                                    ^
../src/large_pages/node_large_page.cc:387:29: error: use of undeclared identifier 'MAP_ANONYMOUS'
              MAP_PRIVATE | MAP_ANONYMOUS,
                            ^

If it is not desired to patch the software, the legacysupport portgroup could also be used.

comment:2 Changed 2 weeks ago by ryandesign (Ryan Schmidt)

Description: modified (diff)
Keywords: haspatch added
Note: See TracTickets for help on using tickets.