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

Build currently broken on macOS #3375

Closed
Vargol opened this issue Jan 15, 2022 · 7 comments
Closed

Build currently broken on macOS #3375

Vargol opened this issue Jan 15, 2022 · 7 comments

Comments

@Vargol
Copy link

Vargol commented Jan 15, 2022

It looks like commit 8a69e00 broke the build of harfbuzz on macOS

-- Build files have been written to: /Users/davidburnett/Documents/Source/ffmpeg/build-ffmpeg/harfbuzz/build-harfbuzz
[ 7%] Building CXX object CMakeFiles/harfbuzz.dir/src/harfbuzz.cc.o
In file included from /Users/davidburnett/Documents/Source/ffmpeg/build-ffmpeg/harfbuzz/harfbuzz/src/harfbuzz.cc:1:
In file included from /Users/davidburnett/Documents/Source/ffmpeg/build-ffmpeg/harfbuzz/harfbuzz/src/hb-aat-layout.cc:28:
In file included from /Users/davidburnett/Documents/Source/ffmpeg/build-ffmpeg/harfbuzz/harfbuzz/src/hb.hh:471:
/Users/davidburnett/Documents/Source/ffmpeg/build-ffmpeg/harfbuzz/harfbuzz/src/hb-meta.hh:144:49: error: no member named 'addressof' in namespace 'std'
operator () (T& v) const HB_AUTO_RETURN (std::addressof (v))
~~~~~^
/Users/davidburnett/Documents/Source/ffmpeg/build-ffmpeg/harfbuzz/harfbuzz/src/hb-meta.hh:75:41: note: expanded from macro 'HB_AUTO_RETURN'
#define HB_AUTO_RETURN(E) -> decltype ((E)) { return (E); }
^
/Users/davidburnett/Documents/Source/ffmpeg/build-ffmpeg/harfbuzz/harfbuzz/src/hb-meta.hh:144:49: error: no member named 'addressof' in namespace 'std'
operator () (T& v) const HB_AUTO_RETURN (std::addressof (v))
~~~~~^
/Users/davidburnett/Documents/Source/ffmpeg/build-ffmpeg/harfbuzz/harfbuzz/src/hb-meta.hh:75:55: note: expanded from macro 'HB_AUTO_RETURN'
#define HB_AUTO_RETURN(E) -> decltype ((E)) { return (E); }
^
/Users/davidburnett/Documents/Source/ffmpeg/build-ffmpeg/harfbuzz/harfbuzz/src/hb-meta.hh:161:41: error: no member named 'addressof' in namespace 'std'
hb_reference_wrapper (T& v) : v (std::addressof (v)) {}

There's a mass of errors, so I need to go back and see if its just that commit.

@alerque
Copy link
Member

alerque commented Jan 15, 2022

I don't think it's quite true that the build is broken on macOS. The current HEAD commit and even the commit you linked to both passed macOS build checks is CI. That being said we're testing the build with automake tooling and with meson tooling, but not with cmake tooling that you appear to be using. It is possible the CMakeLists.txt file is missing a dependency on something that supplies std.

The CMake build is currently not the recommended or most supported build method and its upkeep is largely up to outside contributors.

We'd be happy to accept a PR that fixes up the CMake file so std is available on macOS.

@Vargol
Copy link
Author

Vargol commented Jan 15, 2022

Tried building with meson, got the same error

