Commit Graph

94 Commits

Author SHA1 Message Date
Jacek Sieka 8cdaec502b
bump rocksdb (#83) 2024-06-04 08:07:24 +02: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 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
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
Jacek Sieka 8c59324e8f
introduce `NIMC` to control which `nim` to call (#53) 2022-11-24 17:07:01 +01: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 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
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 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 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
Ștefan Talpalaru 59dfbda0da
update: ignore non-submodule changes at top-level (#31)
and check if /dev/tty exists before using it
2021-11-30 12:52:33 +01:00
Ștefan Talpalaru 3b83e22943
clean-common: Windows fix (#30)
libnatpmp needs CC redefined, even for a `mingw32-make clean`
2021-11-23 01:16:27 +01:00
Ștefan Talpalaru 93ad4a4b20
NIM_COMMIT fix (#29) 2021-11-22 18:13:01 +01:00
Ștefan Talpalaru 08000b4bf0
update: check if any work might be lost (#28) 2021-11-22 17:26:51 +01:00
Ștefan Talpalaru e5bc3dd3a2
libnatpmp.a: silence a warning 2021-11-05 12:17:30 +01:00
Ștefan Talpalaru 5fbffb2285
don't swallow stderr with V=0 (#27) 2021-11-05 00:18:36 +01:00
Etan Kissling 9d6b4b6e98
fix build output color on macOS (#26)
On macOS, `echo` does not support the `\e` extension from GNU coreutils.
Replacing with the portable `\x1B` to fix Terminal build output colors.
2021-09-09 14:12:17 +02:00
Ștefan Talpalaru 6589cedffa
libminiupnpc.a: fix Windows build when '.' not in PATH 2021-08-17 02:44:49 +02:00
Ștefan Talpalaru b6ceb0fc65
replace csources submodule 2021-05-22 19:05:06 +02:00
Ștefan Talpalaru d74428a6ee
nat-libs: don't hardcode CC for Windows 2021-04-29 23:00:28 +02:00
Ștefan Talpalaru 7d418e44da move from timestamps to commit hashes
This allows a faster path for the most common scenario and avoiding a
hard link that probably doesn't work on Windows.
2021-04-28 18:00:44 +03:00
Ștefan Talpalaru 79fa0d6367
make $(NIM_BINARY) a phony target
and have "update-common" run "deps-common" instead of "deps"
2021-02-24 17:52:33 +01:00
Ștefan Talpalaru 8d7080227b
Revert "Allow specifying the BUILD_LOG_LEVEL separately"
This reverts commit 8de1f8036c.
2021-02-19 19:43:14 +01:00
Zahary Karadjov 8de1f8036c
Allow specifying the BUILD_LOG_LEVEL separately 2021-02-18 23:34:56 +02:00
Sacha Saint-Leger 9c4c4d3acf
Edit make update warning message (#18)
* edit make update warning message

* fix shell syntax and reword the warning

* add some newlines

Co-authored-by: Ștefan Talpalaru <stefantalpalaru@yahoo.com>
2021-01-29 13:16:23 +01:00
Ștefan Talpalaru f7c732a150 new variable: QUICK_AND_DIRTY_COMPILER
Don't re-build the Nim compiler multiple times until we get identical
binaries, like "build_all.sh" does. Don't build any tools either.

Disabled by default, useful in CI.
2021-01-06 14:54:31 +02:00
Ștefan Talpalaru e2de003ce6 warn if "make update" was not executed
and warn if Make's parallelism is not enabled
2020-12-10 19:58:44 +02:00
Ștefan Talpalaru c8a1339b2b
fix typo 2020-11-22 17:09:28 +01:00
Jacek Sieka dbb7219f44
conditional pcre (#15) 2020-11-13 13:44:27 +01:00
Ștefan Talpalaru c278412dbf
new var: PARTIAL_STATIC_LINKING 2020-10-08 21:39:40 +02:00
Ștefan Talpalaru 4b662df1e9
libminiupnpc.a: Windows fix 2020-10-07 01:00:57 +02:00
Ștefan Talpalaru f1234f6374
renamed the libnatpmp dir
and moved the "clean-cross" target here
2020-10-07 00:31:30 +02:00
Ștefan Talpalaru 79469de156
libnatpmp.a: use CFLAGS from the environment 2020-09-22 19:32:19 +02:00
Ștefan Talpalaru 41272d2002
update-common: delete "nimcache" directories 2020-09-20 16:03:20 +02:00
Michael Bradley a8cafce7c0
fix: use --recursive opt of git-submodule to generate vendor/.nimble (#13) 2020-09-03 22:26:40 +02:00
Ștefan Talpalaru 7c08b78522
support spaces in $(MAKE) 2020-09-03 14:01:32 +02:00
Ștefan Talpalaru e104d62e4d
variables.mk: don't set LOG_LEVEL in here
so it can be given a default value in the top-level Makefile
2020-08-27 13:20:16 +02:00
Zed abf45cfa27
Support compiling without PCRE (#12) 2020-08-22 04:44:10 +02:00
Ștefan Talpalaru 9bad27f6c2
show-deps: also show commit hashes 2020-07-16 21:02:06 +02:00
Ștefan Talpalaru 767c8e0fb4
cosmetic changes 2020-06-22 16:44:45 +02:00