Imake and X11 .rules  [SOLVED]

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

Re: Imake and X11 .rules

Postby PelleB » Mon Jun 05, 2017 11:57 pm

Have you looked into the file ?

Yes, on both GhostBsd and Salix 14.2, it is the same file. The encoding is UTF-8, maybe that causes some problems. Or maybe that I am using Swedish in the system?
Can you post the file on pastebin or a similar service ?

I do not know what pastebin is, but if you want to find the error, why not download the package and check it yourself? The files will be the same.
Line 2144 says
Code: Select all
#include ProjectRulesFile


It may be an issue with ports, it seems that anything that compiles is considered to be OK, no matter if the programs actually work or not.
PelleB
 
Posts: 12
Joined: Sun Aug 14, 2016 7:57 pm
Has thanked: 4 times
Been thanked: 0 time

Re: Imake and X11 .rules


Re: Imake and X11 .rules

Postby ASX » Tue Jun 06, 2017 7:09 am

PelleB wrote:... but if you want to find the error, ....


Oops ... my bad!
ASX
Developer
 
Posts: 695
Joined: Wed May 06, 2015 3:46 pm
Location: ITALY
Has thanked: 31 times
Been thanked: 74 times

Re: Imake and X11 .rules

Postby kraileth » Tue Jun 06, 2017 10:44 am

PelleB wrote:I do not know what pastebin is, but if you want to find the error, why not download the package and check it yourself? The files will be the same.


Pastebin is a service on the net that lets you upload text files to share the contents with others. I'm not familiar with Salix or its repositories - could you perhaps give me a link to the program's source tarball? The problem here is that we don't have them and thus it's really hard to take a look at it. ;)

Oh, and if ASX's reaction makes you wonder what just happened here: In general we try to be a supportive and helpful community here but this is BSD and not Linux. I'm sure you didn't mean it that way, but it's legit to think that this "if you want to find" implies the whole thing is our problem while in fact you're trying to make it our problem. Just know that we're busy people who try to help others in our free time for no other reason than us wanting to help. Demanding a solution or otherwise expecting that we need to solve problems for others is disrespecting. No offence, like I said, I don't think that you meant that. But that's what it sometimes feels like when you're on the other end of the line.
kraileth
Developer
 
Posts: 252
Joined: Sun Sep 04, 2016 3:30 pm
Has thanked: 36 times
Been thanked: 34 times

Re: Imake and X11 .rules

Postby PelleB » Tue Jun 06, 2017 12:44 pm

I think everything got a bit confused here. The problem is with Imake on GhostBSD, not any kind of Linux. The problem with Imake is that it can not create the makefiles, because it inserts a space in a filename, that should not be there. It does this with all programs I have tried, the Imake.tmpl file is probably identical for all systems, I could only check with Salix/Slackware 14.2, and on that system makefiles are created without any fatal errors.

To get the same package of Imake as I use, I think the easiest way is to use the GhostBSD/FreeBSD repository with Octopkg. If I am wrong, tell me. If you want one of those programs I get error with, here is a sample: http://www.tufftuff.net/xcuckoo-1.0.tar.gz. I can not remember where I found it, so I uploaded it to my homepage. The only thing that is important with this is if Imake can create the makefiles (xmkmf -a) or not. The only thing xcuckoo does, is that it gives you a clock in your TWM titlebar or the titlebar of any other window in TWM (or TVTWM), so it is not important in any other way than that it has an Imake file and is small.

I am not offended by ASX or anyone else and I am grateful that you try to help.
PelleB
 
Posts: 12
Joined: Sun Aug 14, 2016 7:57 pm
Has thanked: 4 times
Been thanked: 0 time

Re: Imake and X11 .rules  [SOLVED]

Postby ASX » Tue Jun 06, 2017 6:49 pm

Code: Select all
/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>)

I copied the code above from one of your previous post:

1) ProjectRulesFile is a macro that get expanded to Concat3(<,TopLevelProject,.rules>)

2) TopLevelProject is another macro and get expanded to X11

3) Concat3 is also a macro, defined in /usr/local/lib/X11/config/Imake.rules, approx line 250, as follow:

Code: Select all
/*
 * Concat3 - concatenates three strings.
 */
#ifndef Concat3
#if (defined(__STDC__) && !defined(UnixCpp)) || defined(AnsiCpp)
#define Concat3(a,b,c)a##b##c
#else
#define Concat3(a,b,c)a/**/b/**/c
#endif
#endif


Now it appear that the comment /**/ get substituted with a space character instead of an empty string,
the result is: ' X11 .rules' note that there one space before the X of "X11" and one space before the dot in ".rules".

That result in
Code: Select all
#include < X11 .rules>

instead of
Code: Select all
#include <X11.rules>


Why ?

I can guess because the default compiler LLVM/CLANG, and specifically its preprocessor behave differently from gcc-cpp.

As I see it, there is a chain of events that make things go wrong ... but I cannot say where the error is at this stage:
It could be that CLANG preprocessor is not compliant, it could be that the replacement of comments is undefined (I think it is the case), etc...

I think that the issue might be solved by forcing the use of GCC ...

A quick and dirty workaround could be substitute:
Code: Select all
#include ProjectRulesFile

with
Code: Select all
#include <X11.rules>

but probably the macro Concat3 is used also in other places ... so you will get other errors ...
ASX
Developer
 
Posts: 695
Joined: Wed May 06, 2015 3:46 pm
Location: ITALY
Has thanked: 31 times
Been thanked: 74 times

Re: Imake and X11 .rules

Postby PelleB » Tue Jun 06, 2017 7:54 pm

Thanks!

It somehow solves the issue as it tells me I should give up. To much effort to put into outdated projects....
PelleB
 
Posts: 12
Joined: Sun Aug 14, 2016 7:57 pm
Has thanked: 4 times
Been thanked: 0 time

Previous

Return to General support

Who is online

Users browsing this forum: No registered users and 1 guest