Pare, core and slice the pears in large pieces, crosswise; add sugar and let stand over night. Drain off the liquid and let boil to a syrup, about 12 minutes, then add pears and the rest of ingredients, breaking the walnuts into pieces, about the size of the raisins.
Let cook slowly until thick and clear, one hour or more. Place in jars or cans. Cover well.