let library lnk =
  try Kmap.find lnk !extern
  with Not_found ->
    let eid = create lnk in
    extern := Kmap.add lnk eid !extern ; eid