#69153 closed defect (fixed)

prelude-manager @5.2.0: clang: error: unknown argument: '-80fd-11ee-8227-6aecfccc70fe/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.2.Internal.sdk/System/Library/Frameworks/'

Reported by: ryandesign (Ryan Carsten Schmidt) Owned by: ctreleaven (Craig Treleaven)
Priority: Normal Milestone:
Component: ports Version: 2.8.1
Keywords: monterey ventura sonoma haspatch Cc:
Port: prelude-manager

Description

Weird error building prelude-manager on the Sonoma buildbot workers:

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

make[2]: Entering directory `/opt/local/var/macports/build/_opt_bblocal_var_buildworker_ports_build_ports_security_prelude-manager/prelude-manager/work/prelude-manager-5.2.0/libev'
/bin/sh ../libtool  --tag=CC   --mode=compile /usr/bin/clang -DHAVE_CONFIG_H -I. -I..   -I/opt/local/include -isysroot/Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk  -pipe -Os -isysroot/Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk -arch x86_64 -DNETSNMP_ENABLE_IPV6 -fno-strict-aliasing -g -Os -pipe -DBUILD=177 -DMACOSX_DEPLOYMENT_TARGET=14.2 --sysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -iframeworkwithsysroot /System/Library/Frameworks/-80fd-11ee-8227-6aecfccc70fe/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.2.Internal.sdk/System/Library/PrivateFrameworks/ -80fd-11ee-8227-6aecfccc70fe/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.2.Internal.sdk/System/Library/Frameworks/ -iwithsysroot /usr/local/libressl/include -L/AppleInternal/Library/BuildRoots/0032d1ee-80fd-11ee-8227-6aecfccc70fe/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.2.Internal.sdk/usr/local/libressl/lib -Udarwin23 -Ddarwin23=darwin23 -I. -I/usr/local/include -MT ev.lo -MD -MP -MF .deps/ev.Tpo -c -o ev.lo ev.c
libtool: compile:  /usr/bin/clang -DHAVE_CONFIG_H -I. -I.. -I/opt/local/include -isysroot/Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk -pipe -Os -isysroot/Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk -arch x86_64 -DNETSNMP_ENABLE_IPV6 -fno-strict-aliasing -g -Os -pipe -DBUILD=177 -DMACOSX_DEPLOYMENT_TARGET=14.2 --sysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -iframeworkwithsysroot /System/Library/Frameworks/-80fd-11ee-8227-6aecfccc70fe/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.2.Internal.sdk/System/Library/PrivateFrameworks/ -80fd-11ee-8227-6aecfccc70fe/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.2.Internal.sdk/System/Library/Frameworks/ -iwithsysroot /usr/local/libressl/include -L/AppleInternal/Library/BuildRoots/0032d1ee-80fd-11ee-8227-6aecfccc70fe/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.2.Internal.sdk/usr/local/libressl/lib -Udarwin23 -Ddarwin23=darwin23 -I. -I/usr/local/include -MT ev.lo -MD -MP -MF .deps/ev.Tpo -c ev.c  -fno-common -DPIC -o .libs/ev.o
clang: error: unknown argument: '-80fd-11ee-8227-6aecfccc70fe/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.2.Internal.sdk/System/Library/Frameworks/'
make[2]: *** [ev.lo] Error 1
make[2]: Leaving directory `/opt/local/var/macports/build/_opt_bblocal_var_buildworker_ports_build_ports_security_prelude-manager/prelude-manager/work/prelude-manager-5.2.0/libev'

Never seen an error like that before and not sure why we're getting a reference to MacOSX14.2.Internal.sdk; no such thing exists on the buildbot workers.

Attachments (1)

prelude attempted sonoma fix.diff (1.7 KB) - added by ctreleaven (Craig Treleaven) 10 months ago.

Download all attachments as: .zip

Change History (9)

comment:1 Changed 10 months ago by ctreleaven (Craig Treleaven)

Status: assignedaccepted

Exactly the same error on Apple and Intel silicone. I see that hex string is included in both the -iframeworkwithsysroot and -L flags.

I'm afraid this one is well beyond my pay grade; especially since I don't have a system running Sonoma.

comment:2 Changed 10 months ago by ryandesign (Ryan Carsten Schmidt)

Keywords: ventura added

Similar issue on macOS 13:

clang: error: unknown argument: '-120b-11ee-b796-7a03568b17ac/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX13.5.Internal.sdk/System/Library/Frameworks/'

comment:3 Changed 10 months ago by ryandesign (Ryan Carsten Schmidt)

Keywords: monterey added

