[Disksim-users] building Disksim-4.0 issues

Ricardo Rey ricardoreyyy at gmail.com
Tue Mar 27 18:01:50 EDT 2012


Hi

About the first problem I'm not sure.

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

Hope this helps!

- Rick

2012/3/27 Qingpeng Niu <niuqingpeng at gmail.com>

> Hi
> My gcc version is 4.6.1 and my bison version is 2.4.1.
> When do make in Disksim main folder. There will be two main problems need
> to fix.
> 1 Some math library can not be found due to library dependency on math
> library.
>
> Solution Search LDFLAGS in each Makefile and put -lm at the end of LDFLAGS
> or link sequence.
> Change src/Makefile
> LDFLAGS = *-lm -L*.  -ldisksim $(DISKMODEL_LDFLAGS) $(MEMSMODEL_LDFLAGS) \
>                             $(LIBPARAM_LDFLAGS) $(LIBDDBG_LDFLAGS)
> to
> LDFLAGS = -ldisksim $(DISKMODEL_LDFLAGS) $(MEMSMODEL_LDFLAGS) \
>                             $(LIBPARAM_LDFLAGS) $(LIBDDBG_LDFLAGS) *-lm
> -L. *
>
> Change memsmodel/Maefile
> $(CC) -o $@ mems_seektest.o *$(LDFLAGS)* $(CFLAGS) -lmems_internals
> to
> $(CC) -o $@ mems_seektest.o $(CFLAGS) -lmems_internals *$(LDFLAGS)*
> *
> *
> 2 src/disksim_iosim.c:712:4: error: duplicate case value
> disksim_iosim.c:712:4: error: previously used here
> Due to StaticAssert (sizeof(ioreq_event) <= DISKSIM_EVENT_SIZE);
> Where* #define StaticAssert(c) switch (c) case 0: case (c): *
> What is the meaning of this StaticAssert.
> 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).
> It sounds to me this is totally no use.
> So just comment it. Then everything works fine and compile successful.
>
> Is this actually a code bug?
> Hopes developer can fix this in Makefile and disksim_iosim.c if this is a
> code bug.
>  --
> Qingpeng Niu
> Department of Computer Science and Engineering at OSU
>
> _______________________________________________
> Disksim-users mailing list
> Disksim-users at ece.cmu.edu
> https://sos.ece.cmu.edu/mailman/listinfo/disksim-users
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.andrew.cmu.edu/pipermail/disksim-users/attachments/20120327/3e1496ac/attachment.html>


More information about the Disksim-users mailing list