xl icon indicating copy to clipboard operation
xl copied to clipboard

Nubie feedback - can't build

Open blakemcbride opened this issue 2 years ago • 4 comments

Greetings,

I am new to XL. Looks very interesting. I am running on a modern X86-64 Linux machine. I have run into the following two issues:

  1. "configure" should be mode 777. I know it's not really used but making it mode 777 will make the system just build.
  2. When I run make, I get:

blake@i9-tower:~/Backup/xl.git$ make Makefile:43: make-it-quick/rules.mk: No such file or directory git submodule update --init --recursive Submodule 'make-it-quick' (https://github.com/c3d/make-it-quick) registered for path 'make-it-quick' Submodule 'recorder' (https://github.com/c3d/recorder) registered for path 'recorder' Cloning into '/home/blake/Backup/xl.git/make-it-quick'... Cloning into '/home/blake/Backup/xl.git/recorder'... Submodule path 'make-it-quick': checked out 'df4c924ff6192c91185984132b68b578b4290a4e' Submodule path 'recorder': checked out '563ab67c1c9733b4f2f11381602630683617ee8e' Submodule 'make-it-quick' (https://github.com/c3d/make-it-quick) registered for path 'recorder/make-it-quick' Cloning into '/home/blake/Backup/xl.git/recorder/make-it-quick'... Submodule path 'recorder/make-it-quick': checked out 'df4c924ff6192c91185984132b68b578b4290a4e' make[1]: Entering directory '/home/blake/Backup/xl.git' [BEGIN] opt linux in [top]
make[2]: Entering directory '/home/blake/Backup/xl.git/recorder' [CONFIG] regex NO [BEGIN] opt linux in [top]recorder/
[CONFIG] setlinebuf OK [CONFIG] drand48 OK [CONFIG] sys/mman OK [CONFIG] regex OK [CONFIG] sigaction OK [BEGIN] opt linux in [top]recorder/
[GENERATE] config.h
[COMPILE 1/2] recorder_ring.c
[COMPILE 2/2] recorder.c
[LINK] librecorder.so
[END] opt linux in [top]recorder/
make[2]: Leaving directory '/home/blake/Backup/xl.git/recorder' make[2]: Entering directory '/home/blake/Backup/xl.git/src' [CONFIG] regex NO /bin/bash: llvm-config: command not found [INFO] Building with LLVM version
[BEGIN] opt linux in [top]src/
[CONFIG] longlong OK [CONFIG] ulong OK [CONFIG] uint OK [CONFIG] ushort OK [CONFIG] uchar NO [CONFIG] glob OK [CONFIG] drand48 OK [CONFIG] sys/socket OK [CONFIG] sys/mman OK [CONFIG] regex OK [CONFIG] mingw_aligned_malloc NO [CONFIG] posix_memalign OK [CONFIG] sbrk OK [CONFIG] struct_stat OK [CONFIG] sigaction OK /bin/bash: llvm-config: command not found [INFO] Building with LLVM version
[BEGIN] opt linux in [top]src/
[VARIANT] lib
make[3]: Entering directory '/home/blake/Backup/xl.git/src' /bin/bash: llvm-config: command not found [INFO] Building with LLVM version
[BEGIN] opt linux in [top]src/[lib]
[GENERATE] basics_module.h
[GENERATE] io_module.h
[GENERATE] math_module.h
[GENERATE] text_module.h
[GENERATE] remote_module.h
[GENERATE] time_functions_module.h
[GENERATE] temperature_module.h
[GENERATE] config.h
/bin/bash: llvm-config: command not found /bin/bash: llvm-config: command not found /bin/bash: llvm-config: command not found [COMPILE 1/39] compiler-expr.cpp
In file included from compiler.h:43:0, from compiler-expr.h:40, from compiler-expr.cpp:38: llvm-crap.h:67:20: error: operator '<' has no left operand #elif LLVM_VERSION < 370 ^ In file included from llvm-crap.h:74:0, from compiler.h:43, from compiler-expr.h:40, from compiler-expr.cpp:38: llvm-crap.h:406:19: error: operator '>=' has no left operand

if LLVM_VERSION >= 350 && LLVM_VERSION < 360

               ^~

llvm-crap.h:414:19: error: operator '>=' has no left operand

if LLVM_VERSION >= 370 && LLVM_VERSION < 380

               ^~

llvm-crap.h:419:19: error: operator '>=' has no left operand

if LLVM_VERSION >= 400

               ^~

In file included from compiler.h:43:0, from compiler-expr.h:40, from compiler-expr.cpp:38: llvm-crap.h:78:10: fatal error: llvm/IR/Type.h: No such file or directory #include <llvm/IR/Type.h> ^~~~~~~~~~~~~~~~ compilation terminated. ../make-it-quick/rules.mk:466: recipe for target '/home/blake/Backup/xl.git/.build/linux/opt/src/compiler-expr.cpp.o' failed make[3]: *** [/home/blake/Backup/xl.git/.build/linux/opt/src/compiler-expr.cpp.o] Error 1 make[3]: Leaving directory '/home/blake/Backup/xl.git/src' ../make-it-quick/rules.mk:365: recipe for target 'lib.variant' failed make[2]: *** [lib.variant] Error 2 make[2]: Leaving directory '/home/blake/Backup/xl.git/src' make-it-quick/rules.mk:362: recipe for target 'src.recurse' failed make[1]: *** [src.recurse] Error 2 make[1]: Leaving directory '/home/blake/Backup/xl.git'

real 0m1.830s user 0m1.470s sys 0m0.437s 5 Errors, 0 Warnings in /home/blake/Backup/xl.git/.logs/build-linux-opt-20210725-095243.log make-it-quick/rules.mk:204: recipe for target 'opt' failed make: *** [opt] Error 2

blakemcbride avatar Jul 25 '21 15:07 blakemcbride

/bin/bash: llvm-config: command not found

You need to have LLVM installed. I know the build should stop in that case, but I never bothered.

Alternatively, you can build interpreter-only with make COMPILER=none

c3d avatar Jul 26 '21 08:07 c3d

Hey @blakemcbride, were you ever successful to compile with my recommendation?

c3d avatar Oct 19 '21 16:10 c3d

For what is worth I was able to compile with make COMPILER=none. Only 4 warnings.

Here is the run.

root@agarciafd-lg:/home/agarciafdz/r/gh/c3d/xl# make COMPILER=none
make[1]: Entering directory '/home/agarciafdz/r/gh/c3d/xl'
[BEGIN]          opt linux in [top]                                            
make[2]: Entering directory '/home/agarciafdz/r/gh/c3d/xl/recorder'
[BEGIN]          opt linux in [top]recorder/                                   
[COMPILE  1/2]   recorder.c                                                    
[LINK]           librecorder.so                                                
[END]            opt linux in [top]recorder/                                   
make[2]: Leaving directory '/home/agarciafdz/r/gh/c3d/xl/recorder'
make[2]: Entering directory '/home/agarciafdz/r/gh/c3d/xl/src'
[CONFIG]         regex                                                   [NO]
[INFO]           Building in interpreter-only mode                             
[BEGIN]          opt linux in [top]src/                                        
[CONFIG]         longlong                                                [OK]
[CONFIG]         ulong                                                   [OK]
[CONFIG]         uint                                                    [OK]
[CONFIG]         ushort                                                  [OK]
[CONFIG]         uchar                                                   [NO]
[CONFIG]         glob                                                    [OK]
[CONFIG]         drand48                                                 [OK]
[CONFIG]         sys/socket                                              [OK]
[CONFIG]         sys/mman                                                [OK]
[CONFIG]         regex                                                   [OK]
[CONFIG]         mingw_aligned_malloc                                    [NO]
[CONFIG]         posix_memalign                                          [OK]
[CONFIG]         sbrk                                                    [OK]
[CONFIG]         struct_stat                                             [OK]
[CONFIG]         sigaction                                               [OK]
[INFO]           Building in interpreter-only mode                             
[BEGIN]          opt linux in [top]src/                                        
[VARIANT]        lib                                                           
make[3]: Entering directory '/home/agarciafdz/r/gh/c3d/xl/src'
[INFO]           Building in interpreter-only mode                             
[BEGIN]          opt linux in [top]src/[lib]                                   
[GENERATE]       config.h                                                      
[COMPILE  1/29]  action.cpp                                                    
[COMPILE  2/29]  bytecode.cpp                                                  
[COMPILE  3/29]  cdecls.cpp                                                    
[COMPILE  4/29]  context.cpp                                                   
[COMPILE  5/29]  errors.cpp                                                    
[COMPILE  6/29]  gc.cpp                                                        
gc.cpp: In static member function ‘static void* XL::TypeAllocator::operator new(size_t)’:
gc.cpp:406:16: warning: ‘operator new’ must not return NULL unless it is declared ‘throw()’ (or ‘-fcheck-new’ is in effect)
  406 |         return nullptr;
      |                ^~~~~~~
[COMPILE  7/29]  interpreter.cpp                                               
[COMPILE  8/29]  main.cpp                                                      
[COMPILE  9/29]  opcodes.cpp                                                   
[COMPILE 10/29]  options.cpp                                                   
[COMPILE 11/29]  parser.cpp                                                    
[COMPILE 12/29]  renderer.cpp                                                  
[COMPILE 13/29]  rewrites.cpp                                                  
[COMPILE 14/29]  runtime.cpp                                                   
[COMPILE 15/29]  scanner.cpp                                                   
[COMPILE 16/29]  serializer.cpp                                                
[COMPILE 17/29]  syntax.cpp                                                    
[COMPILE 18/29]  tree.cpp                                                      
[COMPILE 19/29]  types.cpp                                                     
types.cpp: In member function ‘XL::Tree* XL::Types::TypeCoversType(XL::Tree*, XL::Tree*)’:
types.cpp:482:20: warning: unused variable ‘typeCondition’ [-Wunused-variable]
  482 |         if (Infix *typeCondition = IsPatternCondition(pattern))
      |                    ^~~~~~~~~~~~~
types.cpp:633:23: warning: unused variable ‘nval’ [-Wunused-variable]
  633 |             if (Name *nval = pattern->AsName())
      |                       ^~~~
types.cpp: In member function ‘XL::Tree* XL::Types::PatternCoversPattern(XL::Tree*, XL::Tree*, XL::Tree*)’:
types.cpp:726:20: warning: unused variable ‘typeCondition’ [-Wunused-variable]
  726 |         if (Infix *typeCondition = IsPatternCondition(wide))
      |                    ^~~~~~~~~~~~~
[COMPILE 20/29]  utf8_fileutils.cpp                                            
[COMPILE 21/29]  version.cpp                                                   
[COMPILE 22/29]  winglob.cpp                                                   
[GENERATE]       basics_module.cpp                                             
[COMPILE 23/29]  basics_module.cpp                                             
[GENERATE]       io_module.cpp                                                 
[COMPILE 24/29]  io_module.cpp                                                 
[GENERATE]       math_module.cpp                                               
[COMPILE 25/29]  math_module.cpp                                               
[GENERATE]       text_module.cpp                                               
[COMPILE 26/29]  text_module.cpp                                               
[GENERATE]       remote_module.cpp                                             
[COMPILE 27/29]  remote_module.cpp                                             
[GENERATE]       time_functions_module.cpp                                     
[COMPILE 28/29]  time_functions_module.cpp                                     
[GENERATE]       temperature_module.cpp                                        
[COMPILE 29/29]  temperature_module.cpp                                        
[LINK]           libxl.so                                                      
[END]            opt linux in [top]src/[lib]                                   
make[3]: Leaving directory '/home/agarciafdz/r/gh/c3d/xl/src'
[VARIANT]        exe                                                           
make[3]: Entering directory '/home/agarciafdz/r/gh/c3d/xl/src'
[INFO]           Building in interpreter-only mode                             
[BEGIN]          opt linux in [top]src/[exe]                                   
[COMPILE  1/1]   xl.cpp                                                        
[LINK]           xl                                                            
[END]            opt linux in [top]src/[exe]                                   
make[3]: Leaving directory '/home/agarciafdz/r/gh/c3d/xl/src'
[END]            opt linux in [top]src/                                        
make[2]: Leaving directory '/home/agarciafdz/r/gh/c3d/xl/src'
[END]            opt linux in [top]                                            
make[1]: Leaving directory '/home/agarciafdz/r/gh/c3d/xl'

real	1m48.102s
user	1m41.279s
sys	0m6.433s
0 Errors, 4 Warnings in /home/agarciafdz/r/gh/c3d/xl/.logs/build-linux-opt-20231116-201833.log

elviejo79 avatar Nov 17 '23 02:11 elviejo79

I'm trying to make it run on Mac, but I get different issues when compiling:

❯ make COMPILER=none
[BEGIN]          opt macosx-clang in [top]
[BEGIN]          opt macosx-clang in [top]recorder/
[END]            opt macosx-clang in [top]recorder/
[INFO]           Building in interpreter-only mode
[BEGIN]          opt macosx-clang in [top]src/
[VARIANT]        lib
[INFO]           Building in interpreter-only mode
[BEGIN]          opt macosx-clang in [top]src/[lib]
[COMPILE  1/29]  bytecode.cpp
In file included from bytecode.cpp:37:
../include/bytecode.h:88:56: warning: 'override' keyword is a C++11 extension [-Wc++11-extensions]
    Tree *              Evaluate(Scope *, Tree *input) override;
                                                       ^
../include/bytecode.h:89:67: warning: 'override' keyword is a C++11 extension [-Wc++11-extensions]
    Tree *              TypeCheck(Scope *, Tree *type, Tree *val) override;
                                                                  ^
In file included from bytecode.cpp:38:
../include/interpreter.h:57:57: warning: 'override' keyword is a C++11 extension [-Wc++11-extensions]
    Tree *              Evaluate(Scope *, Tree *source) override;
                                                        ^
../include/interpreter.h:58:69: warning: 'override' keyword is a C++11 extension [-Wc++11-extensions]
    Tree *              TypeCheck(Scope *, Tree *type, Tree *value) override;
                                                                    ^
In file included from bytecode.cpp:40:
../include/errors.h:71:38: warning: default template arguments for a function template are a C++11 extension [-Wc++11-extensions]
    template <typename num, typename =
                                     ^
In file included from bytecode.cpp:41:
In file included from ../include/basics.h:43:
./types.h:160:10: warning: scoped enumerations are a C++11 extension [-Wc++11-extensions]
    enum class Decl { NORMAL, C, DATA, BUILTIN };
         ^
In file included from bytecode.cpp:41:
In file included from ../include/basics.h:46:
In file included from ../include/main.h:47:
../include/options.h:158:18: error: no template named 'function' in namespace 'std'
    typedef std::function<void(Option &opt, Options &opts)> Code;
            ~~~~~^
In file included from bytecode.cpp:41:
...

Does it mean the compiler does not support c++11 or something? I tried looking into makefiles but can't find which exact binary is used for compiling

maximvl avatar Apr 01 '24 01:04 maximvl