Imake and X11 .rules

Need support for GhostBSD. Ask here if your question does not fit elsewhere.
PelleB
Posts: 18
Joined: Sun Aug 14, 2016 4:57 pm

Imake and X11 .rules

Post by PelleB »

Hello,

When I run xmkmf -a I get

Code: Select all

In file included from Imakefile.c:15:
/usr/local/lib/X11/config/Imake.tmpl:2144:10: fatal error: ' X11 .rules' file
      not found
There was not a "X11 .rules" file in the system, but a "X11.rules", so I made a copy of the latter and called it "X11 .rules", which did not help. I had the same problems with many programs I tried to compile, so I suppose it has got something with Imake to do (installed version is 1.0.7,1).

Is there something I have got wrong or is it maybe something with the Imakepackage?

Thanks,

Per B.
kraileth
Posts: 312
Joined: Sun Sep 04, 2016 12:30 pm

Re: Imake and X11 .rules

Post by kraileth »

PelleB wrote:Is there something I have got wrong or is it maybe something with the Imakepackage?
Hi PelleB! Probably the later: Have a look here. It seems like problems started occuring when FreeBSD started using LLVM/Clang as the system compiler for i386 and amd64 so the ports people needed to fix it.

Today imake is not in extremely wide-spread use anymore (even X moved away from it more than a decade ago). I'm guessing you try to build something that's not in ports. Would you tell us what you're trying to build?
PelleB
Posts: 18
Joined: Sun Aug 14, 2016 4:57 pm

Re: Imake and X11 .rules

Post by PelleB »

What I am trying to build (in this case) is xcuckoo 1.0, a little thing that adds a clock to the titlebar in a TWM window. It seems to be from 1992 by the time stamps, but builds and works on Slackware (Salix) 14.2 64-bit without any changes. I had the same situation with several other apps too.

I do not really understand what changes to make and where they should be made.
ASX
Posts: 988
Joined: Wed May 06, 2015 12:46 pm

Re: Imake and X11 .rules

Post by ASX »

PelleB wrote:What I am trying to build (in this case) is xcuckoo 1.0, a little thing that adds a clock to the titlebar in a TWM window. It seems to be from 1992 by the time stamps, but builds and works on Slackware (Salix) 14.2 64-bit without any changes. I had the same situation with several other apps too.

I do not really understand what changes to make and where they should be made.
My nose is telling me that this filename is incorrect:
/usr/local/lib/X11/config/Imake.tmpl:2144:10: fatal error: ' X11 .rules' file
Try to search for X11.rules (without the space before the dot)

find and grep are your friends here. ;)
PelleB
Posts: 18
Joined: Sun Aug 14, 2016 4:57 pm

Re: Imake and X11 .rules

Post by PelleB »

Try to search for X11.rules (without the space before the dot)
Yes, there is a "X11.rules" on the system, in /usr/local/lib/X11/config/ , the same place as Imake.tmpl. I made a copy and called it "X11 .rules", it does not help. This is the problem, why does Imake want the file with the space in the name? And when there is one in the same directory as Imake.tmpl, which it finds, why does it not find it?
ASX
Posts: 988
Joined: Wed May 06, 2015 12:46 pm

Re: Imake and X11 .rules

Post by ASX »

PelleB wrote:
Try to search for X11.rules (without the space before the dot)
Yes, there is a "X11.rules" on the system, in /usr/local/lib/X11/config/ , the same place as Imake.tmpl. I made a copy and called it "X11 .rules", it does not help. This is the problem, why does Imake want the file with the space in the name? And when there is one in the same directory as Imake.tmpl, which it finds, why does it not find it?
OK, the fact that X11.rules exists is a good sign, but it imply that the filename is wrongly listed in some other place, possibly a makefile or a file included from makefile or something like that.

So, what file is imake looking into ?
Because you reported you had the same issue upon building several apps, this is an hint that the wrong name is a system wide issue (as opposed to affecting only one package).

try:

Code: Select all

 grep "X11\*.rules" /usr/local/lib/X11/config
(the "\*" is supposed to match also other characters, like TAB)

if you can't find it, try to "grep -r" in other places, (though imake is not something I'm familiar with).

If you find "X11 .rules" somewhere, try to edit the file and replace it with "X11.rules".
PelleB
Posts: 18
Joined: Sun Aug 14, 2016 4:57 pm

Re: Imake and X11 .rules

Post by PelleB »

Because you reported you had the same issue upon building several apps, this is an hint that the wrong name is a system wide issue (as opposed to affecting only one package).
Yes, I think so. The exact output of xmkmf -a for three very different programs is:

Code: Select all

mv -f Makefile Makefile.bak
imake -DUseInstalled -I/usr/local/lib/X11/config
In file included from Imakefile.c:15:
In file included from /usr/local/lib/X11/config/Imake.tmpl:316:
/usr/local/lib/X11/config/Imake.rules:1674:27: warning: empty character constant
      [-Winvalid-pp-token]
        for flag in ${MAKEFLAGS} ''; do \                               @@\
                                 ^
In file included from Imakefile.c:15:
/usr/local/lib/X11/config/Imake.tmpl:2144:10: fatal error: ' X11 .rules' file
      not found
#include ProjectRulesFile
         ^
/usr/local/lib/X11/config/Imake.tmpl:2142:35: note: expanded from macro
      'ProjectRulesFile'
# define ProjectRulesFile       Concat3(<,TopLevelProject,.rules>)
                                        ^
1 warning and 1 error generated.
imake: Exit code 1.
  Stop.
Can you make anything out of that?

Per B.
ASX
Posts: 988
Joined: Wed May 06, 2015 12:46 pm

Re: Imake and X11 .rules

Post by ASX »

In file included from Imakefile.c:15:
/usr/local/lib/X11/config/Imake.tmpl:2144:10: fatal error: ' X11 .rules' file
not found
Apparently the error in in that file, at line 2144 ...
PelleB
Posts: 18
Joined: Sun Aug 14, 2016 4:57 pm

Re: Imake and X11 .rules

Post by PelleB »

Apparently the error in in that file, at line 2144 ...
Not in that file, but in whatever is processing it.

So something is wrong with the Imake package, not a GhostBSD issue really...
ASX
Posts: 988
Joined: Wed May 06, 2015 12:46 pm

Re: Imake and X11 .rules

Post by ASX »

PelleB wrote:
Apparently the error in in that file, at line 2144 ...
Not in that file, but in whatever is processing it.
What is processing it usually is a C preprocessor (cpp) ... and most of the job is exapnding macros and including files, before to pass the result to the compiler.

Have you looked into the file ?
What is in at line 2144 ?
Can you post the file on pastebin or a similar service ?
So something is wrong with the Imake package, not a GhostBSD issue really...
Of course no, not a GhostBSD issue, but could be a "port" issue, so not an upstream issue either.
Post Reply