Makefile.inc: No such file or directory - linux

I don't have much experience with makefiles, but I am trying to compile and run the program "hdf5ToMds.c" found on this Github repository: https://github.com/MDSplus/mdsplus/tree/alpha/hdf5
My steps towards using the Makefile.in in the folder were as follows:
autoscan
mv configure.scan configure.ac
aclocal
autoheader
autoconf
./configure
make
Now when I run the make I get the error:
Makefile:1: Makefile.inc: No such file or directory
make: *** No rule to make target 'Makefile.inc'. Stop.
Am I missing something obvious? I'm not very familiar with this whole process of getting the code from Github and having to make it. I do have the entire repository cloned, just in case that's relevant.

Related

Why Makefile.am is included in the release tarball?

From the description of https://stackoverflow.com/a/2531841/5983841 and https://stackoverflow.com/a/26832773/5983841 , my understanding is that Makefile.am is not needed in the dist tarball.
I tried
wget https://dist.libuv.org/dist/v1.44.2/libuv-v1.44.2-dist.tar.gz
tar xf libuv-v1.44.2-dist.tar.gz
cd libuv-1.44.2/
mv Makefile.am Makefile.am.bak
./configure
make
it gives error when running make:
tian#tian-B250M-Wind:~/Desktop/playground/garage/libuv-1.44.2$ make
make: *** No rule to make target 'Makefile.am', needed by 'Makefile.in'. Stop.
I answered there: autotools are intended to be used with free software. A dist tarball for a free software project should include all the files needed for someone to be able to make changes to the project and rebuild it, as they want to: that's the foundational goal of Free Software.
They can't do that if you omit critical build files, like Makefile.am. If they wanted to add a new file or something to the project, they need the Makefile.am to modify it. So it should be included in the dist tarball.
Saying that the file is not required in order to build the software as-is without modification, is not the same thing as saying that it can be omitted.
In this specific case, automake-generated makefiles contain rules to check whether someone modified the Makefile.am file and if so, the rules will re-run automake to ensure everything is up to date and correct so you don't have to remember to do it by hand. However this of course requires that the Makefile.am file be present so make can determine that it's up to date.

Makefile : no rule to make target '/constants.py.in' needed by '/constants.py'. Stop

