dibsonthis/Vortex

Failure to compile on PopOS/Linux

electuslipous opened this issue · 4 comments

Info on machine

  • OS: PopOS 22.04 LTS (Ubuntu based)
  • CPU: AMD® Ryzen 7 4700u

Error: Failed to compile compiler
Description:
Cloned the repo as stated in the website, when I ran the command "./build.sh" it threw an error.

My **clang** version:
Ubuntu clang version 14.0.0-1ubuntu1.1
Target: x86_64-pc-linux-gnu
Thread model: posix
InstalledDir: /usr/bin
Found candidate GCC installation: /usr/bin/../lib/gcc/x86_64-linux-gnu/11
Found candidate GCC installation: /usr/bin/../lib/gcc/x86_64-linux-gnu/12
Selected GCC installation: /usr/bin/../lib/gcc/x86_64-linux-gnu/12
Candidate multilib: .;@m64
Selected multilib: .;@m64
**Error log**
Building on Linux...
Compiling Vortex...
mkdir: cannot create directory ‘/home/<USERNAME>/compilers/Vortex/bin/build/interp’: No such file or directory
mkdir: cannot create directory ‘/home/<USERNAME>/compilers/Vortex/bin/build/interp/linux’: No such file or directory
In file included from /home/<USERNAME>/compilers/Vortex/src/Interpreter/Interpreter.cpp:2:
In file included from /home/<USERNAME>/compilers/Vortex/src/Interpreter/Utilities/operations.hpp:3:
/home/<USERNAME>/compilers/Vortex/src/Interpreter/Utilities/types.hpp:66:13: error: use of undeclared identifier 'sort'
            sort(reduced->_Node.List().elements.begin(), reduced->_Node.List().elements.end(), 
            ^
1 error generated.
In file included from /home/<USERNAME>/compilers/Vortex/src/Typechecker/Typechecker.cpp:2:
In file included from /home/<USERNAME>/compilers/Vortex/src/Typechecker/Utilities/operations.hpp:3:
/home/<USERNAME>/compilers/Vortex/src/Typechecker/Utilities/types.hpp:62:13: error: use of undeclared identifier 'sort'
            sort(reduced->_Node.List().elements.begin(), reduced->_Node.List().elements.end(), 
            ^
1 error generated.
compilation failed

Hey @electuslipous I've been working on Linux support and I've got it working on my Ubuntu system.

System info:

Distributor ID:	Ubuntu
Description:	Ubuntu 20.04.6 LTS
Release:	20.04

Clang++:

clang version 10.0.0-4ubuntu1 
Target: x86_64-pc-linux-gnu
Thread model: posix
InstalledDir: /usr/bin
Found candidate GCC installation: /usr/bin/../lib/gcc/x86_64-linux-gnu/11
Found candidate GCC installation: /usr/bin/../lib/gcc/x86_64-linux-gnu/9
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/11
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/9
Selected GCC installation: /usr/bin/../lib/gcc/x86_64-linux-gnu/11
Candidate multilib: .;@m64
Selected multilib: .;@m64

You will need to have libc++ installed in your system because that's what it links to.

Running ./build should now compile properly. You may get some linking errors when compiling the modules (which would require you to download some libs -- but most core .so files are included in the modules so they should be portable).

Let me know how it goes!

I've also added the pre-compiled Linux binaries into the latest release and added support to download them directly to set up a scaffold: https://github.com/dibsonthis/vortex-dist

Feel free to try that out also.

@electuslipous let me know once this issue is good to close 🔐.

Issue fixed for me here. I did have to install libc++ again but once done, it was perfect!
Will start working on using vortex as a backend lang!