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

Linker errors on macOS sample project #1140

Open
n8ta opened this issue Apr 29, 2023 · 1 comment
Open

Linker errors on macOS sample project #1140

n8ta opened this issue Apr 29, 2023 · 1 comment
Labels
bug Something isn't working

Comments

@n8ta
Copy link

n8ta commented Apr 29, 2023

Describe your environment.
macOS 12.3.1, xcode 13.3.1, main branch

Steps to reproduce.
Clone the repo. Build main project with tests and obj-c wrapper off. Build sample c++ project.

Current directory: /Users/n8ta/code/cpp_client_telemetry
macosx deployment target=10.10
***
*** You may need to enter your admin password to update the brew files:
***
==> Downloading https://formulae.brew.sh/api/formula.jws.json
########################################################################################################################################################################### 100.0%
==> Downloading https://formulae.brew.sh/api/cask.jws.json
########################################################################################################################################################################### 100.0%
Warning: Treating cmake as a formula. For the cask, use homebrew/cask/cmake
Warning: cmake 3.26.3 is already installed and up-to-date.
To reinstall 3.26.3, run:
  brew reinstall cmake
Warning: wget 1.21.3_1 is already installed and up-to-date.
To reinstall 1.21.3_1, run:
  brew reinstall wget
--2023-04-29 16:26:02--  https://www.sqlite.org/2018/sqlite-autoconf-3220000.tar.gz
Resolving www.sqlite.org (www.sqlite.org)... 45.33.6.223
Connecting to www.sqlite.org (www.sqlite.org)|45.33.6.223|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 2644649 (2.5M) [application/x-gzip]
Saving to: ‘/tmp/sqlite-snapshot.tar.gz’

/tmp/sqlite-snapshot.tar.gz                  100%[============================================================================================>]   2.52M  5.05MB/s    in 0.5s

2023-04-29 16:26:03 (5.05 MB/s) - ‘/tmp/sqlite-snapshot.tar.gz’ saved [2644649/2644649]

