Find exact point where 'make' fails - linux

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

Related

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.

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?

building cross binutils fr30-unknown-none unsupported

I am trying to build a cross binutilsfor fr30. After running the configure command :
./configure --target=fr30 --enable-cgen-maint --prefix=/<long_path>/myBinutils/new_build_fr30_cgen/
I run make command and got the next error :
** BFD does not support target fr30-unknown-none.
*** Look in bfd/config.bfd for supported targets.
make[1]: *** [configure-bfd] Error 1
how do I find the unknown-none ? any advice ?
The --target configure option is expecting a target triplet of the form cpu-vendor-os.
If you look at the big case statement in bfd/config.bfd that the error message is pointing you at, you'll see that for fr30 the supported target triplets match fr30-*-elf.
For example, configuring with ./configure --target=fr30-elf ... will get you to success or your next problem, as this abbreviation is canonicalised to a suitable triplet (by config.sub):
$ ./config.sub fr30-elf
fr30-unknown-elf
Hopefully with such a configuration, you'll end up with fr30-elf-ld, etc.

Problem in Cross-Compiling libSDL for MIPS Platform

I was trying to compile libSDL-1.2.14 for my mips platform.
But it was not successful.
These were the steps that I tried out :
export PATH=/opt/mips-4.3/bin:$PATH
Went inside the libSDL-1.2.14 source folder.
Gave a "./configure --prefix=/usr/local/SDL_Lib --host=mips-linux-gnu"
Executed the "make" command
This was the error received :
cc1: warning: include location
"/usr/include" is unsafe for
cross-compilation
./src/audio/dma/SDL_dmaaudio.c: In
function 'DMA_WaitAudio':
./src/audio/dma/SDL_dmaaudio.c:167:
error: can't find a register in class
'COP3_REGS' while reloading 'asm'
./src/audio/dma/SDL_dmaaudio.c:167:
error: 'asm' operand has impossible
constraints make: *
[build/SDL_dmaaudio.lo] Error 1
But then i reconfigured the make file by giving the following commands :
make clean
./configure --prefix=/usr/local/SDL_Lib --host=mips-linux-gnu CPPFLAGS=-I/opt/mips-4.3/mips-linux-gnu/libc/usr/include/
make
NOTE : /opt/mips-4.3/mips-linux-gnu/libc/usr/include/ - This is the path where you can locate the select.h file for the mips Platform.
It contains the definitions of the macros FD_ZERO and FD_SET.
Still I am getting the same error.
cc1: warning: include location
"/usr/include" is unsafe for
cross-compilation
./src/audio/dma/SDL_dmaaudio.c: In
function 'DMA_WaitAudio':
./src/audio/dma/SDL_dmaaudio.c:167:
error: can't find a register in class
'COP3_REGS' while reloading 'asm'
./src/audio/dma/SDL_dmaaudio.c:167:
error: 'asm' operand has impossible
constraints make: *
[build/SDL_dmaaudio.lo] Error 1
Please help me with some valuable pointers.
Thanks,
Sen
First, don't set the path to the cross-compiler as the first part of your PATH, set it as last:
export PATH=$PATH:<path to cross-compiler>
It's safer this way. Second, run ./configure --help to get all the options. What that error message would say if it was smarter is the following:
You're trying to cross-compile since you're setting the --host flag
But you're not changing any of the other options for where to find includes and libs for the target environment
I'm going to use /usr/include by default
But that's for the host system which will not work when cross-compiling
Check what other configure options you need to set to tell the configure script where to find the .h files (includes) and the libraries for your target. These usually come with the cross-compiler that you download. Also, you should probably set the CROSS_COMPILE environment variable to the cross-compiler prefix before running configure. The prefix is the part before gcc in a cross-compiler, assuming you're using GCC as your cross-compiler.

Compiling pjsip for iOS 4.0

I've been having issues with compiling pjsip for iOS 4.0.
I am using the latest trunk version from SVN and keep getting a portaudio error. When using the piedmontwireless guide: http://www.piemontewireless.net/PJSip155_and_iPhoneSDK312 I get a missing separator error in my build.mak file, which would indicate a whitespace/tabbing error, but for the life of me I cannot find it.
According to the pjsip mailing lists, you should be able to compile out of the box for iOS 4.0, but I get this error:
../src/pjmedia-audiodev/errno.c:23:26: error: portaudio.h: No such file or directory
../src/pjmedia-audiodev/errno.c: In function ‘pjmedia_audiodev_strerror’:
../src/pjmedia-audiodev/errno.c:104: warning: implicit declaration of function ‘Pa_GetErrorText’
make[2]: *** [output/pjmedia-audiodev-arm-apple-darwin9/errno.o] Error 1
make[1]: *** [pjmedia-audiodev] Error 2
I'll keep punching through this but any help would be really appreciated.
EDIT: I do have portaudio.h
The specific step you are missing is to have a config_site.h file in the proper location.
pjlib/include/pj/config_site.h
It needs to contain the following:
#define PJ_CONFIG_IPHONE 1
#include <pj/config_site_sample.h>
So the configuration will avoid libraries that are not needed or won't compile for the arm chip in the iPhone.
After this addition start over with:
./configure-iphone
and then
make dep && make clean && make
./configure-iphone
Fresh from SVN
Configurations for current target have been written to 'build.mak', and 'os-auto.mak' in various build directories, and pjlib/include/pj/compat/os_auto.h.
Further customizations can be put in:
- 'user.mak'
- 'pjlib/include/pj/config_site.h'
The next step now is to run 'make dep' and 'make'.
Done configuring for iPhoneOS4.2.sdk
Shouldn't ./configure-iphone setup pjlib/include/pj/config_site.h
As
#define PJ_CONFIG_IPHONE 1
#include <pj/config_site_sample.h>
Thanks for the fix #Schroedinger

Resources