Imake and X11 .rules  [SOLVED]

Need support for GhostBSD. Ask here if your question does not fit elsewhere.

Imake and X11 .rules

Postby PelleB » Fri Jun 02, 2017 2:38 am

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.
PelleB
 
Posts: 17
Joined: Sun Aug 14, 2016 3:57 pm
Has thanked: 5 times
Been thanked: 0 time

Imake and X11 .rules


Re: Imake and X11 .rules

Postby kraileth » Sun Jun 04, 2017 2:11 am

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?
kraileth
Developer
 
Posts: 305
Joined: Sun Sep 04, 2016 11:30 am
Has thanked: 57 times
Been thanked: 51 times

Re: Imake and X11 .rules

Postby PelleB » Sun Jun 04, 2017 2:54 pm

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.
PelleB
 
Posts: 17
Joined: Sun Aug 14, 2016 3:57 pm
Has thanked: 5 times
Been thanked: 0 time

Re: Imake and X11 .rules

Postby ASX » Sun Jun 04, 2017 3:44 pm

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. ;)
ASX
Developer
 
Posts: 968
Joined: Wed May 06, 2015 11:46 am
Has thanked: 57 times
Been thanked: 128 times

Re: Imake and X11 .rules

Postby PelleB » Sun Jun 04, 2017 4:22 pm

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?
PelleB
 
Posts: 17
Joined: Sun Aug 14, 2016 3:57 pm
Has thanked: 5 times
Been thanked: 0 time

Re: Imake and X11 .rules

Postby ASX » Sun Jun 04, 2017 4:50 pm

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".
ASX
Developer
 
Posts: 968
Joined: Wed May 06, 2015 11:46 am
Has thanked: 57 times
Been thanked: 128 times

Re: Imake and X11 .rules

Postby PelleB » Sun Jun 04, 2017 5:16 pm

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.
PelleB
 
Posts: 17
Joined: Sun Aug 14, 2016 3:57 pm
Has thanked: 5 times
Been thanked: 0 time

Re: Imake and X11 .rules

Postby ASX » Sun Jun 04, 2017 5:50 pm

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 ...
ASX
Developer
 
Posts: 968
Joined: Wed May 06, 2015 11:46 am
Has thanked: 57 times
Been thanked: 128 times

Re: Imake and X11 .rules

Postby PelleB » Mon Jun 05, 2017 4:38 pm

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...
PelleB
 
Posts: 17
Joined: Sun Aug 14, 2016 3:57 pm
Has thanked: 5 times
Been thanked: 0 time

Re: Imake and X11 .rules

Postby ASX » Mon Jun 05, 2017 5:43 pm

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.
ASX
Developer
 
Posts: 968
Joined: Wed May 06, 2015 11:46 am
Has thanked: 57 times
Been thanked: 128 times

Next

Return to General support

Who is online

Users browsing this forum: No registered users and 3 guests