Comments (8)
So I will work on writing a Makefile for Windows that can be used with nmake.
from selfie.
On Windows we usually use a Linix environment like msys2 and gcc or clang as compiler. For the Visual C++ compiler and PowerShell, you need to install make and modify the Makefile to match the available compiler options.
from selfie.
As promised I created a pull request that might not be perfect, but at least allows selfie to compile using Visual Studio 2017/nmake: #31
Note that one (two?) of the tests currently fail under this configuration. I am not in the position to be able to find the reason for this test failure.
from selfie.
Great! I'm working on this Problem already. It has something to do with the hypster starting on boot level zero.
If your are interested in it, PR #32 fixes this bug on Windows (commit).
from selfie.
If your are interested in it, PR #32 fixes this bug on Windows (commit).
For testing I merged the ChristianMoesl:vpage-size branch with my Makefile.win changes. To make this result reproducable I created a new patch "vpage_win" for this experiment and uploaded it:
(EDIT: also cf. https://github.com/cksystemsteaching/selfie/network).
The results are "interesting":
> selfie.exe -c selfie.c -o selfie3.m -s selfie3.s -y 3 -l selfie3.m -y 2 -l selfie3.m -y 2 -c selfie.c -o selfie4.m -s selfie4.s
now works:
.\selfie.exe: this is selfie compiling selfie.c with starc
.\selfie.exe: 203502 characters read in 7736 lines and 1053 comments
.\selfie.exe: with 108028(53.19%) characters in 31818 actual symbols
.\selfie.exe: 272 global variables, 313 procedures, 456 string literals
.\selfie.exe: 2139 calls, 827 assignments, 71 while, 646 if, 293 return
.\selfie.exe: 132464 bytes generated with 31435 instructions and 6724 bytes of data
.\selfie.exe: 132464 bytes with 31435 instructions and 6724 bytes of data written into selfie3.m
.\selfie.exe: 1322223 characters of assembly with 31435 instructions written into selfie3.s
.\selfie.exe: this is selfie executing selfie3.m with 3MB of physical memory on mipster
selfie3.m: 132464 bytes with 31435 instructions and 6724 bytes of data loaded from selfie3.m
selfie3.m: this is selfie executing selfie3.m with 2MB of physical memory on hypster
selfie3.m: 132464 bytes with 31435 instructions and 6724 bytes of data loaded from selfie3.m
selfie3.m: this is selfie executing selfie3.m with 2MB of physical memory on hypster
selfie3.m: this is selfie compiling selfie.c with starc
selfie3.m: 203502 characters read in 7736 lines and 1053 comments
selfie3.m: with 108028(53.19%) characters in 31818 actual symbols
selfie3.m: 272 global variables, 313 procedures, 456 string literals
selfie3.m: 2139 calls, 827 assignments, 71 while, 646 if, 293 return
selfie3.m: 132464 bytes generated with 31435 instructions and 6724 bytes of data
selfie3.m: 132464 bytes with 31435 instructions and 6724 bytes of data written into selfie4.m
selfie3.m: 1322223 characters of assembly with 31435 instructions written into selfie4.s
selfie3.m: selfie3.m exiting with exit code 0 and 1.39MB of mallocated memory
selfie3.m: this is selfie terminating selfie3.m with exit code 0 and 1.27MB of mapped memory
selfie3.m: selfie3.m exiting with exit code 0 and 7.25MB of mallocated memory
selfie3.m: this is selfie terminating selfie3.m with exit code 0 and 1.66MB of mapped memory
.\selfie.exe: selfie3.m exiting with exit code 0 and 7.25MB of mallocated memory .\selfie.exe: this is selfie terminating selfie3.m with exit code 0 and 2.06MB of mapped memory
.\selfie.exe: profile: total,max(ratio%)@addr(line#),2max(ratio%)@addr(line#),3max(ratio%)@addr(line#) .\selfie.exe: calls: 215690295,65211073(30.30%)@0x3278(~1443),31959586(14.83%)@0x3638(~1486),18694311(8.67%)@0x32D8(~1449) .\selfie.exe: loops: 12426596,3102138(25.00%)@0x1C09C(~7117),2712207(21.83%)@0x129C8(~5120),2633418(21.23%)@0x77FC(~2478) .\selfie.exe: loads: 1644702509,65211073(3.96%)@0x328C(~1443),31959586(1.94%)@0x364C(~1486),31950754(1.94%)@0x36A4(~1489)
.\selfie.exe: stores: 936609332,65211073(6.96%)@0x327C(~1443),31959586(3.41%)@0x363C(~1486),31904127(3.40%)@0x36D8(~1491)
But on the other hand
> selfie.exe -c selfie.c -o selfie5.m -s selfie5.s -min 4 -l selfie5.m -y 2 -l selfie5.m -y 2 -c selfie.c -o selfie6.m -s selfie6.s
will now fail:
.\selfie.exe: this is selfie compiling selfie.c with starc
.\selfie.exe: 203502 characters read in 7736 lines and 1053 comments
.\selfie.exe: with 108028(53.19%) characters in 31818 actual symbols
.\selfie.exe: 272 global variables, 313 procedures, 456 string literals
.\selfie.exe: 2139 calls, 827 assignments, 71 while, 646 if, 293 return
.\selfie.exe: 132464 bytes generated with 31435 instructions and 6724 bytes of data
.\selfie.exe: 132464 bytes with 31435 instructions and 6724 bytes of data written into selfie5.m
.\selfie.exe: 1322223 characters of assembly with 31435 instructions written into selfie5.s
.\selfie.exe: this is selfie executing selfie5.m with 4MB of physical memory on minster
selfie5.m: 132464 bytes with 31435 instructions and 6724 bytes of data loaded from selfie5.m
.\selfie.exe: context selfie5.m throws uncaught page fault at 0x00000581
.\selfie.exe: this is selfie terminating selfie5.m with exit code -8 and 4.00MB of mapped memory
.\selfie.exe: profile: total,max(ratio%)@addr(line#),2max(ratio%)@addr(line#),3max(ratio%)@addr(line#)
.\selfie.exe: calls: 3048,1309(43.10%)@0x3278(~1443),659(21.64%)@0x3638(~1486),399(13.10%)@0x32D8(~1449)
.\selfie.exe: loops: 238,92(38.75%)@0x4F90(~1855),63(26.52%)@0x1140C(~4825),30(12.61%)@0x1AC(~230)
.\selfie.exe: loads: 25040,1309(5.23%)@0x328C(~1443),659(2.63%)@0x364C(~1486),399(1.59%)@0x32F0(~1449)
.\selfie.exe: stores: 13835,1309(9.46%)@0x327C(~1443),659(4.76%)@0x363C(~1486),399(2.88%)@0x32DC(~1449)
NMAKE : fatal error U1077: '.\selfie.exe' : return code '0xfffffff8'
from selfie.
I changed the Makefile in my PR! The command should look like
./selfie -c selfie.c -o selfie5.m -s selfie5.s -min 8 -l selfie5.m -y 2 -l selfie5.m -y 2 -c selfie.c -o selfie6.m -s selfie6.s
This is needed because the page table size in selfie increased dramatically.
from selfie.
I tried it out: This change indeed fixes the problem. In other words: After this patch nmake -f Makefile.win all
ran all through without any abnormalities visible to me. So I merged this into "my" vpage_win branch:
https://github.com/nubok/selfie/commit/e1a67ab479207ef3f21b997677586889cecb0156
from selfie.
We will stay with the the combination of a Unix subsystem (msys2/cygwin) with gcc/clang as toolchain for windows users.
from selfie.
Related Issues (20)
- 11) Virtualization - Introductory Assignments
- Compiler warnings with GCC 10.2.0 HOT 3
- Docker Build on Mac
- Clean up gcc/clang toolchain in Dockerselfie image to support 32-bit and 64-bit x86 and RISC-V HOT 10
- `self-assembler` assignment results in timeout HOT 7
- ELF file integrity
- Grader: Replace `threads` task `shared-heap` with thread-safe task HOT 4
- Suggestion: -Werror when self-grading HOT 7
- `characters of assembly` count in disassembler output is incorrect in `printf` branch HOT 10
- Grader not terminating on plain selfie HOT 4
- Order in list of assignments out of sync HOT 1
- Inconsistent handling of unexpected symbol syntax errors HOT 4
- Compiler warnings with GCC 11.1.0 HOT 4
- Residual files in selfie root directory in the selfie docker image after machine build HOT 1
- Multiplatform AMD64/ARM64 Support HOT 2
- "palloc out of physical memory" problem with changed "make os" HOT 7
- modeler returns "maximum code size exceeded" or "4712 expected between -4096 and 4095" if code size is increased HOT 7
- 32-bit + mipster + self-self-self [+ gc] is failing HOT 1
- Naming the programming language C* causes some confusion HOT 1
- Collisions between student code and Rotor [cc24] HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from selfie.