x sqlite-autoconf-3220000/
x sqlite-autoconf-3220000/compile
x sqlite-autoconf-3220000/config.guess
x sqlite-autoconf-3220000/configure
x sqlite-autoconf-3220000/sqlite3ext.h
x sqlite-autoconf-3220000/aclocal.m4
x sqlite-autoconf-3220000/install-sh
x sqlite-autoconf-3220000/depcomp
x sqlite-autoconf-3220000/sqlite3.c
x sqlite-autoconf-3220000/INSTALL
x sqlite-autoconf-3220000/sqlite3.pc.in
x sqlite-autoconf-3220000/missing
x sqlite-autoconf-3220000/Makefile.am
x sqlite-autoconf-3220000/config.sub
x sqlite-autoconf-3220000/sqlite3.h
x sqlite-autoconf-3220000/Makefile.in
x sqlite-autoconf-3220000/README.txt
x sqlite-autoconf-3220000/tea/
x sqlite-autoconf-3220000/tea/configure
x sqlite-autoconf-3220000/tea/aclocal.m4
x sqlite-autoconf-3220000/tea/README
x sqlite-autoconf-3220000/tea/tclconfig/
x sqlite-autoconf-3220000/tea/tclconfig/install-sh
x sqlite-autoconf-3220000/tea/tclconfig/tcl.m4
x sqlite-autoconf-3220000/tea/doc/
x sqlite-autoconf-3220000/tea/doc/sqlite3.n
x sqlite-autoconf-3220000/tea/Makefile.in
x sqlite-autoconf-3220000/tea/license.terms
x sqlite-autoconf-3220000/tea/pkgIndex.tcl.in
x sqlite-autoconf-3220000/tea/win/
x sqlite-autoconf-3220000/tea/win/rules.vc
x sqlite-autoconf-3220000/tea/win/makefile.vc
x sqlite-autoconf-3220000/tea/win/nmakehlp.c
x sqlite-autoconf-3220000/tea/generic/
x sqlite-autoconf-3220000/tea/generic/tclsqlite3.c
x sqlite-autoconf-3220000/tea/configure.ac
x sqlite-autoconf-3220000/shell.c
x sqlite-autoconf-3220000/Makefile.msc
x sqlite-autoconf-3220000/sqlite3.1
x sqlite-autoconf-3220000/ltmain.sh
x sqlite-autoconf-3220000/Replace.cs
x sqlite-autoconf-3220000/sqlite3.rc
x sqlite-autoconf-3220000/configure.ac
checking for a BSD-compatible install... /usr/local/bin/ginstall -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /usr/local/bin/gmkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking for style of include used by make... GNU
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking whether gcc understands -c and -o together... yes
checking dependency style of gcc... gcc3
checking for special C compiler options needed for large files... no
checking for _FILE_OFFSET_BITS value needed for large files... no
checking for gcc... (cached) gcc
checking whether we are using the GNU C compiler... (cached) yes
checking whether gcc accepts -g... (cached) yes
checking for gcc option to accept ISO C89... (cached) none needed
checking whether gcc understands -c and -o together... (cached) yes
checking dependency style of gcc... (cached) gcc3
checking build system type... x86_64-apple-darwin21.4.0
checking host system type... x86_64-apple-darwin21.4.0
checking how to print strings... printf
checking for a sed that does not truncate output... /usr/local/bin/gsed
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking for fgrep... /usr/bin/grep -F
checking for ld used by gcc... /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld
checking if the linker (/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld) is GNU ld... no
checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm -B
checking the name lister (/usr/bin/nm -B) interface... BSD nm
checking whether ln -s works... yes
checking the maximum length of command line arguments... 786432
checking how to convert x86_64-apple-darwin21.4.0 file names to x86_64-apple-darwin21.4.0 format... func_convert_file_noop
checking how to convert x86_64-apple-darwin21.4.0 file names to toolchain format... func_convert_file_noop
checking for /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld option to reload object files... -r
checking for objdump... objdump
checking how to recognize dependent libraries... pass_all
checking for dlltool... no
checking how to associate runtime and link libraries... printf %s\n
checking for ar... ar
checking for archiver @FILE support... no
checking for strip... strip
checking for ranlib... ranlib
checking command to parse /usr/bin/nm -B output from gcc object... ok
checking for sysroot... no
checking for a working dd... /bin/dd
checking how to truncate binary pipes... /bin/dd bs=4096 count=1
checking for mt... no
checking if : is a manifest tool... no
checking for dsymutil... dsymutil
checking for nmedit... nmedit
checking for lipo... lipo
checking for otool... otool
checking for otool64... no
checking for -single_module linker flag... yes
checking for -exported_symbols_list linker flag... yes
checking for -force_load linker flag... yes
checking how to run the C preprocessor... gcc -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking for dlfcn.h... yes
checking for objdir... .libs
checking if gcc supports -fno-rtti -fno-exceptions... yes
checking for gcc option to produce PIC... -fno-common -DPIC
checking if gcc PIC flag -fno-common -DPIC works... yes
checking if gcc static flag -static works... no
checking if gcc supports -c -o file.o... yes
checking if gcc supports -c -o file.o... (cached) yes
checking whether the gcc linker (/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld) supports shared libraries... yes
checking dynamic linker characteristics... darwin21.4.0 dyld
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... yes
checking for fdatasync... yes
checking for usleep... yes
checking for fullfsync... no
checking for localtime_r... yes
checking for gmtime_r... yes
checking whether strerror_r is declared... yes
checking for strerror_r... yes
checking whether strerror_r returns char *... no
checking editline/readline.h usability... yes
checking editline/readline.h presence... yes
checking for editline/readline.h... yes
checking for library containing readline... no
checking readline/readline.h usability... yes
checking readline/readline.h presence... yes
checking for readline/readline.h... yes
checking for library containing tgetent... -ltermcap
checking for library containing readline... -lreadline
checking for library containing pthread_create... none required
checking for library containing pthread_mutexattr_init... none required
checking for library containing dlopen... none required
checking for whether to support dynamic extensions... yes
checking for posix_fallocate... no
checking zlib.h usability... yes
checking zlib.h presence... yes
checking for zlib.h... yes
checking for library containing deflate... -lz
checking that generated files are newer than configure... done
configure: creating ./config.status
config.status: creating Makefile
config.status: creating sqlite3.pc
config.status: executing depfiles commands
config.status: executing libtool commands
/bin/sh ./libtool  --tag=CC   --mode=compile gcc -DPACKAGE_NAME=\"sqlite\" -DPACKAGE_TARNAME=\"sqlite\" -DPACKAGE_VERSION=\"3.22.0\" -DPACKAGE_STRING=\"sqlite\ 3.22.0\" -DPACKAGE_BUGREPORT=\"http://www.sqlite.org\" -DPACKAGE_URL=\"\" -DPACKAGE=\"sqlite\" -DVERSION=\"3.22.0\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_DLFCN_H=1 -DLT_OBJDIR=\".libs/\" -DHAVE_FDATASYNC=1 -DHAVE_USLEEP=1 -DHAVE_LOCALTIME_R=1 -DHAVE_GMTIME_R=1 -DHAVE_DECL_STRERROR_R=1 -DHAVE_STRERROR_R=1 -DHAVE_EDITLINE_READLINE_H=1 -DHAVE_READLINE_READLINE_H=1 -DHAVE_READLINE=1 -DHAVE_ZLIB_H=1 -I.    -D_REENTRANT=1 -DSQLITE_THREADSAFE=1    -DSQLITE_HAVE_ZLIB  -DSQLITE_ENABLE_FTS3 -DSQLITE_ENABLE_RTREE -g -O2 -MT sqlite3.lo -MD -MP -MF .deps/sqlite3.Tpo -c -o sqlite3.lo sqlite3.c
libtool: compile:  gcc -DPACKAGE_NAME=\"sqlite\" -DPACKAGE_TARNAME=\"sqlite\" -DPACKAGE_VERSION=\"3.22.0\" "-DPACKAGE_STRING=\"sqlite 3.22.0\"" -DPACKAGE_BUGREPORT=\"http://www.sqlite.org\" -DPACKAGE_URL=\"\" -DPACKAGE=\"sqlite\" -DVERSION=\"3.22.0\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_DLFCN_H=1 -DLT_OBJDIR=\".libs/\" -DHAVE_FDATASYNC=1 -DHAVE_USLEEP=1 -DHAVE_LOCALTIME_R=1 -DHAVE_GMTIME_R=1 -DHAVE_DECL_STRERROR_R=1 -DHAVE_STRERROR_R=1 -DHAVE_EDITLINE_READLINE_H=1 -DHAVE_READLINE_READLINE_H=1 -DHAVE_READLINE=1 -DHAVE_ZLIB_H=1 -I. -D_REENTRANT=1 -DSQLITE_THREADSAFE=1 -DSQLITE_HAVE_ZLIB -DSQLITE_ENABLE_FTS3 -DSQLITE_ENABLE_RTREE -g -O2 -MT sqlite3.lo -MD -MP -MF .deps/sqlite3.Tpo -c sqlite3.c  -fno-common -DPIC -o .libs/sqlite3.o
libtool: compile:  gcc -DPACKAGE_NAME=\"sqlite\" -DPACKAGE_TARNAME=\"sqlite\" -DPACKAGE_VERSION=\"3.22.0\" "-DPACKAGE_STRING=\"sqlite 3.22.0\"" -DPACKAGE_BUGREPORT=\"http://www.sqlite.org\" -DPACKAGE_URL=\"\" -DPACKAGE=\"sqlite\" -DVERSION=\"3.22.0\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_DLFCN_H=1 -DLT_OBJDIR=\".libs/\" -DHAVE_FDATASYNC=1 -DHAVE_USLEEP=1 -DHAVE_LOCALTIME_R=1 -DHAVE_GMTIME_R=1 -DHAVE_DECL_STRERROR_R=1 -DHAVE_STRERROR_R=1 -DHAVE_EDITLINE_READLINE_H=1 -DHAVE_READLINE_READLINE_H=1 -DHAVE_READLINE=1 -DHAVE_ZLIB_H=1 -I. -D_REENTRANT=1 -DSQLITE_THREADSAFE=1 -DSQLITE_HAVE_ZLIB -DSQLITE_ENABLE_FTS3 -DSQLITE_ENABLE_RTREE -g -O2 -MT sqlite3.lo -MD -MP -MF .deps/sqlite3.Tpo -c sqlite3.c -o sqlite3.o >/dev/null 2>&1
mv -f .deps/sqlite3.Tpo .deps/sqlite3.Plo
/bin/sh ./libtool  --tag=CC   --mode=link gcc -D_REENTRANT=1 -DSQLITE_THREADSAFE=1    -DSQLITE_HAVE_ZLIB  -DSQLITE_ENABLE_FTS3 -DSQLITE_ENABLE_RTREE -g -O2 -no-undefined -version-info 8:6:8  -o libsqlite3.la -rpath /usr/local/lib sqlite3.lo  -lz
libtool: link: gcc -dynamiclib  -o .libs/libsqlite3.0.dylib  .libs/sqlite3.o   -lz  -g -O2   -install_name  /usr/local/lib/libsqlite3.0.dylib -compatibility_version 9 -current_version 9.6 -Wl,-single_module
libtool: link: (cd ".libs" && rm -f "libsqlite3.dylib" && ln -s "libsqlite3.0.dylib" "libsqlite3.dylib")
libtool: link: ar cru .libs/libsqlite3.a  sqlite3.o
libtool: link: ranlib .libs/libsqlite3.a
libtool: link: ( cd ".libs" && rm -f "libsqlite3.la" && ln -s "../libsqlite3.la" "libsqlite3.la" )
gcc -DPACKAGE_NAME=\"sqlite\" -DPACKAGE_TARNAME=\"sqlite\" -DPACKAGE_VERSION=\"3.22.0\" -DPACKAGE_STRING=\"sqlite\ 3.22.0\" -DPACKAGE_BUGREPORT=\"http://www.sqlite.org\" -DPACKAGE_URL=\"\" -DPACKAGE=\"sqlite\" -DVERSION=\"3.22.0\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_DLFCN_H=1 -DLT_OBJDIR=\".libs/\" -DHAVE_FDATASYNC=1 -DHAVE_USLEEP=1 -DHAVE_LOCALTIME_R=1 -DHAVE_GMTIME_R=1 -DHAVE_DECL_STRERROR_R=1 -DHAVE_STRERROR_R=1 -DHAVE_EDITLINE_READLINE_H=1 -DHAVE_READLINE_READLINE_H=1 -DHAVE_READLINE=1 -DHAVE_ZLIB_H=1 -I.    -D_REENTRANT=1 -DSQLITE_THREADSAFE=1    -DSQLITE_HAVE_ZLIB  -DSQLITE_ENABLE_FTS3 -DSQLITE_ENABLE_RTREE -DSQLITE_ENABLE_EXPLAIN_COMMENTS -DSQLITE_ENABLE_DBPAGE_VTAB -DSQLITE_ENABLE_STMTVTAB -DSQLITE_ENABLE_DBSTAT_VTAB -g -O2 -MT sqlite3-shell.o -MD -MP -MF .deps/sqlite3-shell.Tpo -c -o sqlite3-shell.o `test -f 'shell.c' || echo './'`shell.c
mv -f .deps/sqlite3-shell.Tpo .deps/sqlite3-shell.Po
gcc -DPACKAGE_NAME=\"sqlite\" -DPACKAGE_TARNAME=\"sqlite\" -DPACKAGE_VERSION=\"3.22.0\" -DPACKAGE_STRING=\"sqlite\ 3.22.0\" -DPACKAGE_BUGREPORT=\"http://www.sqlite.org\" -DPACKAGE_URL=\"\" -DPACKAGE=\"sqlite\" -DVERSION=\"3.22.0\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_DLFCN_H=1 -DLT_OBJDIR=\".libs/\" -DHAVE_FDATASYNC=1 -DHAVE_USLEEP=1 -DHAVE_LOCALTIME_R=1 -DHAVE_GMTIME_R=1 -DHAVE_DECL_STRERROR_R=1 -DHAVE_STRERROR_R=1 -DHAVE_EDITLINE_READLINE_H=1 -DHAVE_READLINE_READLINE_H=1 -DHAVE_READLINE=1 -DHAVE_ZLIB_H=1 -I.    -D_REENTRANT=1 -DSQLITE_THREADSAFE=1    -DSQLITE_HAVE_ZLIB  -DSQLITE_ENABLE_FTS3 -DSQLITE_ENABLE_RTREE -DSQLITE_ENABLE_EXPLAIN_COMMENTS -DSQLITE_ENABLE_DBPAGE_VTAB -DSQLITE_ENABLE_STMTVTAB -DSQLITE_ENABLE_DBSTAT_VTAB -g -O2 -MT sqlite3-sqlite3.o -MD -MP -MF .deps/sqlite3-sqlite3.Tpo -c -o sqlite3-sqlite3.o `test -f 'sqlite3.c' || echo './'`sqlite3.c
mv -f .deps/sqlite3-sqlite3.Tpo .deps/sqlite3-sqlite3.Po
/bin/sh ./libtool  --tag=CC   --mode=link gcc -D_REENTRANT=1 -DSQLITE_THREADSAFE=1    -DSQLITE_HAVE_ZLIB  -DSQLITE_ENABLE_FTS3 -DSQLITE_ENABLE_RTREE -DSQLITE_ENABLE_EXPLAIN_COMMENTS -DSQLITE_ENABLE_DBPAGE_VTAB -DSQLITE_ENABLE_STMTVTAB -DSQLITE_ENABLE_DBSTAT_VTAB -g -O2   -o sqlite3 sqlite3-shell.o sqlite3-sqlite3.o -lreadline -ltermcap  -lz
libtool: link: gcc -D_REENTRANT=1 -DSQLITE_THREADSAFE=1 -DSQLITE_HAVE_ZLIB -DSQLITE_ENABLE_FTS3 -DSQLITE_ENABLE_RTREE -DSQLITE_ENABLE_EXPLAIN_COMMENTS -DSQLITE_ENABLE_DBPAGE_VTAB -DSQLITE_ENABLE_STMTVTAB -DSQLITE_ENABLE_DBSTAT_VTAB -g -O2 -o sqlite3 sqlite3-shell.o sqlite3-sqlite3.o  -lreadline -ltermcap -lz
 /usr/local/bin/gmkdir -p '/usr/local/lib'
 /bin/sh ./libtool   --mode=install /usr/local/bin/ginstall -c   libsqlite3.la '/usr/local/lib'
