fatal error: Imake.tmpl: No such file or directory

I get this error while trying to build xless for Fedora. I found these possible explanations: imake Frequently Asked Questions

I think 1 and 3 can be excluded:

  • I don’t call imake directly but use xmkmf (1)
  • The configuration files are present in /usr/share/X11/config (3). I did look for them in a previous attempt by adding this before xmkmf:
find /usr/share/X11/config

What about the second explanation?

You’re using a bootstrapper, but it’s misconfigured. Bootstrappers typically pass one or more -Idir arguments to imake to tell it where the configuration files are located. If the bootstrapper doesn’t pass the correct location(s), imake won’t find the files. To fix this, you need to take a look at your bootstrapper (it’s probably a script and can be examined using a text editor), and change the location(s) that it passes to imake.

https://build.opensuse.org/package/show?package=xless&project=home%3Aplease_try_again%3AFedora

Hi,

You can’t use imake directly but use xmkmf then make.

I look through your build log:

Imakefile.c:34:0: fatal error: Imake.tmpl: No such file or directory

According to the first link you provided, I debug that temporary file. the 34 line is(and always will be):


32 #define INCLUDE_IMAKEFILE <Imakefile>
33 #define IMAKE_TEMPLATE "Imake.tmpl"
34 #include IMAKE_TEMPLATE

It means it can’t find Imake.tmpl.

In openSUSE, the solution is pretty easy.

add “BuildRequires: imake” and “BuildRequires: xorg-cf-files” for 12.2+. (I have commited a fix. you don’t need to add the last BuildRequires when 12.2 is officially released.)

add “BuildRequires: xorg-x11-utils-devel” for 12.1-.

the code is:


%if 0%{?suse_version} >= 1220
BuildRequires: imake
BuildRequires: xorg-cf-files
%else
BuildRequires: xorg-x11-utils-devel
%endif

But since you’re building a Fedora package. I digged a little more:

The imake in Fedora 16/17 has Imake.tmpl file.

So I suggest to use “xmkmf” instead of “xmkmf -a” to remove any difference against the standard one.

If it still doesn’t help, then it may be because openSUSE actually has no “Fedora” packages but packages fake to be Fedora packages. it might installed the same imake as openSUSE (the substitution configuration is in projconf)

So the perfect solution is, branch imake and xorg-cf-files from X11:XOrg into your repository.

Then the build will use your version of imake and xorg-cf-files.

They will certainly work.

Marguerite.

MargueriteSu wrote:

> So the perfect solution is, branch imake and xorg-cf-files from
> X11:XOrg into your repository.

Don’t branch. Use link instead.