PURPOSE: This phase I/II trial is studying the side effects and best dose of giving imatinib mesylate together with gemcitabine and to see how well they work in treating patients with locally advanced, metastatic, or recurrent pancreatic cancer.