i'm currently working on an ubuntu 18.0.4.5 machine and i've been trying to figure out the whole kernel debugging process.
I've stumbled upon the need to auto run GDB scripts along with the vmlinux file, particulary the script residing under /usr/src/linux../scripts/gdb/vmlinux-gdb.py.
I made sure the script ran on initialization with the vmlinux file and had the following error
gdb vmlinux
File "/usr/src/linux-hwe-5.4-headers-5.4.0-42/scripts/gdb/vmlinux-gdb.py", line 34, in <module>
import linux.proc
File "/usr/share/gdb/auto-load/gdb/linux/proc.py", line 15, in <module>
from linux import constants
ImportError: cannot import name 'constants'
After this error occured I checked the /usr/share/gdb/auto-load/gdb/linux directory to look for the missing file and only found 2 related files:
constants.py.in
Makefile
Inside the constants.py.in file was C code mixed with python and was commented that the build will take care of that.
The exact Makefile and constants.py.in files can be found here for reference: https://elixir.bootlin.com/linux/v5.4/source/scripts/gdb/linux/Makefile
https://elixir.bootlin.com/linux/v5.4/source/scripts/gdb/linux/constants.py.in
Trying to build for the first time resulted in this:
make: *** No rule to make target '/constants.py.in', needed by '/constants.py'. Stop.
After some trial and error (i'm not experienced in Makefile language) I copied constants.py.in to the / directory and tried to build again and recieved the following error:
make: *** No rule to make target 'FORCE', needed by '/constants.py'. Stop.
I don't understand what does that FORCE is, looks like some kind of makefile configuration but i can't find a reasonable explantion or patch, the same errors occur when trying to build anything under /usr/src/linux-.../
trying to understand how to fix the build process and eventually create the correct constants.py that is hopefully the last piece to making the vmlinux-gdb.py work during debugging
Running make scripts_gdb at the top level of the source tree will run through a few other Makefiles and eventually build constants.py. You'll see some make chatter like the following:
builder#localhost:/tmp/linux/linux-5.4.125$ make V=1 scripts_gdb
make -f ./scripts/Makefile.build obj=scripts/basic
...
make -f ./scripts/Makefile.build obj=scripts/gdb
make -f ./scripts/Makefile.build obj=scripts/gdb/linux
gcc -E -E -x c -P -Wp,-MD,scripts/gdb/linux/.constants.py.d ... \
scripts/gdb/linux/constants.py.in > scripts/gdb/linux/constants.py ;\
sed -i '1,/<!-- end-c-headers -->/d;' scripts/gdb/linux/constants.py
ln -fsn /tmp/linux/linux-5.4.125/scripts/gdb/vmlinux-gdb.py
After this completes,vmlinux-gdb.py will be usable.

miss asm/types.h in linux compile

lenge#lenge-pc:/lenge/linux/kernel_online$ git branch
master
* tag_v4.15
CONFIG is defconfig.
when I compile kernel(v4.15), error occurred, as follows:
In file included from
/lenge/linux/kernel_online/include/linux/types.h:6,
from /lenge/linux/kernel_online/include/linux/page-flags.h:9,
from /lenge/linux/kernel_online/kernel/bounds.c:10:
/lenge/linux/kernel_online/include/uapi/linux/types.h:5:10: fatal
error: asm/types.h: No such file or directory #include <asm/types.h>
^~~~~~~~~~~~~ compilation terminated.
That is my compile method:
make ARCH=arm64 -C /lenge/linux/kernel_online O=/lenge/linux/kernel_out_aarch64 CROSS_COMPILE=/lenge/gnu/aarch64/bin/aarch64-lenge-linux-gnu- -j4
I create symbolic link as fallows:
ln -s /lenge/linux/kernel_out_aarch64/source/arch/arm64/include/generated/uapi/asm arch/arm64/include/generated/uapi/asm
It's OK.
I just had the same issue cross-compiling to arm64.
I noticed I had some generated files in my source tree even though I use an output directory for my build (O=). I'm not sure if I accidentally omitted O= one time or what happened, but this was messing things up.
To resolve this, I ran make clean (or make mrproper if you're paranoid) in the source directory to remove all generated files. Rerunning my normal make command with O= succeeded, and did not result in generated files in my source dir (as expected).

Find exact point where 'make' fails

I'm working with a modified version of Contiki in conjunction with an extension (a pub/sub system) and had to port some code around. This is on Linux.
Currently, the traditional 'make' execution of the pub/sub system fails, most likely because of a different folder structure.
I'm unable to find where I need to adjust it however and the problem is there are so many nested makefiles and include commands and such that I can't seem to find it. I get the error beneath and I know that the correct uip6.c location is /net/ip/uip6.c but I can't find the place to make that adjustment. Any suggestions on how I can identify that?
selected command: make
execute make command with args:
make -f ../core/Makefile.looci loociCore.hex > debug.txt
/home/looci/looci/lnk/lc_contiki/platform/avr-zigduino/Makefile.early.avr-zigduino:1: loading AVR zigduino early makefile fuses
fatal: Not a git repository: '/home/looci/looci/lnk/lc_contiki_os/.git'
/home/looci/looci/lnk/lc_contiki/core/reconfiguration/reconfigurationEngine.c: In function ‘on_event’:
/home/looci/looci/lnk/lc_contiki/core/reconfiguration/reconfigurationEngine.c:663:2: warning: implicit declaration of function ‘mmem_freememory’
avr-gcc: /home/looci/looci/lnk/lc_contiki_os/core/net/uip6.c: No such file or directory
make[1]: *** [obj_avr-zigduino/uip6.o] Error 1
make: *** [all] Error 2

Changing directories for the makefile in xScreenSaver

I am trying to build an xsreensaver module using the makefile. I downloaded the source from http://www.jwz.org/xscreensaver/, and read the hacking readme.
As my screensaver involves opengl and reading of images, I'm trying to compile the 'photopile' screensaver.
I've run the following
$ cd xscreensaver-5.29
$ cd hacks
$ cd glx
$ make photopile
After running I get the following output errors
cc photopile.c -o photopile
photopile.c:38:23: fatal error: xlockmore.h: No such file or directory compilation terminated.
make: *** [photopile] Error 1
The referenced file is in the "hacks" root folder rather than the "glx" folder. I realize it would be simple enough to just copy that needed file to "glx", but the "xlockmore.h" file is not the only file that its trying to find that is not in the current directory.
It is also looking for "yarandom.h" in the "../../utils" folder.
I'm assuming the makefile was made correctly, and that I am doing something wrong with regards to calling the
make photopile
option from within the "glx" folder.
I'm still learning makefiles and would rather not modify it (or the directory structure by copying header files) anymore than the directions say to.
Any advice?

Resources