libtool: install: /usr/local/bin/ginstall -c .libs/libsqlite3.0.dylib /usr/local/lib/libsqlite3.0.dylib
libtool: install: (cd /usr/local/lib && { ln -s -f libsqlite3.0.dylib libsqlite3.dylib || { rm -f libsqlite3.dylib && ln -s libsqlite3.0.dylib libsqlite3.dylib; }; })
libtool: install: /usr/local/bin/ginstall -c .libs/libsqlite3.lai /usr/local/lib/libsqlite3.la
libtool: install: /usr/local/bin/ginstall -c .libs/libsqlite3.a /usr/local/lib/libsqlite3.a
libtool: install: chmod 644 /usr/local/lib/libsqlite3.a
libtool: install: ranlib /usr/local/lib/libsqlite3.a
 /usr/local/bin/gmkdir -p '/usr/local/bin'
  /bin/sh ./libtool   --mode=install /usr/local/bin/ginstall -c sqlite3 '/usr/local/bin'
libtool: install: /usr/local/bin/ginstall -c sqlite3 /usr/local/bin/sqlite3
 /usr/local/bin/gmkdir -p '/usr/local/include'
 /usr/local/bin/ginstall -c -m 644 sqlite3.h sqlite3ext.h '/usr/local/include'
 /usr/local/bin/gmkdir -p '/usr/local/share/man/man1'
 /usr/local/bin/ginstall -c -m 644 sqlite3.1 '/usr/local/share/man/man1'
 /usr/local/bin/gmkdir -p '/usr/local/lib/pkgconfig'
 /usr/local/bin/ginstall -c -m 644 sqlite3.pc '/usr/local/lib/pkgconfig'
