PDA

View Full Version : imakefile -- doesn't work -- under fedora 25



paulhaul
2nd December 2017, 03:48 AM
I tried to personalize the Makefile.tmpl makefile.rules and since then I don't get the imake to run anymore under Fedora 25.

The command xmkmf -a get me the following

mv -f Makefile Makefile.bak
imake -DUseInstalled -I/usr/share/X11/config
In file included from Imakefile.c:34:0:
/usr/share/X11/config/Imake.tmpl:2144:0: error: #include expects "FILENAME" or <FILENAME>
#include ProjectRulesFile
In file included from Imakefile.c:34:0:
/usr/share/X11/config/Imake.tmpl:2157:0: error: #include expects "FILENAME" or <FILENAME>
#include ProjectTmplFile

In file included from Imakefile.c:34:0:
/usr/share/X11/config/Imake.tmpl:2224:0: error: macro "MakefileTarget" requires 2 arguments, but only 1 given
MakefileTarget()

imake:Exit code 1.
Stop.

Please help me reinstall Imake so that it starts working .

HaydnH
4th December 2017, 12:09 PM
You can find out what package a file belongs to and reinstall it using dnf:



# dnf provides /usr/share/X11/config/Imake.tmpl
imake <rest of output removed>
# dnf reinstall imake

paulhaul
15th December 2017, 04:13 AM
You can find out what package a file belongs to and reinstall it using dnf:



# dnf provides /usr/share/X11/config/Imake.tmpl
imake <rest of output removed>
# dnf reinstall imake


Thanks but this doesn't work. I tried and whenever I run I get



Imakefile.c:33:0: fatal error: Imake.tmpl: No such file or directory
#include IMAKE_TEMPLATE

compilation terminated.
imake: Exit code 1.
Stop.


how does reinstall also rebuild the imake.tmpl and imake.rules files from scratch ?

HaydnH
15th December 2017, 01:21 PM
how does reinstall also rebuild the imake.tmpl and imake.rules files from scratch ?

Sorry for the delay, I've been away.

/usr/share/X11/config/Imake.tmpl and /usr/share/X11/config/Imake.rules are files that are installed with the imake package. Reinstalling the package will recreate them, for example:



[root@darkstar ~]# ls -lh /usr/share/X11/config/Imake.tmpl
-rw-r--r-- 1 root root 54K Aug 3 10:52 /usr/share/X11/config/Imake.tmpl
[root@darkstar ~]# echo "junk" > /usr/share/X11/config/Imake.tmpl
[root@darkstar ~]# ls -lh /usr/share/X11/config/Imake.tmpl
-rw-r--r-- 1 root root 5 Dec 15 12:10 /usr/share/X11/config/Imake.tmpl
[root@darkstar ~]# dnf reinstall imake
Last metadata expiration check: 0:03:18 ago on Fri 15 Dec 2017 12:07:37 GMT.
Dependencies resolved.
================================================== ========================================
Package Arch Version Repository Size
================================================== ========================================
Reinstalling:
imake x86_64 1.0.7-9.fc27 fedora 264 k

Transaction Summary
================================================== ========================================

Total download size: 264 k
Is this ok [y/N]: Is this ok [y/N]: y
Downloading Packages:
imake-1.0.7-9.fc27.x86_64.rpm 2.7 MB/s | 264 kB 00:00
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Total 336 kB/s | 264 kB 00:00
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
Preparing : 1/1
Reinstalling : imake-1.0.7-9.fc27.x86_64 1/2
Erasing : imake-1.0.7-9.fc27.x86_64 2/2
Running scriptlet: imake-1.0.7-9.fc27.x86_64 2/2
Verifying : imake-1.0.7-9.fc27.x86_64 1/2
Verifying : imake-1.0.7-9.fc27.x86_64 2/2

Reinstalled:
imake.x86_64 1.0.7-9.fc27

Complete!
[root@darkstar ~]# ls -lh /usr/share/X11/config/Imake.tmpl
-rw-r--r-- 1 root root 54K Aug 3 10:52 /usr/share/X11/config/Imake.tmpl


If you've reinstalled the files and you're still getting an error then there's something else wrong. For the "Imake.tmpl: No such file or directory" issue, have you tried doing an "ls -l /usr/share/X11/config/Imake.tmpl", or locate "Imake.tmpl"?

What are you trying to compile/install?

paulhaul
15th December 2017, 02:41 PM
Sorry for the delay, I've been away.

/usr/share/X11/config/Imake.tmpl and /usr/share/X11/config/Imake.rules are files that are installed with the imake package. Reinstalling the package will recreate them, for example:



