LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   Compiling with imake (https://www.linuxquestions.org/questions/linux-software-2/compiling-with-imake-4175625242/)

gansub 03-08-2018 10:58 PM

Compiling with imake
 
Iam building some software(currently unsupported) that uses Imakefiles. The software does have a Imake.tmpl file. It is located (relative to the top directory)

config/cf/Imake.tmpl

As the software has subdirectories containing other Imakefiles I typed -

xmkmf -a . .

and I got these messages

mv -f Makefile Makefile.bak
imake -I./config/cf -DTOPDIR=. -DCURDIR=.
In file included from Imakefile.c:34:0:
./config/cf/Imake.tmpl:33:0: fatal error: site.def: No such file or directory
#include <site.def>
^compilation terminated.
imake: Exit code 1.
Stop.

The thing is site.def does exist and is located under config/project/site.def

This is the contents of Imakefile.c that is generated by the execution of imake. This file is removed when imake finishes execution but can be retained by creating a link to that file.

/* imake - temporary file */
#define DefaultOSName Linux 4.13.0-36-generic x86_64
#define DefaultOSMajorVersion
#define LinuxDebian 4
#define LinuxInfoMagic 5
#define LinuxKheops 6
#define LinuxPro 7
#define LinuxRedHat 8
#define LinuxSlackware 9
#define LinuxTurbo 10
#define LinuxWare 11
#define LinuxYggdrasil 12
#define DefaultLinuxDistribution LinuxDebian
#define DefaultLinuxDistName Debian
#define HasGcc 1
#define HasGcc2 1
#define HasGcc3 1
#define GccMajorVersion 5
#define GccMinorVersion 2
#define INCLUDE_IMAKEFILE </tmp/IIf.j7V6mk>
#define IMAKE_TEMPLATE "Imake.tmpl"
#include IMAKE_TEMPLATE

Hopefully I can find a imake expert here !!!

TB0ne 03-10-2018 08:26 AM

Quote:

Originally Posted by gansub (Post 5828922)
Iam building some software(currently unsupported) that uses Imakefiles. The software does have a Imake.tmpl file. It is located (relative to the top directory)

config/cf/Imake.tmpl

As the software has subdirectories containing other Imakefiles I typed -

xmkmf -a . .

and I got these messages

mv -f Makefile Makefile.bak
imake -I./config/cf -DTOPDIR=. -DCURDIR=.
In file included from Imakefile.c:34:0:
./config/cf/Imake.tmpl:33:0: fatal error: site.def: No such file or directory
#include <site.def>
^compilation terminated.
imake: Exit code 1.
Stop.

The thing is site.def does exist and is located under config/project/site.def

This is the contents of Imakefile.c that is generated by the execution of imake. This file is removed when imake finishes execution but can be retained by creating a link to that file.

/* imake - temporary file */
#define DefaultOSName Linux 4.13.0-36-generic x86_64
#define DefaultOSMajorVersion
#define LinuxDebian 4
#define LinuxInfoMagic 5
#define LinuxKheops 6
#define LinuxPro 7
#define LinuxRedHat 8
#define LinuxSlackware 9
#define LinuxTurbo 10
#define LinuxWare 11
#define LinuxYggdrasil 12
#define DefaultLinuxDistribution LinuxDebian
#define DefaultLinuxDistName Debian
#define HasGcc 1
#define HasGcc2 1
#define HasGcc3 1
#define GccMajorVersion 5
#define GccMinorVersion 2
#define INCLUDE_IMAKEFILE </tmp/IIf.j7V6mk>
#define IMAKE_TEMPLATE "Imake.tmpl"
#include IMAKE_TEMPLATE

Hopefully I can find a imake expert here !!!

You need to read the "Question Guidelines" link in my posting signature. We can try to help, but we need actual details before we can do so. You don't tell us what this 'software' is, version/distro of Linux, etc. Further, most downloaded packages have installation instructions either on their website, in a README or INSTALL file, or SOMEWHERE in what you download...they don't leave yo to guess.

Those are the instructions you need to find and read.

knudfl 03-10-2018 10:57 AM

Welcome to LQ.

? What's the name of the program you are trying to build ?
? Is imake installed ? → sudo apt install xutils-dev

"site.def" : /usr/lib/X11/config/site.def

AwesomeMachine 03-10-2018 12:15 PM

It looks like line 33 in imake.tmpl is looking for site.def.

TB0ne 03-10-2018 03:01 PM

Quote:

Originally Posted by knudfl (Post 5829393)
Welcome to LQ.
? What's the name of the program you are trying to build ?
? Is imake installed ? → sudo apt install xutils-dev
"site.def" : /usr/lib/X11/config/site.def

...and...
Quote:

Originally Posted by AwesomeMachine
It looks like line 33 in imake.tmpl is looking for site.def.

Yep...asked the OP that in my first reply. I'd strongly suspect that the program the OP downloaded either has instructions on their website, or in the README/INSTALL/SOME file that came with the downloaded code. It's extremely rare for a program these days to come without such things. While they may have to edit/modify a file to point to the right site.def (or whatever), those instructions will be somewhere, and tell them what to do.

gansub 03-18-2018 04:34 AM

Sorry for the late response. I did not download it from a website. It was given to me by an associate. The software is no longer supported by the org that developed it so it is only kept in archives.

imake is definitely installed on my system. I moved site.def from the directory config/project to config/cf. That helped me compile the file and move on.


All times are GMT -5. The time now is 12:40 PM.