1. The boy is ten years old.

2. He is a ten-year-old boy.

3. The building is ten meters tall.
4. The building is ten meters high.

5. It is a ten-meter-tall building.
6. It is a ten-meter-high builing.
7. It is a ten-meter building.
(Which ones are grammatical?)

They all are correct. Seven could also mean it's ten meters wide or deep, not necessarily tall, though. It's not specific as the others are.

All of the sentences you provided are grammatically correct. However, the choice between using "tall" or "high" depends on the specific context and meaning you want to convey.

1. The boy is ten years old.
2. He is a ten-year-old boy.
Both sentences are grammatically correct. Sentence 1 simply states the boy's age, while sentence 2 adds more emphasis on the fact that he is specifically ten years old.

3. The building is ten meters tall.
4. The building is ten meters high.
Both sentences are grammatically correct and mean the same thing. They describe the vertical measurement of the building, either in terms of height (high) or how far it reaches vertically (tall).

5. It is a ten-meter-tall building.
6. It is a ten-meter-high building.
Both sentences are grammatically correct and convey the same meaning. They describe the building's measurement in terms of height, using either "tall" or "high" to indicate the vertical dimension.

7. It is a ten-meter building.
This sentence is grammatically correct, but it does not provide information about the height or tallness of the building. It simply states that the building's overall length, width, or depth (or all three combined) is ten meters.