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

Mac OS M1 Build failed. #811

Closed
Edison0716 opened this issue Jul 12, 2023 · 1 comment
Closed

Mac OS M1 Build failed. #811

Edison0716 opened this issue Jul 12, 2023 · 1 comment

Comments

@Edison0716
Copy link

Edison0716 commented Jul 12, 2023

MacOs 13.4.1
M1

autoreconf: export WARNINGS=
autoreconf: Entering directory '.'
autoreconf: configure.ac: not using Gettext
autoreconf: running: aclocal --force -I m4
autoreconf: configure.ac: tracing
autoreconf: running: glibtoolize --copy --force
glibtoolize: putting auxiliary files in '.'.
glibtoolize: copying file './ltmain.sh'
glibtoolize: putting macros in AC_CONFIG_MACRO_DIRS, 'm4'.
glibtoolize: copying file 'm4/libtool.m4'
glibtoolize: copying file 'm4/ltoptions.m4'
glibtoolize: copying file 'm4/ltsugar.m4'
glibtoolize: copying file 'm4/ltversion.m4'
glibtoolize: copying file 'm4/lt~obsolete.m4'
autoreconf: configure.ac: not using Intltool
autoreconf: configure.ac: not using Gtkdoc
autoreconf: running: aclocal --force -I m4
autoreconf: running: /opt/homebrew/Cellar/autoconf/2.71/bin/autoconf --force
configure.ac:23: warning: $as_echo is obsolete; use AS_ECHO(["message"]) instead
lib/m4sugar/m4sh.m4:692: _AS_IF_ELSE is expanded from...
lib/m4sugar/m4sh.m4:699: AS_IF is expanded from...
./lib/autoconf/general.m4:2249: AC_CACHE_VAL is expanded from...
./lib/autoconf/general.m4:2270: AC_CACHE_CHECK is expanded from...
m4/ax_pthread.m4:88: AX_PTHREAD is expanded from...
configure.ac:23: the top level
autoreconf: configure.ac: not using Autoheader
autoreconf: running: automake --add-missing --copy --force-missing
configure.ac:14: installing './compile'
configure.ac:6: installing './missing'
Makefile.am: installing './depcomp'
test/integ/Makefile.am:85: warning: variable 'access_marking_test_SOURCES' is defined but no program or
test/integ/Makefile.am:85: library has 'access_marking_test' as canonical name (possible typo)
test/integ/Makefile.am:86: warning: variable 'EXTRA_access_marking_test_DEPENDENCIES' is defined but no program or
test/integ/Makefile.am:86: library has 'access_marking_test' as canonical name (possible typo)
test/unit/Makefile.am:413: warning: variable 'string_propagation_test_SOURCES' is defined but no program or
test/unit/Makefile.am:413: library has 'string_propagation_test' as canonical name (possible typo)
autoreconf: Leaving directory '.'
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a race-free mkdir -p... ./install-sh -c -d
checking for gawk... no
checking for mawk... no
checking for nawk... no
checking for awk... awk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking for g++... g++
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 the compiler supports GNU C++... yes
checking whether g++ accepts -g... yes
checking for g++ option to enable C++11 features... none needed
checking whether make supports the include directive... yes (GNU style)
checking dependency style of g++... gcc3
checking for gcc... gcc
checking whether the compiler supports GNU C... yes
checking whether gcc accepts -g... yes
checking for gcc option to enable C11 features... none needed
checking whether gcc understands -c and -o together... yes
checking dependency style of gcc... gcc3
checking build system type... aarch64-apple-darwin22.5.0
checking host system type... aarch64-apple-darwin22.5.0
checking how to print strings... printf
checking for a sed that does not truncate output... /usr/bin/sed
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... /Library/Developer/CommandLineTools/usr/bin/ld
checking if the linker (/Library/Developer/CommandLineTools/usr/bin/ld) is GNU ld... no
checking for BSD- or MS-compatible name lister (nm)... /opt/homebrew/opt/binutils/bin/nm -B
checking the name lister (/opt/homebrew/opt/binutils/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 aarch64-apple-darwin22.5.0 file names to aarch64-apple-darwin22.5.0 format... func_convert_file_noop
checking how to convert aarch64-apple-darwin22.5.0 file names to toolchain format... func_convert_file_noop
checking for /Library/Developer/CommandLineTools/usr/bin/ld option to reload object files... -r
checking for file... file
checking for objdump... objdump
checking how to recognize dependent libraries... pass_all
checking for dlltool... dlltool
checking how to associate runtime and link libraries... printf %s\n
checking for ar... ar
checking for archiver @file support... @
checking for strip... strip
checking for ranlib... ranlib
checking command to parse /opt/homebrew/opt/binutils/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... no
checking for stdio.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for strings.h... yes
checking for sys/stat.h... yes
checking for sys/types.h... yes
checking for unistd.h... yes
checking for sys/param.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 (/Library/Developer/CommandLineTools/usr/bin/ld) supports shared libraries... yes
checking dynamic linker characteristics... darwin22.5.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 how to run the C++ preprocessor... g++ -E
checking for ld used by g++... /Library/Developer/CommandLineTools/usr/bin/ld
checking if the linker (/Library/Developer/CommandLineTools/usr/bin/ld) is GNU ld... no
checking whether the g++ linker (/Library/Developer/CommandLineTools/usr/bin/ld) supports shared libraries... yes
checking for g++ option to produce PIC... -fno-common -DPIC
checking if g++ PIC flag -fno-common -DPIC works... yes
checking if g++ static flag -static works... no
checking if g++ supports -c -o file.o... yes
checking if g++ supports -c -o file.o... (cached) yes
checking whether the g++ linker (/Library/Developer/CommandLineTools/usr/bin/ld) supports shared libraries... yes
checking dynamic linker characteristics... darwin22.5.0 dyld
checking how to hardcode library paths into programs... immediate
checking for a Python interpreter with version >= 3.0... python3
checking for python3... /opt/homebrew/bin/python3
checking for python3 version... 3.11
checking for python3 platform... darwin
checking for GNU default python3 prefix... ${prefix}
checking for GNU default python3 exec_prefix... ${exec_prefix}
checking for python3 script directory (pythondir)... ${PYTHON_PREFIX}/lib/python3.11/site-packages
checking for python3 extension module directory (pyexecdir)... ${PYTHON_EXEC_PREFIX}/lib/python3.11/site-packages
checking how to run the C preprocessor... gcc -E
checking whether gcc is Clang... yes
checking whether Clang needs flag to prevent "argument unused" warning when linking with -pthread... no
checking for joinable pthread attribute... PTHREAD_CREATE_JOINABLE
checking whether more special flags are required for pthreads... no
checking for PTHREAD_PRIO_INHERIT... yes
checking for boostlib >= 1.71.0... yes
checking whether the Boost::Filesystem library is available... yes
checking for exit in -lboost_filesystem... yes
checking whether the Boost::Regex library is available... yes
checking for exit in -lboost_regex-mt... yes
checking whether the Boost::Program_Options library is available... yes
checking for exit in -lboost_program_options-mt... yes
checking whether the Boost::IOStreams library is available... yes
checking for exit in -lboost_iostreams-mt... yes
checking whether the Boost::Thread library is available... yes
checking for exit in -lboost_thread-mt... yes
checking for adler32 in -lz... yes
checking for main in -ljsoncpp... yes
checking for protoc... /opt/homebrew/bin/protoc
checking for main in -lprotobuf... yes
checking for arpa/inet.h... yes
checking for fcntl.h... yes
checking for inttypes.h... (cached) yes
checking for memory.h... yes
checking for netinet/in.h... yes
checking for stddef.h... yes
checking for stdint.h... (cached) yes
checking for stdlib.h... (cached) yes
checking for string.h... (cached) yes
checking for sys/time.h... yes
checking for unistd.h... (cached) yes
checking for _Bool... yes
checking for stdbool.h that conforms to C99... yes
checking for inline... inline
checking for int16_t... yes
checking for int32_t... yes
checking for int64_t... yes
checking for int8_t... yes
checking for off_t... yes
checking for pid_t... yes
checking for size_t... yes
checking for ssize_t... yes
checking for uint16_t... yes
checking for uint32_t... yes
checking for uint64_t... yes
checking for uint8_t... yes
checking for GNU libc compatible malloc... yes
checking for getpagesize... yes
checking for working mmap... yes
checking for GNU libc compatible realloc... yes
checking for clock_gettime... yes
checking for gettimeofday... yes
checking for memmove... yes
checking for memset... yes
checking for munmap... yes
checking for regcomp... yes
checking for strchr... yes
checking for strdup... yes
checking for strerror... yes
checking for strrchr... yes
checking for strstr... yes
checking for strtol... yes
checking that generated files are newer than configure... done
configure: creating ./config.status
config.status: creating Makefile
config.status: creating test/Makefile
config.status: creating test/integ/Makefile
config.status: creating test/unit/Makefile
config.status: executing depfiles commands
config.status: executing libtool commands
mkdir -p ./protores
/Library/Developer/CommandLineTools/usr/bin/make all-recursive
Making all in .
mkdir -p ./protores
/bin/sh ./libtool --tag=CXX --mode=link g++ --std=gnu++17 -O3 -Wall -Werror -Wno-attributes -Wno-comment -Wno-unknown-warning-option -Wno-array-bounds -Wno-class-memaccess -Wno-deprecated-declarations -Wno-format-truncation -Wno-format-zero-length -Wno-invalid-offsetof -Wno-maybe-uninitialized -Wno-parentheses -Wno-return-type -Wno-shift-count-overflow -Wno-sign-compare -Wno-strict-aliasing -Wno-stringop-overflow -Wno-stringop-overread -Wno-uninitialized -Wno-unused-but-set-variable -Wno-unused-function -Wno-unused-private-field -Wno-unused-result -Wno-unused-variable -g -std=gnu++17 -o redexdump tools/redexdump/DumpTables.o tools/redexdump/PrintUtil.o tools/redexdump/RedexDump.o tools/common/DexCommon.o tools/common/Formatters.o libredex.la -lboost_filesystem -lboost_regex-mt -lboost_thread-mt -lpthread -lpthread -ldl -ljsoncpp -lz
libtool: link: g++ --std=gnu++17 -O3 -Wall -Werror -Wno-attributes -Wno-comment -Wno-unknown-warning-option -Wno-array-bounds -Wno-class-memaccess -Wno-deprecated-declarations -Wno-format-truncation -Wno-format-zero-length -Wno-invalid-offsetof -Wno-maybe-uninitialized -Wno-parentheses -Wno-return-type -Wno-shift-count-overflow -Wno-sign-compare -Wno-strict-aliasing -Wno-stringop-overflow -Wno-stringop-overread -Wno-uninitialized -Wno-unused-but-set-variable -Wno-unused-function -Wno-unused-private-field -Wno-unused-result -Wno-unused-variable -g -std=gnu++17 -o redexdump tools/redexdump/DumpTables.o tools/redexdump/PrintUtil.o tools/redexdump/RedexDump.o tools/common/DexCommon.o tools/common/Formatters.o -Wl,-bind_at_load ./.libs/libredex.a -lboost_iostreams-mt -lprotobuf -lboost_filesystem -lboost_regex-mt -lboost_thread-mt -lpthread -ldl -ljsoncpp -lz
ld: warning: dylib (/opt/homebrew/lib/libboost_iostreams-mt.dylib) was built for newer macOS version (13.0) than being linked (11.3)
ld: warning: dylib (/opt/homebrew/lib/libprotobuf.dylib) was built for newer macOS version (13.0) than being linked (11.3)
ld: warning: dylib (/opt/homebrew/lib/libboost_regex-mt.dylib) was built for newer macOS version (13.0) than being linked (11.3)
ld: warning: dylib (/opt/homebrew/lib/libboost_thread-mt.dylib) was built for newer macOS version (13.0) than being linked (11.3)
ld: warning: dylib (/opt/homebrew/lib/libboost_filesystem.dylib) was built for newer macOS version (13.0) than being linked (11.3)
ld: warning: dylib (/opt/homebrew/lib/libjsoncpp.dylib) was built for newer macOS version (13.0) than being linked (11.3)
ld: warning: ignoring file ./.libs/libredex.a, building for macOS-arm64 but attempting to link with file built for macOS-arm64
Undefined symbols for architecture arm64:
"dex_encoding::details::throw_invalid(char const*)", referenced from:
dump_string_data_item(unsigned char const**) in DumpTables.o
"_utf32_to_utf8", referenced from:
dump_string_data_item(unsigned char const**) in DumpTables.o
"_utf32_to_utf8_length", referenced from:
dump_string_data_item(unsigned char const**) in DumpTables.o
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[2]: *** [redexdump] Error 1
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2

@facebook facebook deleted a comment from xinledanding Aug 2, 2023
@agampe
Copy link
Contributor

agampe commented Aug 28, 2023

Maybe try to follow this Stackoverflow question? Seems a very Mac-specific issue that we won't change the Makefile for.

@agampe agampe closed this as completed Aug 28, 2023
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

2 participants