Discussion:
[MacPorts] #57712: CFLAGS is missing -isysroot/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk
MacPorts
2018-12-02 12:31:27 UTC
Permalink
#57712: CFLAGS is missing
-isysroot/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk
--------------------+--------------------------------
Reporter: sgrewe | Owner: < default >, ionic
Type: defect | Status: assigned
Priority: Normal | Milestone:
Component: ports | Version: 2.5.4
Keywords: | Port: pulseaudio
--------------------+--------------------------------
New Macbook pro\\
migrated with migration assistant\\
\\
uninstalled macports\\
installed xcode 10.1\\
installed command line tools\\
reinstalled macports\\
\\
port install pulseaudio fails because CFLAGS is missing SDK
--
Ticket URL: <https://trac.macports.org/ticket/57712>
MacPorts <https://www.macports.org/>
Ports system for macOS
MacPorts
2018-12-02 12:34:13 UTC
Permalink
#57712: CFLAGS is missing
-isysroot/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk
-------------------------+--------------------------------
Reporter: sgrewe | Owner: < default >, ionic
Type: defect | Status: assigned
Priority: Normal | Milestone:
Component: ports | Version: 2.5.4
Resolution: | Keywords:
Port: pulseaudio |
-------------------------+--------------------------------
Changes (by sgrewe):

* Attachment "main.log" added.

main.log
--
Ticket URL: <https://trac.macports.org/ticket/57712>
MacPorts <https://www.macports.org/>
Ports system for macOS
MacPorts
2018-12-02 15:12:23 UTC
Permalink
#57712: pulseaudio: using incorrect sysroot
-------------------------+----------------------
Reporter: sgrewe | Owner: Ionic
Type: defect | Status: assigned
Priority: Normal | Milestone:
Component: ports | Version: 2.5.4
Resolution: | Keywords: mojave
Port: pulseaudio |
-------------------------+----------------------
Changes (by jmroot):

* keywords: => mojave
* owner: < default >, ionic => Ionic


Comment:

The configure script is being called with this argument in your log:
{{{
--with-mac-sysroot=/
}}}
I can't reproduce that. For me on 10.14 it's using
{{{
--with-mac-
sysroot=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk
}}}
which makes sense looking at what the Portfile does.

Apparently configure.sdkroot is empty for you. Do you have any SDK-related
options set in macports.conf? Does /usr/include exist on your system?
--
Ticket URL: <https://trac.macports.org/ticket/57712#comment:2>
MacPorts <https://www.macports.org/>
Ports system for macOS
MacPorts
2018-12-02 15:21:59 UTC
Permalink
#57712: pulseaudio: using incorrect sysroot
-------------------------+----------------------
Reporter: sgrewe | Owner: Ionic
Type: defect | Status: assigned
Priority: Normal | Milestone:
Component: ports | Version: 2.5.4
Resolution: | Keywords: mojave
Port: pulseaudio |
-------------------------+----------------------
Changes (by sgrewe):

* Attachment "macports.conf" added.

macports.conf
--
Ticket URL: <https://trac.macports.org/ticket/57712>
MacPorts <https://www.macports.org/>
Ports system for macOS
MacPorts
2018-12-02 15:31:17 UTC
Permalink
#57712: pulseaudio: using incorrect sysroot
-------------------------+----------------------
Reporter: sgrewe | Owner: Ionic
Type: defect | Status: assigned
Priority: Normal | Milestone:
Component: ports | Version: 2.5.4
Resolution: | Keywords: mojave
Port: pulseaudio |
-------------------------+----------------------

Comment (by sgrewe):

On the old macbook it's also using\\
{{{--with-mac-
sysroot=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk}}}\\
I did not change macports.conf, see attached\\
/usr/include exists, but again, same as on the old machine, where it's
working\\
I now deleted the contents of /usr/include, tried again\\

{{{
port clean --all pulseaudio
port install pulseaudio
}}}
but still the same result
--
Ticket URL: <https://trac.macports.org/ticket/57712#comment:3>
MacPorts <https://www.macports.org/>
Ports system for macOS
MacPorts
2018-12-02 15:32:22 UTC
Permalink
#57712: pulseaudio: using incorrect sysroot
-------------------------+----------------------
Reporter: sgrewe | Owner: Ionic
Type: defect | Status: assigned
Priority: Normal | Milestone:
Component: ports | Version: 2.5.4
Resolution: | Keywords: mojave
Port: pulseaudio |
-------------------------+----------------------

Comment (by sgrewe):

How can I check that macports sees the command line tools?
--
Ticket URL: <https://trac.macports.org/ticket/57712#comment:4>
MacPorts <https://www.macports.org/>
Ports system for macOS
MacPorts
2018-12-02 15:50:02 UTC
Permalink
#57712: pulseaudio: using incorrect sysroot
-------------------------+----------------------
Reporter: sgrewe | Owner: Ionic
Type: defect | Status: assigned
Priority: Normal | Milestone:
Component: ports | Version: 2.5.4
Resolution: | Keywords: mojave
Port: pulseaudio |
-------------------------+----------------------

