Error while building glibc - linux

I'm trying to install glibc to debug a C-framework I'm working on. But, I'm getting an error in the build process. Here's the error msg:
make[3]: Leaving directory `/root/glibc-source/glibc-2.14/elf'
/usr/bin/install -c /root/glibc-2.14-build/elf/ld.so /usr/local/myglibc/lib/ld-2.14.so.new
mv -f /usr/local/myglibc/lib/ld-2.14.so.new /usr/local/myglibc/lib/ld-2.14.so
/usr/bin/install -c /root/glibc-2.14-build/libc.so /usr/local/myglibc/lib/libc-2.14.so.new
mv -f /usr/local/myglibc/lib/libc-2.14.so.new /usr/local/myglibc/lib/libc-2.14.so
echo ld-2.14.so /usr/local/myglibc/lib/ld-linux-x86-64.so.2 >> /root/glibc-2.14-build/elf/symlink.list
/usr/bin/install -c /root/glibc-2.14-build/elf/sotruss-lib.so /usr/local/myglibc/lib/audit/sotruss-lib.so.new
mv -f /usr/local/myglibc/lib/audit/sotruss-lib.so.new /usr/local/myglibc/lib/audit/sotruss-lib.so
make[2]: *** No rule to make target `/root/glibc-2.14-build/dlfcn/libdl.so.2', needed by `/root/glibc-2.14-build/elf/sprof'. Stop.
make[2]: Leaving directory `/root/glibc-source/glibc-2.14/elf'
make[1]: *** [elf/subdir_install] Error 2
make[1]: Leaving directory `/root/glibc-source/glibc-2.14'
make: *** [install] Error 2
Is this a known problem?
I had built glibc on the same machine earlier last week without any errors. I'm rebuilding it because glibc is compiled with optimization level 2(-O2) by default and I'm unable to look into the values of a few variables inside the library functions from the code dump as they've been optimized out. I'm currently trying to compile with optimization level 1.
Thanks

It looks like you are trying to make install, without first doing a successful make all.

This is for the benefit of anyone who might be trying to build glibc on their ubuntu box.
I went through the following problems and resolved them the following way.
These problems were encountered in ubuntu 12.04
I created a directory glib-build on the same level as the glib-VERSION and ran the following command
$> ../glibc-2.16.0/configure --prefix=/home/gugovind/tsapp/glibc/glibc-build/
that gave me the following error that makeinfo is missing.
for that
$>sudo apt-get install texinfo
will resolve the problem.
It threw and error about LD_LIBRARY_PATH having the current directory (even if it does not exist)
for that run the following in your command prompt
$>set LD_LIBRARY_PATH
this will clear the LD_LIBRARY_PATH only for that console temporarily. Then run the configure again.
You might encounter another problem with configure..
"function strtonum never defined"
look at the config.log file and it might be missing mawk or gawk. install them using
sudo apt-get install gawk
This should get you through the configure part.
now run
make all
if in case you encounter a particular file not compiling.. just copy the gcc ... before that and paste it in the command prompt again after you have cd to that directory (the command lines before the error should tell you where to go.)
make install
You might get a warning about not able to find etc/ld.config... file. ignore that..
you are all set now.

Related

open2: exec of lzma -c0 failed a internal-package Error 2 while building in Theos

I keep getting make: * [internal-package] Error 2 when trying to build a tweak I'm working on. Ive never had this issue before, and its not specifying whats wrong. Here is what it says:
yinyongzhen#eagle:Desktop/tingtweak ‹master*›$ make package
Making all for tweak tingtweak…
make[2]: Nothing to be done for internal-library-compile'.
Making stage for tweak tingtweak…
dm.pl: building packagecom.yz.tingtweak:iphoneos-arm' in `./packages/com.yz.tingtweak_0.0.1-1+debug_iphoneos-arm.deb'
open2: exec of lzma -c0 failed at /Users/yinyongzhen/theos/bin/dm.pl line 113.
make: *** [internal-package] Error 2
Try running the lzma command in terminal, if it's missing, you need to:
brew install xz
For those facing the same issue, make sure dpkg is installed on your machine. It is require for Theos. Installing it will get rid of the error with lzma (it seems to be part of).
brew install dpkg

luci compilation error:iwinfo.h: No such file or directory

I downloaded the luci trunk from git https://github.com/openwrt/luci.git and got the following error when i compile it on centOS.
I already have iw package intalled but still got the error.
Package iw-3.10-4.el7.x86_64 already installed and latest version
How can i fix this issue?
make[1]: Entering directory `/home/mullex/Dev/Projects/openwrt-luci/modules/admin-full'
rm -f src/*.o src/luci-bwc
gcc -O2 --std=gnu99 -Wall -pedantic -fPIC -c -o src/luci-bwc.o src/luci-bwc.c
src/luci-bwc.c:35:20: fatal error: iwinfo.h: No such file or directory
#include <iwinfo.h>
^
compilation terminated.
make[1]: *** [src/luci-bwc.o] Error 1
make[1]: Leaving directory `/home/mullex/Dev/Projects/openwrt-luci/modules/admin-full'
*** Compilation of modules/admin-full failed!
make: *** [gccbuild] Error 1
I experienced this same problem this morning, when running the LuCI Makefile on Ubuntu, in order to get LuCI up and running on my PC for development purposes without the need to be connected to a router. I solved it in the following way:
At this web page...
http://luci.subsignal.org/trac/changeset/10377
... there is a description of lines that were added to two files to implement features requiring the iwinfo.h include file. I had already installed iw (by using the command "sudo apt-get install iw") but it seemed that this did not include iwinfo.h, which I understand is a file that you can only install on OpenWRT. Therefore, to solve the issue, I manually reverted the two files back to their original state by deleting the green lines and adding in the red lines. By green lines and red lines I mean those highlighted in the Diff output of the files given at the above web page. Hence, I ended up with two revised (rolled-back) versions of the following two files:
contrib/package/luci/Makefile and modules/admin-full/src/luci-bwc.c
I then ran the top-level LuCI Makefile again, using the following command while in the top-level directory:
sudo make runuhttpd
The Makefile completed without errors, and its final step was to start the web server at localhost:8080/luci/
At this point in the terminal window, the process waits (i.e. does not return to command prompt) because it is running the web server. In my web browser, at localhost:8080/luci/, I now successfully see the default index page. If I enter CTRL-C in the terminal window, to kill the process, the web server stops and the default index page is no longer viewable in the web browser.
To run the web server again, in the terminal I enter the last command that was executed by the Makefile, which is:
[my-top-level-LUCI-installation-directory]/host/usr/sbin/uhttpd -p 8080 -h [my-top-level-LUCI-installation-directory]/host/www -f
Hope this helps.

Toolchain binaries cannot be found

Trying to build recent version of u-boot bootloader for my mini2440 ARM board I managed to download a toolchain package from codesourcery and extract it to following path: /usr/local/arm-2008q3/
I also exported following values for current session:
export PATH=$PATH:/usr/local/arm-2008q3/bin
export CROSS_COMPILE=arm-none-linux-gnueabi-
When I run make I get a following output and I cant figure out why:
make: arm-none-linux-gnueabi-gcc: Command not found
for dir in tools examples api_examples ; do make -C $dir _depend ; done
make[1]: arm-none-linux-gnueabi-gcc: Command not found
make[1]: Entering directory `/home/deth/uboot/mini2440/tools'
make[1]: Nothing to be done for `_depend'.
make[1]: Leaving directory `/home/deth/uboot/mini2440/tools'
make[1]: arm-none-linux-gnueabi-gcc: Command not found
make[1]: Entering directory `/home/deth/uboot/mini2440/examples'
/bin/sh: 1: arm-none-linux-gnueabi-gcc: not found
I double checked everything and binaries indeed reside in mentioned folder but... Please explain where I'm wrong.
Well, after almost three days of headbanging into the wall I managed to solve this. To be honest I might have never solved it if occasionally hadn't installed the COdesourcery toolchain with executable installer which they also provide. After doing that the manually unpacked version started to execute! This of course led to a conclusion that there were libraries missing. I tried to reproduce the problem on separate virtual machine and voila, here are couple of words that solved the whole issue:
sudo apt-get install lib32z1 lib32ncurses5 lib32bz2-1.0
Hope this will help someone, and thanks to everyone for help!

Error in compiling the kernel

I am trying to compile linux 3.5.2 kernel. I followed this tutorial
"http://blog.techveda.org/index.php/adding-system-calls-linux-kernel-3-5-x/"
and everything was going perfect.but when I tried to do build the kernel I get this error
here are the commands I used to build my kernel
sudo cp /boot/config-3.5.0-17-generic ./config
make oldconfig
sudo make -j8
the error when I do the make -j8 is:
ERROR: "__modver_version_show" [drivers/staging/rts5139/rts5139.ko] undefined!
WARNING: modpost: Found 2 section mismatch(es).
To see full details build your kernel with:
'make CONFIG_DEBUG_SECTION_MISMATCH=y'
make[1]: *** [__modpost] Error 1
make: *** [modules] Error 2
I really can't find what is the problem it looks like I have a problem with a driver but how could this happen and I am using my old configuration file that is already working. ??
I have met the same problem while compiling kernel 3.2, and solve it by "su -" to root and then recompile.
If you do not need this driver simply mod the config fiel like follows:
CONFIG_RTS5139=n

How do I build the ManDVD package from compressed source on Linux?

When I try to install any compressed file into Linux I never can, because:
When I execute ./configure the system says bash: ./configure: No such file or directory.
When I execute sudo ./configure the system says sudo: ./configure: command not found.
Worst , when I execute make the system says make: *** No rule to make target '/usr/lib64/qt-3.3/mkspecs/default/qmake.conf', needed by 'Makefile'. Stop.
With make install the system says make: *** No rule to make target '/usr/lib64/qt-3.3/mkspecs/default/qmake.conf', needed by 'Makefile'. Stop.
Completion: I can't install nothing that is not in the repository into my system.
Note: I use Linux Mint XFCE 13 (Maya).
What can I do to solve this unpleasant problem?
As ManDVD's Makefile says:
#############################################################################
# Makefile for building: mandvd
# Generated by qmake (1.07a) (Qt 3.3.8b) on: Sun Mar 8 18:32:50 2009
# Project: mandvd.pro
# Template: app
# Command: $(QMAKE) -o Makefile mandvd.pro
#############################################################################
Makefile was autogenerated by qmake.
I'm no expert at using qmake, but I think executing qmake will re-generate Makefile, so then you can run make && sudo make install as INSTALL file says.
You should've already discovered project is kind of messy (if not discontinued at all), so take care, and may the force be with you :)

Resources