Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

1.0.6 may fail to build on macOS 14.3.1: error: unknown type name 'NSUInteger' etc [reason unclear, worksforsome] #112

Closed
barracuda156 opened this issue Mar 12, 2024 · 22 comments

Comments

@barracuda156
Copy link

/opt/local/bin/clang++-mp-15 -std=gnu++17 -I"/opt/local/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/opt/local/include/freetype2 -I/opt/local/include/libpng16 -I'/opt/local/Library/Frameworks/R.framework/Versions/4.3/Resources/library/cpp11/include' -I/opt/local/include -isysroot/Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk    -fPIC  -pipe -Os -stdlib=libc++ -isysroot/Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk -arch arm64  -c init.cpp -o init.o
/opt/local/bin/clang++-mp-15 -I"/opt/local/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/opt/local/include/freetype2 -I/opt/local/include/libpng16 -I'/opt/local/Library/Frameworks/R.framework/Versions/4.3/Resources/library/cpp11/include' -I/opt/local/include -isysroot/Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk   -fobjc-arc -fPIC   -c mac/FontManagerMac.mm -o mac/FontManagerMac.o
In file included from mac/FontManagerMac.mm:1:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h:9:
/Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSObjCRuntime.h:615:74: error: unknown type name 'NSUInteger'
FOUNDATION_EXPORT const char *NSGetSizeAndAlignment(const char *typePtr, NSUInteger * _Nullable sizep, NSUInteger * _Nullable alignp);
                                                                         ^
/Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSObjCRuntime.h:615:104: error: unknown type name 'NSUInteger'
FOUNDATION_EXPORT const char *NSGetSizeAndAlignment(const char *typePtr, NSUInteger * _Nullable sizep, NSUInteger * _Nullable alignp);
                                                                                                       ^
/Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSObjCRuntime.h:631:24: error: unknown type name 'NSInteger'
typedef NS_CLOSED_ENUM(NSInteger, NSComparisonResult) {
                       ^
/Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSObjCRuntime.h:631:24: error: unknown type name 'NSInteger'
/Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSObjCRuntime.h:639:20: error: unknown type name 'NSUInteger'
typedef NS_OPTIONS(NSUInteger, NSEnumerationOptions) {
                   ^
/Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSObjCRuntime.h:644:20: error: unknown type name 'NSUInteger'
typedef NS_OPTIONS(NSUInteger, NSSortOptions) {
                   ^
/Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSObjCRuntime.h:649:17: error: unknown type name 'NSInteger'
typedef NS_ENUM(NSInteger, NSQualityOfService) {
                ^
/Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSObjCRuntime.h:649:17: error: unknown type name 'NSInteger'
/Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSObjCRuntime.h:657:14: error: unknown type name 'NSInteger'
static const NSInteger NSNotFound = NSIntegerMax;
             ^
/Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSObjCRuntime.h:657:37: error: use of undeclared identifier 'NSIntegerMax'
static const NSInteger NSNotFound = NSIntegerMax;
                                    ^
In file included from mac/FontManagerMac.mm:2:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/System/Library/Frameworks/CoreText.framework/Headers/CoreText.h:26:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/System/Library/Frameworks/CoreText.framework/Headers/CTFramesetter.h:21:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/System/Library/Frameworks/CoreText.framework/Headers/CTTypesetter.h:20:
/Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/System/Library/Frameworks/CoreText.framework/Headers/CTLine.h:138:5: error: unknown type name 'CFAttributedStringRef'; did you mean 'NSAttributedStringKey'?
    CFAttributedStringRef attrString ) CT_AVAILABLE(macos(10.5), ios(3.2), watchos(2.0), tvos(9.0));
    ^
/Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSAttributedString.h:22:20: note: 'NSAttributedStringKey' declared here
typedef NSString * NSAttributedStringKey NS_TYPED_EXTENSIBLE_ENUM;
                   ^
In file included from mac/FontManagerMac.mm:2:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/System/Library/Frameworks/CoreText.framework/Headers/CoreText.h:26:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/System/Library/Frameworks/CoreText.framework/Headers/CTFramesetter.h:21:
/Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/System/Library/Frameworks/CoreText.framework/Headers/CTTypesetter.h:102:5: error: unknown type name 'CFAttributedStringRef'; did you mean 'NSAttributedStringKey'?
    CFAttributedStringRef string ) CT_AVAILABLE(macos(10.5), ios(3.2), watchos(2.0), tvos(9.0));
    ^
/Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSAttributedString.h:22:20: note: 'NSAttributedStringKey' declared here
typedef NSString * NSAttributedStringKey NS_TYPED_EXTENSIBLE_ENUM;
                   ^
In file included from mac/FontManagerMac.mm:2:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/System/Library/Frameworks/CoreText.framework/Headers/CoreText.h:26:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/System/Library/Frameworks/CoreText.framework/Headers/CTFramesetter.h:21:
/Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/System/Library/Frameworks/CoreText.framework/Headers/CTTypesetter.h:129:5: error: unknown type name 'CFAttributedStringRef'; did you mean 'NSAttributedStringKey'?
    CFAttributedStringRef string,
    ^
/Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSAttributedString.h:22:20: note: 'NSAttributedStringKey' declared here
typedef NSString * NSAttributedStringKey NS_TYPED_EXTENSIBLE_ENUM;
                   ^
In file included from mac/FontManagerMac.mm:2:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/System/Library/Frameworks/CoreText.framework/Headers/CoreText.h:26:
/Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/System/Library/Frameworks/CoreText.framework/Headers/CTFramesetter.h:82:5: error: unknown type name 'CFAttributedStringRef'; did you mean 'NSAttributedStringKey'?
    CFAttributedStringRef attrString ) CT_AVAILABLE(macos(10.5), ios(3.2), watchos(2.0), tvos(9.0));
    ^
/Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSAttributedString.h:22:20: note: 'NSAttributedStringKey' declared here
typedef NSString * NSAttributedStringKey NS_TYPED_EXTENSIBLE_ENUM;
                   ^
14 errors generated.
make: *** [mac/FontManagerMac.o] Error 1
ERROR: compilation failed for package ‘systemfonts’
* removing ‘/opt/local/var/macports/build/_opt_svacchanda_SonomaPorts_R_R-systemfonts/R-systemfonts/work/build/systemfonts’
Command failed:  cd "/opt/local/var/macports/build/_opt_svacchanda_SonomaPorts_R_R-systemfonts/R-systemfonts/work/systemfonts" && /opt/local/bin/R CMD INSTALL . --library=/opt/local/var/macports/build/_opt_svacchanda_SonomaPorts_R_R-systemfonts/R-systemfonts/work/build --install-tests 
Exit code: 1

Something has broken down here.

@thomasp85
Copy link
Member

Hi

I'm developing on the same platform and version and have no trouble installing it. Have you changed anything on your system?

I can also see that you are using macports, which might mess up everything. Have you tried installing it in the regular way?

@barracuda156
Copy link
Author

@thomasp85 Thank you for responding.

This could also be a result of a recent Xcode 15.3 update, since nothing else should have changed, and Macports otherwise works perfectly fine.

1.0.5 was building across the board at least from 10.6 through 14: https://ports.macports.org/port/R-systemfonts/details

@thomasp85
Copy link
Member

ah - I have yet to update Xcode... It would seems strange if they messed with that, though...

I'll give you an update when I try to reproduce with the latest Xcode

@thomasp85
Copy link
Member

Hmm... Also no issue after updating Xcode... Can I get you to post the full install log?

@barracuda156
Copy link
Author

@thomasp85 Well, while I am not sure what caused this issue at the moment, Apple did break some stuff in recent Xcode versions, so I won’t be surprised. Just recall a recent nightmare with ld which required switching to ld-classic for quite a number of ports.

I will be back to my testing hardware tomorrow, so can try building 1.0.6 on other systems. If it works with no changes on Catalina and Snow Leopard, then Sonoma is to blame.

@barracuda156
Copy link
Author

barracuda156 commented Mar 12, 2024

Hmm... Also no issue after updating Xcode... Can I get you to post the full install log?

@thomasp85 The log attached:

R-systemfonts_1.0.6_Sonoma_arm64.log

@barracuda156
Copy link
Author

@thomasp85 UPD. This is definitely something either with Sonoma or with a specific Sonoma system.

On Catalina R-systemfonts 1.0.6 installs normally in Macports environment:

--->  Extracting systemfonts_1.0.6.tar.gz
Executing:  cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_R_R-systemfonts/R-systemfonts/work" && /usr/bin/gzip -dc '/opt/local/var/macports/distfiles/R-systemfonts/systemfonts_1.0.6.tar.gz' | /usr/bin/tar -xf - 
--->  Configuring R-systemfonts
Executing:  cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_R_R-systemfonts/R-systemfonts/work/systemfonts" && /opt/local/bin/R CMD build . --no-manual --no-build-vignettes --keep-empty-dirs 
* checking for file ‘./DESCRIPTION’ ... OK
* preparing ‘systemfonts’:
* checking DESCRIPTION meta-information ... OK
* cleaning src
* running ‘cleanup’
* checking vignette meta-information ... OK
* checking for LF line-endings in source and make files and shell scripts
* checking for empty or unneeded directories
* looking to see if a ‘data/datalist’ file should be added
* building ‘systemfonts_1.0.6.tar.gz’

--->  Building R-systemfonts
xinstall: mkdir /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_R_R-systemfonts/R-systemfonts/work/build
Executing:  cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_R_R-systemfonts/R-systemfonts/work/systemfonts" && /opt/local/bin/R CMD INSTALL . --library=/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_R_R-systemfonts/R-systemfonts/work/build --install-tests 
* installing *source* package ‘systemfonts’ ...
** package ‘systemfonts’ successfully unpacked and MD5 sums checked
** using staged installation
Found pkg-config cflags and libs!
Using PKG_CFLAGS=-I/opt/local/include/freetype2 -I/opt/local/include/libpng16
Using PKG_LIBS=-L/opt/local/lib -lfreetype -lbz2 -lpng16 -lz -lbrotlidec -lbrotlicommon
** libs
using C++ compiler: ‘clang version 15.0.7’
using SDK: ‘’
rm -f systemfonts.so caches.o cpp11.o dev_metrics.o font_matching.o font_registry.o ft_cache.o string_shape.o font_metrics.o font_fallback.o string_metrics.o emoji.o cache_store.o init.o mac/FontManagerMac.o
/opt/local/bin/clang++-mp-15 -std=gnu++17 -I"/opt/local/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/opt/local/include/freetype2 -I/opt/local/include/libpng16 -I'/opt/local/Library/Frameworks/R.framework/Versions/4.3/Resources/library/cpp11/include' -I/opt/local/include -isysroot/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk    -fPIC  -pipe -Os -stdlib=libc++ -isysroot/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk -arch x86_64  -c caches.cpp -o caches.o
/opt/local/bin/clang++-mp-15 -std=gnu++17 -I"/opt/local/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/opt/local/include/freetype2 -I/opt/local/include/libpng16 -I'/opt/local/Library/Frameworks/R.framework/Versions/4.3/Resources/library/cpp11/include' -I/opt/local/include -isysroot/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk    -fPIC  -pipe -Os -stdlib=libc++ -isysroot/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk -arch x86_64  -c cpp11.cpp -o cpp11.o
/opt/local/bin/clang++-mp-15 -std=gnu++17 -I"/opt/local/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/opt/local/include/freetype2 -I/opt/local/include/libpng16 -I'/opt/local/Library/Frameworks/R.framework/Versions/4.3/Resources/library/cpp11/include' -I/opt/local/include -isysroot/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk    -fPIC  -pipe -Os -stdlib=libc++ -isysroot/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk -arch x86_64  -c dev_metrics.cpp -o dev_metrics.o
/opt/local/bin/clang++-mp-15 -std=gnu++17 -I"/opt/local/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/opt/local/include/freetype2 -I/opt/local/include/libpng16 -I'/opt/local/Library/Frameworks/R.framework/Versions/4.3/Resources/library/cpp11/include' -I/opt/local/include -isysroot/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk    -fPIC  -pipe -Os -stdlib=libc++ -isysroot/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk -arch x86_64  -c font_matching.cpp -o font_matching.o
/opt/local/bin/clang++-mp-15 -std=gnu++17 -I"/opt/local/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/opt/local/include/freetype2 -I/opt/local/include/libpng16 -I'/opt/local/Library/Frameworks/R.framework/Versions/4.3/Resources/library/cpp11/include' -I/opt/local/include -isysroot/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk    -fPIC  -pipe -Os -stdlib=libc++ -isysroot/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk -arch x86_64  -c font_registry.cpp -o font_registry.o
/opt/local/bin/clang++-mp-15 -std=gnu++17 -I"/opt/local/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/opt/local/include/freetype2 -I/opt/local/include/libpng16 -I'/opt/local/Library/Frameworks/R.framework/Versions/4.3/Resources/library/cpp11/include' -I/opt/local/include -isysroot/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk    -fPIC  -pipe -Os -stdlib=libc++ -isysroot/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk -arch x86_64  -c ft_cache.cpp -o ft_cache.o
/opt/local/bin/clang++-mp-15 -std=gnu++17 -I"/opt/local/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/opt/local/include/freetype2 -I/opt/local/include/libpng16 -I'/opt/local/Library/Frameworks/R.framework/Versions/4.3/Resources/library/cpp11/include' -I/opt/local/include -isysroot/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk    -fPIC  -pipe -Os -stdlib=libc++ -isysroot/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk -arch x86_64  -c string_shape.cpp -o string_shape.o
/opt/local/bin/clang++-mp-15 -std=gnu++17 -I"/opt/local/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/opt/local/include/freetype2 -I/opt/local/include/libpng16 -I'/opt/local/Library/Frameworks/R.framework/Versions/4.3/Resources/library/cpp11/include' -I/opt/local/include -isysroot/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk    -fPIC  -pipe -Os -stdlib=libc++ -isysroot/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk -arch x86_64  -c font_metrics.cpp -o font_metrics.o
/opt/local/bin/clang++-mp-15 -std=gnu++17 -I"/opt/local/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/opt/local/include/freetype2 -I/opt/local/include/libpng16 -I'/opt/local/Library/Frameworks/R.framework/Versions/4.3/Resources/library/cpp11/include' -I/opt/local/include -isysroot/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk    -fPIC  -pipe -Os -stdlib=libc++ -isysroot/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk -arch x86_64  -c font_fallback.cpp -o font_fallback.o
/opt/local/bin/clang++-mp-15 -std=gnu++17 -I"/opt/local/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/opt/local/include/freetype2 -I/opt/local/include/libpng16 -I'/opt/local/Library/Frameworks/R.framework/Versions/4.3/Resources/library/cpp11/include' -I/opt/local/include -isysroot/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk    -fPIC  -pipe -Os -stdlib=libc++ -isysroot/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk -arch x86_64  -c string_metrics.cpp -o string_metrics.o
/opt/local/bin/clang++-mp-15 -std=gnu++17 -I"/opt/local/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/opt/local/include/freetype2 -I/opt/local/include/libpng16 -I'/opt/local/Library/Frameworks/R.framework/Versions/4.3/Resources/library/cpp11/include' -I/opt/local/include -isysroot/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk    -fPIC  -pipe -Os -stdlib=libc++ -isysroot/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk -arch x86_64  -c emoji.cpp -o emoji.o
/opt/local/bin/clang++-mp-15 -std=gnu++17 -I"/opt/local/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/opt/local/include/freetype2 -I/opt/local/include/libpng16 -I'/opt/local/Library/Frameworks/R.framework/Versions/4.3/Resources/library/cpp11/include' -I/opt/local/include -isysroot/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk    -fPIC  -pipe -Os -stdlib=libc++ -isysroot/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk -arch x86_64  -c cache_store.cpp -o cache_store.o
/opt/local/bin/clang++-mp-15 -std=gnu++17 -I"/opt/local/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/opt/local/include/freetype2 -I/opt/local/include/libpng16 -I'/opt/local/Library/Frameworks/R.framework/Versions/4.3/Resources/library/cpp11/include' -I/opt/local/include -isysroot/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk    -fPIC  -pipe -Os -stdlib=libc++ -isysroot/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk -arch x86_64  -c init.cpp -o init.o
/opt/local/bin/clang++-mp-15 -I"/opt/local/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/opt/local/include/freetype2 -I/opt/local/include/libpng16 -I'/opt/local/Library/Frameworks/R.framework/Versions/4.3/Resources/library/cpp11/include' -I/opt/local/include -isysroot/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk   -fobjc-arc -fPIC   -c mac/FontManagerMac.mm -o mac/FontManagerMac.o
/opt/local/bin/clang++-mp-15 -std=gnu++17 -dynamiclib -Wl,-headerpad_max_install_names -undefined dynamic_lookup -single_module -multiply_defined suppress -L/opt/local/Library/Frameworks/R.framework/Resources/lib -L/opt/local/lib -Wl,-headerpad_max_install_names -Wl,-rpath,/opt/local/lib/libgcc -Wl,-syslibroot,/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk -arch x86_64 -o systemfonts.so caches.o cpp11.o dev_metrics.o font_matching.o font_registry.o ft_cache.o string_shape.o font_metrics.o font_fallback.o string_metrics.o emoji.o cache_store.o init.o mac/FontManagerMac.o -L/opt/local/lib -lfreetype -lbz2 -lpng16 -lz -lbrotlidec -lbrotlicommon -framework CoreText -framework Foundation -F/opt/local/Library/Frameworks/R.framework/.. -framework R -Wl,-framework -Wl,CoreFoundation
installing to /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_R_R-systemfonts/R-systemfonts/work/build/00LOCK-systemfonts/00new/systemfonts/libs
** R
** inst
** tests
** byte-compile and prepare package for lazy loading
** help
*** installing help indices
** building package indices
** installing vignettes
** testing if installed package can be loaded from temporary location
** checking absolute paths in shared objects and dynamic libraries
** testing if installed package can be loaded from final location
** testing if installed package keeps a record of temporary installation path
* DONE (systemfonts)

@barracuda156
Copy link
Author

UPD2. However build on Sonoma keeps failing. I updated now to 14.4, nothing changed:

--->  Building R-systemfonts
xinstall: mkdir /opt/local/var/macports/build/_opt_svacchanda_SonomaPorts_R_R-systemfonts/R-systemfonts/work/build
Executing:  cd "/opt/local/var/macports/build/_opt_svacchanda_SonomaPorts_R_R-systemfonts/R-systemfonts/work/systemfonts-1.0.6" && /opt/local/bin/R CMD INSTALL . --library=/opt/local/var/macports/build/_opt_svacchanda_SonomaPorts_R_R-systemfonts/R-systemfonts/work/build --install-tests 
* installing *source* package ‘systemfonts’ ...
** using staged installation
Found pkg-config cflags and libs!
Using PKG_CFLAGS=-I/opt/local/include/freetype2 -I/opt/local/include/libpng16
Using PKG_LIBS=-L/opt/local/lib -lfreetype -lbz2 -lpng16 -lz -lbrotlidec -lbrotlicommon
** libs
using C++ compiler: ‘clang version 15.0.7’
using SDK: ‘MacOSX14.4.sdk’
rm -f systemfonts.so caches.o cpp11.o dev_metrics.o font_matching.o font_registry.o ft_cache.o string_shape.o font_metrics.o font_fallback.o string_metrics.o emoji.o cache_store.o init.o mac/FontManagerMac.o
/opt/local/bin/clang++-mp-15 -std=gnu++17 -I"/opt/local/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/opt/local/include/freetype2 -I/opt/local/include/libpng16 -I'/opt/local/Library/Frameworks/R.framework/Versions/4.3/Resources/library/cpp11/include' -I/opt/local/include -isysroot/Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk    -fPIC  -pipe -Os -stdlib=libc++ -isysroot/Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk -arch arm64  -c caches.cpp -o caches.o
/opt/local/bin/clang++-mp-15 -std=gnu++17 -I"/opt/local/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/opt/local/include/freetype2 -I/opt/local/include/libpng16 -I'/opt/local/Library/Frameworks/R.framework/Versions/4.3/Resources/library/cpp11/include' -I/opt/local/include -isysroot/Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk    -fPIC  -pipe -Os -stdlib=libc++ -isysroot/Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk -arch arm64  -c cpp11.cpp -o cpp11.o
/opt/local/bin/clang++-mp-15 -std=gnu++17 -I"/opt/local/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/opt/local/include/freetype2 -I/opt/local/include/libpng16 -I'/opt/local/Library/Frameworks/R.framework/Versions/4.3/Resources/library/cpp11/include' -I/opt/local/include -isysroot/Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk    -fPIC  -pipe -Os -stdlib=libc++ -isysroot/Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk -arch arm64  -c dev_metrics.cpp -o dev_metrics.o
/opt/local/bin/clang++-mp-15 -std=gnu++17 -I"/opt/local/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/opt/local/include/freetype2 -I/opt/local/include/libpng16 -I'/opt/local/Library/Frameworks/R.framework/Versions/4.3/Resources/library/cpp11/include' -I/opt/local/include -isysroot/Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk    -fPIC  -pipe -Os -stdlib=libc++ -isysroot/Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk -arch arm64  -c font_matching.cpp -o font_matching.o
/opt/local/bin/clang++-mp-15 -std=gnu++17 -I"/opt/local/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/opt/local/include/freetype2 -I/opt/local/include/libpng16 -I'/opt/local/Library/Frameworks/R.framework/Versions/4.3/Resources/library/cpp11/include' -I/opt/local/include -isysroot/Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk    -fPIC  -pipe -Os -stdlib=libc++ -isysroot/Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk -arch arm64  -c font_registry.cpp -o font_registry.o
/opt/local/bin/clang++-mp-15 -std=gnu++17 -I"/opt/local/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/opt/local/include/freetype2 -I/opt/local/include/libpng16 -I'/opt/local/Library/Frameworks/R.framework/Versions/4.3/Resources/library/cpp11/include' -I/opt/local/include -isysroot/Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk    -fPIC  -pipe -Os -stdlib=libc++ -isysroot/Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk -arch arm64  -c ft_cache.cpp -o ft_cache.o
/opt/local/bin/clang++-mp-15 -std=gnu++17 -I"/opt/local/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/opt/local/include/freetype2 -I/opt/local/include/libpng16 -I'/opt/local/Library/Frameworks/R.framework/Versions/4.3/Resources/library/cpp11/include' -I/opt/local/include -isysroot/Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk    -fPIC  -pipe -Os -stdlib=libc++ -isysroot/Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk -arch arm64  -c string_shape.cpp -o string_shape.o
/opt/local/bin/clang++-mp-15 -std=gnu++17 -I"/opt/local/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/opt/local/include/freetype2 -I/opt/local/include/libpng16 -I'/opt/local/Library/Frameworks/R.framework/Versions/4.3/Resources/library/cpp11/include' -I/opt/local/include -isysroot/Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk    -fPIC  -pipe -Os -stdlib=libc++ -isysroot/Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk -arch arm64  -c font_metrics.cpp -o font_metrics.o
/opt/local/bin/clang++-mp-15 -std=gnu++17 -I"/opt/local/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/opt/local/include/freetype2 -I/opt/local/include/libpng16 -I'/opt/local/Library/Frameworks/R.framework/Versions/4.3/Resources/library/cpp11/include' -I/opt/local/include -isysroot/Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk    -fPIC  -pipe -Os -stdlib=libc++ -isysroot/Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk -arch arm64  -c font_fallback.cpp -o font_fallback.o
/opt/local/bin/clang++-mp-15 -std=gnu++17 -I"/opt/local/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/opt/local/include/freetype2 -I/opt/local/include/libpng16 -I'/opt/local/Library/Frameworks/R.framework/Versions/4.3/Resources/library/cpp11/include' -I/opt/local/include -isysroot/Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk    -fPIC  -pipe -Os -stdlib=libc++ -isysroot/Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk -arch arm64  -c string_metrics.cpp -o string_metrics.o
/opt/local/bin/clang++-mp-15 -std=gnu++17 -I"/opt/local/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/opt/local/include/freetype2 -I/opt/local/include/libpng16 -I'/opt/local/Library/Frameworks/R.framework/Versions/4.3/Resources/library/cpp11/include' -I/opt/local/include -isysroot/Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk    -fPIC  -pipe -Os -stdlib=libc++ -isysroot/Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk -arch arm64  -c emoji.cpp -o emoji.o
/opt/local/bin/clang++-mp-15 -std=gnu++17 -I"/opt/local/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/opt/local/include/freetype2 -I/opt/local/include/libpng16 -I'/opt/local/Library/Frameworks/R.framework/Versions/4.3/Resources/library/cpp11/include' -I/opt/local/include -isysroot/Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk    -fPIC  -pipe -Os -stdlib=libc++ -isysroot/Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk -arch arm64  -c cache_store.cpp -o cache_store.o
/opt/local/bin/clang++-mp-15 -std=gnu++17 -I"/opt/local/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/opt/local/include/freetype2 -I/opt/local/include/libpng16 -I'/opt/local/Library/Frameworks/R.framework/Versions/4.3/Resources/library/cpp11/include' -I/opt/local/include -isysroot/Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk    -fPIC  -pipe -Os -stdlib=libc++ -isysroot/Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk -arch arm64  -c init.cpp -o init.o
/opt/local/bin/clang++-mp-15 -I"/opt/local/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/opt/local/include/freetype2 -I/opt/local/include/libpng16 -I'/opt/local/Library/Frameworks/R.framework/Versions/4.3/Resources/library/cpp11/include' -I/opt/local/include -isysroot/Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk   -fobjc-arc -fPIC   -c mac/FontManagerMac.mm -o mac/FontManagerMac.o
In file included from mac/FontManagerMac.mm:1:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h:9:
/Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSObjCRuntime.h:615:74: error: unknown type name 'NSUInteger'
FOUNDATION_EXPORT const char *NSGetSizeAndAlignment(const char *typePtr, NSUInteger * _Nullable sizep, NSUInteger * _Nullable alignp);
                                                                         ^
/Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSObjCRuntime.h:615:104: error: unknown type name 'NSUInteger'
FOUNDATION_EXPORT const char *NSGetSizeAndAlignment(const char *typePtr, NSUInteger * _Nullable sizep, NSUInteger * _Nullable alignp);
                                                                                                       ^
/Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSObjCRuntime.h:631:24: error: unknown type name 'NSInteger'
typedef NS_CLOSED_ENUM(NSInteger, NSComparisonResult) {
                       ^
/Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSObjCRuntime.h:631:24: error: unknown type name 'NSInteger'
/Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSObjCRuntime.h:639:20: error: unknown type name 'NSUInteger'
typedef NS_OPTIONS(NSUInteger, NSEnumerationOptions) {
                   ^
/Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSObjCRuntime.h:644:20: error: unknown type name 'NSUInteger'
typedef NS_OPTIONS(NSUInteger, NSSortOptions) {
                   ^
/Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSObjCRuntime.h:649:17: error: unknown type name 'NSInteger'
typedef NS_ENUM(NSInteger, NSQualityOfService) {
                ^
/Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSObjCRuntime.h:649:17: error: unknown type name 'NSInteger'
/Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSObjCRuntime.h:657:14: error: unknown type name 'NSInteger'
static const NSInteger NSNotFound = NSIntegerMax;
             ^
/Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSObjCRuntime.h:657:37: error: use of undeclared identifier 'NSIntegerMax'
static const NSInteger NSNotFound = NSIntegerMax;
                                    ^
In file included from mac/FontManagerMac.mm:2:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/System/Library/Frameworks/CoreText.framework/Headers/CoreText.h:26:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/System/Library/Frameworks/CoreText.framework/Headers/CTFramesetter.h:21:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/System/Library/Frameworks/CoreText.framework/Headers/CTTypesetter.h:20:
/Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/System/Library/Frameworks/CoreText.framework/Headers/CTLine.h:138:5: error: unknown type name 'CFAttributedStringRef'; did you mean 'NSAttributedStringKey'?
    CFAttributedStringRef attrString ) CT_AVAILABLE(macos(10.5), ios(3.2), watchos(2.0), tvos(9.0));
    ^
/Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSAttributedString.h:22:20: note: 'NSAttributedStringKey' declared here
typedef NSString * NSAttributedStringKey NS_TYPED_EXTENSIBLE_ENUM;
                   ^
In file included from mac/FontManagerMac.mm:2:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/System/Library/Frameworks/CoreText.framework/Headers/CoreText.h:26:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/System/Library/Frameworks/CoreText.framework/Headers/CTFramesetter.h:21:
/Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/System/Library/Frameworks/CoreText.framework/Headers/CTTypesetter.h:102:5: error: unknown type name 'CFAttributedStringRef'; did you mean 'NSAttributedStringKey'?
    CFAttributedStringRef string ) CT_AVAILABLE(macos(10.5), ios(3.2), watchos(2.0), tvos(9.0));
    ^
/Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSAttributedString.h:22:20: note: 'NSAttributedStringKey' declared here
typedef NSString * NSAttributedStringKey NS_TYPED_EXTENSIBLE_ENUM;
                   ^
In file included from mac/FontManagerMac.mm:2:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/System/Library/Frameworks/CoreText.framework/Headers/CoreText.h:26:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/System/Library/Frameworks/CoreText.framework/Headers/CTFramesetter.h:21:
/Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/System/Library/Frameworks/CoreText.framework/Headers/CTTypesetter.h:129:5: error: unknown type name 'CFAttributedStringRef'; did you mean 'NSAttributedStringKey'?
    CFAttributedStringRef string,
    ^
/Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSAttributedString.h:22:20: note: 'NSAttributedStringKey' declared here
typedef NSString * NSAttributedStringKey NS_TYPED_EXTENSIBLE_ENUM;
                   ^
In file included from mac/FontManagerMac.mm:2:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/System/Library/Frameworks/CoreText.framework/Headers/CoreText.h:26:
/Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/System/Library/Frameworks/CoreText.framework/Headers/CTFramesetter.h:82:5: error: unknown type name 'CFAttributedStringRef'; did you mean 'NSAttributedStringKey'?
    CFAttributedStringRef attrString ) CT_AVAILABLE(macos(10.5), ios(3.2), watchos(2.0), tvos(9.0));
    ^
/Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSAttributedString.h:22:20: note: 'NSAttributedStringKey' declared here
typedef NSString * NSAttributedStringKey NS_TYPED_EXTENSIBLE_ENUM;
                   ^
14 errors generated.
make: *** [mac/FontManagerMac.o] Error 1
ERROR: compilation failed for package ‘systemfonts’
* removing ‘/opt/local/var/macports/build/_opt_svacchanda_SonomaPorts_R_R-systemfonts/R-systemfonts/work/build/systemfonts’
Command failed:  cd "/opt/local/var/macports/build/_opt_svacchanda_SonomaPorts_R_R-systemfonts/R-systemfonts/work/systemfonts-1.0.6" && /opt/local/bin/R CMD INSTALL . --library=/opt/local/var/macports/build/_opt_svacchanda_SonomaPorts_R_R-systemfonts/R-systemfonts/work/build --install-tests 
Exit code: 1

No idea why :(

@thomasp85
Copy link
Member

The big difference I can see is that you for some reason have hardcoded the SDK to MacOSX14.4.sdk in the last example. Maybe you have something weird in your global makevars or environment

@thomasp85
Copy link
Member

Hmm... I can see in my install log that despite upgrading Xcode, R still picks up the 14.2 version, not 14.4

@barracuda156
Copy link
Author

Hmm... I can see in my install log that despite upgrading Xcode, R still picks up the 14.2 version, not 14.4

Interesting. But how does it work? Does Xcode retain an older SDK, or the path points to nowhere?

@thomasp85
Copy link
Member

Trying to look into it now

@barracuda156
Copy link
Author

UPD3. Just for the record, 1.0.6 also builds normally on the old macOS 10.6 for ppc (macOS < 10.9 does need a minor patch, which is seen in the log, but it only fixes configure script):

--->  Extracting systemfonts-1.0.6.tar.gz
Executing:  cd "/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_R_R-systemfonts/R-systemfonts/work" && /opt/x86_64/bin/gzip -dc '/opt/local/var/macports/distfiles/R-systemfonts/systemfonts-1.0.6.tar.gz' | /opt/x86_64/bin/gnutar --no-same-owner -xf - 
--->  Applying patches to R-systemfonts
--->  Applying patch-older-macos.diff
Executing:  cd "/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_R_R-systemfonts/R-systemfonts/work/systemfonts-1.0.6" && /usr/bin/patch -p0 < '/opt/PPCSnowLeopardPorts/R/R-systemfonts/files/patch-older-macos.diff'
patching file configure
--->  Configuring R-systemfonts
Executing:  cd "/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_R_R-systemfonts/R-systemfonts/work/systemfonts-1.0.6" && /opt/local/bin/R CMD build . --no-manual --no-build-vignettes --keep-empty-dirs 
* checking for file ‘./DESCRIPTION’ ... OK
* preparing ‘systemfonts’:
* checking DESCRIPTION meta-information ... OK
* cleaning src
* running ‘cleanup’
* checking for LF line-endings in source and make files and shell scripts
* checking for empty or unneeded directories
* looking to see if a ‘data/datalist’ file should be added
* building ‘systemfonts_1.0.6.tar.gz’

--->  Building R-systemfonts
xinstall: mkdir /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_R_R-systemfonts/R-systemfonts/work/build
Executing:  cd "/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_R_R-systemfonts/R-systemfonts/work/systemfonts-1.0.6" && /opt/local/bin/R CMD INSTALL . --library=/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_R_R-systemfonts/R-systemfonts/work/build --install-tests 
* installing *source* package ‘systemfonts’ ...
** using staged installation
Found pkg-config cflags and libs!
Using PKG_CFLAGS=-I/opt/local/include/freetype2 -I/opt/local/include/libpng16
Using PKG_LIBS=-L/opt/local/lib -lfontconfig -lfreetype
** libs
using C++ compiler: ‘g++-mp-13 (MacPorts gcc13 13.2.0_4+stdlib_flag) 13.2.0’
Warning in system2("xcrun", "--show-sdk-path", TRUE, TRUE) :
  running command ''xcrun' --show-sdk-path 2>&1' had status 64
using SDK: ‘NA’‘NA’‘NA’‘NA’‘NA’‘NA’
rm -f systemfonts.so caches.o cpp11.o dev_metrics.o font_matching.o font_registry.o ft_cache.o string_shape.o font_metrics.o font_fallback.o string_metrics.o emoji.o cache_store.o init.o unix/FontManagerLinux.o
/opt/local/bin/g++-mp-13 -std=gnu++17 -I"/opt/local/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/opt/local/include/freetype2 -I/opt/local/include/libpng16 -I'/opt/local/Library/Frameworks/R.framework/Versions/4.3/Resources/library/cpp11/include' -isystem/opt/local/include/LegacySupport -I/opt/local/include    -fPIC  -pipe -Os -arch ppc  -c caches.cpp -o caches.o
/opt/local/bin/g++-mp-13 -std=gnu++17 -I"/opt/local/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/opt/local/include/freetype2 -I/opt/local/include/libpng16 -I'/opt/local/Library/Frameworks/R.framework/Versions/4.3/Resources/library/cpp11/include' -isystem/opt/local/include/LegacySupport -I/opt/local/include    -fPIC  -pipe -Os -arch ppc  -c cpp11.cpp -o cpp11.o
/opt/local/bin/g++-mp-13 -std=gnu++17 -I"/opt/local/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/opt/local/include/freetype2 -I/opt/local/include/libpng16 -I'/opt/local/Library/Frameworks/R.framework/Versions/4.3/Resources/library/cpp11/include' -isystem/opt/local/include/LegacySupport -I/opt/local/include    -fPIC  -pipe -Os -arch ppc  -c dev_metrics.cpp -o dev_metrics.o
/opt/local/bin/g++-mp-13 -std=gnu++17 -I"/opt/local/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/opt/local/include/freetype2 -I/opt/local/include/libpng16 -I'/opt/local/Library/Frameworks/R.framework/Versions/4.3/Resources/library/cpp11/include' -isystem/opt/local/include/LegacySupport -I/opt/local/include    -fPIC  -pipe -Os -arch ppc  -c font_matching.cpp -o font_matching.o
/opt/local/bin/g++-mp-13 -std=gnu++17 -I"/opt/local/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/opt/local/include/freetype2 -I/opt/local/include/libpng16 -I'/opt/local/Library/Frameworks/R.framework/Versions/4.3/Resources/library/cpp11/include' -isystem/opt/local/include/LegacySupport -I/opt/local/include    -fPIC  -pipe -Os -arch ppc  -c font_registry.cpp -o font_registry.o
/opt/local/bin/g++-mp-13 -std=gnu++17 -I"/opt/local/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/opt/local/include/freetype2 -I/opt/local/include/libpng16 -I'/opt/local/Library/Frameworks/R.framework/Versions/4.3/Resources/library/cpp11/include' -isystem/opt/local/include/LegacySupport -I/opt/local/include    -fPIC  -pipe -Os -arch ppc  -c ft_cache.cpp -o ft_cache.o
/opt/local/bin/g++-mp-13 -std=gnu++17 -I"/opt/local/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/opt/local/include/freetype2 -I/opt/local/include/libpng16 -I'/opt/local/Library/Frameworks/R.framework/Versions/4.3/Resources/library/cpp11/include' -isystem/opt/local/include/LegacySupport -I/opt/local/include    -fPIC  -pipe -Os -arch ppc  -c string_shape.cpp -o string_shape.o
/opt/local/bin/g++-mp-13 -std=gnu++17 -I"/opt/local/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/opt/local/include/freetype2 -I/opt/local/include/libpng16 -I'/opt/local/Library/Frameworks/R.framework/Versions/4.3/Resources/library/cpp11/include' -isystem/opt/local/include/LegacySupport -I/opt/local/include    -fPIC  -pipe -Os -arch ppc  -c font_metrics.cpp -o font_metrics.o
/opt/local/bin/g++-mp-13 -std=gnu++17 -I"/opt/local/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/opt/local/include/freetype2 -I/opt/local/include/libpng16 -I'/opt/local/Library/Frameworks/R.framework/Versions/4.3/Resources/library/cpp11/include' -isystem/opt/local/include/LegacySupport -I/opt/local/include    -fPIC  -pipe -Os -arch ppc  -c font_fallback.cpp -o font_fallback.o
/opt/local/bin/g++-mp-13 -std=gnu++17 -I"/opt/local/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/opt/local/include/freetype2 -I/opt/local/include/libpng16 -I'/opt/local/Library/Frameworks/R.framework/Versions/4.3/Resources/library/cpp11/include' -isystem/opt/local/include/LegacySupport -I/opt/local/include    -fPIC  -pipe -Os -arch ppc  -c string_metrics.cpp -o string_metrics.o
/opt/local/bin/g++-mp-13 -std=gnu++17 -I"/opt/local/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/opt/local/include/freetype2 -I/opt/local/include/libpng16 -I'/opt/local/Library/Frameworks/R.framework/Versions/4.3/Resources/library/cpp11/include' -isystem/opt/local/include/LegacySupport -I/opt/local/include    -fPIC  -pipe -Os -arch ppc  -c emoji.cpp -o emoji.o
/opt/local/bin/g++-mp-13 -std=gnu++17 -I"/opt/local/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/opt/local/include/freetype2 -I/opt/local/include/libpng16 -I'/opt/local/Library/Frameworks/R.framework/Versions/4.3/Resources/library/cpp11/include' -isystem/opt/local/include/LegacySupport -I/opt/local/include    -fPIC  -pipe -Os -arch ppc  -c cache_store.cpp -o cache_store.o
/opt/local/bin/g++-mp-13 -std=gnu++17 -I"/opt/local/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/opt/local/include/freetype2 -I/opt/local/include/libpng16 -I'/opt/local/Library/Frameworks/R.framework/Versions/4.3/Resources/library/cpp11/include' -isystem/opt/local/include/LegacySupport -I/opt/local/include    -fPIC  -pipe -Os -arch ppc  -c init.cpp -o init.o
/opt/local/bin/g++-mp-13 -std=gnu++17 -I"/opt/local/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/opt/local/include/freetype2 -I/opt/local/include/libpng16 -I'/opt/local/Library/Frameworks/R.framework/Versions/4.3/Resources/library/cpp11/include' -isystem/opt/local/include/LegacySupport -I/opt/local/include    -fPIC  -pipe -Os -arch ppc  -c unix/FontManagerLinux.cpp -o unix/FontManagerLinux.o
/opt/local/bin/g++-mp-13 -std=gnu++17 -dynamiclib -Wl,-headerpad_max_install_names -undefined dynamic_lookup -single_module -multiply_defined suppress -L/opt/local/Library/Frameworks/R.framework/Resources/lib -Wl,-headerpad_max_install_names -L/opt/local/lib -lMacportsLegacySupport -Wl,-rpath,/opt/local/lib/libgcc -arch ppc -o systemfonts.so caches.o cpp11.o dev_metrics.o font_matching.o font_registry.o ft_cache.o string_shape.o font_metrics.o font_fallback.o string_metrics.o emoji.o cache_store.o init.o unix/FontManagerLinux.o -L/opt/local/lib -lfontconfig -lfreetype -F/opt/local/Library/Frameworks/R.framework/.. -framework R -Wl,-framework -Wl,CoreFoundation
installing to /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_R_R-systemfonts/R-systemfonts/work/build/00LOCK-systemfonts-1.0.6/00new/systemfonts/libs
** R
** inst
** tests
** byte-compile and prepare package for lazy loading
** help
*** installing help indices
** building package indices
** installing vignettes
** testing if installed package can be loaded from temporary location
** checking absolute paths in shared objects and dynamic libraries
** testing if installed package can be loaded from final location
** testing if installed package keeps a record of temporary installation path
* DONE (systemfonts)

So everything else aside of Sonoma works for me so far.

@thomasp85
Copy link
Member

Ok, so I have now successfully got it to use the 14.4 sdk and I still have no issues compiling...

Are you using the command line tools or have you somehow gotten R to use the Xcode tooling to compile? I've been told the later is ripe for disaster

@barracuda156
Copy link
Author

@thomasp85 From the logs it seems that the build uses command line tools:

/Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk

But it may be some conflict with Xcode (?). I have added 1.0.6 update into my PR to Macports now, and CI already passed for macOS 13 and macOS 14.
So it is neither a bug with systemfonts nor with Macports environment, but something fails for me locally, and only on Sonoma.

We could close the issue as worksforsome, since I got no clue how to fix it, and it is not reproducible on your end or CI. If buildbots are good upon merging PR with updates, we can consider it a mystery bug :) After all, I can use a pre-built package then for Sonoma, once buildbots generate it.

@thomasp85
Copy link
Member

One last idea... In the issue title you say macOS 14.3.1 - have you tried updating your OS so it matches the version of the build tools?

@barracuda156 barracuda156 changed the title 1.0.6 fails to build on macOS 14.3.1: error: unknown type name 'NSUInteger' etc 1.0.6 may fail to build on macOS 14.3.1: error: unknown type name 'NSUInteger' etc [reason unclear, worksforsome] Mar 15, 2024
@barracuda156
Copy link
Author

Yes, it is updated now:

svacchanda@Sergeys-Air ~ % sw_vers
ProductName:		macOS
ProductVersion:		14.4
BuildVersion:		23E214

And I reran build locally, it still fails.

But given that CI pass, it should work (i.e. Macports is not to blame). And my Sonoma set-up should be pretty much default.
Allow me a day, once Macports buildbots have it built, I will close this. If it is a local issue, whatever its reason, not really worth spending time on it.

@barracuda156
Copy link
Author

@thomasp85 Update to 1.0.6 merged in macports/macports-ports@b76ac65
We will see the updated build status in a while here: https://ports.macports.org/port/R-systemfonts/details
(Perhaps it should build across the board.)

@barracuda156
Copy link
Author

@thomasp85 Buildbots are fine on Sonoma. Build log: https://build.macports.org/builders/ports-14_arm64-builder/builds/20401/steps/install-port/logs/stdio

So I am closing the issue. Though the reason of the failure is unclear, it worksforsome.

Thank you for helping here!

@thomasp85
Copy link
Member

No problem. Sorry we couldn't get to the bottom of it

@nocanstillbb
Copy link

I also encountered this problem. After I switched the sdk from 14.4 to 13.3, it became normal.

@barracuda156
Copy link
Author

I also encountered this problem. After I switched the sdk from 14.4 to 13.3, it became normal.

It may not be an optimal solution, perhaps you could try different 14.x? There were changes across Xcode versions, chances are it works with another one.
I still have no idea why it failed here though.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants