fadhilkurnia/ssdsim

[Resolved] multiple definition of `ac_timing'

Opened this issue · 0 comments

Machine Config:
gcc version 12.2.1 20221121 (Red Hat 12.2.1-4) (GCC)
Linux 6.0.9-300.fc37.x86_64

While compiling (using 'make') getting the following error:

/usr/bin/ld: flash.o: initialize.h:168: multiple definition of ac_timing'; /usr/bin/ld: pagemap.o:initialize.h:168: multiple definition of ac_timing';
collect2: error: ld returned 1 exit status
make: *** [Makefile:14: ssd] Error 1

However, the issue was resolved using the following code change:
In initialize.h at line 133
struct ac_time_characteristics{
change to
extern struct ac_time_characteristics{

The contributors in the main repo may do the same code change. Because without this change, code may not work on Linux machines with the latest gcc compiler.