ls: third_party/googletest/CMakeLists.txt: No such file or directory
Clone googletest from google/googletest:master ...
Cloning into 'third_party/googletest'...
remote: Enumerating objects: 272, done.
remote: Counting objects: 100% (272/272), done.
remote: Compressing objects: 100% (214/214), done.
remote: Total 272 (delta 76), reused 96 (delta 47), pack-reused 0
Receiving objects: 100% (272/272), 950.37 KiB | 2.49 MiB/s, done.
Resolving deltas: 100% (76/76), done.
Note: switching to '58d77fa8070e8cec2dc1ed015d66b454c8d78850'.

You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by switching back to a branch.

If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:

  git switch -c <new-branch-name>

Or undo this operation with:

  git switch -

Turn off this advice by setting config variable advice.detachedHead to false

Add ios and arm64 build steps for googletest
~/code/cpp_client_telemetry/third_party/googletest ~/code/cpp_client_telemetry
env | sort
+ env
+ sort
AUTO_BUNDLE=true
COLORFGBG=15;0
COLORTERM=truecolor
COMMAND_MODE=unix2003
DISPLAY=/private/tmp/com.apple.launchd.aAFvT7rwxQ/org.xquartz:0
EDITOR=vim
GOPATH=/Users/n8ta/go:/Users/n8ta/code/raft3
HOME=/Users/n8ta
ITERM_PROFILE=Default
ITERM_SESSION_ID=w1t0p0:145CA8C8-89B5-4CE1-9729-DE3D20B0365E
LANG=en_US.UTF-8
LC_TERMINAL=iTerm2
LC_TERMINAL_VERSION=3.4.19
LLVM_SYS_130_PREFIX=/Users/n8ta/llvm-13
LLVM_SYS_150_PREFIX=/Users/n8ta/llvm-15
LOGNAME=n8ta
LS_COLORS=rs=0:di=01;34:ln=01;36:mh=00:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:mi=00:su=37;41:sg=30;43:ca=00:tw=30;42:ow=34;42:st=37;44:ex=01;32:*.tar=01;31:*.tgz=01;31:*.arc=01;31:*.arj=01;31:*.taz=01;31:*.lha=01;31:*.lz4=01;31:*.lzh=01;31:*.lzma=01;31:*.tlz=01;31:*.txz=01;31:*.tzo=01;31:*.t7z=01;31:*.zip=01;31:*.z=01;31:*.dz=01;31:*.gz=01;31:*.lrz=01;31:*.lz=01;31:*.lzo=01;31:*.xz=01;31:*.zst=01;31:*.tzst=01;31:*.bz2=01;31:*.bz=01;31:*.tbz=01;31:*.tbz2=01;31:*.tz=01;31:*.deb=01;31:*.rpm=01;31:*.jar=01;31:*.war=01;31:*.ear=01;31:*.sar=01;31:*.rar=01;31:*.alz=01;31:*.ace=01;31:*.zoo=01;31:*.cpio=01;31:*.7z=01;31:*.rz=01;31:*.cab=01;31:*.wim=01;31:*.swm=01;31:*.dwm=01;31:*.esd=01;31:*.avif=01;35:*.jpg=01;35:*.jpeg=01;35:*.mjpg=01;35:*.mjpeg=01;35:*.gif=01;35:*.bmp=01;35:*.pbm=01;35:*.pgm=01;35:*.ppm=01;35:*.tga=01;35:*.xbm=01;35:*.xpm=01;35:*.tif=01;35:*.tiff=01;35:*.png=01;35:*.svg=01;35:*.svgz=01;35:*.mng=01;35:*.pcx=01;35:*.mov=01;35:*.mpg=01;35:*.mpeg=01;35:*.m2v=01;35:*.mkv=01;35:*.webm=01;35:*.webp=01;35:*.ogm=01;35:*.mp4=01;35:*.m4v=01;35:*.mp4v=01;35:*.vob=01;35:*.qt=01;35:*.nuv=01;35:*.wmv=01;35:*.asf=01;35:*.rm=01;35:*.rmvb=01;35:*.flc=01;35:*.avi=01;35:*.fli=01;35:*.flv=01;35:*.gl=01;35:*.dl=01;35:*.xcf=01;35:*.xwd=01;35:*.yuv=01;35:*.cgm=01;35:*.emf=01;35:*.ogv=01;35:*.ogx=01;35:*.aac=00;36:*.au=00;36:*.flac=00;36:*.m4a=00;36:*.mid=00;36:*.midi=00;36:*.mka=00;36:*.mp3=00;36:*.mpc=00;36:*.ogg=00;36:*.ra=00;36:*.wav=00;36:*.oga=00;36:*.opus=00;36:*.spx=00;36:*.xspf=00;36:*~=00;90:*#=00;90:*.bak=00;90:*.old=00;90:*.orig=00;90:*.part=00;90:*.rej=00;90:*.swp=00;90:*.tmp=00;90:*.dpkg-dist=00;90:*.dpkg-old=00;90:*.ucf-dist=00;90:*.ucf-new=00;90:*.ucf-old=00;90:*.rpmnew=00;90:*.rpmorig=00;90:*.rpmsave=00;90:
LaunchInstanceID=B166193B-490D-40BB-A115-60DC7B719B07
MACOSX_DEPLOYMENT_TARGET=10.10
NOROOT=
OLDPWD=/Users/n8ta/code/cpp_client_telemetry
OMF_CONFIG=/Users/n8ta/.config/omf
OMF_PATH=/Users/n8ta/.local/share/omf
PASSENGER_APP_ENV=development
PATH=/usr/local/bin:/Users/n8ta/.rbenv/shims:/Users/n8ta/code/jawk/jawk/target/release/:/Users/n8ta/.bin:/Users/n8ta/go/bin:/usr/local/bin:/Users/n8ta/font-tools/FontCommandLineTools.pkg/Payload:/Users/n8ta/Library/Android/sdk/platform-tools:/usr/local/go:/usr/local/bin:/usr/sbin:/Users/n8ta/.composer/vendor/bin:/Applications/Sublime Text 2.app/Contents/SharedSupport/bin/:/usr/bin:/bin:/usr/sbin:/sbin:/Users/n8ta/.cargo/bin:/Users/n8ta/code/habitctl/target/release:/Applications/microchip/xc32/v2.30/bin:/Applications/Racket v8.1/bin:/usr/local/opt/gnu-sed/libexec/gnubin:/Users/n8ta/.cabal/bin:/Users/n8ta/.ghcup/bin:/usr/local/Cellar/nuget/5.10.0/bin:/usr/local/Cellar/mono/6.12.0.122/bin:/Users/n8ta/.local/bin:/Users/n8ta/go/bin:/Users/n8ta/code/raft3/bin
PWD=/Users/n8ta/code/cpp_client_telemetry/third_party/googletest
RBENV_SHELL=fish
SECURITYSESSIONID=186a5
SHELL=/usr/local/bin/fish
SHLVL=4
SQLITE_PKG=sqlite-autoconf-3220000
SSH_AUTH_SOCK=/private/tmp/com.apple.launchd.fvd0W9pBN6/Listeners
TERM=xterm-256color
TERM_PROGRAM=iTerm.app
TERM_PROGRAM_VERSION=3.4.19
TERM_SESSION_ID=w1t0p0:145CA8C8-89B5-4CE1-9729-DE3D20B0365E
TMPDIR=/var/folders/6n/rwqzdntn1hd46w7f_wrcff0c0000gn/T/
TRAVIS_API_KEY=9LnaEKKu--PTNh4vjNg_fw
USER=n8ta
XPC_FLAGS=0x0
XPC_SERVICE_NAME=0
_=/usr/bin/env
__CFBundleIdentifier=com.googlecode.iterm2
__CF_USER_TEXT_ENCODING=0x1F5:0:0
rm -rf build
+ rm -rf build
mkdir -p build || true
+ mkdir -p build
cd build
+ cd build
cmake -Dgtest_build_samples=OFF \
      -Dgmock_build_samples=OFF \
      -Dgtest_build_tests=OFF \
      -Dgmock_build_tests=OFF \
      -DCMAKE_CXX_FLAGS="-fPIC $CXX_FLAGS" \
      -DBUILD_IOS=$IOS_BUILD \
      -DARCH=$ARCH \
      ..
