mario
mario

Reputation: 624

Make, Syntax of Static Pattern Rules, error " *** target pattern contains no '%'. Stop. "

I am trying to build mysql-workbench from source (for a 32 bit Fedora 22). After many attempts and fixes, I got the following error:

plugins/migration/CMakeFiles/wbcopytables-bin.dir/build.make:163: *** target pattern contains no '%'.  Stop.

Line build.make:163 is

plugins/migration/wbcopytables-bin: /bin/sh:\ /root/linux-res-6.3/usr/bin/iodbc-config:\ No\ such\ file\ or\ directory

Do you see any typo, with respect to Make and its syntax of Static Pattern Rules? Or am I on a complete wrong track?

Also, is there a way to check corrections of line 163 without to build the entire .rpm (which takes almost 1h)?

m.

Upvotes: 0

Views: 4092

Answers (1)

kbulgrien
kbulgrien

Reputation: 4518

As there is not enough information given in the question, this answer is given on the grounds that it is easy to reproduce the error message in a way that appears to emulate what line 168 has in it.

Given a Makefile that contains a construct something this:

this: that: somethingelse:
        echo the stuff

The error message in the question results:

$ make this
Makefile:1: *** target pattern contains no `%'.  Stop

And further, since the line 168:

plugins/migration/wbcopytables-bin: /bin/sh:\ /root/linux-res-6.3/usr/bin/iodbc-config:\ No\ such\ file\ or\ directory

looks an awful lot like:

this: that: somethingelse:

build.make rather seems to have been generated by some script that encountered an error and output:

/bin/sh: /root/linux-res-6.3/usr/bin/iodbc-config: No such file or directory

It would further appear that said script probably for some reason redirected stderr onto stdout or whatever file descriptor was being used to generate build.make, with the result being that the generated file was so damaged as to produce this error.

Of course, all this presupposes much and the question provides far too little contextual information, but certainly this explanation seems plausible.

In a real Makefile, one would correct the situation by removing the colons from all but the final target name, but the OP's file is apparently compromised since it is most improbable that the error message was ever intended to be a target name.

Upvotes: 2

Related Questions