When it comes to binding two items together, it's hard to beat modern adhesives. Duct tape, Cyanoacrylate superglue, two-part epoxy, and even construction adhesives like Liquid Nails can be indispensable for repairing gear and crafting useful items in a survival situation. If you're in a long-term survival scenario, these resources will be limited and will inevitably run out. Even if the situation isn't dire, you may find yourself with a need for glue, and no modern adhesives on hand. Improvising an adhesive from the resources around you is a valuable skill.
One time-tested source of adhesive in nature is pine resin, also called pine sap. This substance is naturally sticky and viscous, but can be transformed into an excellent glue through careful application of heat and a temper material. The heat liquefies the resin, and the temper thickens and strengthens it into a pliable yet sticky gel.
The basic steps to making pine resin glue are as follows. First, find some suitable trees. Pine is used in this example, but other evergreen conifers such as spruce, fir, or cedar can work as well. Look for sap running down the bark. It should be thick and tacky, but not completely solidified. Use a stick to scrape this resin into a metal tin.
Once you have a substantial amount of resin, you'll also need a temper material. Crushed charcoal powder is frequently used, but finely-ground dry grass or even pulverized rabbit droppings can be substituted. Heat the tin of resin over hot coals, and stir the resin frequently until thoroughly liquefied, gradually adding temper material until the desired consistency is reached. Just don't boil the glue, as this may cause it to become brittle.
The following video from Primitive Pathways demonstrates this technique, and gives other helpful tips:
These primitive pine resin glue sticks provide an easy way to transport and store adhesive in usable amounts. When you need some glue, just hold one of these sticks over the fire until it softens, and brush or dab it onto a surface to apply it. It may not be super glue or JB-Weld, but it's the next best thing — and it won't cost you a dime.