+ cmake -Dgtest_build_samples=OFF -Dgmock_build_samples=OFF -Dgtest_build_tests=OFF -Dgmock_build_tests=OFF '-DCMAKE_CXX_FLAGS=-fPIC ' -DBUILD_IOS=NO -DARCH=x86_64 ..
-- The C compiler identification is AppleClang 13.1.6.13160021
-- The CXX compiler identification is AppleClang 13.1.6.13160021
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Found Python: /usr/local/Frameworks/Python.framework/Versions/3.11/bin/python3.11 (found version "3.11.1") found components: Interpreter
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Success
-- Found Threads: TRUE
-- Configuring done (3.0s)
-- Generating done (0.0s)
CMake Warning:
  Manually-specified variables were not used by the project:

    gmock_build_samples


-- Build files have been written to: /Users/n8ta/code/cpp_client_telemetry/third_party/googletest/build
make
+ make
[ 12%] Building CXX object googletest/CMakeFiles/gtest.dir/src/gtest-all.cc.o
[ 25%] Linking CXX static library ../lib/libgtest.a
[ 25%] Built target gtest
[ 37%] Building CXX object googlemock/CMakeFiles/gmock.dir/src/gmock-all.cc.o
[ 50%] Linking CXX static library ../lib/libgmock.a
[ 50%] Built target gmock
[ 62%] Building CXX object googlemock/CMakeFiles/gmock_main.dir/src/gmock_main.cc.o
[ 75%] Linking CXX static library ../lib/libgmock_main.a
[ 75%] Built target gmock_main
[ 87%] Building CXX object googletest/CMakeFiles/gtest_main.dir/src/gtest_main.cc.o
[100%] Linking CXX static library ../lib/libgtest_main.a
[100%] Built target gtest_main
popd
+ popd
~/code/cpp_client_telemetry
# CTEST_OUTPUT_ON_FAILURE=1 make test
# make install
gcc   version: Apple clang version 13.1.6 (clang-1316.0.21.2.3)
Target: x86_64-apple-darwin21.4.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
clang version: Apple clang version 13.1.6 (clang-1316.0.21.2.3)
Target: x86_64-apple-darwin21.4.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
cmake -DMAC_ARCH=universal -DCMAKE_BUILD_TYPE=Debug -DCMAKE_PACKAGE_TYPE=tgz -DCMAKE_CXX_FLAGS= DBUILD_SHARED_LIBS=OFF ..
CMake Warning:
  Ignoring extra path from command line:

   "/Users/n8ta/code/cpp_client_telemetry/out/DBUILD_SHARED_LIBS=OFF"