I also see -iwithsysroot /usr/local/libressl/include and -I/usr/local/include in the log which we do not want.

I see that this is happening when building the bundled version of libev. Could we use the MacPorts libev port instead?

I see the same problem on my macOS 12 system:

clang: error: unknown argument: '-3cda-11ee-b8ac-16228a05f5d2/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX12.7.Internal.sdk/System/Library/Frameworks/'

however we had successful builds on macOS 12 on the buildbot back in March 2022 so maybe something has changed with the dependencies.

comment:4 Changed 10 months ago by ryandesign (Ryan Carsten Schmidt)

I think these weird flags are coming from /usr/bin/net-snmp-config:

% /usr/bin/net-snmp-config --cflags
-DNETSNMP_ENABLE_IPV6 -fno-strict-aliasing -g -Os -pipe -DBUILD=174 -DMACOSX_DEPLOYMENT_TARGET=12.7 --sysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX13.1.sdk -iframeworkwithsysroot /System/Library/Frameworks/-3cda-11ee-b8ac-16228a05f5d2/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX12.7.Internal.sdk/System/Library/PrivateFrameworks/ -3cda-11ee-b8ac-16228a05f5d2/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX12.7.Internal.sdk/System/Library/Frameworks/ -iwithsysroot /usr/local/libressl/include -L/AppleInternal/Library/BuildRoots/bc10cbcd-3cda-11ee-b8ac-16228a05f5d2/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX12.7.Internal.sdk/usr/local/libressl/lib -Udarwin21 -Ddarwin21=darwin21 -I. -I/usr/local/include

Can the port use MacPorts net-snmp instead?

comment:5 Changed 10 months ago by ctreleaven (Craig Treleaven)

prelude-manager's configure has a couple of promising options ...

$ ./configure --help
`configure' configures prelude-manager 5.2.0 to adapt to many kinds of systems.
...
  --with-net-snmp-prefix=PFX
                          Prefix where net-snmp is installed (optional)
...
  --with-libev            Define if we use the libev available on the system
                          or the embedded libev

I'll try these out, hopefully today.

comment:6 Changed 10 months ago by ctreleaven (Craig Treleaven)

I've wasted a lot of time and can't make prelude-manager build with MacPorts libev. I think their configure tests for libev are broken but I'm not that good with Auto tools. Also, upstream appears to have had no activity for over 3 years so I doubt we'll get any support. I'm attached a diff with where I got to in case I'm missing something obvious.

Changed 10 months ago by ctreleaven (Craig Treleaven)

comment:7 Changed 10 months ago by ryandesign (Ryan Carsten Schmidt)

Keywords: haspatch added

Thanks!

Upstream's configure tests for libev are broken in that they are expecting libev to provide a pkg-config file which, as shipped by libev's developers, it doesn't. Some distributions are apparently adding their own pkg-config files to their libev packages. libev's developers were asked to incorporate a pkg-config file into their software in 2009 and did not respond.

I think the only problem with your patch was probably "LIBEV_LIBS=-llibev" which should have been "LIBEV_LIBS=-lev". I've made a few more changes and submitted everything here:

https://github.com/macports/macports-ports/pull/22332

comment:8 Changed 10 months ago by ryandesign (Ryan Carsten Schmidt)

Resolution: fixed
Status: acceptedclosed

In 2369e08e454a7e64bac6a00c6ad2fe4c87d5de5c/macports-ports (master):

prelude-manager: Use MacPorts libev and net-snmp (https://github.com/macports/macports-ports/pull/22332)

Fixes build failure on recent macOS whose net-snmp-config is broken.

Closes: #69153

Switch pkgconfig dependency to path:-based to accommodate pkgconf.

Add libtool dependency because prelude-manager links with libltdl.dylib.

Add net-snmp dependency and --enable-snmp configure arg for clarity.

Add libev dependency and --with-libev configure arg to tell it to use
MacPorts libev and patch Makefile.am to avoid trying to build the
bundled libev which would fail. Add LIBEV_CFLAGS and LIBEV_LIBS
environment variables because the configure script expects to find libev
via pkg-config but libev doesn't provide a pkg-config file.

Remove --mandir=${prefix}/share/man configure arg; that's the default.

Add --with-libwrap=${prefix} configure arg to suppress an ld warning
that otherwise appears due to an improperly written configure script.

Suppress warning about intentional implicit declaration of strchr.

Use destroot.keepdirs to create the turd file in ${destroot}${prefix}
/var/spool/prelude-manager rather than doing it manually.

Co-authored-by: Craig Treleaven <ctreleaven@…>

Note: See TracTickets for help on using tickets.