{"record":{"id":"a5d540e9df2cad53","repo":"junegunn/fzf","slug":"error-profiling-not-supported-fzf-must-be-built","errorCode":null,"errorMessage":"error: profiling not supported: FZF must be built with '-tags=pprof' to enable profiling","messagePattern":"error: profiling not supported: FZF must be built with '-tags=pprof' to enable profiling","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/options_no_pprof.go","lineNumber":10,"sourceCode":"//go:build !pprof\n// +build !pprof\n\npackage fzf\n\nimport \"errors\"\n\nfunc (o *Options) initProfiling() error {\n\tif o.CPUProfile != \"\" || o.MEMProfile != \"\" || o.BlockProfile != \"\" || o.MutexProfile != \"\" {\n\t\treturn errors.New(\"error: profiling not supported: FZF must be built with '-tags=pprof' to enable profiling\")\n\t}\n\treturn nil\n}\n","sourceCodeStart":1,"sourceCodeEnd":14,"githubUrl":"https://github.com/junegunn/fzf/blob/bd4efa277b49ef34ca4025bff9b1a288e1980eff/src/options_no_pprof.go#L1-L14","documentation":"One of the profiling flags (--profile-cpu, --profile-mem, --profile-block, --profile-mutex) was used, but the running fzf binary was built without the 'pprof' build tag, so options_no_pprof.go's stub initProfiling rejects it. Profiling support is compile-time only; there is no runtime switch.","triggerScenarios":"Passing any profiling option to a stock fzf build (installed via brew, apt, or the official release tarballs, which are all built without -tags=pprof).","commonSituations":"Users copying profiling instructions from the fzf README or a developer blog onto a distribution binary; CI scripts that add profiling flags unconditionally.","solutions":["Remove the --profile-* flags for normal usage; they are only for fzf development","If you really need profiles, build from source with the tag: go build -tags=pprof (see BUILD.md in the repo)","Confirm which build you have: a tagged build accepts the flags without this error"],"exampleFix":"# before\nfzf --profile-cpu cpu.prof\n# after (stock binary)\nfzf\n# after (development build)\ngo build -tags=pprof && ./fzf --profile-cpu cpu.prof","handlingStrategy":"validation","validationCode":"# only pass profiling flags to a pprof-tagged build\nFZF_BIN=fzf\n# heuristic: dev builds usually live outside package managers\nif [ \"${FZF_PPROF:-0}\" = 1 ]; then FZF_BIN=./fzf; fi   # built with -tags=pprof\n$FZF_BIN --profile-cpu /tmp/cpu.prof   # omit flags for stock fzf","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Gate profiling flags behind a build-identity check in your scripts","Treat --profile-* as developer-only options; never bake them into shared aliases"],"tags":["fzf","build-tags","pprof","profiling"],"backgroundTag":null,"analyzedSha":"bd4efa277b49ef34ca4025bff9b1a288e1980eff","analyzedAt":"2026-08-15T06:11:46.983Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}