Opened 6 years ago

Closed 6 years ago

Last modified 6 years ago

#56247 closed defect (fixed)

jack @1.9.12: fatal error: 'MacTypes.h' file not found

Reported by: iefdev (Eric F) Owned by: neverpanic (Clemens Lang)
Priority: Normal Milestone:
Component: ports Version: 2.4.2
Keywords: lion Cc: neverpanic (Clemens Lang)
Port: jack

Description (last modified by iEFdev)

Repeated error:

... fatal error: 'MacTypes.h' file not found
:info:build #include <MacTypes.h>
:info:build          ^

Related to #56241? (change of headers)

# there's no maintainer spec in the Portfile, but i added @neverpanic - as noticed in #56241

Attachments (2)

jack_main.log (40.0 KB) - added by iEFdev 6 years ago.
MacTypes.diff (876 bytes) - added by iEFdev 6 years ago.

Download all attachments as: .zip

Change History (17)

Changed 6 years ago by iEFdev

Attachment: jack_main.log added

comment:1 Changed 6 years ago by iEFdev

Description: modified (diff)

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

Keywords: lion added; Lion removed
Summary: Missing header (fatal error: 'MacTypes.h' file not found)jack @1.9.12: fatal error: 'MacTypes.h' file not found

comment:3 Changed 6 years ago by neverpanic (Clemens Lang)

My system has /usr/include/MacTypes.h. Does yours not have that file?

What's the output of mdfind -name MacTypes.h on your system? Do you have the Command Line Tools installed?

comment:4 in reply to:  3 Changed 6 years ago by iEFdev

Replying to neverpanic:

My system has /usr/include/MacTypes.h. Does yours not have that file?

No, it doesn't.  

What's the output of mdfind -name MacTypes.h on your system?

Here it is:

$ mdfind -name MacTypes.h
/System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/CarbonCore.framework/Versions/A/Headers/MacTypes.h

 

Do you have the Command Line Tools installed?

Yes.

comment:5 Changed 6 years ago by kencu (Ken)

Other ports have this issue too -- see:

<https://github.com/macports/macports-ports/blob/master/science/openscad/files/patch-src-AppleEvents.cc.diff>

not sure just when this file is needed and when it's not...I can test later today.

comment:6 Changed 6 years ago by neverpanic (Clemens Lang)

Can you try applying the following patch and see if that helps?

  • audio/jack/Portfile

    diff --git a/audio/jack/Portfile b/audio/jack/Portfile
    index b5a55dd07e..6eb76c2600 100644
    a b long_description \ 
    2424    Through JACK, users are enabled to build powerful systems for signal \
    2525    processing and music production.
    2626
     27patchfiles          mactypes.patch
     28
    2729depends_build-append \
    2830                    port:pkgconfig
    2931depends_lib         port:libsamplerate \
  • audio/jack/files/mactypes.patch

    diff --git a/audio/jack/files/mactypes.patch b/audio/jack/files/mactypes.patch
    index e69de29bb2..e51be48ce0 100644
    a b  
     1--- macosx/JackMachThread.h.orig        2018-04-07 19:51:15.000000000 +0200
     2+++ macosx/JackMachThread.h     2018-04-07 19:52:10.000000000 +0200
     3@@ -70,7 +70,7 @@
     4 
     5 #include "JackPosixThread.h"
     6 #ifndef MY_TARGET_OS_IPHONE
     7-#include <MacTypes.h>
     8+#include <CoreServices/../Frameworks/CarbonCore.framework/Headers/MacTypes.h>
     9 #endif
     10 
     11 #include <mach/thread_policy.h>
     12--- macosx/coremidi/JackCoreMidiUtil.h.orig     2018-04-07 19:51:21.000000000 +0200
     13+++ macosx/coremidi/JackCoreMidiUtil.h  2018-04-07 19:52:21.000000000 +0200
     14@@ -22,7 +22,7 @@
     15 
     16 #include <string>
     17 
     18-#include <MacTypes.h>
     19+#include <CoreServices/../Frameworks/CarbonCore.framework/Headers/MacTypes.h>
     20 
     21 namespace Jack {
     22 

comment:7 in reply to:  6 Changed 6 years ago by iEFdev

Replying to neverpanic:

Can you try applying the following patch and see if that helps?

I didn't run the patch, but added the 3 changes manually. It started to build fine, but failed at a later instead. But, this one made it:

$ sudo port upgrade jack configure.cxxflags="-stdlib=libc++" configure.cxx="clang++ -stdlib=libc++"

comment:8 Changed 6 years ago by neverpanic (Clemens Lang)

OK, so now I'd only need to know when MacTypes.h started appearing on newer systems. If you can figure this out for me, I'll commit the patch.

comment:9 in reply to:  8 Changed 6 years ago by iEFdev

Replying to neverpanic:

OK, so now I'd only need to know when MacTypes.h started appearing on newer systems. If you can figure this out for me, I'll commit the patch.

Not sure, but it looks like 10.8 from a page I found here: https://developer.apple.com/library/content/releasenotes/General/CarbonCoreDeprecations/#//apple_ref/doc/uid/TP40012224-CH1-SW22

It's all about 10.8, updated in 2012, and about MacTypes.h it says:

If you need to include this header file for compatibility with legacy code, use /usr/include/MacTypes.h instead.

So maybe:

set check.os.major 12
if {${check.os.major} < ${os.major}} {
    patchfiles    MacTypes.diff
}

I tried to use the patch but it did work (using the “files” dir). I made one from my own changes that did, incase you want it.

Changed 6 years ago by iEFdev

Attachment: MacTypes.diff added

comment:10 Changed 6 years ago by kencu (Ken)

comment:11 Changed 6 years ago by neverpanic (Clemens Lang)

Owner: set to neverpanic
Resolution: fixed
Status: newclosed

In 0020079b7d555c5d32bb3c329d25832c72e2ce28/macports-ports:

jack: Fix build on legacy systems

Closes: #56247

comment:12 Changed 6 years ago by kencu (Ken)

It doesn't build with the default SnowLeopard compiler.

I didn't try an exhaustive list of compilers, but for those who may follow, it builds through with macports-clang-5.0 against -stdlib=libstdc++ without the cxx11 PortGroup. It doesn't appear to require -stdlib=libc++, but it does certainly build with it.

comment:13 Changed 6 years ago by neverpanic (Clemens Lang)

I'm not interested in debugging build issues on SnowLeopard. If you can come up with a patch, that would be nice.

comment:14 Changed 6 years ago by kencu (Ken)

Don't blame you. Very very soon SnowLeopard will default to libc++ and clang-5.0, and you will never need to think about a compiler or c++ stdlib issue again. Doesn't that sound wonderful!

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

I'm pretty sure the Right Way is to #include <CoreServices/CoreServices.h> if you need those types.

Note: See TracTickets for help on using tickets.