OPINION OP THE COURT
In May, 1920, Frank Tomei, one of appellants, was the owner of certain real estate in Albuquerque. William Kreugel, the other appellant, held a contract for the purchase of the property, or, as expressed in the complaint and admitted in the answer, “was the prospective owner under a conditional sale contract.” Kreugel employed appellees to make some alterations and repairs in the building on the property. Tomei was not a party to the contract. Ap-pellees did the work and furnished the materials necessary for these repairs; and, not having been paid in full, filed their claim of lien in the office of the county clerk of Bernalillo county. This proceeding was commenced to enforce the lien. The prayer was for personal judgment against each of the appellees and for a sale of the property to satisfy the amount found due. The court entered judgment determining the amount due, declared it to be a lien against, the interests of both appellants in the premises, and ordered a sale. No personal judgment was rendered, but the court reserved the right to enter judgment against Kreugel for any deficiency remaining after application of the proceeds of the sale.
*26  When the claim of lien filed with the county clerk was offered in evidence, appellants objected, because no copy of it was attached to the complaint, basing their objection -upon section 4146, Code 1915, which provides that, when any written instrument upon which the action is founded is referred to in the pleadings, the original or a copy shall be filed with the pleading, in default of which, or of sufficient reason for the failure, the instrument shall not be admitted. The trial court held that the action was not founded upon this instrument and the statute did not apply. This ruling was correct. That a claim of lien be prepared and filed is an essential requisite under the statute (Texas, Santa Fé & N. R. Co. v. Orman, 3 N. M. 652, 9 Pac. 595), but it is by no means the foundation of the lien nor of an action commenced to enforce it. The lien is really founded upon the doing of the work or the furnishing of the material; the language of the statute, section 3319, being that every person performing labor upon or furnishing materials to be used has a lien for the work done or materials furnished. The filing of the claim under section 3323 is a step absolutely required to perfect the lien, but it does not itself constitute the lien, nor is the lien founded upon it. The failure to attach a copy to the complaint did not prevent its admission in evidence.
[¡2] It is next contended that the complaint does not state a cause of action against the appellant Frank Tomei, neither the pleadings nor proof showing that his interest in the property was or could be affected by what Kreugel may have done. But appellant has assigned no such error, and consequently the matter is not properly before us.
 The claim of lien filed by appellees contained the following statements:
“Cash payments from time to time as the work progressed, terms to be cash upon the final completion of the work, all work to be done at cost of materials and labor, plus 10 per cent profit,” etc.
*27The court found:
“That the defendant was to make payments to the plaintiffs for the labor and material furnished on the cost plus 10 per cent basis as the time progressed and was to make a substantial payment at the time of the completion of the work and each month thereafter.”
There is a slight variance between the statement of the lien as to the time of payments and the proof as summarized in the court’s finding. The statement is, however, substantially correct. Only substantial compliance with the statute is required. Minor v. Marshall, 6 N. M. 194, 27 Pac. 481; Post v. Miles, 7 N. M. 317, 323, 34 Pac. 586; Ford v. Springer Land Ass’n, 8 N. M. 37, 47, 41 Pac. 541; Genest v. Las Vegas Masonic Bldg. Ass’n, 11 N. M. 251, 269, 67 Pac. 743.
The primary object of filing the claim is to give notice to subsequent purchasers and incumbrancers and inform the owner of the extent and nature of the lienor’s claim. The variance between the notice of lien and the proof is so unimportant that it cannot vitiate the lien.
 Appellant argues that there was no proof to support either the statement in the notice of lien or the finding by the court that the work was to be done on a basis of cost plus ten per cent. There is no specific evidence of such an agreement, but nevertheless it is deducible from other facts. There was testimony that the understanding was that the work was to be done on a percentage basis, the exact percentage not being discussed. If this were true, it amounted to an agreement to charge cost plus the reasonable or customary percentage. There was 'some evidence to the effect that this was 10 per cent. The legal effect of the understanding therefore was in accordance with the statement in the claim of lien and the finding of the court.
For the reasons stated, the judgment will be affirmed, and it is so ordered.
RAYNOLDS, C. J., and PARKER, J., concur.