davidburnett@Davids-Mac-mini harfbuzz % meson build
The Meson build system
Version: 0.59.1
Source dir: /Volumes/Sabrent Media/Documents/Source/ffmpeg/build-ffmpeg/harfbuzz/harfbuzz
Build dir: /Volumes/Sabrent Media/Documents/Source/ffmpeg/build-ffmpeg/harfbuzz/harfbuzz/build
Build type: native build
Project name: harfbuzz
Project version: 3.2.0
C compiler for the host machine: cc (clang 13.0.0 "Apple clang version 13.0.0 (clang-1300.0.29.30)")
C linker for the host machine: cc ld64 711
C++ compiler for the host machine: c++ (clang 13.0.0 "Apple clang version 13.0.0 (clang-1300.0.29.30)")
C++ linker for the host machine: c++ ld64 711
Host machine cpu family: aarch64
Host machine cpu: arm64
Compiler for C++ supports link arguments -Bsymbolic-functions: YES
Compiler for C++ supports arguments -fno-exceptions: YES
Compiler for C++ supports arguments -fno-rtti: YES
Compiler for C++ supports arguments -fno-threadsafe-statics: YES
Compiler for C++ supports arguments -fvisibility-inlines-hidden: YES
Library m found: YES
Found pkg-config: /opt/local/bin/pkg-config (0.29.2)
Run-time dependency freetype2 found: YES 24.1.18
Run-time dependency glib-2.0 found: YES 2.62.6
Run-time dependency gobject-2.0 found: YES 2.62.6
Dependency graphite2 skipped: feature graphite2 disabled
Dependency graphite2 skipped: feature graphite disabled
Run-time dependency icu-uc found: YES 67.1
Run-time dependency cairo found: YES 1.17.4
Run-time dependency cairo-ft found: YES 1.17.4
Found CMake: /opt/local/bin/cmake (3.22.1)
Run-time dependency chafa found: NO (tried pkgconfig, framework and cmake)
Compiler for C++ supports arguments -Wno-non-virtual-dtor: YES
Run-time dependency threads found: YES
Has header "unistd.h" : YES
Has header "sys/mman.h" : YES
Has header "stdbool.h" : YES
Has header "xlocale.h" : YES
Checking for function "atexit" : YES
Checking for function "mprotect" : YES
Checking for function "sysconf" : YES
Checking for function "getpagesize" : YES
Checking for function "mmap" : YES
Checking for function "isatty" : YES
Checking for function "uselocale" : YES
Checking for function "newlocale" : YES
Checking for function "FT_Get_Var_Blend_Coordinates" with dependency freetype2: YES
Checking for function "FT_Set_Var_Blend_Coordinates" with dependency freetype2: YES
Checking for function "FT_Done_MM_Var" with dependency freetype2: YES
Program gen-hb-version.py found: YES (/Volumes/Sabrent Media/Documents/Source/ffmpeg/build-ffmpeg/harfbuzz/harfbuzz/src/gen-hb-version.py)
Configuring hb-version.h with command
Program ragel found: NO
src/meson.build:301: WARNING: You have to install ragel if you are going to develop HarfBuzz itself
Program gen-harfbuzzcc.py found: YES (/Volumes/Sabrent Media/Documents/Source/ffmpeg/build-ffmpeg/harfbuzz/harfbuzz/src/gen-harfbuzzcc.py)
Program gen-def.py found: YES (/Volumes/Sabrent Media/Documents/Source/ffmpeg/build-ffmpeg/harfbuzz/harfbuzz/src/gen-def.py)
Configuring harfbuzz-config.cmake using configuration
Program glib-mkenums found: YES (/opt/local/bin/glib-mkenums)
Program fix_get_types.py found: YES (/opt/local/Library/Frameworks/Python.framework/Versions/3.9/bin/python3.9 /Volumes/Sabrent Media/Documents/Source/ffmpeg/build-ffmpeg/harfbuzz/harfbuzz/src/fix_get_types.py)
Program fix_get_types.py found: YES (/opt/local/Library/Frameworks/Python.framework/Versions/3.9/bin/python3.9 /Volumes/Sabrent Media/Documents/Source/ffmpeg/build-ffmpeg/harfbuzz/harfbuzz/src/fix_get_types.py)
Program g-ir-scanner found: YES (/opt/local/bin/g-ir-scanner)
Run-time dependency gobject-introspection-1.0 found: YES 1.60.2
Dependency gobject-introspection-1.0 found: YES 1.60.2 (cached)
Program g-ir-scanner found: YES (/opt/local/bin/g-ir-scanner)
Dependency gobject-introspection-1.0 found: YES 1.60.2 (cached)
Program g-ir-compiler found: YES (/opt/local/bin/g-ir-compiler)
Program check-c-linkage-decls.py found: YES (/Volumes/Sabrent Media/Documents/Source/ffmpeg/build-ffmpeg/harfbuzz/harfbuzz/src/check-c-linkage-decls.py)
Program check-externs.py found: YES (/Volumes/Sabrent Media/Documents/Source/ffmpeg/build-ffmpeg/harfbuzz/harfbuzz/src/check-externs.py)
Program check-header-guards.py found: YES (/Volumes/Sabrent Media/Documents/Source/ffmpeg/build-ffmpeg/harfbuzz/harfbuzz/src/check-header-guards.py)
Program check-includes.py found: YES (/Volumes/Sabrent Media/Documents/Source/ffmpeg/build-ffmpeg/harfbuzz/harfbuzz/src/check-includes.py)
Program check-libstdc++.py found: YES (/Volumes/Sabrent Media/Documents/Source/ffmpeg/build-ffmpeg/harfbuzz/harfbuzz/src/check-libstdc++.py)
Program check-static-inits.py found: YES (/Volumes/Sabrent Media/Documents/Source/ffmpeg/build-ffmpeg/harfbuzz/harfbuzz/src/check-static-inits.py)
Program check-symbols.py found: YES (/Volumes/Sabrent Media/Documents/Source/ffmpeg/build-ffmpeg/harfbuzz/harfbuzz/src/check-symbols.py)
Program run-tests.py found: YES (/Volumes/Sabrent Media/Documents/Source/ffmpeg/build-ffmpeg/harfbuzz/harfbuzz/test/shape/run-tests.py)
Program run-tests.py found: YES (/Volumes/Sabrent Media/Documents/Source/ffmpeg/build-ffmpeg/harfbuzz/harfbuzz/test/subset/run-tests.py)
Program run-repack-tests.py found: YES (/Volumes/Sabrent Media/Documents/Source/ffmpeg/build-ffmpeg/harfbuzz/harfbuzz/test/subset/run-repack-tests.py)
Program run-shape-fuzzer-tests.py found: YES (/Volumes/Sabrent Media/Documents/Source/ffmpeg/build-ffmpeg/harfbuzz/harfbuzz/test/fuzzing/run-shape-fuzzer-tests.py)
Program run-subset-fuzzer-tests.py found: YES (/Volumes/Sabrent Media/Documents/Source/ffmpeg/build-ffmpeg/harfbuzz/harfbuzz/test/fuzzing/run-subset-fuzzer-tests.py)
Program run-draw-fuzzer-tests.py found: YES (/Volumes/Sabrent Media/Documents/Source/ffmpeg/build-ffmpeg/harfbuzz/harfbuzz/test/fuzzing/run-draw-fuzzer-tests.py)
Program gtkdoc-scan found: YES (/opt/local/bin/gtkdoc-scan)
Configuring version.xml using configuration
Program gtkdoc-scan found: YES (/opt/local/bin/gtkdoc-scan)
Program gtkdoc-scangobj found: YES (/opt/local/bin/gtkdoc-scangobj)
Program gtkdoc-mkdb found: YES (/opt/local/bin/gtkdoc-mkdb)
Program gtkdoc-mkhtml found: YES (/opt/local/bin/gtkdoc-mkhtml)
Program gtkdoc-fixxref found: YES (/opt/local/bin/gtkdoc-fixxref)
Configuring config.h using configuration
Build targets in project: 98

