| 5 Jan 2024 |
@qbit:tapenet.org | sec.. | 16:28:50 |
Vladislav Vasilev | Is it working on your station ? | 16:28:58 |
Vladislav Vasilev | { fetchFromGitHub
, pkgs
, lib
}: pkgs.buildGoModule rec {
pname = "neutrond";
version = "2.0.0";
commit = "e605ed3db4381994ee8185ba4a0ff0877d34e67f";
src = (fetchFromGitHub {
owner = "neutron-org";
repo = "neutron";
rev = "v${version}";
sha256 = "sha256-NuoOlrciBeL2f/A7wlQBqYlYJhSYucXRhLgxdasfyhI=";
});
vendorHash = "sha256-uLInKbuL886cfXCyQvIDZJHUC8AK9fR39yNBHDO+Qzc=";
# vendorSha256 = lib.fakeSha256;
doCheck = false;
meta = with lib; {
description = "Neutron node";
longDescription = ''
Neutron node to interact with neutron blockchain
'';
homepage = "https://github.com/neutron-org/neutron";
license = licenses.asl20; # Apache license
maintainers = with maintainers; [
pr0n00gler
foxpy
];
platforms = platforms.all;
};
nativeBuildInputs = with pkgs; [
patchelf
];
ldflags = [
"-w -s"
"-X github.com/cosmos/cosmos-sdk/version.Name=neutron"
"-X github.com/cosmos/cosmos-sdk/version.AppName=neutrond"
"-X github.com/cosmos/cosmos-sdk/version.Version=${version}"
"-X github.com/cosmos/cosmos-sdk/version.Commit=${commit}"
"-X github.com/cosmos/cosmos-sdk/version.BuildTags=netgo,ledger"
];
}
| 16:29:01 |
@qbit:tapenet.org | it seems to be some wasm thing | 16:39:04 |
@qbit:tapenet.org | \o/ : /nix/store/ww1inj006h7q79li8wd0mlnz93zj60dv-neutrond-2.0.0 | 16:53:37 |
@qbit:tapenet.org | had to disable cgo and use -trimpath | 16:53:48 |
@qbit:tapenet.org | Vladislav Vasilev: http://sprunge.us/Pt0OZc | 16:54:09 |
Vladislav Vasilev | One moment | 17:04:09 |
Vladislav Vasilev | And previously you got same error ? | 17:04:26 |
Vladislav Vasilev | With my default.ni | 17:04:32 |
Vladislav Vasilev | * With my default.nix | 17:04:38 |
@qbit:tapenet.org | if you remove the cgo and trimpath stuff it will hit the issue with the embedded /build | 17:04:54 |
Vladislav Vasilev | Oh, thank you | 17:05:50 |
Vladislav Vasilev | It works | 17:05:51 |
Vladislav Vasilev | But why? I removed gcc | 17:06:01 |
@qbit:tapenet.org | that -X line is just setting a variable - it isn't actually changing any build stuff | 17:06:43 |
@qbit:tapenet.org | CGO and trimpath make it work by telling go that the build needs to be reproducible | 17:07:09 |
@qbit:tapenet.org | so go will remove references to full paths like th wasm thing | 17:07:23 |
Vladislav Vasilev | And by default cgo is enabled ? | 17:08:26 |
@qbit:tapenet.org | =0 tells go to make a static binary | 17:10:25 |
Vladislav Vasilev | Ah | 17:10:39 |
Vladislav Vasilev | Nice, i got it | 17:10:47 |
Vladislav Vasilev | You are magician, thank you very much | 17:11:06 |
Vladislav Vasilev | By default I should enable this thing in future everywhere | 17:11:29 |
@qbit:tapenet.org | no, you usually don't have to | 17:12:02 |
Vladislav Vasilev | As I understood, the problem was triggered because of shared linking with dangling paths | 17:13:07 |
Vladislav Vasilev | So, static building fix it | 17:13:25 |
@qbit:tapenet.org | static build was part of the fix - trimpath was the other | 17:13:36 |
Vladislav Vasilev | trimpath removing some dirs from path ? | 17:14:57 |
@qbit:tapenet.org | ya, if you look at the binary from the failing build it has the explicit path to the vendor derectory for CosmWasm/wasmvm | 17:25:11 |