Preheat oven to 350° F. and grease an 8- by 8-in. baking pan. Melt butter and let cool. Whisk together flour, cinnamon, ginger, nutmeg, cloves, salt, and brown sugar. Stir in oats, raisins (if using), and pecans, then stir in melted butter.
Toss apricots with lemon juice and granulated sugar and spread in baking pan. Squeeze topping into shaggy chunks and scatter over apricots. Bake until bubbling, 40 to 50 minutes; cool at least 30 minutes, and serve with vanilla ice cream.
Notes: If using supermarket apricots, cut each into quarters, increase lemon juice to 2 tablespoons and granulated sugar to 1/2 cup, and mix a pinch each of cinnamon, ginger, and nutmeg into the fruit before baking.
Please Note: Nutritional values listed may vary from final results depending on actual measurements and brands used to prepare the recipe.