Hello @ all,
I try to compile flashrom on my older Suse Distro 8.2 with Kernel 2.4.20 and gcc 3.3 Suse Prerelease, but it fails because of the -Werror Flag.
e.g flashrom_enable.c line 408 and 417 warning: comparison between signed and unsigned ... bla, bla
breaks the process.
If I delete -Werror in the makefile. flashrom is build, but with many warnings shown below in mostly each file to compile.
Also, flashrom doesn't work for me, I get an error
"LinuxBios Table not found"
and then a
Segmention Fault
What goes wrong? Is my gcc version to old? pciutils are installed.
regards Chris
Also, flashrom doesn't work for me, I get an error
"LinuxBios Table not found"
and then a
Segmention Fault
Do you have a linuxbios table in your image?
What goes wrong? Is my gcc version to old? pciutils are installed.
Not too old but perhaps too new. Try 3.2 or 2.95 and see if you get the same results.
-- Richard A. Smith
* Christian Sühs chris@suehsi.de [051214 17:21]:
Hello @ all,
I try to compile flashrom on my older Suse Distro 8.2 with Kernel 2.4.20 and gcc 3.3 Suse Prerelease, but it fails because of the -Werror Flag.
e.g flashrom_enable.c line 408 and 417 warning: comparison between signed and unsigned ... bla, bla
flashrom_enable.c: 394: int i; 408: for (i = 0; i < sizeof(mbenables) / sizeof(mbenables[0]); i++) { 417: for (i = 0; i < sizeof(enables) / sizeof(enables[0]) && (!dev);
sizeof is defined unsigned and i is signed. I wonder why this is no error with later compilers anymore. Can you make i unsigned int in line 394 and see if the code compiles then your compiler?
If I delete -Werror in the makefile. flashrom is build, but with many warnings shown below in mostly each file to compile.
can you send me a complete log of the warnings?
I suggest to update to a newer SUSE version. The problems will likely vanish.
Also, flashrom doesn't work for me, I get an error
"LinuxBios Table not found"
and then a
Segmention Fault
Can you try to run the code in gdb to see where it segfaults? You need to change -Os to -O -g
Stefan
sizeof is defined unsigned and i is signed. I wonder why this is no error with later compilers anymore. Can you make i unsigned int in line 394 and see if the code compiles then your compiler?
Ok, at the moment I try this. Changed line 394 in unsigned i and the compiler goes to the next c files, the next problem is in jedec.c line 190 comparison bla, bla. changed line 188 in unsigned i and the compiler goes to the next. than comparison bla, bla in sst28sf040.c line 88 changed line 86 in unsigned i and so on.
I will change each line who is a comparison failure, I think there are a lot more :D
can you send me a complete log of the warnings?
I send you a list of each line in the c files which results in an error (warning)
Can you try to run the code in gdb to see where it segfaults? You need to change -Os to -O -g
later :D i have saved an unworking version.
Stefan
* Christian Sühs chris@suehsi.de [051215 22:40]:
can you send me a complete log of the warnings?
I send you a list of each line in the c files which results in an error (warning)
Ah :-) If you are fixing it for your gcc 3.3, you're of course welcome to send an "svn diff" output as well :-)
Can you try to run the code in gdb to see where it segfaults? You need to change -Os to -O -g
later :D i have saved an unworking version.
No hurry ;-)
Stefan
Stefan Reinauer schrieb:
- Christian Sühs chris@suehsi.de [051215 22:40]:
can you send me a complete log of the warnings?
I send you a list of each line in the c files which results in an error (warning)
Ah :-) If you are fixing it for your gcc 3.3, you're of course welcome to send an "svn diff" output as well :-)
Ok, no errors or warnings with gcc 3.3 Suse prerelease with following changes:
flashrom_enable.c change int i to unsigned int i in line 394 jedec.c change int i to unsigned i in line 188
same for sst28sf040.c line 86, am29f040b.c line 54, 82802ab.c line 154, sst_fwhub.c line 83,
lbtable.c change static int to static unsigned int in line 55 for count_lb_records(...),
flash_rom.c change unsigned long size to long size in line 47
the tool seems to work, currently I can't test it properly. The change in the last file could be make complications, but getpagesize() returns int ...