I am not that familiar with Linux; less with Mac. I was looking at the source code (self-master) and I have a few questions (using any\regs.hh as an example): 1) # include "_regs_pd.hh.incl": where is this file located? 2) Where is the definition for the data type Location at?
Also, is there a command line version of Self? If so, how do I build it? Or better, do you have a Linux binary for it?
I have been able to get the Ubuntu Bash console running on my Windows 10 machine, and have compiled small programs in it. If you had a Linux binary executable that was only a command line version, I believe I could run it.
I have already tried to build my own on Windows 10 but have been getting errors on the build. I was able to Git self and do "cmake .": drwxr-xr-x 0 pslm pslm 4096 Nov 30 18:41 ../ -rw-rw-rw- 1 pslm pslm 26573 Nov 30 18:41 ChangeLog.md -rw-rw-rw- 1 pslm pslm 18094 Dec 1 19:23 CMakeCache.txt drwxrwxrwx 0 pslm pslm 4096 Dec 1 19:24 CMakeFiles/ -rw-rw-rw- 1 pslm pslm 1545 Dec 1 19:23 cmake_install.cmake -rw-rw-rw- 1 pslm pslm 620 Nov 30 18:41 CMakeLists.txt -rw-rw-rw- 1 pslm pslm 1704 Dec 1 19:23 configureVmDate.cmake drwxrwxrwx 0 pslm pslm 4096 Nov 30 18:41 controller/ drwxrwxrwx 0 pslm pslm 4096 Nov 30 18:42 docs/ drwxrwxrwx 0 pslm pslm 4096 Dec 1 19:23 .git/ -rw-rw-rw- 1 pslm pslm 126 Nov 30 18:41 .gitignore drwxrwxrwx 0 pslm pslm 4096 Nov 30 18:42 historical/ -rw-rw-rw- 1 pslm pslm 126775 Dec 1 19:23 includeDB drwxrwxrwx 0 pslm pslm 4096 Nov 30 18:42 legal/ -rw-rw-rw- 1 pslm pslm 8730 Dec 1 19:23 Makefile drwxrwxrwx 0 pslm pslm 4096 Nov 30 18:42 objects/ -rw-rw-rw- 1 pslm pslm 989 Nov 30 18:42 readme.md drwxrwxrwx 0 pslm pslm 4096 Nov 30 18:42 release/ drwxrwxrwx 0 pslm pslm 4096 Dec 1 19:23 tools/ -rw-rw-rw- 1 pslm pslm 820 Nov 30 18:41 .travis.yml drwxrwxrwx 0 pslm pslm 4096 Dec 1 19:23 vm/ pslm@DESKTOP-GVA5CBU:~/self$ cmake . -- Preparing for Linux on i386 -- Preparing Self VM 2017.1.13 (build 2017.1) -- Using X11 plaform windows. -- Configuring for build level optimized -- Configuring done -- Generating done -- Build files have been written to: /home/pslm/self
This is where I get the error: pslm@DESKTOP-GVA5CBU:~/self$ cmake --build . [ 0%] Building CXX object vm/CMakeFiles/makeDeps.dir/build_support/makeDeps.cpp.o In file included from /home/pslm/self/vm/build_support/makeDeps.cpp:61:0: /usr/include/c++/5/new:39:28: fatal error: bits/c++config.h: No such file or directory compilation terminated. vm/CMakeFiles/makeDeps.dir/build.make:62: recipe for target 'vm/CMakeFiles/makeDeps.dir/build_support/makeDeps.cpp.o' failed make[2]: *** [vm/CMakeFiles/makeDeps.dir/build_support/makeDeps.cpp.o] Error 1 CMakeFiles/Makefile2:93: recipe for target 'vm/CMakeFiles/makeDeps.dir/all' failed make[1]: *** [vm/CMakeFiles/makeDeps.dir/all] Error 2 Makefile:83: recipe for target 'all' failed make: *** [all] Error 2
NOTE: I have already downloaded the Ncurses and X development libraries; was able to fix those errors.
Thanks, Richard Green
On Sun, Dec 3, 2017 at 2:03 AM, pslmsngr@gmail.com [self-interest] self-interest@yahoogroups.com wrote:
- # include "_regs_pd.hh.incl": where is this file located?
Building the source has a code generation step where it looks at dependencies in the C++ files and generates optimal ".incl" files containing header includes. If you're thinking of doing a port you might like to try the 'remove_makedeps' branch. This removes this code generation step and uses normal file includes.
I have a GNU Makefile that I've used in the past for building, before CMake integration was done, that might give you an idea of what files are needed for building:
https://github.com/doublec/self/blob/master/Makefile.linux
- Where is the definition for the data type Location at?
It is in vm/src/i386/asm/regs_i386.hh as an 'enum' and probably in the other CPU backends.
Also, is there a command line version of Self? If so, how do I build it? Or better, do you have a Linux binary for it?
The build process builds the Self VM, which is command line. From there you build a self image (that's what "'worldBuilder.self' _RunScript" does) which will produce an image that runs the command line and optionally the gui. You would run it as:
cd objects ../vm/Self # ...enter commands here...
it can be run headless this way on a server.
I have been able to get the Ubuntu Bash console running on my Windows 10 machine, and have compiled small programs in it. If you had a Linux binary executable that was only a command line version, I believe I could run it.
Try: http://www.cd.pn/self_linux.zip
Unzip that and there is a "Self" linux executable. It has the following dynamic dependencies:
linux-gate.so.1 => (0xf7769000) libpthread.so.0 => /lib/i386-linux-gnu/libpthread.so.0 (0xf72e0000) libX11.so.6 => /usr/lib/i386-linux-gnu/libX11.so.6 (0xf7195000) libXext.so.6 => /usr/lib/i386-linux-gnu/libXext.so.6 (0xf7180000) libtinfo.so.5 => /lib/i386-linux-gnu/libtinfo.so.5 (0xf715d000) libdl.so.2 => /lib/i386-linux-gnu/libdl.so.2 (0xf7158000) libstdc++.so.6 => /usr/lib/i386-linux-gnu/libstdc++.so.6 (0xf6fd8000) libm.so.6 => /lib/i386-linux-gnu/libm.so.6 (0xf6f82000) libgcc_s.so.1 => /lib/i386-linux-gnu/libgcc_s.so.1 (0xf6f64000) libc.so.6 => /lib/i386-linux-gnu/libc.so.6 (0xf6da8000) /lib/ld-linux.so.2 (0x565f9000) libxcb.so.1 => /usr/lib/i386-linux-gnu/libxcb.so.1 (0xf6d82000) libXau.so.6 => /usr/lib/i386-linux-gnu/libXau.so.6 (0xf6d7e000) libXdmcp.so.6 => /usr/lib/i386-linux-gnu/libXdmcp.so.6 (0xf6d77000)
It would probably be possible to build one without the X lib dependencies. Let me know if that's useful.
pslm@DESKTOP-GVA5CBU:~/self$ cmake --build . [ 0%] Building CXX object vm/CMakeFiles/makeDeps.dir/build_support/makeDeps.cpp.o In file included from /home/pslm/self/vm/build_supp ort/makeDeps.cpp:61:0: /usr/include/c++/5/new:39:28: fatal error: bits/c++config.h: No such file or directory
Definitely try the "remove_makedeps" branch. This will avoid that pain.
Thanks for looking into Windows support, that'd be a great contribution.
self-interest@lists.selflanguage.org