What is Ralph's purpose of building a fire?
Ralph's main purpose, as pointed out by the previous post, is to build a large fire and use it to signal a ship. He builds a fire on a platform on the mountain and the boys pitch in enthusiastically to help. But they soon tire of dragging wood to the fire and later on when they see a passing ship they realize that the fire has gone out because of inattention.
There is also an incident when the fire gets somewhat out of control at the top of the hill and they fear that one boy, one with freckles, has been lost and killed in the fire as they cannot locate him after coming down.
Ralph suggests building a fire to signal ships.
Ralph's purpose for building a fire is to get help.
He knew the the smoke from the fire would create a signal for help for other boats in the ocean.
He wanted to get off the island (along with others on the island) because he knew troubles were going to come up.
That fire that was burning in the mountain and later on the beach was actually to attract the notice of passing ships near the island as they might be able to rescue the boys from this terrible disaster and escape away from the savagery of some of the clan. It becomes a allusion and a compass of the boys' connection with civilization outside and gives them hope that they can get back to the modern society, and not get stuck in the nomadic past.
Ralph's purpose of building a fire is to give a smoke signal. The smoke signal is the only thing that can get them rescued except by luck.