dzaima / CBQN

a BQN implementation in C
GNU General Public License v3.0
329 stars 46 forks source link

Mltiple errors while installing #76

Closed vergelli closed 1 year ago

vergelli commented 1 year ago

Hello, I'm new to BQN and I'd like to get started by downloading it onto my PC and start coding. I tried following the instructions provided, but I couldn't make it work

System: Ubuntu 20 Desktop clang: No clang on os Note: I have it SUDOed

Question: Is folder structure relevant?

Tried: sudo make REPLXX=1 CC=cc

with the following response (Long code warning):

builtins/arithd.c
builtins/cmp.c
builtins/arithm.c
builtins/sfns.c
builtins/squeeze.c
builtins/select.c
src/builtins/sfns.c: In function ‘shape_c2’:
src/builtins/sfns.c:165:19: warning: ‘unkInd’ may be used uninitialized in this function [-Wmaybe-uninitialized]
  165 |         } else if (unkInd == n_reverse) {
      |                   ^
builtins/sort.c
In file included from src/builtins/sort.c:12:
src/builtins/grade.h: In function ‘gradeUp_c2’:
src/builtins/grade.h:302:9: warning: this ‘for’ clause does not guard... [-Wmisleading-indentation]
  302 |         for (u64 i=0; i<xia; i++) rp[i]=wia; goto done;
      |         ^~~
src/builtins/grade.h:302:46: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘for’
  302 |         for (u64 i=0; i<xia; i++) rp[i]=wia; goto done;
      |                                              ^~~~
In file included from src/builtins/../core.h:3,
                 from src/builtins/sort.c:1:
src/builtins/../h.h:532:18: error: a label can only be part of a statement and a declaration is not a statement
  532 | #define SGetU(X) Arr* X##_arrU = a(X); AS2B X##_getU = TIv(X##_arrU,getU);
      |                  ^~~
src/builtins/grade.h:327:5: note: in expansion of macro ‘SGetU’
  327 |     SGetU(x)
      |     ^~~~~
src/builtins/../h.h:532:40: error: expected expression before ‘AS2B’
  532 | #define SGetU(X) Arr* X##_arrU = a(X); AS2B X##_getU = TIv(X##_arrU,getU);
      |                                        ^~~~
src/builtins/grade.h:327:5: note: in expansion of macro ‘SGetU’
  327 |     SGetU(x)
      |     ^~~~~
src/builtins/grade.h:341:18: warning: implicit declaration of function ‘x_getU’ [-Wimplicit-function-declaration]
  341 |       B c = GetU(x,i);
      |                  ^
src/builtins/../h.h:534:19: note: in definition of macro ‘GetU’
  534 | #define GetU(X,N) X##_getU(X##_arrU,N)
      |                   ^
src/builtins/grade.h:341:18: error: invalid initializer
  341 |       B c = GetU(x,i);
      |                  ^
src/builtins/../h.h:534:19: note: in definition of macro ‘GetU’
  534 | #define GetU(X,N) X##_getU(X##_arrU,N)
      |                   ^
In file included from src/builtins/sort.c:14:
src/builtins/grade.h: In function ‘gradeDown_c2’:
src/builtins/grade.h:302:9: warning: this ‘for’ clause does not guard... [-Wmisleading-indentation]
  302 |         for (u64 i=0; i<xia; i++) rp[i]=wia; goto done;
      |         ^~~
src/builtins/grade.h:302:46: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘for’
  302 |         for (u64 i=0; i<xia; i++) rp[i]=wia; goto done;
      |                                              ^~~~
In file included from src/builtins/../core.h:3,
                 from src/builtins/sort.c:1:
src/builtins/../h.h:532:18: error: a label can only be part of a statement and a declaration is not a statement
  532 | #define SGetU(X) Arr* X##_arrU = a(X); AS2B X##_getU = TIv(X##_arrU,getU);
      |                  ^~~
src/builtins/grade.h:327:5: note: in expansion of macro ‘SGetU’
  327 |     SGetU(x)
      |     ^~~~~
src/builtins/../h.h:532:40: error: expected expression before ‘AS2B’
  532 | #define SGetU(X) Arr* X##_arrU = a(X); AS2B X##_getU = TIv(X##_arrU,getU);
      |                                        ^~~~
src/builtins/grade.h:327:5: note: in expansion of macro ‘SGetU’
  327 |     SGetU(x)
      |     ^~~~~
src/builtins/grade.h:341:18: error: invalid initializer
  341 |       B c = GetU(x,i);
      |                  ^
src/builtins/../h.h:534:19: note: in definition of macro ‘GetU’
  534 | #define GetU(X,N) X##_getU(X##_arrU,N)
      |                   ^
make[2]: *** [makefile:198: obj/ba9923306553b1fba7f3b00eb32fd8bc/sort.o] Error 1
make[2]: *** Se espera a que terminen otras tareas....
make[1]: *** [makefile:164: run_incremental_0] Error 2
make: *** [makefile:7: o3] Error 2

I also tried: sudo make clean

And received:

spoiler: orden no encontrada = order not found


bash: clang: orden no encontrada
rm -f obj/*/*.o
rm -f obj/*/*.d
rm -f src/gen/customRuntime
rm -rf src/singeli/gen/
bash: clang: orden no encontrada
rm -f obj/presingeli/*.o
rm -f obj/presingeli/*.d

Any advice?

dzaima commented 1 year ago

Those line numbers do not match the current state of the repo.

Might you be on an old git commit? (run git pull to get latest; possibly checking out master first, if it's not already)

vergelli commented 1 year ago

That's correct, I've been trying with an outdated version somehow. I clone the actual project and follow the instructions and worked with the following output:

builtins/arithm.c
builtins/arithd.c
builtins/cmp.c
builtins/sfns.c
builtins/squeeze.c
builtins/select.c
builtins/slash.c
builtins/group.c
builtins/sort.c
builtins/search.c
builtins/selfsearch.c
builtins/transpose.c
builtins/fold.c
builtins/scan.c
builtins/md1.c
builtins/md2.c
builtins/compare.c
builtins/cells.c
builtins/fns.c
builtins/sysfn.c
builtins/internal.c
builtins/inverse.c
core/tyarr.c
core/harr.c
core/fillarr.c
core/stuff.c
core/derv.c
core/mm.c
core/heap.c
Using precompiled bytecode; see readme for how to build your own
main.c
rtwrap.c
vm.c
ns.c
nfns.c
ffi.c
jit/nvm.c
utils/ryu.c
utils/utf.c
utils/hash.c
utils/file.c
utils/mut.c
utils/each.c
utils/bits.c
build/replxxSubmodule/src/ConvertUTF.cpp
build/replxxSubmodule/src/wcwidth.cpp
build/replxxSubmodule/src/conversion.cxx
build/replxxSubmodule/src/escape.cxx
build/replxxSubmodule/src/history.cxx
build/replxxSubmodule/src/prompt.cxx
build/replxxSubmodule/src/replxx.cxx
build/replxxSubmodule/src/replxx_impl.cxx
build/replxxSubmodule/src/terminal.cxx
build/replxxSubmodule/src/util.cxx
build/replxxSubmodule/src/windows.cxx
load.c
vergelli commented 1 year ago

Thanks