The condensation of piperonylamine (I) with dihydroxyacetone dimer (II) in the presence of potassium thiocyanate produced the mercaptoimidazole (III), which was desulfurized upon treatment with nitric acid and sodium nitrite. The resulting (hydroxymethyl)imidazole (IV) was then converted to the corresponding chloride (V) employing thionyl chloride in chloroform.
Horner-Emmons condensation of 1-naphthaldehyde (VI) with triethyl phosphonoacetate (VII) using DBU as the base afforded naphthylacrylate (VIII). This was reacted with tosylmethylisocyanide and potassium tert-butoxide to produce pyrrole (IX). Hydrolysis of the ester group of (IX) with KOH gave rise to the carboxylic acid (X), which was coupled with N-methylpiperazine (XI) employing EDC and HOBt or, alternatively, by previous conversion to the corresponding acid chloride with SOCl2. The resulting amide (XII) was finally alkylated at the pyrrole N atom with chloride (V) in the presence of NaH.