Changing directories for the makefile in xScreenSaver - linux

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?

Related

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.

Buildroot ".stamp_images_installed" Failed After Folder Name Change

I fire up the Buildroot by make. Compilation progress was successful.
In the installation progress, it tried to copy /output/build/uboot/SPL but that folder does not exist. Instead, /output/build/uboot/spl exists.
I changed the spl folder name to SPL
Run the make again but I got .stamp_images_installed failed error. Check the end of the post for full error log.
To solve the problem, I want to build the target again so I removed output/target folder and all the .stamp_images_installed files under output/build but still I got .stamp_images_installed failed error.
Why Buildroot still gives me this error ? What am I doing wrong ?
My full error log is as the following;
>>> uboot e1cbe8c74e87036e649b0e34656aebabb3aa00c7 Installing to target
>>> uboot e1cbe8c74e87036e649b0e34656aebabb3aa00c7 Installing to images directory
cp -dpf /home/mei/buildroot/output/build/uboot-e1cbe8c74e87036e649b0e34656aebabb3aa00c7/u-boot.bin /home/mei/buildroot/output/images/
cp -dpf /home/mei/buildroot/output/build/uboot-e1cbe8c74e87036e649b0e34656aebabb3aa00c7/u-boot.img /home/mei/buildroot/output/images/
cp -dpf /home/mei/buildroot/output/build/uboot-e1cbe8c74e87036e649b0e34656aebabb3aa00c7/SPL /home/mei/buildroot/output/images/
cp: -r not specified; omitting directory '/home/mei/buildroot/output/build/uboot-e1cbe8c74e87036e649b0e34656aebabb3aa00c7/SPL'
package/pkg-generic.mk:320: recipe for target '/home/mei/buildroot/output/build/uboot-e1cbe8c74e87036e649b0e34656aebabb3aa00c7/.stamp_images_installed' failed
make[1]: *** [/home/mei/buildroot/output/build/uboot-e1cbe8c74e87036e649b0e34656aebabb3aa00c7/.stamp_images_installed] Error 1
Makefile:84: recipe for target '_all' failed
make: *** [_all] Error 2
Thanks!
There is a folder called spl (in lowercase), but we're looking for a file called SPL (in uppercase). When you build a first stage bootloader, it may have various names, depending on the platform. Usually the name is u-boot-spl.bin, and it resides inside the spl directory. Some platforms, however, use a different name for this file (for historical reasons). For iMX6, the file name is SPL and it resides directly in the U-Boot directory.
However, in your case, apparently the SPL file doesn't get built. Probably this is because you are using a U-Boot configuration that doesn't build it under that name. If you are actually building for iMX6, this indicates that there is something wrong with your U-Boot configuration. If you're building for some other SoC, it's Buildroot's BR2_TARGET_UBOOT_SPL_NAME option that is incorrectly set.

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).

Makefile.inc: No such file or directory

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.

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

Resources