facebook / redex

A bytecode optimizer for Android apps
https://fbredex.com/
MIT License
6.03k stars 653 forks source link

编译时间怎么这么久 #715

Closed Novelot closed 2 years ago

Novelot commented 2 years ago

state分支,执行autoreconf -ivf && ./configure && make,一个多小时了,还没编译完,好像在循环,啥情况?你们也编译这么久吗? 环境:

HOMEBREW_VERSION: 3.5.10
ORIGIN: https://github.com/Homebrew/brew
HEAD: c5731faf8be1ddc1eeae4b162b88bd76318fc279
Last commit: 3 hours ago
Core tap ORIGIN: https://github.com/Homebrew/homebrew-core
Core tap HEAD: c08782c6d852b70f41386baf22df3a1f128900c5
Core tap last commit: 2 hours ago
Core tap branch: master
HOMEBREW_PREFIX: /usr/local
HOMEBREW_BOTTLE_DOMAIN: https://mirrors.ustc.edu.cn/homebrew-bottles
HOMEBREW_CASK_OPTS: []
HOMEBREW_MAKE_JOBS: 12
Homebrew Ruby: 2.6.8 => /usr/local/Homebrew/Library/Homebrew/vendor/portable-ruby/2.6.8_1/bin/ruby
CPU: dodeca-core 64-bit kabylake
Clang: 13.1.6 build 1316
Git: 2.37.2 => /usr/local/bin/git
Curl: 7.79.1 => /usr/bin/curl
macOS: 12.5.1-x86_64
CLT: 13.4.0.0.1.1651278267
Xcode: 13.4.1

提示:


