https://gcc.gnu.org/bugzilla/show_bug.cgi?id=119691
Bug ID: 119691
Summary: gcc does not build for powerpc64-apple-darwin9: ld: bl
out of range (-16845644 max is +/-16M) from
__ZN10hash_tableI19default_hash_traitsIP11cgraph_edgeE
Lb0E11xcallocatorED1Ev at 0x101015870 in __text of
libbackend.a
Product: gcc
Version: 14.2.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: target
Assignee: unassigned at gcc dot gnu.org
Reporter: vital.had at gmail dot com
CC: egallager at gcc dot gnu.org, iains at gcc dot gnu.org,
pinskia at gcc dot gnu.org
Target Milestone: ---
Target: powerpc64-apple-darwin9
Created attachment 61050
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=61050&action=edit
Config of the build
For quite some time I am unable to build gcc for ppc64 on 10.5.8. It keeps
failing here:
```
:info:build : > tmp-libgcc.mvars
:info:build if
/opt/local/var/macports/build/_opt_PPCLeopardPorts_lang_gcc14/libgcc14/work/build/./gcc/xgcc
-B/opt/local/var/macports/build/_opt_PPCLeopardPorts_lang_gcc14/libgcc14/work/build/./gcc/
-fno-checking -print-sysroot-headers-suffix > /dev/null 2>&1; then \
:info:build set -e; for ml in
`/opt/local/var/macports/build/_opt_PPCLeopardPorts_lang_gcc14/libgcc14/work/build/./gcc/xgcc
-B/opt/local/var/macports/build/_opt_PPCLeopardPorts_lang_gcc14/libgcc14/work/build/./gcc/
-fno-checking -print-multi-lib`; do \
:info:build multi_dir=`echo ${ml} | sed -e 's/;.*$//'`; \
:info:build flags=`echo ${ml} | sed -e 's/^[^;]*;//' -e 's/@/ -/g'`; \
:info:build
sfx=`/opt/local/var/macports/build/_opt_PPCLeopardPorts_lang_gcc14/libgcc14/work/build/./gcc/xgcc
-B/opt/local/var/macports/build/_opt_PPCLeopardPorts_lang_gcc14/libgcc14/work/build/./gcc/
-fno-checking ${flags} -print-sysroot-headers-suffix`; \
:info:build if [ "${multi_dir}" = "." ]; \
:info:build then multi_dir=""; \
:info:build else \
:info:build multi_dir=/${multi_dir}; \
:info:build fi; \
:info:build echo "${sfx};${multi_dir}"; \
:info:build done; \
:info:build else \
:info:build echo ";"; \
:info:build fi > tmp-fixinc_list
:info:build echo GCC_CFLAGS = '-g -O2 -pipe -Os -DIN_GCC -W -Wall
-Wno-narrowing -Wwrite-strings -Wcast-qual -Wno-format -Wstrict-prototypes
-Wmissing-prototypes -Wold-style-definition -isystem ./include ' >>
tmp-libgcc.mvars
:info:build echo INHIBIT_LIBC_CFLAGS = '' >> tmp-libgcc.mvars
:info:build /bin/sh
/opt/local/var/macports/build/_opt_PPCLeopardPorts_lang_gcc14/libgcc14/work/gcc-14.2.0/gcc/../move-if-change
tmp-fixinc_list fixinc_list
:info:build echo TARGET_SYSTEM_ROOT = '' >> tmp-libgcc.mvars
:info:build if test no = yes; then \
:info:build NO_PIE_CFLAGS="-fno-PIE"; \
:info:build else \
:info:build NO_PIE_CFLAGS=; \
:info:build fi; \
:info:build echo NO_PIE_CFLAGS = "$NO_PIE_CFLAGS" >> tmp-libgcc.mvars
:info:build mv tmp-libgcc.mvars libgcc.mvars
:info:build echo timestamp > s-fixinc_list
:info:build rm -rf libbackend.a
:info:build ar rc libbackend.a gimple-match-1.o gimple-match-2.o
gimple-match-3.o gimple-match-4.o gimple-match-5.o gimple-match-6.o
gimple-match-7.o gimple-match-8.o gimple-match-9.o gimple-match-10.o
gimple-match-exports.o generic-match-1.o generic-match-2.o generic-match-3.o
generic-match-4.o generic-match-5.o generic-match-6.o generic-match-7.o
generic-match-8.o generic-match-9.o generic-match-10.o insn-attrtab.o
insn-automata.o insn-dfatab.o insn-emit-1.o insn-emit-2.o insn-emit-3.o
insn-emit-4.o insn-emit-5.o insn-emit-6.o insn-emit-7.o insn-emit-8.o
insn-emit-9.o insn-emit-10.o insn-extract.o insn-latencytab.o insn-modes.o
insn-opinit.o insn-output.o insn-peep.o insn-preds.o insn-recog.o insn-enums.o
ggc-page.o adjust-alignment.o alias.o alloc-pool.o auto-inc-dec.o
auto-profile.o bb-reorder.o bitmap.o builtins.o caller-save.o calls.o ccmp.o
cfg.o cfganal.o cfgbuild.o cfgcleanup.o cfgexpand.o cfghooks.o cfgloop.o
cfgloopanal.o cfgloopmanip.o cfgrtl.o ctfc.o ctfout.o btfout.o symtab.o
symtab-thunks.o symtab-clones.o cgraph.o cgraphbuild.o cgraphunit.o
cgraphclones.o combine.o combine-stack-adj.o compare-elim.o context.o convert.o
coroutine-passes.o coverage.o cppbuiltin.o cppdefault.o cprop.o cse.o cselib.o
data-streamer.o data-streamer-in.o data-streamer-out.o dbgcnt.o dce.o ddg.o
debug.o df-core.o df-problems.o df-scan.o dfp.o digraph.o dojump.o dominance.o
domwalk.o double-int.o dse.o dumpfile.o dwarf2asm.o dwarf2cfi.o dwarf2ctf.o
dwarf2out.o early-remat.o emit-rtl.o et-forest.o except.o explow.o expmed.o
expr.o fibonacci_heap.o file-prefix-map.o final.o fixed-value.o fold-const.o
fold-const-call.o fold-mem-offsets.o function.o function-abi.o function-tests.o
fwprop.o gcc-rich-location.o gcc-urlifier.o gcse.o gcse-common.o ggc-common.o
ggc-tests.o gimple.o gimple-array-bounds.o gimple-builder.o gimple-expr.o
gimple-if-to-switch.o gimple-iterator.o gimple-fold.o
gimple-harden-conditionals.o gimple-harden-control-flow.o gimple-laddress.o
gimple-loop-interchange.o gimple-loop-jam.o gimple-loop-versioning.o
gimple-low.o gimple-lower-bitint.o gimple-predicate-analysis.o
gimple-pretty-print.o gimple-range.o gimple-range-cache.o gimple-range-edge.o
gimple-range-fold.o gimple-range-gori.o gimple-range-infer.o gimple-range-op.o
gimple-range-phi.o gimple-range-trace.o gimple-ssa-backprop.o
gimple-ssa-isolate-paths.o gimple-ssa-nonnull-compare.o gimple-ssa-sccopy.o
gimple-ssa-split-paths.o gimple-ssa-store-merging.o
gimple-ssa-strength-reduction.o gimple-ssa-sprintf.o gimple-ssa-warn-access.o
gimple-ssa-warn-alloca.o gimple-ssa-warn-restrict.o gimple-streamer-in.o
gimple-streamer-out.o gimple-walk.o gimple-warn-recursion.o gimplify.o
gimplify-me.o godump.o graph.o graphds.o graphviz.o graphite.o
graphite-isl-ast-to-gimple.o graphite-dependences.o graphite-optimize-isl.o
graphite-poly.o graphite-scop-detection.o graphite-sese-to-poly.o gtype-desc.o
haifa-sched.o hash-map-tests.o hash-set-tests.o hw-doloop.o hwint.o ifcvt.o
ree.o inchash.o incpath.o init-regs.o internal-fn.o ipa-cp.o ipa-sra.o
ipa-devirt.o ipa-fnsummary.o ipa-polymorphic-call.o ipa-split.o ipa-inline.o
ipa-comdats.o ipa-free-lang-data.o ipa-visibility.o ipa-inline-analysis.o
ipa-inline-transform.o ipa-modref.o ipa-modref-tree.o ipa-predicate.o
ipa-profile.o ipa-prop.o ipa-param-manipulation.o ipa-pure-const.o ipa-icf.o
ipa-icf-gimple.o ipa-reference.o ipa-ref.o ipa-utils.o ipa-strub.o ipa.o ira.o
ira-build.o ira-costs.o ira-conflicts.o ira-color.o ira-emit.o ira-lives.o
jump.o langhooks.o lcm.o lists.o loop-doloop.o loop-init.o loop-invariant.o
loop-iv.o loop-unroll.o lower-subreg.o lra.o lra-assigns.o lra-coalesce.o
lra-constraints.o lra-eliminations.o lra-lives.o lra-remat.o lra-spills.o
lto-cgraph.o lto-streamer.o lto-streamer-in.o lto-streamer-out.o
lto-section-in.o lto-section-out.o lto-opts.o lto-compress.o mcf.o
mode-switching.o modulo-sched.o multiple_target.o omp-offload.o omp-expand.o
omp-general.o omp-low.o omp-oacc-kernels-decompose.o
omp-oacc-neuter-broadcast.o omp-simd-clone.o opt-problem.o optabs.o
optabs-libfuncs.o optabs-query.o optabs-tree.o optinfo.o optinfo-emit-json.o
options-save.o options-urls.o opts-global.o ordered-hash-map-tests.o passes.o
plugin.o pointer-query.o postreload-gcse.o postreload.o predict.o print-rtl.o
print-rtl-function.o print-tree.o profile.o profile-count.o range.o range-op.o
range-op-float.o range-op-ptr.o read-md.o read-rtl.o read-rtl-function.o real.o
realmpfr.o recog.o reg-stack.o regcprop.o reginfo.o regrename.o regstat.o
reload.o reload1.o reorg.o resource.o rtl-error.o rtl-ssa/accesses.o
rtl-ssa/blocks.o rtl-ssa/changes.o rtl-ssa/functions.o rtl-ssa/insns.o
rtl-ssa/movement.o rtl-tests.o rtl.o rtlhash.o rtlanal.o rtlhooks.o
rtx-vector-builder.o run-rtl-passes.o sched-deps.o sched-ebb.o sched-rgn.o
sel-sched-ir.o sel-sched-dump.o sel-sched.o selftest-rtl.o selftest-run-tests.o
sese.o shrink-wrap.o simplify-rtx.o sparseset.o spellcheck.o spellcheck-tree.o
splay-tree-utils.o sreal.o stack-ptr-mod.o statistics.o stmt.o stor-layout.o
store-motion.o streamer-hooks.o stringpool.o substring-locations.o
target-globals.o targhooks.o timevar.o toplev.o tracer.o trans-mem.o
tree-affine.o asan.o tsan.o ubsan.o sanopt.o sancov.o tree-call-cdce.o
tree-cfg.o tree-cfgcleanup.o tree-chrec.o tree-complex.o tree-data-ref.o
tree-dfa.o tree-diagnostic.o tree-diagnostic-client-data-hooks.o
tree-diagnostic-path.o tree-dump.o tree-eh.o tree-emutls.o tree-if-conv.o
tree-inline.o tree-into-ssa.o tree-iterator.o tree-logical-location.o
tree-loop-distribution.o tree-nested.o tree-nrv.o tree-object-size.o
tree-outof-ssa.o tree-parloops.o tree-phinodes.o tree-predcom.o
tree-pretty-print.o tree-profile.o tree-scalar-evolution.o tree-sra.o
tree-switch-conversion.o tree-ssa-address.o tree-ssa-alias.o tree-ssa-ccp.o
tree-ssa-coalesce.o tree-ssa-copy.o tree-ssa-dce.o tree-ssa-dom.o
tree-ssa-dse.o tree-ssa-forwprop.o tree-ssa-ifcombine.o tree-ssa-live.o
tree-ssa-loop-ch.o tree-ssa-loop-im.o tree-ssa-loop-ivcanon.o
tree-ssa-loop-ivopts.o tree-ssa-loop-manip.o tree-ssa-loop-niter.o
tree-ssa-loop-prefetch.o tree-ssa-loop-split.o tree-ssa-loop-unswitch.o
tree-ssa-loop.o tree-ssa-math-opts.o tree-ssa-operands.o gimple-range-path.o
tree-ssa-phiopt.o tree-ssa-phiprop.o tree-ssa-pre.o tree-ssa-propagate.o
tree-ssa-reassoc.o tree-ssa-sccvn.o tree-ssa-scopedtables.o tree-ssa-sink.o
tree-ssa-strlen.o tree-ssa-structalias.o tree-ssa-tail-merge.o tree-ssa-ter.o
tree-ssa-threadbackward.o tree-ssa-threadedge.o tree-ssa-threadupdate.o
tree-ssa-uncprop.o tree-ssa-uninit.o tree-ssa.o tree-ssanames.o tree-stdarg.o
tree-streamer.o tree-streamer-in.o tree-streamer-out.o tree-tailcall.o
tree-vect-generic.o gimple-isel.o tree-vect-patterns.o tree-vect-data-refs.o
tree-vect-stmts.o tree-vect-loop.o tree-vect-loop-manip.o tree-vect-slp.o
tree-vect-slp-patterns.o tree-vectorizer.o tree-vector-builder.o tree-vrp.o
tree.o tristate.o typed-splay-tree.o valtrack.o value-pointer-equiv.o
value-query.o value-range.o value-range-pretty-print.o value-range-storage.o
value-relation.o value-prof.o var-tracking.o varasm.o varpool.o
vec-perm-indices.o vmsdbgout.o vr-values.o vtable-verify.o warning-control.o
web.o wide-int.o wide-int-print.o rs6000.o analyzer/access-diagram.o
analyzer/analysis-plan.o analyzer/analyzer.o analyzer/analyzer-language.o
analyzer/analyzer-logging.o analyzer/analyzer-pass.o
analyzer/analyzer-selftests.o analyzer/bar-chart.o analyzer/bounds-checking.o
analyzer/call-details.o analyzer/call-info.o analyzer/call-string.o
analyzer/call-summary.o analyzer/checker-event.o analyzer/checker-path.o
analyzer/complexity.o analyzer/constraint-manager.o
analyzer/diagnostic-manager.o analyzer/engine.o analyzer/feasible-graph.o
analyzer/function-set.o analyzer/infinite-loop.o analyzer/infinite-recursion.o
analyzer/kf.o analyzer/kf-analyzer.o analyzer/kf-lang-cp.o
analyzer/known-function-manager.o analyzer/pending-diagnostic.o
analyzer/program-point.o analyzer/program-state.o analyzer/ranges.o
analyzer/record-layout.o analyzer/region.o analyzer/region-model.o
analyzer/region-model-asm.o analyzer/region-model-manager.o
analyzer/region-model-reachability.o analyzer/sm.o analyzer/sm-file.o
analyzer/sm-fd.o analyzer/sm-malloc.o analyzer/sm-pattern-test.o
analyzer/sm-sensitive.o analyzer/sm-signal.o analyzer/sm-taint.o
analyzer/state-purge.o analyzer/store.o analyzer/supergraph.o analyzer/svalue.o
analyzer/symbol.o analyzer/trimmed-graph.o analyzer/varargs.o rs6000-string.o
rs6000-p8swap.o rs6000-logue.o rs6000-call.o rs6000-pcrel-opt.o
rs6000-builtins.o rs6000-builtin.o darwin.o host-darwin.o host-ppc64-darwin.o
:info:build ranlib libbackend.a
:info:build if [ -f ../stage_final ] \
:info:build && cmp -s ../stage_current ../stage_final; then \
:info:build cp ../prev-gcc/cc1-checksum.cc cc1-checksum.cc; \
:info:build else \
:info:build build/genchecksum c/c-lang.o c-family/stub-objc.o attribs.o
c/c-errors.o c/c-decl.o c/c-typeck.o c/c-convert.o c/c-aux-info.o
c/c-objc-common.o c/c-parser.o c/c-fold.o c/gimple-parser.o c-family/c-common.o
c-family/c-cppbuiltin.o c-family/c-dump.o c-family/c-format.o
c-family/c-gimplify.o c-family/c-indentation.o c-family/c-lex.o
c-family/c-omp.o c-family/c-opts.o c-family/c-pch.o c-family/c-ppoutput.o
c-family/c-pragma.o c-family/c-pretty-print.o c-family/c-semantics.o
c-family/c-ada-spec.o c-family/c-ubsan.o c-family/known-headers.o
c-family/c-attribs.o c-family/c-warn.o c-family/c-spellcheck.o darwin-c.o
rs6000-c.o libbackend.a main.o libcommon-target.a libcommon.a
../libcpp/libcpp.a ../libdecnumber/libdecnumber.a libcommon.a
../libcpp/libcpp.a ../libiberty/pic/libiberty.a ../libdecnumber/libdecnumber.a
../libbacktrace/.libs/libbacktrace.a \
:info:build checksum-options > cc1-checksum.cc.tmp &&
\
:info:build
/opt/local/var/macports/build/_opt_PPCLeopardPorts_lang_gcc14/libgcc14/work/gcc-14.2.0/gcc/../move-if-change
cc1-checksum.cc.tmp cc1-checksum.cc; \
:info:build fi
:info:build if [ -f ../stage_final ] \
:info:build && cmp -s ../stage_current ../stage_final; then \
:info:build cp ../prev-gcc/cc1plus-checksum.cc cc1plus-checksum.cc; \
:info:build else \
:info:build build/genchecksum cp/cp-lang.o c-family/stub-objc.o cp/call.o
cp/class.o cp/constexpr.o cp/constraint.o cp/coroutines.o cp/cp-gimplify.o
cp/cp-objcp-common.o cp/cp-ubsan.o cp/cvt.o cp/contracts.o
cp/cxx-pretty-print.o cp/decl.o cp/decl2.o cp/dump.o cp/error.o cp/except.o
cp/expr.o cp/friend.o cp/init.o cp/lambda.o cp/lex.o cp/logic.o cp/mangle.o
cp/mapper-client.o cp/mapper-resolver.o cp/method.o cp/module.o
cp/name-lookup.o cp/optimize.o cp/parser.o cp/pt.o cp/ptree.o cp/rtti.o
cp/search.o cp/semantics.o cp/tree.o cp/typeck.o cp/typeck2.o
cp/vtable-class-hierarchy.o attribs.o c-family/c-common.o
c-family/c-cppbuiltin.o c-family/c-dump.o c-family/c-format.o
c-family/c-gimplify.o c-family/c-indentation.o c-family/c-lex.o
c-family/c-omp.o c-family/c-opts.o c-family/c-pch.o c-family/c-ppoutput.o
c-family/c-pragma.o c-family/c-pretty-print.o c-family/c-semantics.o
c-family/c-ada-spec.o c-family/c-ubsan.o c-family/known-headers.o
c-family/c-attribs.o c-family/c-warn.o c-family/c-spellcheck.o darwin-c.o
rs6000-c.o libbackend.a main.o libcommon-target.a libcommon.a
../libcpp/libcpp.a ../libdecnumber/libdecnumber.a ../libcody/libcody.a
libcommon.a ../libcpp/libcpp.a ../libiberty/pic/libiberty.a
../libdecnumber/libdecnumber.a ../libbacktrace/.libs/libbacktrace.a \
:info:build checksum-options > cc1plus-checksum.cc.tmp &&
\
:info:build
/opt/local/var/macports/build/_opt_PPCLeopardPorts_lang_gcc14/libgcc14/work/gcc-14.2.0/gcc/../move-if-change
cc1plus-checksum.cc.tmp cc1plus-checksum.cc; \
:info:build fi
:info:build /opt/local/libexec/gcc10-bootstrap/bin/g++ -arch ppc64 -std=c++11
-no-pie -g -fPIC -DIN_GCC -fno-exceptions -fno-rtti
-fasynchronous-unwind-tables -W -Wall -Wno-narrowing -Wwrite-strings
-Wcast-qual -Wno-format -Wmissing-format-attribute -Wconditionally-supported
-Woverloaded-virtual -pedantic -Wno-long-long -Wno-variadic-macros
-Wno-overlength-strings -DHAVE_CONFIG_H -no-pie -static-libstdc++
-static-libgcc -L/opt/local/lib -Wl,-headerpad_max_install_names -o lto1 \
:info:build lto/lto-lang.o lto/lto.o lto/lto-object.o attribs.o
lto/lto-partition.o lto/lto-symtab.o lto/lto-common.o libbackend.a main.o
libcommon-target.a libcommon.a ../libcpp/libcpp.a
../libdecnumber/libdecnumber.a -L/opt/local/lib -lisl -L/opt/local/lib
-L/opt/local/lib -L/opt/local/lib -lmpc -lmpfr -lgmp -lz -L/opt/local/lib
-lzstd libcommon.a ../libcpp/libcpp.a -liconv
../libbacktrace/.libs/libbacktrace.a ../libiberty/pic/libiberty.a
../libdecnumber/libdecnumber.a
:info:build /opt/local/libexec/gcc10-bootstrap/bin/g++ -arch ppc64 -std=c++11
-no-pie -g -fPIC -DIN_GCC -fno-exceptions -fno-rtti
-fasynchronous-unwind-tables -W -Wall -Wno-narrowing -Wwrite-strings
-Wcast-qual -Wno-format -Wmissing-format-attribute -Wconditionally-supported
-Woverloaded-virtual -pedantic -Wno-long-long -Wno-variadic-macros
-Wno-overlength-strings -DHAVE_CONFIG_H -no-pie -static-libstdc++
-static-libgcc -L/opt/local/lib -Wl,-headerpad_max_install_names -o lto-dump \
:info:build lto/lto-lang.o lto/lto-object.o attribs.o
lto/lto-partition.o lto/lto-symtab.o lto/lto-dump.o lto/lto-common.o
libbackend.a main.o libcommon-target.a libcommon.a ../libcpp/libcpp.a
../libdecnumber/libdecnumber.a -L/opt/local/lib -lisl -L/opt/local/lib
-L/opt/local/lib -L/opt/local/lib -lmpc -lmpfr -lgmp -lz -L/opt/local/lib
-lzstd libcommon.a ../libcpp/libcpp.a -liconv
../libbacktrace/.libs/libbacktrace.a ../libiberty/pic/libiberty.a
../libdecnumber/libdecnumber.a
:info:build ld: bl out of range (-16845644 max is +/-16M) from
__ZN10hash_tableI19default_hash_traitsIP11cgraph_edgeELb0E11xcallocatorED1Ev at
0x101015870 in __text of libbackend.a(ipa-cp.o) to __Z8ggc_freePv at
0x100004E40 in __text of libbackend.a(ggc-page.o) in
__ZN10hash_tableI19default_hash_traitsIP11cgraph_edgeELb0E11xcallocatorED1Ev
from libbackend.a(ipa-cp.o)
:info:build ld: bl out of range (-16839456 max is +/-16M) from
__ZN10hash_tableI19default_hash_traitsIP11cgraph_edgeELb0E11xcallocatorED1Ev at
0x1010140A4 in __text of libbackend.a(ipa-cp.o) to __Z8ggc_freePv at
0x100004EA0 in __text of libbackend.a(ggc-page.o) in
__ZN10hash_tableI19default_hash_traitsIP11cgraph_edgeELb0E11xcallocatorED1Ev
from libbackend.a(ipa-cp.o)
:info:build collect2: error: ld returned 1 exit status
:info:build make[3]: *** [lto1] Error 1
:info:build make[3]: *** Waiting for unfinished jobs....
:info:build collect2: error: ld returned 1 exit status
:info:build make[3]: *** [lto-dump] Error 1
:info:build rm gcc.pod
:info:build make[3]: Leaving directory
`/opt/local/var/macports/build/_opt_PPCLeopardPorts_lang_gcc14/libgcc14/work/build/gcc'
:info:build make[2]: *** [all-stage1-gcc] Error 2
:info:build make[2]: Leaving directory
`/opt/local/var/macports/build/_opt_PPCLeopardPorts_lang_gcc14/libgcc14/work/build'
:info:build make[1]: *** [stage1-bubble] Error 2
:info:build make[1]: Leaving directory
`/opt/local/var/macports/build/_opt_PPCLeopardPorts_lang_gcc14/libgcc14/work/build'
:info:build make: *** [bootstrap-lean] Error 2
```
Initially I thought something is wrong with the linker or cctools, so I tried a
lot of variants, but nothing makes any difference. Whether cctools and linker
are built as ppc, ppc64 or universal binaries, whether LLVM LTO is enabled or
not, it still fails.
It seems that nothing is wrong with my tools (after all, they work robustly on
32-bit ppc), and the bug is in gcc itself. Unless I miss something.
Any idea what may go wrong and how to fix this?