Comment (by sgrewe):

Obviously

{{{
configure.sdkroot
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk
}}}
in the portfile solves the problem, but what is the root cause?
--
Ticket URL: <https://trac.macports.org/ticket/57712#comment:5>
MacPorts <https://www.macports.org/>
Ports system for macOS
MacPorts
2018-12-02 17:47:54 UTC
Permalink
#57712: pulseaudio: using incorrect sysroot
-------------------------+----------------------
Reporter: sgrewe | Owner: Ionic
Type: defect | Status: assigned
Priority: Normal | Milestone:
Component: ports | Version: 2.5.4
Resolution: | Keywords: mojave
Port: pulseaudio |
-------------------------+----------------------

Comment (by jmroot):

If /usr/include exists, it is assumed to contain a working set of system
headers and an SDK is not used. The code that sets the default value of
configure.sdkroot is here: https://github.com/macports/macports-
base/blob/v2.5.4/src/port1.0/portconfigure.tcl#L401
--
Ticket URL: <https://trac.macports.org/ticket/57712#comment:6>
MacPorts <https://www.macports.org/>
Ports system for macOS
MacPorts
2018-12-03 00:50:17 UTC
Permalink
#57712: pulseaudio: using incorrect sysroot
-------------------------+----------------------
Reporter: sgrewe | Owner: Ionic
Type: defect | Status: assigned
Priority: Normal | Milestone:
Component: ports | Version: 2.5.4
Resolution: | Keywords: mojave
Port: pulseaudio |
-------------------------+----------------------

Comment (by kencu):

So Stefan, it looks like if instead of deleting the **contents** of
`/usr/include`, if just delete `/usr/include` completely, you should be
OK.
--
Ticket URL: <https://trac.macports.org/ticket/57712#comment:7>
MacPorts <https://www.macports.org/>
Ports system for macOS
MacPorts
2018-12-03 01:00:35 UTC
Permalink
#57712: pulseaudio: using incorrect sysroot
-------------------------+--------------------
Reporter: sgrewe | Owner: Ionic
Type: defect | Status: closed
Priority: Normal | Milestone:
Component: ports | Version: 2.5.4
Resolution: invalid | Keywords: mojave
Port: pulseaudio |
-------------------------+--------------------
Changes (by Ionic):

* status: assigned => closed
* cc: sgrewe (removed)
* resolution: => invalid


Comment:

Why would one delete /usr/include in the first place?

In any case, there's nothing to do on the port (or base) side here, so
closing up.

If an sdkroot is set up correctly (manually or automatically through
base), it's getting used, otherwise the root is set to `/`, which is fine.


Btw: you do not need to CC yourself if you are the reporter.
--
Ticket URL: <https://trac.macports.org/ticket/57712#comment:8>
MacPorts <https://www.macports.org/>
Ports system for macOS
MacPorts
2018-12-03 04:38:51 UTC
Permalink
#57712: pulseaudio: using incorrect sysroot
-------------------------+--------------------
Reporter: sgrewe | Owner: Ionic
Type: defect | Status: closed
Priority: Normal | Milestone:
Component: ports | Version: 2.5.4
Resolution: invalid | Keywords: mojave
Port: pulseaudio |
-------------------------+--------------------
Post by MacPorts
Why would one delete /usr/include in the first place?
It normally doesn't exist on Mojave. There is an extra installer included
in the command line tools which will install it though, and some users
have used it.
--
Ticket URL: <https://trac.macports.org/ticket/57712#comment:9>
MacPorts <https://www.macports.org/>
Ports system for macOS
MacPorts
2018-12-03 20:14:17 UTC
Permalink
#57712: pulseaudio: using incorrect sysroot
-------------------------+--------------------
Reporter: sgrewe | Owner: Ionic
Type: defect | Status: closed
Priority: Normal | Milestone:
Component: ports | Version: 2.5.4
Resolution: invalid | Keywords: mojave
Port: pulseaudio |
-------------------------+--------------------
Changes (by Ionic):

* cc: sgrewe (added)
Post by MacPorts
Post by MacPorts
Why would one delete /usr/include in the first place?
It normally doesn't exist on Mojave. There is an extra installer
included in the command line tools which will install it though, and some
users have used it.

Does that mean that base now has to check whether `/usr/include` is empty
and set `configure.sdkroot` appropriately to an SDK path and we have a
general bug here? If we already check for the presence of `/usr/include`
(and unless Apple installs a stub empty directory by default to preserve
the hierarchy), the only way this could go wrong is if users delete the
directory contents manually or uninstall the package, without the
installer removing the directory.
Post by MacPorts
Post by MacPorts
Btw: you do not need to CC yourself if you are the reporter.
This is no longer necessarily the case: users can change their
notification preferences such that they will not be notified for tickets
that they reported unless they are also in Cc.

Ah, must have missed that. Okay then, ignore that comment. Re-adding to CC
list.
--
Ticket URL: <https://trac.macports.org/ticket/57712#comment:10>
MacPorts <https://www.macports.org/>
Ports system for macOS
Loading...