| 5 Jan 2024 |
Vladislav Vasilev | shrinking RPATHs of ELF executables and libraries in /nix/store/zzkwzmabvdb6w36ia8acxvzl8aavcnl4-neutrond
shrinking /nix/store/zzkwzmabvdb6w36ia8acxvzl8aavcnl4-neutrond/bin/neutrond
checking for references to /build/ in /nix/store/zzkwzmabvdb6w36ia8acxvzl8aavcnl4-neutrond...
RPATH of binary /nix/store/zzkwzmabvdb6w36ia8acxvzl8aavcnl4-neutrond/bin/neutrond contains a forbidden reference to /build/
/nix/store/d4jf1cbbk494zwgbqz31pxgigpsbh6w2-stdenv-linux/setup: line 74: pop_var_context: head of shell_variables not a function context
/nix/store/d4jf1cbbk494zwgbqz31pxgigpsbh6w2-stdenv-linux/setup: line 1414: pop_var_context: head of shell_variables not a function context
/nix/store/d4jf1cbbk494zwgbqz31pxgigpsbh6w2-stdenv-linux/setup: line 1553: pop_var_context: head of shell_variables not a function context | 15:37:40 |
Vladislav Vasilev | Patchelf: here we go again | 15:37:53 |
Vladislav Vasilev | Someone hardcoded paths as I suppose | 15:38:08 |
@qbit:tapenet.org | so it's building fine | 15:38:24 |
@qbit:tapenet.org | so not a dep issue | 15:38:28 |
@qbit:tapenet.org | remove the nativeBuildInputs | 15:38:39 |
Vladislav Vasilev | There is nothing now | 15:38:50 |
Vladislav Vasilev | I removed it | 15:39:00 |
Vladislav Vasilev | config:
{ fetchFromGitHub
, stdenv
, pkgs
, lib
}: pkgs.buildGoModule rec {
name = "neutrond";
version = "2.0.0";
src = (fetchFromGitHub {
owner = "neutron-org";
repo = "neutron";
rev = "d30ed2fd6dc230a9525c4a73c511428e8086eb32";
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;
};
}
| 15:39:06 |
Vladislav Vasilev | I will replace ${version} later | 15:39:26 |
@qbit:tapenet.org | rev should be `rev = "v${version}" | 15:39:39 |
@qbit:tapenet.org | * rev should be `rev = "v${version}"` | 15:39:42 |
@qbit:tapenet.org | name should be pname | 15:40:03 |
Vladislav Vasilev | Like that ? It's v2 in commits | 15:41:29 |
Vladislav Vasilev |  Download image.png | 15:41:32 |
Vladislav Vasilev | Ah, I got it | 15:44:53 |
Vladislav Vasilev | OKay | 15:44:55 |
Vladislav Vasilev | Now it's this
{ fetchFromGitHub
, stdenv
, pkgs
, lib
}: pkgs.buildGoModule rec {
pname = "neutrond";
version = "2.0.0";
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;
};
}
| 15:45:03 |
Vladislav Vasilev | But error is still the same | 15:45:33 |
Vladislav Vasilev | RPATH of binary /nix/store/v5c6pldfn9wfn4k2q4ap07z8369fzap5-neutrond-2.0.0/bin/neutrond contains a forbidden reference to /build/
I think we should change relative path | 15:47:02 |
@qbit:tapenet.org | what if you add:
ldflags = [ "-w -s" ];
| 16:07:19 |
@qbit:tapenet.org | you will need it for adding some -X flags too | 16:07:30 |
@qbit:tapenet.org | https://github.com/neutron-org/neutron/blob/main/Makefile#L66-L70 | 16:07:37 |
Vladislav Vasilev | Redacted or Malformed Event | 16:15:03 |
Vladislav Vasilev | Redacted or Malformed Event | 16:15:05 |
Vladislav Vasilev | { fetchFromGitHub
, stdenv
, 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=gcc,netgo"
];
}
| 16:15:18 |
Vladislav Vasilev | * Trying this now
{ fetchFromGitHub
, stdenv
, 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=gcc,netgo"
];
}
| 16:15:48 |
@qbit:tapenet.org | if it's using cgo stuff you will need to set proxyVendor = true; | 16:16:14 |
@qbit:tapenet.org | (i don't think it is - bu tthe ref to gcc in the BuildTags made me think of that :P | 16:17:20 |
Vladislav Vasilev | I think it was wrong :DDD | 16:17:50 |