I am trying compile ocl-icd2.1.3 in CentOs 6.3 but get error.
ocl_icd_loader.c:40: error: expected [error|warning|ignored] after '#pragma GCC diagnostic'
ocl_icd_loader.c:41: error: unknown option after '#pragma GCC diagnostic' kind
ocl_icd_loader.c:44: error: expected [error|warning|ignored] after '#pragma GCC diagnostic'
In file included from ocl_icd_loader.h:31,
from ocl_icd_loader.c:48:
ocl_icd.h:32: error: expected [error|warning|ignored] after '#pragma GCC diagnostic'
ocl_icd.h:33: error: unknown option after '#pragma GCC diagnostic' kind
ocl_icd.h:41: error: expected [error|warning|ignored] after '#pragma GCC diagnostic'
In file included from ocl_icd_loader.c:50:
ocl_icd_debug.h:29: error: expected [error|warning|ignored] after '#pragma GCC diagnostic'
ocl_icd_debug.h:30: error: unknown option after '#pragma GCC diagnostic' kind
ocl_icd_debug.h:35: error: expected [error|warning|ignored] after '#pragma GCC diagnostic'
In file included from ocl_icd_loader.c:50:
ocl_icd_debug.h:69: error: expected [error|warning|ignored] after '#pragma GCC diagnostic'
ocl_icd_debug.h:72: error: expected [error|warning|ignored] after '#pragma GCC diagnostic'
make[2]: *** [libOpenCL_la-ocl_icd_loader.lo] Error 1
make[2]: se sale del directorio `/home/juliancho/Descargas/ocl-icd-2.1.3'
make[1]: *** [all-recursive] Error 1
make[1]: se sale del directorio `/home/juliancho/Descargas/ocl-icd-2.1.3'
make: *** [all] Error 2
please help me.
Thank you so much.
Your source contains a line like
#pragma GCC diagnostic push
This kind of pragma was introduced in GCC 4.6. Your gcc release is too old to handle it.
You can:
upgrade your gcc
remove -Wunknown-pragmas or equivalent from the makefile
remove -Werror or equivalent from the makefile
remove #pragma GCC diagnostic push, #pragma GCC diagnostic pop from the source
but only the first option is reliable.
Yesterday upgrade gcc and now got this:
Wmissing-prototypes "is valid for C / Obj but not for C + + [Enabled by default]
Related
Unable to install gobject-introspection - symbol lookup error: and undefined symbol: g_unicode_type_get_type
I tried to compile Gtk4, and download gobject-introspection 1.30, 1.40, 1.50, 1.64.1. All failed with the same exact error except the last one that produced another error.
Errors for gobject-introspection 1.30, 1.40, 1.50,
CCLD _giscanner.la
ar: `u' modifier ignored since `D' is the default (see `U')
CC g_ir_compiler-compiler.o
CCLD g-ir-compiler
CC g_ir_generate-generate.o
CCLD g-ir-generate
CC g_ir_inspect-g-ir-inspect.o
CCLD g-ir-inspect
CC gi_dump_types-gdump.o
CC gi_dump_types-gi-dump-types.o
CCLD gi-dump-types
CC glib_print-glib-print.o
CCLD glib-print
GEN g-ir-scanner
GEN g-ir-annotation-tool
GEN g-ir-doc-tool
GISCAN GLib-2.0.gir
g-ir-scanner: GLib: warning: 736 warnings suppressed (use --warn-all to see them)
GISCAN GObject-2.0.gir
/home/elias/Downloads/gobject-introspection-1.50.0/tmp-introspectCppLzz/GObject-2.0: symbol lookup error: /home/elias/Downloads/gobject-introspection-1.50.0/tmp-introspectCppLzz/GObject-2.0: undefined symbol: g_unicode_type_get_type
Command '[u'/home/elias/Downloads/gobject-introspection-1.50.0/tmp-introspectCppLzz/GObject-2.0', u'--introspect-dump=/home/elias/Downloads/gobject-introspection-1.50.0/tmp-introspectCppLzz/functions.txt,/home/elias/Downloads/gobject-introspection-1.50.0/tmp-introspectCppLzz/dump.xml']' returned non-zero exit status 127
Makefile:3520: recipe for target 'GObject-2.0.gir' failed
make[2]: *** [GObject-2.0.gir] Error 1
make[2]: Leaving directory '/home/elias/Downloads/gobject-introspection-1.50.0'
Makefile:2810: recipe for target 'all-recursive' failed
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory '/home/elias/Downloads/gobject-introspection-1.50.0'
Makefile:1570: recipe for target 'all' failed
make: *** [all] Error 2
I solved that problem finding the solution here:
You're probably missing the development package. The package name
varies by distribution, but it's the one containing
/usr/lib/pkgconfig/gobject-introspection-1.0.pc (or
/usr/lib64/pkgconfig/gobject-introspection-1.0.pc for some 64-bit
distros):
Fedora, CentOS, RHEL, etc.: gobject-introspection-devel
Debian,Ubuntu, Mint, etc.: libgirepository1.0-dev Arch: gobject-introspection
FreeBSD: gobject-introspection
Cygwin: libgirepository1.0-devel msys2:
mingw-w64-x86_64-gobject-introspection and/or mingw-w64-i686-gobject-introspection
I encountered the following error while I was compiling gpfs.
OS:RHEL7.4
GPFS:4.2.1
1.# cd /usr/lpp/mmfs/src/
2.# make LINUX_DISTRIBUTION=REDHAT_AS_LINUX Autoconfig
3.# make World
When the third step occurs, the following error occurs。
DVERBOSETRACE -DLROC -D"KBUILD_STR(s)=#s" -D"KBUILD_BASENAME=KBUILD_STR()" -fno-stack-protector -Wformat=0 -Wno-format-security -I/usr/lpp/mmfs/src/gpl-linux -c kdump.c
cc kdump.o kdump-kern.o kdump-kern-dwarfs.o -o kdump -lpthread
kdump-kern.o: In function `GetOffset':
kdump-kern.c:(.text+0x9): undefined reference to `page_offset_base'
kdump-kern.o: In function `KernInit':
kdump-kern.c:(.text+0x58): undefined reference to `page_offset_base'
collect2: error: ld returned 1 exit status
make[1]: *** [modules] Error 1
make[1]: Leaving directory `/usr/lpp/mmfs/src/gpl-linux'
make: *** [Modules] Error 1
add unsigned long page_offset_base; on top of the file /usr/lpp/mmfs/src/gpl-linux/kdump.c
i see the same problem compiling with the kernel (3.10.0-693.1.1.el7.x86_64). (rhel7.3 updated + GPFS 4.2.3-1)
I resolved it using a previous kernel: kernel-3.10.0-514.el7.x86_64
I hope this help.
Regards
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'm trying to compile the examples provided with Libspotify on my Raspberry Pi B. Had a load of errors about alsa to start with, but managed to fix them by installing libasound2-dev.
Now I'm getting the following error when I try to compile - does anyone have any suggestions, please?
The problem seems to be stemming from
/usr/bin/ld: alsa-audio.o: undefined reference to symbol
'pthread_create##GLIBC_2.4' //lib/arm-linux-gnueabihf/libpthread.so.0:
error adding symbols: DSO missing from command line
Terminal output:
for a in jukebox spshell localfiles; do make -C $a all; done
make[1]: Entering directory '/home/username/Downloads/libspotify-12.1.103-Linux-armv6-bcm2708hardfp-release/share/doc/libspotify/examples/jukebox'
cc -I/usr/include/alsa -I/usr/local/include -Wall -L/usr/local/lib jukebox.o appkey.o alsa-audio.o audio.o -o jukebox -lasound -lspotify
/usr/bin/ld: alsa-audio.o: undefined reference to symbol 'pthread_create##GLIBC_2.4'
//lib/arm-linux-gnueabihf/libpthread.so.0: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status
Makefile:21: recipe for target 'jukebox' failed
make[1]: *** [jukebox] Error 1
make[1]: Leaving directory '/home/username/Downloads/libspotify-12.1.103-Linux-armv6-bcm2708hardfp-release/share/doc/libspotify/examples/jukebox'
make[1]: Entering directory '/home/username/Downloads/libspotify-12.1.103-Linux-armv6-bcm2708hardfp-release/share/doc/libspotify/examples/spshell'
cc -I/usr/local/include -Wall -L/usr/local/lib spshell.o spshell_posix.o appkey.o cmd.o browse.o search.o toplist.o inbox.o star.o playlist.o test.o -lreadline -lspotify -o spshell
/usr/bin/ld: spshell_posix.o: undefined reference to symbol 'pthread_create##GLIBC_2.4'
//lib/arm-linux-gnueabihf/libpthread.so.0: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status
Makefile:18: recipe for target 'spshell' failed
make[1]: *** [spshell] Error 1
make[1]: Leaving directory '/home/username/Downloads/libspotify-12.1.103-Linux-armv6-bcm2708hardfp-release/share/doc/libspotify/examples/spshell'
make[1]: Entering directory '/home/username/Downloads/libspotify-12.1.103-Linux-armv6-bcm2708hardfp-release/share/doc/libspotify/examples/localfiles'
make[1]: Leaving directory '/home/username/Downloads/libspotify-12.1.103-Linux-armv6-bcm2708hardfp-release/share/doc/libspotify/examples/localfiles'
I am attempting to build the AR Drone SDK on Ubuntu. When compiling the libraries I get the error:
//lib/x86_64-linux-gnu/libm.so.6: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status
I dont understand what the problem is. I am following this tutorial and the problem occurs when I run make. I have run ARDroneLib/Soft/Build/check_dependencies.sh and it outputs ok.
Any ideas what the problem is? Below is the full output from running make.
soribo#soribo-vm:~/Projects/ARDrone/ARDrone_SDK_2_0_1/Examples/Linux$ make
make[1]: Entering directory `/home/soribo/Projects/ARDrone/ARDrone_SDK_2_0_1/ARDroneLib/Soft/Build'
Libs already extracted
Building target static
Architecture x86_64 is already built
Creating universal static lib file from architectures x86_64
Build done.
Checking required Ubuntu packages ...
ok.
Building ARDroneTool/Lib
Building ARDroneTool/Lib
make[1]: Leaving directory `/home/soribo/Projects/ARDrone/ARDrone_SDK_2_0_1/ARDroneLib/Soft/Build'
make[1]: Entering directory `/home/soribo/Projects/ARDrone/ARDrone_SDK_2_0_1/Examples/Linux/Navigation/Build'
-- Building ardrone_navigation --
Libs already extracted
Building target static
Architecture x86_64 is already built
Creating universal static lib file from architectures x86_64
Build done.
Checking required Ubuntu packages ...
ok.
Building ARDroneTool/Lib
Building ARDroneTool/Lib
-- Linking ardrone_navigation --
ld common/mobile_main
/usr/bin/ld: ../../Soft/Build/targets_versions/ffmpeg_static_PROD_MODE_Linux_3.19.0-25-generic_GNU_Linux_usrbingcc_4.8.4/libavutil.a(eval.o): undefined reference to symbol 'fabs##GLIBC_2.2.5'
//lib/x86_64-linux-gnu/libm.so.6: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status
make[4]: *** [/home/soribo/Projects/ARDrone/ARDrone_SDK_2_0_1/Examples/Linux/Navigation/Build/../../Build/Release/common/mobile_main] Error 1
make[3]: *** [all] Error 2
make[2]: *** [build_app] Error 2
make[1]: *** [ardrone_navigation] Error 2
make[1]: Leaving directory `/home/soribo/Projects/ARDrone/ARDrone_SDK_2_0_1/Examples/Linux/Navigation/Build'
make: *** [all] Error 2
I had the same problem. I found the solution here:
http://jderobot.org/Varribas-tfm/ARDrone:starting_up#Building_Examples
Looking for undefined reference to symbol 'fabs##GLIBC_2.2.5', I reached to [2], that confirms an unmeet dependency problem [1].
What happened here?
libavutil.a(eval.o): undefined reference to symbol 'fabs##GLIBC_2.2.5'
libm.so.6: error adding symbols: DSO missing from command line
First line say us that libavutil is using fabs. It is declared into libm library, but -lm is missed in command line (Makefile).
ARDrone_SDK_2_0_1/Examples/Linux/Navigation/Build/Makefile:131
GENERIC_LIBS+=-liw -lpc_ardrone -lgthread-2.0 -lgtk-x11-2.0 -lrt -lxml2 -ludev -lswscale -lSDL -lm
Then, Navigation will compile successfully.