harfbuzz 3.2.0

Additional shapers
Graphite2 : NO

Dependencies used for command-line utilities
Cairo : YES
Chafa : NO

Directories
prefix : /usr/local
bindir : bin
libdir : lib
includedir : include
datadir : share

Font callbacks (the more the merrier)
FreeType : YES

Other features
Documentation : YES
GObject bindings : YES
Introspection : YES
Experimental APIs: NO

Platform shapers (not normally needed)
CoreText : NO
DirectWrite : NO
GDI/Uniscribe : NO

Testing
Tests : YES
Benchmark : NO

Unicode callbacks (you want at least one)
Builtin : YES
Glib : YES
ICU : YES

Found ninja-1.10.2 at /opt/local/bin/ninja
davidburnett@Davids-Mac-mini harfbuzz %

davidburnett@Davids-Mac-mini harfbuzz % meson test -Cbuild
ninja: Entering directory `/Volumes/Sabrent Media/Documents/Source/ffmpeg/build-ffmpeg/harfbuzz/harfbuzz/build'
[9/226] Compiling C++ object util/hb-shape.p/hb-shape.cc.o
FAILED: util/hb-shape.p/hb-shape.cc.o
c++ -Iutil/hb-shape.p -Iutil -I../util -I. -I.. -Isrc -I../src -I/opt/local/include/freetype2 -I/opt/local/include/libpng16 -I/opt/local/include -I/opt/local/include/cairo -I/opt/local/include/glib-2.0 -I/opt/local/lib/glib-2.0/include -I/opt/local/include/pixman-1 -I/opt/local/include/ossp -fcolor-diagnostics -Wall -Winvalid-pch -Wnon-virtual-dtor -std=c++11 -fno-rtti -O0 -g -fno-exceptions -fno-rtti -fno-threadsafe-statics -fvisibility-inlines-hidden -DHAVE_CONFIG_H -Wno-non-virtual-dtor -MD -MQ util/hb-shape.p/hb-shape.cc.o -MF util/hb-shape.p/hb-shape.cc.o.d -o util/hb-shape.p/hb-shape.cc.o -c ../util/hb-shape.cc
In file included from ../util/hb-shape.cc:28:
In file included from ../util/batch.hh:28:
In file included from ../util/options.hh:30:
In file included from ../src/hb.hh:471:
../src/hb-meta.hh:144:49: error: no member named 'addressof' in namespace 'std'
operator () (T& v) const HB_AUTO_RETURN (std::addressof (v))
~~~~~^
../src/hb-meta.hh:75:41: note: expanded from macro 'HB_AUTO_RETURN'
#define HB_AUTO_RETURN(E) -> decltype ((E)) { return (E); }
^
../src/hb-meta.hh:144:49: error: no member named 'addressof' in namespace 'std'
operator () (T& v) const HB_AUTO_RETURN (std::addressof (v))
~~~~~^
../src/hb-meta.hh:75:55: note: expanded from macro 'HB_AUTO_RETURN'
#define HB_AUTO_RETURN(E) -> decltype ((E)) { return (E); }
^
../src/hb-meta.hh:161:41: error: no member named 'addressof' in namespace 'std'
hb_reference_wrapper (T& v) : v (std::addressof (v)) {}
~~~~~^
3 errors generated.
[10/226] Compiling C++ object util/hb-subset.p/hb-subset.cc.o
FAILED: util/hb-subset.p/hb-subset.cc.o
c++ -Iutil/hb-subset.p -Iutil -I../util -I. -I.. -Isrc -I../src -I/opt/local/include/freetype2 -I/opt/local/include/libpng16 -I/opt/local/include -I/opt/local/include/cairo -I/opt/local/include/glib-2.0 -I/opt/local/lib/glib-2.0/include -I/opt/local/include/pixman-1 -I/opt/local/include/ossp -fcolor-diagnostics -Wall -Winvalid-pch -Wnon-virtual-dtor -std=c++11 -fno-rtti -O0 -g -fno-exceptions -fno-rtti -fno-threadsafe-statics -fvisibility-inlines-hidden -DHAVE_CONFIG_H -Wno-non-virtual-dtor -MD -MQ util/hb-subset.p/hb-subset.cc.o -MF util/hb-subset.p/hb-subset.cc.o.d -o util/hb-subset.p/hb-subset.cc.o -c ../util/hb-subset.cc
In file included from ../util/hb-subset.cc:28:
In file included from ../util/batch.hh:28:
In file included from ../util/options.hh:30:
In file included from ../src/hb.hh:471:
../src/hb-meta.hh:144:49: error: no member named 'addressof' in namespace 'std'
operator () (T& v) const HB_AUTO_RETURN (std::addressof (v))
~~~~~^
../src/hb-meta.hh:75:41: note: expanded from macro 'HB_AUTO_RETURN'
#define HB_AUTO_RETURN(E) -> decltype ((E)) { return (E); }
^
../src/hb-meta.hh:144:49: error: no member named 'addressof' in namespace 'std'
operator () (T& v) const HB_AUTO_RETURN (std::addressof (v))
~~~~~^
../src/hb-meta.hh:75:55: note: expanded from macro 'HB_AUTO_RETURN'
#define HB_AUTO_RETURN(E) -> decltype ((E)) { return (E); }
^
../src/hb-meta.hh:161:41: error: no member named 'addressof' in namespace 'std'
hb_reference_wrapper (T& v) : v (std::addressof (v)) {}
~~~~~^
3 errors generated.
[18/226] Generating hb-gobject-enums-tmp.h with a custom command (wrapped by meson to capture output)
ninja: build stopped: subcommand failed.
Could not rebuild /Volumes/Sabrent Media/Documents/Source/ffmpeg/build-ffmpeg/harfbuzz/harfbuzz/build
davidburnett@Davids-Mac-mini harfbuzz %

@alerque
Copy link
Member

alerque commented Jan 15, 2022

Notable from your log:

C++ compiler for the host machine: c++ (clang 13.0.0 "Apple clang version 13.0.0 (clang-1300.0.29.30)")

vs. our CI build test on macOS has:

C++ compiler for the host machine: c++ (clang 12.0.0 "Apple clang version 12.0.0 (clang-1200.0.32.29)")

@behdad
Copy link
Member

behdad commented Jan 15, 2022

Should hopefully be fixed.

@behdad behdad closed this as completed in 1c50106 Jan 15, 2022
@Vargol
Copy link
Author

Vargol commented Jan 16, 2022

See to have fixed the initail errors still getting build errors with CMake, will try meson when its not 00:40 and raise a seperate issue if necessary.

Error is
-- Build files have been written to: /Users/davidburnett/Documents/Source/ffmpeg/build-ffmpeg/harfbuzz/build-harfbuzz
[ 7%] Building CXX object CMakeFiles/harfbuzz.dir/src/harfbuzz.cc.o
In file included from /Users/davidburnett/Documents/Source/ffmpeg/build-ffmpeg/harfbuzz/harfbuzz/src/harfbuzz.cc:56:
In file included from /Users/davidburnett/Documents/Source/ffmpeg/build-ffmpeg/harfbuzz/harfbuzz/src/hb-coretext.cc:35:
In file included from /Users/davidburnett/Documents/Source/ffmpeg/build-ffmpeg/harfbuzz/harfbuzz/src/hb-coretext.h:37:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX12.1.sdk/System/Library/Frameworks/ApplicationServices.framework/Headers/ApplicationServices.h:23:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX12.1.sdk/System/Library/Frameworks/CoreServices.framework/Headers/CoreServices.h:19:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX12.1.sdk/System/Library/Frameworks/CoreFoundation.framework/Headers/CoreFoundation.h:23:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX12.1.sdk/usr/include/c++/v1/locale.h:46:
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX12.1.sdk/usr/include/locale.h:53:8: error: expected unqualified-id
char *setlocale(int, const char *);
^
/Users/davidburnett/Documents/Source/ffmpeg/build-ffmpeg/harfbuzz/harfbuzz/src/hb-common.cc:53:37: note: expanded from macro 'setlocale'
#define setlocale(Category, Locale) "C"
^
1 error generated.
make[2]: *** [CMakeFiles/harfbuzz.dir/src/harfbuzz.cc.o] Error 1
make[1]: *** [CMakeFiles/harfbuzz.dir/all

behdad added a commit that referenced this issue Jan 16, 2022
@behdad
Copy link
Member

behdad commented Jan 16, 2022

Should be fixed.

@Vargol
Copy link
Author

Vargol commented Jan 16, 2022

Yes it is, thank you for sorting this so swiftly.

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