Replies: 1 comment
-
I experienced a very similar error when installing [INFO] Installing environment for https://github.com/gitleaks/gitleaks.
[INFO] Once installed this environment will be reused.
[INFO] This may take a few minutes...
An unexpected error has occurred: CalledProcessError: command: ('/home/user/.cache/pre-commit/repojvt9nwnq/golangenv-default/.go/bin/go', 'install', './...')
return code: 1
stdout: (none)
stderr:
go: downloading github.com/lucasjones/reggen v0.0.0-20200904144131-37ba4fa293bb
go: downloading github.com/gitleaks/go-gitdiff v0.9.1
go: downloading github.com/rs/zerolog v1.33.0
go: downloading github.com/h2non/filetype v1.1.3
go: downloading github.com/spf13/cobra v1.9.1
go: downloading github.com/spf13/viper v1.19.0
go: downloading github.com/mholt/archives v0.1.2
go: downloading github.com/fatih/semgroup v1.2.0
go: downloading github.com/Masterminds/sprig/v3 v3.3.0
go: downloading github.com/BobuSumisu/aho-corasick v1.0.3
go: downloading golang.org/x/exp v0.0.0-20250218142911-aa4b98e5adaa
go: downloading github.com/charmbracelet/lipgloss v0.5.0
go: downloading github.com/lucasb-eyer/go-colorful v1.2.0
go: downloading github.com/muesli/reflow v0.2.1-0.20210115123740-9e1d0d53df68
go: downloading github.com/muesli/termenv v0.15.1
go: downloading github.com/mattn/go-runewidth v0.0.14
go: downloading github.com/huandu/xstrings v1.5.0
go: downloading dario.cat/mergo v1.0.1
go: downloading github.com/Masterminds/goutils v1.1.1
go: downloading github.com/google/uuid v1.6.0
go: downloading github.com/Masterminds/semver/v3 v3.3.0
go: downloading github.com/mitchellh/copystructure v1.2.0
go: downloading github.com/shopspring/decimal v1.4.0
go: downloading github.com/spf13/cast v1.7.1
go: downloading golang.org/x/crypto v0.32.0
go: downloading github.com/fsnotify/fsnotify v1.8.0
go: downloading github.com/mitchellh/mapstructure v1.5.0
go: downloading github.com/sagikazarmark/slog-shim v0.1.0
go: downloading github.com/spf13/afero v1.12.0
go: downloading github.com/spf13/pflag v1.0.6
go: downloading golang.org/x/sync v0.11.0
go: downloading github.com/mattn/go-colorable v0.1.14
go: downloading github.com/rivo/uniseg v0.2.0
go: downloading github.com/andybalholm/brotli v1.1.2-0.20250424173009-453214e765f3
go: downloading github.com/STARRY-S/zip v0.2.1
go: downloading github.com/bodgit/sevenzip v1.6.0
go: downloading github.com/dsnet/compress v0.0.2-0.20230904184137-39efe44ab707
go: downloading github.com/klauspost/compress v1.17.11
go: downloading github.com/klauspost/pgzip v1.2.6
go: downloading github.com/minio/minlz v1.0.0
go: downloading github.com/nwaples/rardecode/v2 v2.1.0
go: downloading github.com/pierrec/lz4/v4 v4.1.21
go: downloading github.com/sorairolake/lzip-go v0.3.5
go: downloading github.com/therootcompany/xz v1.0.1
go: downloading github.com/ulikunitz/xz v0.5.12
go: downloading golang.org/x/text v0.22.0
go: downloading github.com/subosito/gotenv v1.6.0
go: downloading github.com/hashicorp/hcl v1.0.0
go: downloading gopkg.in/ini.v1 v1.67.0
go: downloading github.com/magiconair/properties v1.8.9
go: downloading github.com/pelletier/go-toml/v2 v2.2.3
go: downloading gopkg.in/yaml.v3 v3.0.1
go: downloading github.com/mitchellh/reflectwalk v1.0.2
go: downloading golang.org/x/sys v0.30.0
go: downloading github.com/aymanbagabas/go-osc52/v2 v2.0.1
go: downloading github.com/mattn/go-isatty v0.0.20
go: downloading github.com/bodgit/plumbing v1.3.0
go: downloading github.com/bodgit/windows v1.0.1
go: downloading go4.org v0.0.0-20230225012048-214862532bf5
go: downloading github.com/hashicorp/go-multierror v1.1.1
go: downloading github.com/hashicorp/golang-lru/v2 v2.0.7
go: downloading github.com/hashicorp/errwrap v1.1.0
# runtime/cgo
cc1: error: command-line option ‘-fno-caret-diagnostics’ is valid for vhdl but not for C [-Werror]
_cgo_export.c:3:10: fatal error: stdlib.h: No such file or directory
3 | #include <stdlib.h>
| ^~~~~~~~~~
cc1: all warnings being treated as errors
compilation terminated.
Check the log at /home/user/.cache/pre-commit/pre-commit.log I also had GHDL 4.1.0 (tarball) [Dunoon edition]
Compiled with GNAT Version: 13.3.0
GCC 13.3.0 code generator
Written by Tristan Gingold.
Copyright (C) 2003 - 2024 Tristan Gingold.
GHDL is free software, covered by the GNU General Public License. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. I was on nixos, and was using a FHS environment to setup dependencies locally for a python project. I avoided the issue by explicitly adding { pkgs ? import <nixpkgs> {} }:
(pkgs.buildFHSEnv {
name = "project-env";
targetPkgs = pkgs: (with pkgs; [
gcc
...
]);
multiPkgs = pkgs: (with pkgs; [
gcc
...
]);
runScript = "bash --init-file <(cat $HOME/.bashrc; cat .venv/bin/activate) -i";
}).env I don't know if this would be similar for OP, but I'd suggest that the issue is that the |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I have attempted to build gogs from source as outlined here. However, I run into an issue when I attempt to build via the command
go build -o gogs
which gives me the following output:For some context, I have GHDL (an open source simulator for the hardware description language VHDL) built using a GCC backend but that is the only thing that makes any sense as to why this error might occur at all when building any other projects. I don't know if this is a more generic GCC configuration problem that I've caused myself from the original GHDL build process, or something else entirely. Pointers to fix the issue would be much appreciated here.
gcc -v
gives:Beta Was this translation helpful? Give feedback.
All reactions