[root@darkstar ~]# ls -lh /usr/share/X11/config/Imake.tmpl
-rw-r--r-- 1 root root 54K Aug 3 10:52 /usr/share/X11/config/Imake.tmpl
[root@darkstar ~]# echo "junk" > /usr/share/X11/config/Imake.tmpl
[root@darkstar ~]# ls -lh /usr/share/X11/config/Imake.tmpl
-rw-r--r-- 1 root root 5 Dec 15 12:10 /usr/share/X11/config/Imake.tmpl
[root@darkstar ~]# dnf reinstall imake
Last metadata expiration check: 0:03:18 ago on Fri 15 Dec 2017 12:07:37 GMT.
Dependencies resolved.
================================================== ========================================
Package Arch Version Repository Size
================================================== ========================================
Reinstalling:
imake x86_64 1.0.7-9.fc27 fedora 264 k

Transaction Summary
================================================== ========================================

Total download size: 264 k
Is this ok [y/N]: Is this ok [y/N]: y
Downloading Packages:
imake-1.0.7-9.fc27.x86_64.rpm 2.7 MB/s | 264 kB 00:00
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Total 336 kB/s | 264 kB 00:00
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
Preparing : 1/1
Reinstalling : imake-1.0.7-9.fc27.x86_64 1/2
Erasing : imake-1.0.7-9.fc27.x86_64 2/2
Running scriptlet: imake-1.0.7-9.fc27.x86_64 2/2
Verifying : imake-1.0.7-9.fc27.x86_64 1/2
Verifying : imake-1.0.7-9.fc27.x86_64 2/2

Reinstalled:
imake.x86_64 1.0.7-9.fc27

Complete!
[root@darkstar ~]# ls -lh /usr/share/X11/config/Imake.tmpl
-rw-r--r-- 1 root root 54K Aug 3 10:52 /usr/share/X11/config/Imake.tmpl


If you've reinstalled the files and you're still getting an error then there's something else wrong. For the "Imake.tmpl: No such file or directory" issue, have you tried doing an "ls -l /usr/share/X11/config/Imake.tmpl", or locate "Imake.tmpl"?

What are you trying to compile/install?


Wow, ok thanks for including the checks. I see now.
That said, this doesn't change the fact that I still get these error messages.

Hold on. I am just calling

imake

and getting this error message at the moment. I have yet to use it for compiling a file or making a Makefile. That said, if I am not even able to call it, it means, something is wrong.

HaydnH
15th December 2017, 03:48 PM
Hold on. I am just calling

imake

and getting this error message at the moment. I have yet to use it for compiling a file or making a Makefile. That said, if I am not even able to call it, it means, something is wrong.

Ok, have you created an Imakefile before hand? Try the following and see whether you can create a Makefile, if so imake should be installed OK:



[haydn@darkstar ~]$ mkdir imake
[haydn@darkstar ~]$ cd imake/
[haydn@darkstar imake]$ ls -al
total 12
drwxrwxr-x 2 haydn haydn 4096 Dec 15 14:45 .
drwx--x---+ 107 haydn haydn 4096 Dec 15 14:45 ..
[haydn@darkstar imake]$ touch Imakefile
[haydn@darkstar imake]$ xmkmf
imake -DUseInstalled -I/usr/share/X11/config
[haydn@darkstar imake]$ ls -l
total 28
-rw-rw-r-- 1 haydn haydn 0 Dec 15 14:45 Imakefile
-rw-rw-r-- 1 haydn haydn 26854 Dec 15 14:45 Makefile
[haydn@darkstar imake]$

paulhaul
15th December 2017, 03:57 PM
Thank you for the quick follow up which puts me at ease.
Yes I got precisely what you got. So, does it mean that my Imake actually is working after all ?
Wow, that was impressive.

paulhaul
15th December 2017, 06:47 PM
Wow, ok thanks for including the checks. I see now.
That said, this doesn't change the fact that I still get these error messages.

Hold on. I am just calling

imake

and getting this error message at the moment. I have yet to use it for compiling a file or making a Makefile. That said, if I am not even able to call it, it means, something is wrong.


Hold on

There is a mistake on my system. When I actually look at whether these files have changed ....

ls -l Imake.rules
-rw-r--r--. 1 root root 115845 Feb 4 2016 Imake.rules

the year and time didn't change after re-install . That's actually very strange.

paulhaul
15th December 2017, 06:51 PM
[root@sony-sony config]# ls -lh Imake.rules
-rw-r--r--. 1 root root 114K Feb 4 2016 Imake.rules
[root@ config]# echo "junk" > /usr/share/X11/config/Imake.tmpl
[root@ config]# ls -lh Imake.rules
-rw-r--r--. 1 root root 114K Feb 4 2016 Imake.rules
[root@ config]#

Is this very strange or just strange ? .... there's no change .....

HaydnH
18th December 2017, 04:53 PM
You're echoing "junk" in to Imake.tmpl, NOT Imake.rules.