<span>Hi</span><div><br></div><div>About the first problem I'm not sure.</div><div><br></div><div>About the second problem, that assert is designed so that you can't compile in a 64 bit architecture. Basically it compares the size of the ioreq_event struct with a certain value, but in 64 bits this comparison is 0. So, when the assert is called, it is called as "switch(0) case 0: case 0"  (two case 0), which is a compile time error (duplicate case value). There is a guide for compiling in 64 bit, but I don't have it right now. I can send it to you tomorrow if you're not in a hurry =D</div>

<div><br></div><div>Hope this helps!</div><div><br></div><div>- Rick</div><br><div class="gmail_quote">2012/3/27 Qingpeng Niu <span dir="ltr"><<a href="mailto:niuqingpeng@gmail.com" target="_blank">niuqingpeng@gmail.com</a>></span><br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi<div><div>My gcc version is 4.6.1 and my bison version is 2.4.1. </div><div>When do make in Disksim main folder. There will be two main problems need to fix. <br>

<div>1 Some math library can not be found due to library dependency on math library.</div>
<div><br></div><div>Solution Search LDFLAGS in each Makefile and put -lm at the end of LDFLAGS or link sequence.</div><div>Change src/Makefile</div><div>LDFLAGS = <b>-lm -L</b>.  -ldisksim $(DISKMODEL_LDFLAGS) $(MEMSMODEL_LDFLAGS) \</div>


<div>                            $(LIBPARAM_LDFLAGS) $(LIBDDBG_LDFLAGS) </div><div>to</div><div>LDFLAGS = -ldisksim $(DISKMODEL_LDFLAGS) $(MEMSMODEL_LDFLAGS) \</div><div>                            $(LIBPARAM_LDFLAGS) $(LIBDDBG_LDFLAGS) <b>-lm -L. </b> </div>


<div><br></div><div>Change memsmodel/Maefile</div><div>$(CC) -o $@ mems_seektest.o <b>$(LDFLAGS)</b> $(CFLAGS) -lmems_internals</div><div>to</div><div>$(CC) -o $@ mems_seektest.o $(CFLAGS) -lmems_internals <b>$(LDFLAGS)</b></div>


<div><b><br></b></div><div><div>2 src/disksim_iosim.c:712:4: error: duplicate case value<div>disksim_iosim.c:712:4: error: previously used here</div><div>Due to StaticAssert (sizeof(ioreq_event) <= DISKSIM_EVENT_SIZE);</div>


<div>Where<b> #define StaticAssert(c) switch (c) case 0: case (c): </b></div><div>What is the meaning of this StaticAssert.  </div><div>I do not understand the meaning of this assert. If c is 0, because there is no break, it will still go to case(c). If c is not 0, it directly go to case(c). </div>


<div>It sounds to me this is totally no use. </div><div>So just comment it. Then everything works fine and compile successful. </div><div><br></div><div>Is this actually a code bug?</div><div>Hopes developer can fix this in Makefile and disksim_iosim.c if this is a code bug. </div>

<span><font color="#888888">
-- <br>Qingpeng Niu<br>Department of Computer Science and Engineering at OSU <br>
</font></span></div></div></div></div>
<br>_______________________________________________<br>
Disksim-users mailing list<br>
<a href="mailto:Disksim-users@ece.cmu.edu" target="_blank">Disksim-users@ece.cmu.edu</a><br>
<a href="https://sos.ece.cmu.edu/mailman/listinfo/disksim-users" target="_blank">https://sos.ece.cmu.edu/mailman/listinfo/disksim-users</a><br>
<br></blockquote></div><br>