[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#731806: debian-installer: FTBFS on sparc: genisoimage errors



Le 28/04/2014 13:20, Thomas Schmitt a écrit :

[genisoimage]
(gdb) x rpnt
0x1ea7f9:    0x00000000
(gdb) x lpnt
0x1e9dc1:    0x01000000
(gdb) n
659        if (strcmp(rpnt, lpnt) == 0) {
Both values match the prescribed names for "." and ".." in ECMA-119
(aka ISO 9660), 6.8.2.2 Identification of directories:
Single byte 0x00 is ".", single byte 0x01 is "..".
Ok, I got the bug nailed.
Here's a sample session from my sparc:
----------
cat  test_strcmp.c<<EOF
#include <stdio.h>
#include <stdlib.h>

void main(void) {
  char stra[2];
  char strb[2];
  int result = 0;

  stra[0] = 0;
  stra[1] = 0;
  strb[0] = 1;
  strb[1] = 0;

  result = strcmp(stra,strb);

  printf("result from strcmp('\\0000','\\0001' is %d)\n",result);
  exit(0);
}
EOF
gcc -o test_strcmp test_strcmp.c
./test_strcmp
result from strcmp('\0000','\0001' is 0)
----------

Here's the same sample from my intel workstation:
----------
gcc -o test_strcmp test_strcmp.c
./test_strcmp
result from strcmp('\0000','\0001' is -1)
----------

Typicaly, an endianness error.

If I apply this patch on cdrkit:
--- genisoimage/write.c    2014-04-28 13:31:28.103571175 +0200
+++ genisoimage/write.c.new    2014-04-28 13:31:07.255433923 +0200
@@ -656,7 +656,7 @@
 #endif    /* APPLE_HYB */

     /* If the entries are the same, this is an error. */
-    if (strcmp(rpnt, lpnt) == 0) {
+    if (strcmp(rpnt, lpnt) == 0 && rpnt[0] == lpnt[0]) {
 #ifdef    USE_LIBSCHILY
         errmsgno(EX_BAD,
             "Error: '%s' and '%s' have the same ISO9660 name '%s'.\n",

Then the iso is correctly generated.

I'll file a bug with cdrkit. I think that genisoimage with that test is unable to generated any iso at all on big endian machines.
So, strcmp shouldn't have yielded 0 when comparing the strings.
Can this be caused by alignment problems ?
Nope.


Hum, unfortunately, valgrind is not available for sparc.
Then gdb will have to do.


xorriso is the one compiled from isoburn. I tried with the one from the
archive, and the one rebuild from source with a debbuild.
Same problem on both.
If you also built libisofs and libburn from source, then this burries
my theory of a binary incompatibility between two SPARC machines.

I'm compiling at this moment the vanilla xorriso from gnu.
Let's see what it yields.
It has the same source as the three library tarballs used as input
for Debian's xorriso. Only difference is that GNU xorriso brings
own copies of the library source code and links it statically with
the xorriso main program.
So it can be easily tested without interfering with installations
of the libraries. (And with no need for superuser privileges.)
I filed a bug with xorriso. Waiting for the number to show up.


Have a nice day :)

Thomas


You too ; ).

Seb


Reply to: