Commit Graph

206 Commits

Author SHA1 Message Date
Etan Kissling a15dc546a0
switch to Nim `v1.6.20` (#82)
- https://github.com/nim-lang/Nim/compare/v1.6.18..v1.6.20
2024-04-26 00:14:23 +00:00
Jacek Sieka d7e7f1044d
Use -fPIC when building nat traversal (#77)
Co-authored-by: Richard Ramos <info@richardramos.me>
2024-03-27 14:59:44 -04:00
richΛrd 40f8a2652b
allow overriding CC for libimiupnpc.a and libnatpmp.a targets (#81) 2024-03-27 10:37:58 -04:00
Jakub Sokołowski d050836d64
fix miniupnpc build on Windows by not escaping PATH (#80)
Also use correct `;` divider. Otherwise the build fails with:
```
nimbus@windows-01 MINGW64 /d/beacon-node-holesky-libp2p/repo (nim-libp2p-auto-bump-unstable)
$ make libminiupnpc.a --debug
Reading makefiles...
Updating makefiles....
Updating goal targets....
 File 'libminiupnpc.a' does not exist.
   File 'sanity-checks' does not exist.
  Must remake target 'sanity-checks'.
  Successfully remade target file 'sanity-checks'.
Must remake target 'libminiupnpc.a'.
process_begin: CreateProcess(NULL, git rev-parse --short HEAD, ...) failed.
Makefile.mingw:56: pipe: No error
gcc: fatal error: cannot execute 'cc1': CreateProcess: No such file or directory
compilation terminated.
make[1]: *** [Makefile.mingw:121: wingenminiupnpcstrings.exe] Error 1
make: *** [vendor/nimbus-build-system/makefiles/targets.mk:134: libminiupnpc.a] Error 2
```
Resolves:
https://github.com/status-im/nimbus-eth2/issues/5507

I still don't get why this `PATH` modification is even necessary, it works without it.

Signed-off-by: Jakub Sokołowski <jakub@status.im>
2024-03-27 09:44:06 +01:00
tersec 14e0c55e89
quote and library paths for use in passc/passl to allow embedded spaces (#79) 2024-03-26 18:36:14 +00:00
Etan Kissling 3866a8ab98
remove `Nim-csources-v1` and `nimble` checkouts (#75)
When `build_nim.sh` detects that `skipIntegrityCheck` is supported,
it runs the upstream toolchain for building Nim, ignoring the locally
checked out `Nim-csources-v1` and `nimble` sub-repositories. So, having
those repos checked out is not useful in that scenario.

When `skipIntegrityCheck` is unsupported, `build_nim.sh` uses the local
sub-repositories if they are available. But, it also clones them if they
are unavailable using commits as specified by environment variables.
Because the clone will happen as part of the script, having the repos
linked as sub-repositories is also not useful. Even worse, if the script
has different commit hashes than the subrepository, the behaviour is
different depending on whether `build_nim.sh` is run before or after
the submodules are checked out.

Therefore, we can remove the `Nim-csources-v1` and `nimble` sub-repos,
using the upstream build system if available, or the hardcoded commits
inside `build_nim.sh` to have a manual build, as before.

Also moves the various variables that control the used versions into
the manual section to emphasize that these only take effect in manual
mode, but not when using upstream build system (`skipIntegrityCheck`).

If one wants to use a custom `Nimble` version, fork `Nim` and adjust the
config in that fork. That also works with the upstream build system.
2024-01-15 16:21:06 +01:00
Etan Kissling c01eb708bc
adjust `CSOURCES_V1_COMMIT` variable with recent bump (#73) (#74)
Forgot to update the ref in the build script to actually use the new
commit. Do that now.
2024-01-15 15:51:12 +01:00
Etan Kissling 8eae399a6c
bump `csources_v1` to `561b417c65791cd8356b5f73620914ceff845d10` (#73)
- fix compilation with old glibc
- preliminary support for CROSSOS (a BSD derivate)
- added OpenIndiana support
2024-01-15 15:26:23 +01:00
Etan Kissling cf0c9cfa40
switch to Nim `v1.6.18` (#72)
- https://github.com/nim-lang/Nim/compare/v1.6.16..v1.6.18
2024-01-03 15:17:07 +01:00
Etan Kissling 6cdd14282b
switch to Nim `v1.6.16` (#70)
Previous bump was two commits behind the official upstream tag.
2023-10-25 10:21:02 +02:00
jangko fc18925ce1
Bump Nim to version 1.6.16 2023-10-16 20:33:13 +07:00
andri lim 3b298a78be
Add GitHub Action CI (#66)
* Add Github Action CI
2023-10-16 20:13:05 +07:00
Etan Kissling 81ce5fc752
Allow passing config to submodule initialization in `update-common` (#69)
To configure submodule specific config overrides, allow passing
`$(GIT_SUBMODULE_CONFIG)` to `update-common`. Use case for `nimbus-eth2`
is to exclude a large file that we don't need from LFS checkout.
2023-09-18 17:16:15 +02:00
jangko 733e81c6a9
Patch libnatpmp.a rule to support llvm-mingw in targets.mk 2023-09-13 08:27:46 +07:00
Etan Kissling fe9bc3f375
switch to Nim `v1.6.14` (#63) 2023-06-27 19:30:49 +02:00
Etan Kissling 239c3a7fbb
install Nimble CA cert when `skipIntegrityCheck` (#62)
In #61 a regression was introduced where Nimble fails to build packages.

```
    Prompt: No local packages.json found, download it from internet? -> [forced yes]
Downloading Official package list
       Tip: 6 messages have been suppressed, use --verbose to show them.
     Error: Refresh failed
        ... Could not download: No SSL/TLS CA certificates found.
Error: Process completed with exit code 1.
```

Ensure that CA cert is being downloaded once more, even when `koch`
supports `skipIntegrityCheck`.
2023-06-09 20:26:55 +02:00
markspanbroek 17d85dac6f
Fix checking out of recent Nim tags in shallow repo (#58)
* Fix checking out of recent Nim tags in shallow repo

When calling `git fetch` on a shallow repo, recent
tags or commits are refused. Fetching with `--tags`
ensures that the latest tags and the commits that
they point to are fetched.

More info:
https://git-scm.com/docs/git-fetch#Documentation/git-fetch.txt---update-shallow

Co-authored-by: Tanguy <tanguy@status.im>
2023-06-07 12:36:06 +02:00
Tanguy cb65dbcd80
Use upstream build system when possible (#61) 2023-05-22 15:55:06 +02:00
Zahary Karadjov 2e69505479
Bump Nim to version 1.6.12 2023-03-15 13:05:13 +02:00
Jacek Sieka 47052a3fcc
Revert "Bump fix-id (mitigates gc problem) (#59)" (#60)
This reverts commit 0e3e295fdb.
2023-03-07 20:20:30 +01:00
Jordan Hrycaj 0e3e295fdb
Bump fix-id (mitigates gc problem) (#59) 2023-03-07 17:58:17 +00:00
Zahary Karadjov 95afb33019
Generate nimbus-build-system.paths from env.sh again
The model where nimbus-build-system.paths were generated as a dependency
from `update-common` proved to create various issues in practice:

* It was not working properly during the repository bootstrapping
  because the paths file generation script is assuming that all
  submodules are already checked out

* It was not always triggered from builds of the top-level targets
  due to missing or already satisfied dependencies on `update-common`.

A more proper solution would structure the dependencies like this:

top-level-project -> nimbus-build-system.paths -> vendor-modules

... but this requires a larger refactoring of the Makefiles, so I'm
merging this interim solution as a way to improve the status quo.
2023-02-23 17:12:35 +02:00
jangko ba832c296e
update nim compiler to b1a0467: bare exception fix 2023-02-01 11:19:29 +07:00
Tanguy 72d51e4c32
Fix windows CI building (#56)
Linking doesn't work properly on github actions windows machines
2023-01-12 13:38:06 +01:00
Tanguy c488f87b09
Automatic csources selection (#55) 2023-01-05 10:40:49 +01:00
Zahary Karadjov 06d1145ffd
Switch to Nim 1.6.11 2022-12-01 07:43:32 +02:00
Zahary Karadjov 97ee9bab50
Switch back to Nim 1.2 to produce the Nimbus 22.11 release 2022-12-01 07:36:42 +02:00
Jacek Sieka 8c59324e8f
introduce `NIMC` to control which `nim` to call (#53) 2022-11-24 17:07:01 +01:00
Zahary Karadjov dc535cd462
Better compatibility with direnv
Scripts sourcing a project env.sh file (e.g. direnv's .envrc) can specify
the `NBS_ONLY_LOAD_ENV_VARS` env variable to avoid any attempts from NBS
to execute a target script. Previously, the script was trying to detect
only sourcing from an interactive shell.
2022-10-15 00:59:16 +03:00
Zahary Karadjov b1d380e07e
Allow the paths file to be created outside of the build system env 2022-10-15 00:21:53 +03:00
Zahary Karadjov d548b20ecd
Generate the paths file in 'make update' 2022-10-14 23:43:51 +03:00
Zahary Karadjov 5a6f950b6d
Tentative fix for the libminiupnp build problems on Windows 2022-10-12 19:28:03 +03:00
Jakub Sokołowski 6b419277aa
hardcode CC to gcc for windows (#52)
Windows doesn't have a `cc` symlnk and this results in build failure:
```
C compiler (cc) not installed. Aborting.
```
Because `?=` operator treats `CC` as already set, since it defaults to `cc`:
https://www.gnu.org/software/make/manual/make.html#Implicit-Variables
2022-10-12 18:28:34 +03:00
Zahary Karadjov a04a8eb266
Switch to Nim 1.6 2022-10-10 18:39:01 +03:00
Zahary Karadjov a75cb63076
update miniupnp build targets to match their latest version 2022-10-04 19:21:45 +03:00
Jakub Sokołowski 07e37730c6
allow overriding CC with clang or other (#51) 2022-10-04 19:18:45 +03:00
Ivan Yonchovski daff2b4670
Make sure the path is understandable for nim on windows (#49) 2022-09-12 12:50:14 +03:00
Zahary Karadjov c7977002fb
Support vendor packages with a 'src' folder 2022-08-25 22:17:48 +03:00
Ivan Yonchovski daca2e58bd
Initial step to make NBS work with --noNimblePath (#48)
Here POC on what are the other steps that have to be performed to allow using NBS.

0961d3acc2

Once all projects migrate to this approach, the code related to building
NIMBLE_PATH can be deleted from the repo

cc @zah
2022-08-11 13:09:15 +03:00
Zahary Karadjov c0c15c4e45
Revert "Bump Nim to 1.6.7 (as of 2022-07-25)"
This reverts commit 6d75eeea74.

A critical `lent` issue has been discovered
2022-07-29 11:25:15 +03:00
Zahary Karadjov 6d75eeea74
Bump Nim to 1.6.7 (as of 2022-07-25) 2022-07-25 23:26:54 +03:00
Bulat-Ziganshin fe4865eae3
Fix typo in targets.mk (#46)
https://github.com/status-im/nimbus-build-system/blob/master/makefiles/targets.mk#L152

should contain "CC=$(CC)", similar to the next line. Otherwise Makefile variable CC gets defined as "cc" and it doesn't work for Windows
2022-06-16 08:45:48 +03:00
Ștefan Talpalaru a8ab2dc39a
build_nim.sh: hide stderr from "ls" (#43) 2022-03-18 21:09:01 +01:00
Ștefan Talpalaru 041544c2b7
build_nim.sh: fix "cacert.pem" corner case (#42) 2022-03-18 10:29:00 +01:00
Ștefan Talpalaru 8377eed7c0
build_nim.sh: limit the number of Nim binaries (#41)
The most recent 10 compiler binaries should be enough for everyone.
2022-03-18 10:21:21 +01:00
Ștefan Talpalaru 8425ff9e3b
"update-dev" target (#40)
OVERRIDE now defaults to 1 for "update" and 0 for "update-dev".
2022-01-26 15:20:55 +01:00
Ștefan Talpalaru f62fa395f7
build_nim.sh: handle manual symlink deletion (#39) 2022-01-26 11:54:34 +01:00
Ștefan Talpalaru bc4791418a
remove build_p2pd.sh (#38)
nim-libp2p has its own copy
2022-01-20 03:24:43 +01:00
Ștefan Talpalaru 36e57b833d
EXCLUDED_NIM_PACKAGES (#37) 2022-01-20 00:44:30 +01:00
Ștefan Talpalaru f85ad74a05
/dev/tty exists but can't be used in GitHub Actions (#35) 2022-01-19 21:44:33 +01:00