-- The C compiler identification is AppleClang 13.1.6.13160021
-- The CXX compiler identification is AppleClang 13.1.6.13160021
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- BUILD_IOS:
-- MAC_ARCH:               universal
-- CMAKE_SYSTEM_INFO_FILE: Platform/Darwin
-- CMAKE_SYSTEM_NAME:      Darwin
-- CMAKE_SYSTEM_PROCESSOR: x86_64
-- CMAKE_SYSTEM:           Darwin-21.4.0
-- CMAKE_SYSTEM_VERSION:   21.4.0
-- CMAKE_BUILD_TYPE:       Debug
-- TARGET_ARCH:            x86_64
-- CMAKE_CXX_COMPILER_ID:  AppleClang
Building Debug ...
-- Found Tcmalloc: /usr/local/lib/libtcmalloc.dylib
-- -- PAL implementation: CPP11
-- -- SDK version: EVT-3.4.119.0
-- Found CURL: /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX12.3.sdk/usr/lib/libcurl.tbd (found version "7.79.1")
-- Building static SDK library
-- Library will be installed to /usr/local/lib
-- Package name: mat-sdk-3.4.119-Darwin-1.0-x86_64.tgz
-- Configuring done (1.5s)
-- Generating done (0.0s)
-- Build files have been written to: /Users/n8ta/code/cpp_client_telemetry/out
[  1%] Building CXX object lib/CMakeFiles/mat.dir/decorators/BaseDecorator.cpp.o
[  3%] Building CXX object lib/CMakeFiles/mat.dir/packager/BondSplicer.cpp.o
[  5%] Building CXX object lib/CMakeFiles/mat.dir/packager/Packager.cpp.o
[  6%] Building CXX object lib/CMakeFiles/mat.dir/callbacks/DebugSource.cpp.o
[  8%] Building CXX object lib/CMakeFiles/mat.dir/bond/BondSerializer.cpp.o
[ 10%] Building CXX object lib/CMakeFiles/mat.dir/filter/EventFilterCollection.cpp.o
[ 12%] Building CXX object lib/CMakeFiles/mat.dir/tpm/TransmitProfiles.cpp.o
[ 13%] Building CXX object lib/CMakeFiles/mat.dir/tpm/TransmissionPolicyManager.cpp.o
[ 15%] Building CXX object lib/CMakeFiles/mat.dir/tpm/DeviceStateHandler.cpp.o
[ 17%] Building CXX object lib/CMakeFiles/mat.dir/system/EventProperty.cpp.o
[ 18%] Building CXX object lib/CMakeFiles/mat.dir/system/TelemetrySystem.cpp.o
[ 20%] Building CXX object lib/CMakeFiles/mat.dir/system/EventProperties.cpp.o
[ 22%] Building CXX object lib/CMakeFiles/mat.dir/compression/HttpDeflateCompression.cpp.o
[ 24%] Building CXX object lib/CMakeFiles/mat.dir/api/AllowedLevelsCollection.cpp.o
[ 25%] Building CXX object lib/CMakeFiles/mat.dir/api/LogManager.cpp.o
[ 27%] Building CXX object lib/CMakeFiles/mat.dir/api/ContextFieldsProvider.cpp.o
[ 29%] Building CXX object lib/CMakeFiles/mat.dir/api/LogManagerImpl.cpp.o
[ 31%] Building CXX object lib/CMakeFiles/mat.dir/api/LogSessionData.cpp.o
[ 32%] Building CXX object lib/CMakeFiles/mat.dir/api/Logger.cpp.o
[ 34%] Building CXX object lib/CMakeFiles/mat.dir/api/LogManagerProvider.cpp.o
[ 36%] Building CXX object lib/CMakeFiles/mat.dir/api/CorrelationVector.cpp.o
[ 37%] Building CXX object lib/CMakeFiles/mat.dir/api/LogConfiguration.cpp.o
[ 39%] Building CXX object lib/CMakeFiles/mat.dir/api/AuthTokensController.cpp.o
[ 41%] Building CXX object lib/CMakeFiles/mat.dir/api/ILogConfiguration.cpp.o
[ 43%] Building CXX object lib/CMakeFiles/mat.dir/api/LogManagerFactory.cpp.o
[ 44%] Building CXX object lib/CMakeFiles/mat.dir/api/capi.cpp.o
[ 46%] Building CXX object lib/CMakeFiles/mat.dir/api/DataViewerCollection.cpp.o
[ 48%] Building CXX object lib/CMakeFiles/mat.dir/utils/FileUtils.cpp.o
[ 50%] Building CXX object lib/CMakeFiles/mat.dir/utils/Utils.cpp.o
[ 51%] Building CXX object lib/CMakeFiles/mat.dir/utils/StringUtils.cpp.o
[ 53%] Building CXX object lib/CMakeFiles/mat.dir/utils/ZlibUtils.cpp.o
[ 55%] Building CXX object lib/CMakeFiles/mat.dir/pal/InformationProviderImpl.cpp.o
[ 56%] Building CXX object lib/CMakeFiles/mat.dir/http/HttpClient_CAPI.cpp.o
[ 58%] Building CXX object lib/CMakeFiles/mat.dir/http/HttpClientManager.cpp.o
[ 60%] Building CXX object lib/CMakeFiles/mat.dir/http/HttpRequestEncoder.cpp.o
[ 62%] Building CXX object lib/CMakeFiles/mat.dir/http/HttpResponseDecoder.cpp.o
[ 63%] Building CXX object lib/CMakeFiles/mat.dir/http/HttpClientFactory.cpp.o
[ 65%] Building CXX object lib/CMakeFiles/mat.dir/stats/Statistics.cpp.o
[ 67%] Building CXX object lib/CMakeFiles/mat.dir/stats/MetaStats.cpp.o
[ 68%] Building CXX object lib/CMakeFiles/mat.dir/offline/StorageObserver.cpp.o
[ 70%] Building CXX object lib/CMakeFiles/mat.dir/offline/OfflineStorageFactory.cpp.o
[ 72%] Building CXX object lib/CMakeFiles/mat.dir/offline/MemoryStorage.cpp.o
[ 74%] Building CXX object lib/CMakeFiles/mat.dir/offline/OfflineStorage_SQLite.cpp.o
[ 75%] Building CXX object lib/CMakeFiles/mat.dir/offline/OfflineStorageHandler.cpp.o
[ 77%] Building CXX object lib/CMakeFiles/mat.dir/offline/LogSessionDataProvider.cpp.o
[ 79%] Building CXX object lib/CMakeFiles/mat.dir/backoff/IBackoff.cpp.o
[ 81%] Building CXX object lib/CMakeFiles/mat.dir/pal/PAL.cpp.o
[ 82%] Building CXX object lib/CMakeFiles/mat.dir/pal/TaskDispatcher_CAPI.cpp.o
[ 84%] Building CXX object lib/CMakeFiles/mat.dir/pal/WorkerThread.cpp.o
[ 86%] Building CXX object lib/CMakeFiles/mat.dir/pal/posix/sysinfo_utils_apple.cpp.o
[ 87%] Building CXX object lib/CMakeFiles/mat.dir/pal/posix/sysinfo_utils_mac.mm.o
[ 89%] Building CXX object lib/CMakeFiles/mat.dir/pal/posix/DeviceInformationImpl.cpp.o
[ 91%] Building CXX object lib/CMakeFiles/mat.dir/pal/posix/SystemInformationImpl.cpp.o
[ 93%] Building CXX object lib/CMakeFiles/mat.dir/pal/posix/sysinfo_sources.cpp.o
[ 94%] Building CXX object lib/CMakeFiles/mat.dir/http/HttpClient_Apple.mm.o
[ 96%] Building CXX object lib/CMakeFiles/mat.dir/pal/posix/NetworkInformationImpl.mm.o
[ 98%] Building C object lib/CMakeFiles/mat.dir/__/third_party/Reachability/ODWReachability.m.o
[100%] Linking CXX static library libmat.a
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: for architecture: x86_64 file: libmat.a(LogManager.cpp.o) has no symbols
[100%] Built target mat
[100%] Built target mat
Run CPack packaging tool...
CPack: Create package using TGZ
CPack: Install projects
CPack: - Run preinstall target for: mat-sdk
CPack: - Install project: mat-sdk []
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: for architecture: x86_64 file: /usr/local/lib/libmat.a(LogManager.cpp.o) has no symbols
CPack: Create package
CPack: - package: /Users/n8ta/code/cpp_client_telemetry/out/mat-sdk-3.4.119-Darwin-1.0-x86_64.tar.gz generated.
+-----------------------------------------------------------------------------------+
 This step may prompt for your sudo password to deploy SDK to /usr/local
