urbit / vere

An implementation of the Urbit runtime
MIT License
53 stars 35 forks source link

cannot build with flake.nix #628

Open h33p opened 1 month ago

h33p commented 1 month ago

It appears that flake is broken, or maybe I'm doing something wrong (new to nixos)

on release branch:

❯ nix develop                                                                                                                                                               vere/git/release 
/nix/store/rk067yylvhyb7a360n8k1ps4lb4xsbl3-coreutils-9.3/bin/dircolors: /usr/lib/libc.so.6: version `GLIBC_2.38' not found (required by /nix/store/rk067yylvhyb7a360n8k1ps4lb4xsbl3-coreutils-9.3/bin/dircolors)
/nix/store/rk067yylvhyb7a360n8k1ps4lb4xsbl3-coreutils-9.3/bin/dircolors: /usr/lib/libc.so.6: version `GLIBC_2.38' not found (required by /nix/store/29691038dnsk07w5jr32rw6vsnmarcb5-acl-2.3.1/lib/libacl.so.1)
/nix/store/rk067yylvhyb7a360n8k1ps4lb4xsbl3-coreutils-9.3/bin/dircolors: /usr/lib/libc.so.6: version `GLIBC_2.38' not found (required by /nix/store/p3zhf82f9i2bd7yzy258d9xq5bik8nmk-gmp-with-cxx-6.3.0/lib/libgmp.so.10)
*** stack smashing detected ***: terminated

[auri@devm-aurimas:~/other/vere]$ bazel build :urbit
Starting local Bazel server and connecting to it...
INFO: Analyzed target //:urbit (76 packages loaded, 12379 targets configured).
INFO: Found 1 target...
WARNING: /home/auri/other/vere/BUILD.bazel:174:8: input '.git' to //:version_str is a directory; dependency checking of directories is unsound
ERROR: /home/auri/other/vere/BUILD.bazel:174:8: Executing genrule //:version_str failed: (Exit 1): bash failed: error executing command /nix/store/j80wcbm6bb1nsqsgmniq43rg980p27q9-bash-5.2-p15/bin/bash -c ... (remaining 1 argument skipped)

Use --sandbox_debug to see verbose messages from the sandbox and retain the sandbox build root for debugging
git: /usr/lib/libc.so.6: version `GLIBC_2.38' not found (required by git)
Target //pkg/vere:urbit failed to build
Use --verbose_failures to see the command lines of failed build steps.
INFO: Elapsed time: 7.593s, Critical Path: 4.97s
INFO: 312 processes: 14 internal, 298 linux-sandbox.
FAILED: Build did NOT complete successfully
*** stack smashing detected ***: terminated

Really odd stack smashing thingy getting detected.

on develop branch:

❯ nix develop                                                                                                                                                               vere/git/develop 

[auri@devm-aurimas:~/other/vere]$ bazel build :urbit
Starting local Bazel server and connecting to it...
INFO: Analyzed target //:urbit (76 packages loaded, 12412 targets configured).
INFO: Found 1 target...
<...>
configure: error: The pkg-config script could not be found or is too old.  Make sure it
is in your PATH or set the PKG_CONFIG environment variable to the full
path to pkg-config.

Alternatively, you may set the environment variables EXPAT_CFLAGS
and EXPAT_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details.

To get pkg-config, see <http://pkg-config.freedesktop.org/>.
See `config.log' for more details
_____ END BUILD LOGS _____
rules_foreign_cc: Build wrapper script location: bazel-out/k8-opt/bin/external/dbus/libdbus-1_foreign_cc/wrapper_build_script.sh
rules_foreign_cc: Build script location: bazel-out/k8-opt/bin/external/dbus/libdbus-1_foreign_cc/build_script.sh
rules_foreign_cc: Build log location: bazel-out/k8-opt/bin/external/dbus/libdbus-1_foreign_cc/Configure.log

Target //pkg/vere:urbit failed to build
Use --verbose_failures to see the command lines of failed build steps.
INFO: Elapsed time: 48.916s, Critical Path: 45.89s
INFO: 393 processes: 8 internal, 385 linux-sandbox.
FAILED: Build did NOT complete successfully

develop branch, adding pkg-config to the list of packages:

<...>
PKG_CONFIG_PATH=:/home/auri/.cache/bazel/_bazel_auri/1997c550debeec101dac973109169cf3/sandbox/linux-sandbox/4/execroot/__main__/bazel-out/k8-opt/bin/external/urcrypt/urcrypt.ext_build_deps/openssl/lib/pkgconfig:/home/auri/.cache/bazel/_bazel_auri/1997c550debeec101dac973109169cf3/sandbox/linux-sandbox/4/execroot/__main__/bazel-out/k8-opt/bin/external/urcrypt/urcrypt.ext_build_deps/secp256k1/lib/pkgconfig
+ NOCONFIGURE=1
+ /home/auri/.cache/bazel/_bazel_auri/1997c550debeec101dac973109169cf3/sandbox/linux-sandbox/4/execroot/__main__/bazel-out/k8-opt/bin/external/urcrypt/urcrypt.build_tmpdir/autogen.sh
aclocal: warning: couldn't open directory 'build-aux/m4': No such file or directory
configure.ac:126: error: possibly undefined macro: AC_MSG_NOTICE
      If this token and others are legitimate, please use m4_pattern_allow.
      See the Autoconf documentation.
autoreconf: error: /nix/store/bkdqj1ckn7h1ypnvmdv0i3bhm31llhxz-autoconf-2.71/bin/autoconf failed with exit status: 1
_____ END BUILD LOGS _____
rules_foreign_cc: Build wrapper script location: bazel-out/k8-opt/bin/external/urcrypt/urcrypt_foreign_cc/wrapper_build_script.sh
rules_foreign_cc: Build script location: bazel-out/k8-opt/bin/external/urcrypt/urcrypt_foreign_cc/build_script.sh
rules_foreign_cc: Build log location: bazel-out/k8-opt/bin/external/urcrypt/urcrypt_foreign_cc/Configure.log

Target //pkg/vere:urbit failed to build
Use --verbose_failures to see the command lines of failed build steps.
INFO: Elapsed time: 5.337s, Critical Path: 2.92s
INFO: 6 processes: 6 internal.
FAILED: Build did NOT complete successfully
h33p commented 1 month ago

It seems like if I force ACLOCAL_PATH urcrypt starts to build:

ACLOCAL_PATH=/usr/share/aclocal autoreconf -if --warnings=all
aclocal: warning: couldn't open directory 'build-aux/m4': No such file or directory
libtoolize: putting auxiliary files in AC_CONFIG_AUX_DIR, 'build-aux'.
libtoolize: copying file 'build-aux/ltmain.sh'
libtoolize: putting macros in AC_CONFIG_MACRO_DIRS, 'build-aux/m4'.
libtoolize: copying file 'build-aux/m4/libtool.m4'
libtoolize: copying file 'build-aux/m4/ltoptions.m4'
libtoolize: copying file 'build-aux/m4/ltsugar.m4'
libtoolize: copying file 'build-aux/m4/ltversion.m4'
libtoolize: copying file 'build-aux/m4/lt~obsolete.m4'
configure.ac:47: installing 'build-aux/compile'
configure.ac:44: installing 'build-aux/missing'
Makefile.am: installing 'build-aux/depcomp'

Let me see if there's a way to make this work without breaking others.

h33p commented 1 month ago

The following progresses further:

bazel build :urbit --action_env=ACLOCAL_PATH=$ACLOCAL_PATH --action_env=PKG_CONFIG_PATH=$PKG_CONFIG_PATH

However, now avahi spazzes out