[Disksim-users] building Disksim-4.0 issues

Qingpeng Niu niuqingpeng at gmail.com
Tue Mar 27 17:17:22 EDT 2012


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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.andrew.cmu.edu/pipermail/disksim-users/attachments/20120327/4885bb67/attachment.html>


More information about the Disksim-users mailing list