+-----------------------------------------------------------------------------------+
Password:
Install SDK to /usr/local
cd examples/SampleCpp
-- The C compiler identification is AppleClang 13.1.6.13160021
-- The CXX compiler identification is AppleClang 13.1.6.13160021
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Success
-- Found Threads: TRUE
-- Configuring done (1.3s)
-- Generating done (0.0s)
-- Build files have been written to: /Users/n8ta/code/cpp_client_telemetry/examples/cpp/SampleCpp/out
[ 25%] Building CXX object CMakeFiles/SampleCpp.dir/main.cpp.o
[ 50%] Building CXX object CMakeFiles/SampleCpp.dir/DebugCallback.cpp.o
[ 75%] Building C object CMakeFiles/SampleCpp.dir/demo.c.o
[100%] Linking CXX executable SampleCpp
Undefined symbols for architecture x86_64:
  "_SCNetworkReachabilityCreateWithAddress", referenced from:
      +[ODWReachability reachabilityWithAddress:] in libmat.a(ODWReachability.m.o)
  "_SCNetworkReachabilityCreateWithName", referenced from:
      +[ODWReachability reachabilityWithHostname:] in libmat.a(ODWReachability.m.o)
  "_SCNetworkReachabilityGetFlags", referenced from:
      -[ODWReachability isReachable] in libmat.a(ODWReachability.m.o)
      -[ODWReachability isReachableViaWiFi] in libmat.a(ODWReachability.m.o)
      -[ODWReachability connectionRequired] in libmat.a(ODWReachability.m.o)
      -[ODWReachability isConnectionOnDemand] in libmat.a(ODWReachability.m.o)
      -[ODWReachability isInterventionRequired] in libmat.a(ODWReachability.m.o)
      -[ODWReachability reachabilityFlags] in libmat.a(ODWReachability.m.o)
  "_SCNetworkReachabilitySetCallback", referenced from:
      -[ODWReachability startNotifier] in libmat.a(ODWReachability.m.o)
      -[ODWReachability stopNotifier] in libmat.a(ODWReachability.m.o)
  "_SCNetworkReachabilitySetDispatchQueue", referenced from:
      -[ODWReachability startNotifier] in libmat.a(ODWReachability.m.o)
      -[ODWReachability stopNotifier] in libmat.a(ODWReachability.m.o)
  "_nw_path_get_status", referenced from:
      ____ZN9Microsoft12Applications6Events19PlatformAbstraction18NetworkInformation14SetupNetDetectEv_block_invoke.11 in libmat.a(NetworkInformationImpl.mm.o)
  "_nw_path_is_constrained", referenced from:
      ____ZN9Microsoft12Applications6Events19PlatformAbstraction18NetworkInformation14SetupNetDetectEv_block_invoke.11 in libmat.a(NetworkInformationImpl.mm.o)
  "_nw_path_is_expensive", referenced from:
      ____ZN9Microsoft12Applications6Events19PlatformAbstraction18NetworkInformation14SetupNetDetectEv_block_invoke.11 in libmat.a(NetworkInformationImpl.mm.o)
  "_nw_path_monitor_cancel", referenced from:
      Microsoft::Applications::Events::PlatformAbstraction::NetworkInformation::~NetworkInformation() in libmat.a(NetworkInformationImpl.mm.o)
      Microsoft::Applications::Events::PlatformAbstraction::NetworkInformation::SetupNetDetect() in libmat.a(NetworkInformationImpl.mm.o)
  "_nw_path_monitor_create", referenced from:
      Microsoft::Applications::Events::PlatformAbstraction::NetworkInformation::SetupNetDetect() in libmat.a(NetworkInformationImpl.mm.o)
  "_nw_path_monitor_set_queue", referenced from:
      Microsoft::Applications::Events::PlatformAbstraction::NetworkInformation::SetupNetDetect() in libmat.a(NetworkInformationImpl.mm.o)
  "_nw_path_monitor_set_update_handler", referenced from:
      Microsoft::Applications::Events::PlatformAbstraction::NetworkInformation::SetupNetDetect() in libmat.a(NetworkInformationImpl.mm.o)
  "_nw_path_monitor_start", referenced from:
      Microsoft::Applications::Events::PlatformAbstraction::NetworkInformation::SetupNetDetect() in libmat.a(NetworkInformationImpl.mm.o)
  "_nw_path_uses_interface_type", referenced from:
      ____ZN9Microsoft12Applications6Events19PlatformAbstraction18NetworkInformation14SetupNetDetectEv_block_invoke.11 in libmat.a(NetworkInformationImpl.mm.o)
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[2]: *** [SampleCpp] Error 1
make[1]: *** [CMakeFiles/SampleCpp.dir/all] Error 2
make: *** [all] Error 2

What is the expected behavior?
No linker errors

What is the actual behavior?
Reachability obj-c library can't seem to find some macOS functions

Additional context.
Intel mac but I see the same on an m2.

@n8ta n8ta added the bug Something isn't working label Apr 29, 2023
@n8ta
Copy link
Author

n8ta commented Apr 30, 2023

Few missing frameworks when building. Adding this to CMakeLists fixes it (line 46)

if (CMAKE_SYSTEM_NAME STREQUAL "Darwin")
        set (PLATFORM_LIBS "-framework CoreFoundation -framework IOKit -framework Foundation -framework SystemConfiguration -framework Network")
endif()

-framework SystemConfiguration -framework Network are missing.

I'll see if I can make a PR monday.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant