Opened 6 years ago

Closed 6 years ago

#57723 closed defect (fixed)

tuntaposx @20150118: fatal error: 'kern/locks.h' file not found

Reported by: mriyah Owned by: Equidamoid
Priority: Normal Milestone:
Component: ports Version: 2.5.4
Keywords: mojave Cc: mriyah, jackiezhangcn
Port: tuntaposx

Description (last modified by mf2k (Frank Schima))

tuntaposx as a dependency failed to build with the following

fatal error: 'kern/locks.h' file not found.

Regards.

Attachments (1)

main.log (18.0 KB) - added by mriyah 6 years ago.

Download all attachments as: .zip

Change History (11)

comment:1 Changed 6 years ago by mf2k (Frank Schima)

Description: modified (diff)
Port: tuntaposx added

In the future, please use WikiFormatting, fill in the Port field and add the port maintainer(s) to Cc (port info --maintainers tuntaposx), if any.

comment:2 Changed 6 years ago by mf2k (Frank Schima)

Please attach the main.log file after cleaning the port (sudo port clean tuntaposx).

Changed 6 years ago by mriyah

Attachment: main.log added

comment:3 Changed 6 years ago by ryandesign (Ryan Carsten Schmidt)

Keywords: mojave added
Summary: installing tinc on mojavetuntaposx @20150118: fatal error: 'kern/locks.h' file not found

comment:4 Changed 6 years ago by mf2k (Frank Schima)

Cc: jackiezhangcn added

Has duplicate #57819.

comment:5 Changed 6 years ago by Equidamoid

The build uses incorrect path for kernel headers:

-I/System/Library/Frameworks/Kernel.framework/Headers

instead of the one that made it compile for me:

-I/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/Kernel.framework/Versions/A/Headers

I have no idea (for now) how to fix it properly in macports way, but here is the hack that may help someone before proper fix is available:

Run port edit tuntaposx and replace

reinplace "s|@ARCHFLAGS@|[get_canonical_archflags cc]|" ${f}

with

reinplace "s|@ARCHFLAGS@|[get_canonical_archflags cc] -I/Library/Developer/CommandLineTools/SDKs/MacOSX. sdk/System/Library/Frameworks/Kernel.framework/Versions/A/Headers|" ${f}

comment:6 Changed 6 years ago by Equidamoid

I believe this line in src/{tun,tap}/Makefile can be patched for a better fix:

INCLUDE = -I.. -I/System/Library/Frameworks/Kernel.framework/Headers

Last edited 6 years ago by Equidamoid (previous) (diff)

comment:8 Changed 6 years ago by Equidamoid

Owner: set to Equidamoid
Resolution: fixed
Status: newclosed

In 7640a4aa1377008845014c2bdfab91900d031fd5/macports-ports (master):

Fix tuntaposx build on Mojave

  • updated kernel headers path in Makefies

Closes: #57723

comment:9 Changed 6 years ago by jmroot (Joshua Root)

Resolution: fixed
Status: closedreopened

comment:10 Changed 6 years ago by ken-cunningham-webuse

Resolution: fixed
Status: reopenedclosed

In 085ffd96809875035301b00a728c98783f773e19/macports-ports (master):

tuntaposx: use configure.sdkroot to set SDK path

closes: #57723

when this port is next updated, these patches and
reinplace bits should all be rolled into one.

Note: See TracTickets for help on using tickets.