In file included from opt/type-analysis/GlobalTypeAnalysisPass.cpp:8:
In file included from ./opt/type-analysis/GlobalTypeAnalysisPass.h:10:
In file included from ./service/type-analysis/GlobalTypeAnalyzer.h:10:
In file included from ./libredex/CallGraph.h:15:
In file included from ./libredex/Resolver.h:12:
In file included from ./libredex/DexUtil.h:20:
./libredex/DexStore.h:86:19: warning: 'iterator<std::input_iterator_tag, std::vector<DexClass *>>' is deprecated [-Wdeprecated-declarations]
    : public std::iterator<std::input_iterator_tag, DexClasses> {
                  ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/__iterator/iterator.h:27:29: note: 'iterator<std::input_iterator_tag, std::vector<DexClass *>>' has been explicitly marked deprecated here
struct _LIBCPP_TEMPLATE_VIS _LIBCPP_DEPRECATED_IN_CXX17 iterator
                            ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/__config:1066:39: note: expanded from macro '_LIBCPP_DEPRECATED_IN_CXX17'
#  define _LIBCPP_DEPRECATED_IN_CXX17 _LIBCPP_DEPRECATED
                                      ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/__config:1043:48: note: expanded from macro '_LIBCPP_DEPRECATED'
#    define _LIBCPP_DEPRECATED __attribute__ ((deprecated))
                                               ^
thezhangwei commented 2 years ago

Hi, have you maybe tried a different machine? Do you still experience a similar build performance? One suggestion brought by the team is to try Make parallelism if your machine has enough memory. It's mentioned in the doc here.

Novelot commented 2 years ago
mv -f opt/instrument/.deps/redex_all-BlockInstrument.Tpo opt/instrument/.deps/redex_all-BlockInstrument.Po
g++ -DPACKAGE_NAME=\"redex\" -DPACKAGE_TARNAME=\"redex\" -DPACKAGE_VERSION=\"1.0\" -DPACKAGE_STRING=\"redex\ 1.0\" -DPACKAGE_BUGREPORT=\"not-valid-yet@fb.com\" -DPACKAGE_URL=\"\" -DPACKAGE=\"redex\" -DVERSION=\"1.0\" -DHAVE_STDIO_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_STRINGS_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_UNISTD_H=1 -DHAVE_SYS_PARAM_H=1 -DSTDC_HEADERS=1 -DHAVE_DLFCN_H=1 -DLT_OBJDIR=\".libs/\" -DHAVE_PTHREAD_PRIO_INHERIT=1 -DHAVE_PTHREAD=1 -DHAVE_BOOST=/\*\*/ -DHAVE_BOOST_FILESYSTEM=/\*\*/ -DHAVE_BOOST_SYSTEM=/\*\*/ -DHAVE_BOOST_REGEX=/\*\*/ -DHAVE_BOOST_PROGRAM_OPTIONS=/\*\*/ -DHAVE_BOOST_IOSTREAMS=/\*\*/ -DHAVE_BOOST_THREAD=/\*\*/ -DHAVE_LIBZ=1 -DHAVE_LIBJSONCPP=1 -DHAVE_ARPA_INET_H=1 -DHAVE_FCNTL_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_MEMORY_H=1 -DHAVE_NETINET_IN_H=1 -DHAVE_STDDEF_H=1 -DHAVE_STDINT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_SYS_TIME_H=1 -DHAVE_UNISTD_H=1 -DHAVE__BOOL=1 -DHAVE_MALLOC=1 -DHAVE_GETPAGESIZE=1 -DHAVE_MMAP=1 -DHAVE_REALLOC=1 -DHAVE_CLOCK_GETTIME=1 -DHAVE_GETTIMEOFDAY=1 -DHAVE_MEMMOVE=1 -DHAVE_MEMSET=1 -DHAVE_MUNMAP=1 -DHAVE_REGCOMP=1 -DHAVE_STRCHR=1 -DHAVE_STRDUP=1 -DHAVE_STRERROR=1 -DHAVE_STRRCHR=1 -DHAVE_STRSTR=1 -DHAVE_STRTOL=1 -I.  -I./analysis/ip-reflection-analysis -I./analysis/max-depth -I./liblocator -I./libredex -I./libresource -I./libresource/android -I./libresource/androidfw -I./libresource/cutils -I./libresource/system -I./libresource/utils -I./opt -I./opt/access-marking -I./opt/add_redex_txt_to_apk -I./opt/analyze-pure-method -I./opt/app_module_usage -I./opt/annoclasskill -I./opt/annokill -I./opt/basic-block -I./opt/branch-prefix-hoisting -I./opt/bridge -I./opt/builder_pattern -I./opt/check_breadcrumbs -I./opt/class-merging -I./opt/class-splitting -I./opt/constant-propagation -I./opt/copy-propagation -I./opt/cse -I./opt/dedup_blocks -I./opt/dedup-strings -I./opt/delinit -I./opt/delsuper -I./opt/evaluate_type_checks -I./opt/final_inline -I./opt/init-classes -I./opt/instrument -I./opt/interdex -I./opt/layout-reachability -I./opt/local-dce -I./opt/make-public -I./opt/merge_interface -I./opt/methodinline -I./opt/obfuscate -I./opt/object-sensitive-dce -I./opt/optimize_enums -I./opt/original_name -I./opt/outliner -I./opt/partial-application -I./opt/peephole -I./opt/print-members -I./opt/print-kotlin-stats -I./opt/rebindrefs -I./opt/reduce-array-literals -I./opt/reduce-boolean-branches -I./opt/reduce-gotos -I./opt/redundant_move_elimination -I./opt/regalloc -I./opt/remove-apilevel-checks -I./opt/remove-builders -I./opt/remove_empty_classes -I./opt/remove_gotos -I./opt/remove-interfaces -I./opt/remove-nullcheck-string-arg -I./opt/remove-recursive-locks -I./opt/remove_redundant_check_casts -I./opt/remove-uninstantiables -I./opt/remove-unreachable -I./opt/remove-unused-args -I./opt/renameclasses -I./opt/reorder-interfaces -I./opt/resolve-proguard-values -I./opt/resolve-refs -I./opt/result-propagation -I./opt/shrinker -I./opt/shorten-srcstrings -I./opt/singleimpl -I./opt/split_huge_switches -I./opt/staticrelo -I./opt/static-sink -I./opt/stringbuilder-outliner -I./opt/string_concatenator -I./opt/strip-debug-info -I./opt/synth -I./opt/test_cfg -I./opt/throw-propagation -I./opt/track_resources -I./opt/type-analysis -I./opt/unmark_proguard_keep -I./opt/unreferenced_interfaces -I./opt/unterface -I./opt/up-code-motion -I./opt/verifier -I./opt/vertical_merging -I./opt/virtual_merging -I./opt/virtual_scope -I./service/api-levels -I./service/class-init -I./service/class-merging -I./service/constant-propagation -I./service/copy-propagation -I./service/cross-dex-ref-minimizer -I./service/cse -I./service/dataflow -I./service/dedup-blocks -I./service/escape-analysis -I./service/field-ops -I./service/init-classes -I./service/local-dce -I./service/loop-info -I./service/method-dedup -I./service/method-inliner -I./service/method-outliner -I./service/method-merger -I./service/kotlin-instance-rewrite -I./service/reduce-boolean-branches -I./service/reference-update -I./service/regalloc -I./service/regalloc-fast -I./service/shrinker -I./service/switch-dispatch -I./service/switch-partitioning -I./service/type-analysis -I./service/type-string-rewriter -I./shared -I./sparta/include -I./tools/common -I./tools/redexdump -I./util -I/usr/include/jsoncpp  -I/usr/local/opt/node@12/include --std=gnu++17 -O3 -Wall -g -std=gnu++17 -MT opt/remove-builders/redex_all-RemoveBuilders.o -MD -MP -MF opt/remove-builders/.deps/redex_all-RemoveBuilders.Tpo -c -o opt/remove-builders/redex_all-RemoveBuilders.o `test -f 'opt/remove-builders/RemoveBuilders.cpp' || echo './'`opt/remove-builders/RemoveBuilders.cpp
In file included from opt/remove-builders/RemoveBuilders.cpp:8:
In file included from ./opt/remove-builders/RemoveBuilders.h:10:
In file included from ./libredex/Pass.h:16:
./libredex/DexStore.h:86:19: warning: 'iterator<std::input_iterator_tag, std::vector<DexClass *>>' is deprecated [-Wdeprecated-declarations]
    : public std::iterator<std::input_iterator_tag, DexClasses> {
                  ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/__iterator/iterator.h:27:29: note: 'iterator<std::input_iterator_tag, std::vector<DexClass *>>' has been explicitly marked deprecated here
struct _LIBCPP_TEMPLATE_VIS _LIBCPP_DEPRECATED_IN_CXX17 iterator
                            ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/__config:1066:39: note: expanded from macro '_LIBCPP_DEPRECATED_IN_CXX17'
#  define _LIBCPP_DEPRECATED_IN_CXX17 _LIBCPP_DEPRECATED
                                      ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/__config:1043:48: note: expanded from macro '_LIBCPP_DEPRECATED'
#    define _LIBCPP_DEPRECATED __attribute__ ((deprecated))
                                               ^
1 warning generated.
mv -f opt/remove-builders/.deps/redex_all-RemoveBuilders.Tpo opt/remove-builders/.deps/redex_all-RemoveBuilders.Po
g++ -DPACKAGE_NAME=\"redex\" -DPACKAGE_TARNAME=\"redex\" -DPACKAGE_VERSION=\"1.0\" -DPACKAGE_STRING=\"redex\ 1.0\" -DPACKAGE_BUGREPORT=\"not-valid-yet@fb.com\" -DPACKAGE_URL=\"\" -DPACKAGE=\"redex\" -DVERSION=\"1.0\" -DHAVE_STDIO_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_STRINGS_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_UNISTD_H=1 -DHAVE_SYS_PARAM_H=1 -DSTDC_HEADERS=1 -DHAVE_DLFCN_H=1 -DLT_OBJDIR=\".libs/\" -DHAVE_PTHREAD_PRIO_INHERIT=1 -DHAVE_PTHREAD=1 -DHAVE_BOOST=/\*\*/ -DHAVE_BOOST_FILESYSTEM=/\*\*/ -DHAVE_BOOST_SYSTEM=/\*\*/ -DHAVE_BOOST_REGEX=/\*\*/ -DHAVE_BOOST_PROGRAM_OPTIONS=/\*\*/ -DHAVE_BOOST_IOSTREAMS=/\*\*/ -DHAVE_BOOST_THREAD=/\*\*/ -DHAVE_LIBZ=1 -DHAVE_LIBJSONCPP=1 -DHAVE_ARPA_INET_H=1 -DHAVE_FCNTL_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_MEMORY_H=1 -DHAVE_NETINET_IN_H=1 -DHAVE_STDDEF_H=1 -DHAVE_STDINT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_SYS_TIME_H=1 -DHAVE_UNISTD_H=1 -DHAVE__BOOL=1 -DHAVE_MALLOC=1 -DHAVE_GETPAGESIZE=1 -DHAVE_MMAP=1 -DHAVE_REALLOC=1 -DHAVE_CLOCK_GETTIME=1 -DHAVE_GETTIMEOFDAY=1 -DHAVE_MEMMOVE=1 -DHAVE_MEMSET=1 -DHAVE_MUNMAP=1 -DHAVE_REGCOMP=1 -DHAVE_STRCHR=1 -DHAVE_STRDUP=1 -DHAVE_STRERROR=1 -DHAVE_STRRCHR=1 -DHAVE_STRSTR=1 -DHAVE_STRTOL=1 -I.  -I./analysis/ip-reflection-analysis -I./analysis/max-depth -I./liblocator -I./libredex -I./libresource -I./libresource/android -I./libresource/androidfw -I./libresource/cutils -I./libresource/system -I./libresource/utils -I./opt -I./opt/access-marking -I./opt/add_redex_txt_to_apk -I./opt/analyze-pure-method -I./opt/app_module_usage -I./opt/annoclasskill -I./opt/annokill -I./opt/basic-block -I./opt/branch-prefix-hoisting -I./opt/bridge -I./opt/builder_pattern -I./opt/check_breadcrumbs -I./opt/class-merging -I./opt/class-splitting -I./opt/constant-propagation -I./opt/copy-propagation -I./opt/cse -I./opt/dedup_blocks -I./opt/dedup-strings -I./opt/delinit -I./opt/delsuper -I./opt/evaluate_type_checks -I./opt/final_inline -I./opt/init-classes -I./opt/instrument -I./opt/interdex -I./opt/layout-reachability -I./opt/local-dce -I./opt/make-public -I./opt/merge_interface -I./opt/methodinline -I./opt/obfuscate -I./opt/object-sensitive-dce -I./opt/optimize_enums -I./opt/original_name -I./opt/outliner -I./opt/partial-application -I./opt/peephole -I./opt/print-members -I./opt/print-kotlin-stats -I./opt/rebindrefs -I./opt/reduce-array-literals -I./opt/reduce-boolean-branches -I./opt/reduce-gotos -I./opt/redundant_move_elimination -I./opt/regalloc -I./opt/remove-apilevel-checks -I./opt/remove-builders -I./opt/remove_empty_classes -I./opt/remove_gotos -I./opt/remove-interfaces -I./opt/remove-nullcheck-string-arg -I./opt/remove-recursive-locks -I./opt/remove_redundant_check_casts -I./opt/remove-uninstantiables -I./opt/remove-unreachable -I./opt/remove-unused-args -I./opt/renameclasses -I./opt/reorder-interfaces -I./opt/resolve-proguard-values -I./opt/resolve-refs -I./opt/result-propagation -I./opt/shrinker -I./opt/shorten-srcstrings -I./opt/singleimpl -I./opt/split_huge_switches -I./opt/staticrelo -I./opt/static-sink -I./opt/stringbuilder-outliner -I./opt/string_concatenator -I./opt/strip-debug-info -I./opt/synth -I./opt/test_cfg -I./opt/throw-propagation -I./opt/track_resources -I./opt/type-analysis -I./opt/unmark_proguard_keep -I./opt/unreferenced_interfaces -I./opt/unterface -I./opt/up-code-motion -I./opt/verifier -I./opt/vertical_merging -I./opt/virtual_merging -I./opt/virtual_scope -I./service/api-levels -I./service/class-init -I./service/class-merging -I./service/constant-propagation -I./service/copy-propagation -I./service/cross-dex-ref-minimizer -I./service/cse -I./service/dataflow -I./service/dedup-blocks -I./service/escape-analysis -I./service/field-ops -I./service/init-classes -I./service/local-dce -I./service/loop-info -I./service/method-dedup -I./service/method-inliner -I./service/method-outliner -I./service/method-merger -I./service/kotlin-instance-rewrite -I./service/reduce-boolean-branches -I./service/reference-update -I./service/regalloc -I./service/regalloc-fast -I./service/shrinker -I./service/switch-dispatch -I./service/switch-partitioning -I./service/type-analysis -I./service/type-string-rewriter -I./shared -I./sparta/include -I./tools/common -I./tools/redexdump -I./util -I/usr/include/jsoncpp  -I/usr/local/opt/node@12/include --std=gnu++17 -O3 -Wall -g -std=gnu++17 -MT opt/remove-builders/redex_all-RemoveBuildersHelper.o -MD -MP -MF opt/remove-builders/.deps/redex_all-RemoveBuildersHelper.Tpo -c -o opt/remove-builders/redex_all-RemoveBuildersHelper.o `test -f 'opt/remove-builders/RemoveBuildersHelper.cpp' || echo './'`opt/remove-builders/RemoveBuildersHelper.cpp
In file included from opt/remove-builders/RemoveBuildersHelper.cpp:8:
In file included from ./opt/remove-builders/RemoveBuildersHelper.h:15:
In file included from ./service/method-inliner/Inliner.h:14:
In file included from ./service/method-inliner/CallSiteSummaries.h:10:
In file included from ./service/shrinker/Shrinker.h:10:
In file included from ./service/cse/CommonSubexpressionElimination.h:12:
In file included from ./libredex/MethodOverrideGraph.h:12:
./libredex/DexStore.h:86:19: warning: 'iterator<std::input_iterator_tag, std::vector<DexClass *>>' is deprecated [-Wdeprecated-declarations]
    : public std::iterator<std::input_iterator_tag, DexClasses> {
                  ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/__iterator/iterator.h:27:29: note: 'iterator<std::input_iterator_tag, std::vector<DexClass *>>' has been explicitly marked deprecated here
struct _LIBCPP_TEMPLATE_VIS _LIBCPP_DEPRECATED_IN_CXX17 iterator
                            ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/__config:1066:39: note: expanded from macro '_LIBCPP_DEPRECATED_IN_CXX17'
#  define _LIBCPP_DEPRECATED_IN_CXX17 _LIBCPP_DEPRECATED
                                      ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/__config:1043:48: note: expanded from macro '_LIBCPP_DEPRECATED'
#    define _LIBCPP_DEPRECATED __attribute__ ((deprecated))
                                               ^

一直都在循环这个错误

并行也不行,电脑都崩了