I gonna debugging kernel with QEMU to GDB.
I had commanded such as "make && sudo make install" on GDB though, Error have shown up.
Error Message:
make[1]: Leaving directory '/home/ubuntu/work/Kernel/linux-kernel/qemu/binutils-gdb/gdb'
g++ -std=gnu++11 -g -02 -I. -I. -I./common -I./config -DLOCALEDIR=""/usr/local/share/locale"" -DHAVE_CONFIG_H -I./../include/opcode -I./../opcodes/.. -I./../readline/.. -I./../zlib -I../bfd -I./../bfd -I./../include -I../libdecnumber -I./../libdecnumber -I./gnulib/import -Ibuild-gunlib/import -DTUI=1 -Wall -Wpointer-arith -Wno-unused -Wunused-value -Wunused-function -Wno-switch -Wno-char-subscripts -Wempty-body -Wunused-but-set-parameter -Wunused-but-set-variable -Wno-sign-compare -Wno-write-strings -Wno-narrowing -Wformat-nonliteral -c -o dfp.o -MT dfp.o -MMD -MP -MF .deps/dfp.Tpo dfp.c
In file included from ../libdecnumber/decNumber.h:37:0,
from ../libdecnumber/dpd/decimal128.h:58,
from dfp.c:29:
../libdecnumber/decContext.h:54:61: fatal error: gstdint.h: No such file or directory
compilation terminated.
Makefile:1872: recipe for target 'dfp.o' failed
make: *** [dfp.o] Error 1enter code here
What should I do? Please, help me.
Thank you.
You need to run configure in the libdecnumber before building gdb.
Related
why am I getting "fatal error: asm/early_ioremap.h: No such file or directory" while building simple hello world kernel driver for x86_64 with Linux 4.4.15 libraries using gcc-4.8.5? gcc is searching for asm/early_ioremap.h which is not available in Linux 4.4.15.
any idea how can i fix this?
/opt/gcc-4.8.5-glibc-2.21-p8/x86_64-linux-gnu/bin/x86_64-linux-gnu-gcc -M -MP -MT '/home/obj/src/kernel/hello_world/hello.o' -MT '/home/obj/src/kernel/hello_world/hello.d' -MT 'hello.E' -MT 'hello.S' -I/home/src/kernel/hello_world -I/home/obj/src/kernel/linux-4.4.15/include -I/home/src/inc -I/home/obj/src/kernel/linux-4.4.15/arch/x86/include -D__KERNEL__ -DMODULE -DPACKET_LEAK_TRACING -DSIZEOF_CPU_REGISTER=8 -DNUM_DEV_CF=0 -DNUM_DEV_USB=0 -mtune=nocona -march=nocona -m64 -pipe -std=gnu89 -g -nostdinc -isystem /opt/gcc-4.8.5-glibc-2.21-p8/x86_64-linux-gnu/lib/gcc/x86_64-linux-gnu/4.8.5/include -O2 -fno-strict-aliasing -fno-common -ffreestanding -Wall -Wstrict-prototypes -Wno-trigraphs -Wmissing-format-attribute -Wdisabled-optimization -Wwrite-strings -Wimplicit-int -Wmissing-braces -Wmissing-noreturn -Wundef -Wmissing-field-initializers -Wmissing-declarations -Wmissing-prototypes -Wno-unused-parameter -Winline -mcmodel=kernel -fno-omit-frame-pointer -fno-stack-protector -mno-red-zone -fno-asynchronous-unwind-tables -imacros generated/autoconf.h hello.c -I/home/obj/src/kernel/linux-4.4.15/include/uapi/ -I/home/obj/src/kernel/linux-4.4.15/arch/x86/include/uapi/
In file included from /home/obj/src/kernel/linux-4.4.15/arch/x86/include/asm/realmode.h:5:0,
from /home/obj/src/kernel/linux-4.4.15/arch/x86/include/asm/acpi.h:33,
from /home/obj/src/kernel/linux-4.4.15/arch/x86/include/asm/fixmap.h:19,
from /home/obj/src/kernel/linux-4.4.15/arch/x86/include/asm/apic.h:12,
from /home/obj/src/kernel/linux-4.4.15/arch/x86/include/asm/smp.h:12,
from /home/obj/src/kernel/linux-4.4.15/arch/x86/include/asm/mmzone_64.h:10,
from /home/obj/src/kernel/linux-4.4.15/arch/x86/include/asm/mmzone.h:4,
from /home/obj/src/kernel/linux-4.4.15/include/linux/mmzone.h:856,
from /home/obj/src/kernel/linux-4.4.15/include/linux/gfp.h:5,
from /home/obj/src/kernel/linux-4.4.15/include/linux/kmod.h:22,
from /home/obj/src/kernel/linux-4.4.15/include/linux/module.h:13,
from hello.c:1:
/home/obj/src/kernel/linux-4.4.15/arch/x86/include/asm/io.h:43:31: fatal error: asm/early_ioremap.h: No such file or directory
#include <asm/early_ioremap.h>
^
compilation terminated.
gcc is searching for asm/early_ioremap.h which is not available in Linux 4.4.15.
any idea how can i fix this?
I think you've answered your own question; either you figure out where the functionality contained in that header file has moved, or with what it has been replaced, or you use a Linux 4.4.15-compatible hello world module, or you use an older kernel.
Personally, I'd go for trying out another example that is supposed to work with recent versions of Linux.
I've faced a very similar error just recently trying to build a module from the kernel to an out-of-tree output by specifying the O= flag.
It seems to be that this is the part causing the failure for me
make \
-j1 \
-C /lib/modules/4.17.9-041709-generic/build \
M=/home/kbingham/sources/linux/drivers/media/usb/uvc \
O=/tmp/build-uvc \
V=1 \
modules
fails,
with the error:
/usr/src/linux-headers-4.17.9-041709-generic/arch/x86/include/asm/io.h:44:10: fatal error: asm/early_ioremap.h: No such file or directory
#include <asm/early_ioremap.h>
^~~~~~~~~~~~~~~~~~~~~
compilation terminated.
whilst
make \
-j1 \
-C /lib/modules/4.17.9-041709-generic/build \
M=/home/kbingham/sources/linux/drivers/media/usb/uvc \
V=1 \
modules
suceeds.
I am using the Ubuntu 14.04 in virtual box and 64 bit OS
I try to cross compile Qt-everywhere 4.8.6 with a 'gcc-linaro-arm-linux-gnueabihf-4.7' cross compiler and get the following error while doing the 'make'
make[1]: Entering directory `/home/user/qt-everywhere-opensource-src-4.8.6
/src/corelib'
/usr/local/linaro/bin/arm-linux-gnueabihf-gcc (The path depends where the Toolchain has been installed) -c -pipe -O3 -march=armv7-a -mtune=cortex-a8 -mfpu=neon -mfloat-abi=hard -fvisibility=hidden -Wall -W -D_REENTRANT -fPIC -DQT_BUILD_CORE_LIB -DQT_NO_USING_NAMESPACE -DQT_NO_CAST_TO_ASCII -DQT_ASCII_CAST_WARNINGS -DQT_MOC_COMPAT -DQT_USE_QSTRINGBUILDER -DHB_EXPORT=Q_CORE_EXPORT -DQT_NO_DEBUG -I../../mkspecs/qws/linux-arm-linaro-g++ -I. -I../../include -I../../include/QtCore -I.rcc/release-static-emb-arm -Iglobal -I../3rdparty/zlib -I../3rdparty/harfbuzz/src -I../3rdparty/md5 -I../3rdparty/md4 -I.moc/release-static-emb-arm -o .obj/release-static-emb-arm/adler32.o ../3rdparty/zlib/adler32.c
/bin/sh: 1: Syntax error: word unexpected (expecting ")")
make[1]: *** [.obj/release-static-emb-arm/adler32.o] Error 2
make[1]: Leaving directory `/home/user/qt-everywhere-opensource-src-4.8.6/src/corelib'
make: *** [sub-corelib-install_subtargets-ordered] Error 2
The .configure script has no problems
Can anyone help out, what causes this?
This text doesn't belong in your call to gcc:
(The path depends where the Toolchain has been installed)
Remove that to get rid of the error.
I downloaded Openni2 from github and run $make following the instruction in README. I got this error:
g++ -MD -MP -MT "./../../../Bin/Intermediate/x86-Release/libOpenNI2.jni.so/org_openni_NativeMethods.d ../../../Bin/Intermediate/x86-Release/libOpenNI2.jni.so/org_openni_NativeMethods.o" -c -msse3 -Wall -O2 -DNDEBUG -I. -I../../../Include -I../../../ThirdParty/PSCommon/XnLib/Include -fPIC -fvisibility=hidden -o ../../../Bin/Intermediate/x86-Release/libOpenNI2.jni.so/org_openni_NativeMethods.o org_openni_NativeMethods.cpp
g++ -o ../../../Bin/x86-Release/libOpenNI2.jni.so ./../../../Bin/Intermediate/x86-Release/libOpenNI2.jni.so/OpenNI.jni.o ./../../../Bin/Intermediate/x86-Release/libOpenNI2.jni.so/org_openni_NativeMethods.o -L../../../Bin/x86-Release -lOpenNI2 -Wl,--no-undefined -shared
/usr/lib/i386-linux-gnu/libc_nonshared.a(stack_chk_fail_local.oS): In function `__stack_chk_fail_local':
(.text+0x10): undefined reference to `__stack_chk_fail'
collect2: error: ld returned 1 exit status
make[1]: *** [../../../Bin/x86-Release/libOpenNI2.jni.so] Error 1
make[1]: Leaving directory `/home/smalleyreaserch/OpenNI2/Wrappers/java/OpenNI.jni'
make: *** [Wrappers/java/OpenNI.jni] Error 2
I have all the required packages installed. Can anyone help me?
My system is Ubuntu 14.04 32 bits but the computer is 64 bits. would that be the reason why Im getting this error?
Some other people had this problem... but it was mainly in i686 computers... anyways, here is a possible solution.
First, make sure you have java and not openjava... I have read that this gives sometimes problems.
Secondly, use
export LDFLAGS+="-lc"
This should fix your problem, if not just leave a comment
I'm trying to cross compile NodeJS for Windows CE and I can't seem to figure it out. We'd like to run Node on devices using Freescale ARM1136-MX35 processors.
I've tried using cegcc but to no avail, and I've also tried configuring using: ./configure --without-npm --without-ssl --without-snapshot --dest-cpu=arm --dest-os=win, but there were just too many errors. Has anyone had any success compiling Node for Windows CE?
Here's the error I get using the normal gcc:
root#kevin-vm:~/node-v0.10.26# make
make -C out BUILDTYPE=Release V=1
make[1]: Entering directory `/root/node-v0.10.26/out'
g++ '-DNODE_WANT_INTERNALS=1' '-DARCH="arm"' '-DPLATFORM="linux"' '-DNODE_TAG=""' '-DHAVE_OPENSSL=0' '-DHAVE_ETW=1' '-DHAVE_PERFCTR=1' '-D__POSIX__' '-D_LARGEFILE_SOURCE' '-D_FILE_OFFSET_BITS=64' '-D_POSIX_C_SOURCE=200112' -I../src -I../tools/msvs/genfiles -I../deps/uv/src/ares -I/root/node-v0.10.26/out/Release/obj/gen -I../deps/v8/include -I../deps/zlib -I../deps/http_parser -I../deps/cares/include -I../deps/uv/include -Wall -Wextra -Wno-unused-parameter -pthread -O2 -fno-strict-aliasing -fno-tree-vrp -fno-omit-frame-pointer -fno-rtti -fno-exceptions -MMD -MF /root/node-v0.10.26/out/Release/.deps//root/node-v0.10.26/out/Release/obj.target/node/src/node.o.d.raw -c -o /root/node-v0.10.26/out/Release/obj.target/node/src/node.o ../src/node.cc
In file included from ../src/node_counters.h:36:0,
from ../src/node.cc:35:
../src/node_win32_perfctr_provider.h:33:8: error: ‘HANDLE’ does not name a type
../src/node_win32_perfctr_provider.h: In function ‘bool node::NODE_COUNTER_ENABLED()’:
../src/node_win32_perfctr_provider.h:35:45: error: ‘NodeCounterProvider’ was not declared in this scope
make[1]: *** [/root/node-v0.10.26/out/Release/obj.target/node/src/node.o] Error 1
make[1]: Leaving directory `/root/node-v0.10.26/out'
make: *** [node] Error 2
Using cegcc:
root#kevin-vm:~/node-v0.10.26# make
/usr/bin/python tools/gyp_node.py -f make
make -C out BUILDTYPE=Release V=1
make[1]: Entering directory `/root/node-v0.10.26/out'
arm-cegcc-gcc '-D_DARWIN_USE_64_BIT_INODE=1' '-D_LARGEFILE_SOURCE' '-D_FILE_OFFSET_BITS=64' '-D_GNU_SOURCE' '-DHAVE_CONFIG_H' '-DCARES_STATICLIB' -I../deps/cares/include -I../deps/cares/src -I../deps/cares/config/linux -Wall -Wextra -Wno-unused-parameter -pthread -g --std=gnu89 -pedantic -Wall -Wextra -Wno-unused-parameter -O2 -fno-strict-aliasing -fno-tree-vrp -fno-tree-sink -fno-omit-frame-pointer -MMD -MF /root/node-v0.10.26/out/Release/.deps//root/node-v0.10.26/out/Release/obj.target/cares/deps/cares/src/ares_cancel.o.d.raw -c -o /root/node-v0.10.26/out/Release/obj.target/cares/deps/cares/src/ares_cancel.o ../deps/cares/src/ares_cancel.c
arm-cegcc-gcc: unrecognized option '-pthread'
/bin/../libexec/gcc/arm-cegcc/4.4.0/cc1: error while loading shared libraries: libmpfr.so.1: cannot open shared object file: No such file or directory
make[1]: *** [/root/node-v0.10.26/out/Release/obj.target/cares/deps/cares/src/ares_cancel.o] Error 1
make[1]: Leaving directory `/root/node-v0.10.26/out'
make: *** [node] Error 2
Edit:
Our company decided to stop using Windows CE products and switched to embedded Linux systems (ARMv6) and it runs 0.12.2 just fine on there.
I'm attempting to compile abiword in my Cygwin environment.
I have cygwin 1.7.25.
The compile fails regarding glib:
libtool: compile: gcc -DHAVE_CONFIG_H -I. -I.. -D_REENTRANT -I/usr/include/fribidi -
I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/libgsf-1 -I/usr/include/libxml2
-I/usr/include/wv -I/usr/include/freetype2 -I/usr/include/cairo -I/usr/include/pixman-1 -
I/usr/include/libpng15 -I/usr/include/pango-1.0 -I/usr/include/harfbuzz -I/usr/include/gtk-2.0 -
I/usr/lib/gtk-2.0/include -I/usr/include/atk-1.0 -I/usr/include/gdk-pixbuf-2.0 -
I/usr/include/gio-unix-2.0/ -I/usr/include/gtk-unix-print-2.0 -I/usr/include/librsvg-2.0 -Wall -
Wextra -Wsign-compare -Wpointer-arith -Wchar-subscripts -Wwrite-strings -Wmissing-noreturn -
Wunused -Wpointer-arith -Wshadow -g -O2 -MT go-cmd-context.lo -MD -MP -MF .deps/go-cmd-
context.Tpo -c goffice/app/go-cmd-context.c -DDLL_EXPORT -DPIC -o .libs/go-cmd-context.o
In file included from ./goffice/app/goffice-app.h:25:0,
from ./goffice/app/go-cmd-context.h:24,
from goffice/app/go-cmd-context-impl.h:4,
from goffice/app/go-cmd-context.c:10:
/usr/include/glib-2.0/glib/gmacros.h:35:2: error: #error "Only <glib.h> can be included directly."
goffice/app/go-cmd-context.c: In function ‘go_cmd_context_get_type’:
goffice/app/go-cmd-context.c:147:3: warning: missing initializer [-Wmissing-field-initializers]
goffice/app/go-cmd-context.c:147:3: warning: (near initialization for ‘go_cmd_context_info.class_init’) [-Wmissing-field-initializers]
Makefile:503: recipe for target `go-cmd-context.lo' failed
make[3]: *** [go-cmd-context.lo] Error 1
make[3]: Leaving directory `/home/kingram/src/abiword-2.8.6/goffice-bits'
Makefile:409: recipe for target `all' failed
make[2]: *** [all] Error 2
make[2]: Leaving directory `/home/kingram/src/abiword-2.8.6/goffice-bits'
Makefile:670: recipe for target `all-recursive' failed
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/kingram/src/abiword-2.8.6'
Makefile:473: recipe for target `all' failed
make: *** [all] Error 2
A google search produced a Redhat bug report suggesting that Glib 2.31 is required.
I'm considering downloading and compiling the latest glib from source as cygwin does not appear to be using it.
However, I'd like some insight on this choice or hear if there are some other experiences around this.
Actually, Glib 2.31 is the culprit; its headers changed so that only the top-level headers may be #included, not the individual class headers.
Cygwin does have the latest stable branch of Glib.
Therefore, in order to get this to compile, you would need to fix the #includes in the code, as indicated in the error messages.
However, I can save you the trouble: Abiword packages are available from Cygwin Ports.