When I use make command it gives me this
gcc -I/usr/include/libxml2 -I/usr/lib/vlc/include/ `pkg-config --cflags gtk+-2.0 gstreamer-0.10` -o obj/callbacks.o -c src/callbacks.c
In file included from src/callbacks.c:6:
src/includes.h:29:37: error: gst/interfaces/xoverlay.h: No such file or directory
src/includes.h:40:21: error: vlc/vlc.h: No such file or directory
src/includes.h:41:28: error: vlc/deprecated.h: No such file or directory
src/includes.h:42:24: error: vlc/libvlc.h: No such file or directory
src/includes.h:43:35: error: vlc/libvlc_structures.h: No such file or directory
In file included from src/includes.h:202,
from src/callbacks.c:6:
src/extern_vars.h:111: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
src/extern_vars.h:112: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
make: *** [obj/callbacks.o] Error 1
I have downloaded from here
http://sourceforge.net/projects/uctimsclient.berlios/
This package needs VLC and GStreamer development files (headers and libs) to be compiled from source. What OS do you use?
Related
I've installed zlib library but when I am compiling this project - https://github.com/mgbellemare/Arcade-Learning-Environment -
it gives me an error not found zlib.
When I run
gcc -o a a.c ; ./a
where a.c file uses "#include "
I've tried these flags
-DZLIB_LIBRARY:FILEPATH
-DZLIB_INCLUDE_DIR:PATH
-ZLIB_CFLAGS=" " ZLIB_LIBS="-lz"
-lz
and recompile the cmake package from source
/home/mostafa/Documents/temp/Arcade-Learning-Environment/src/common/ScreenExporter.cpp:18:10: fatal error: zlib.h: No such file or directory
#include <zlib.h>
^~~~~~~~
compilation terminated.
make[2]: *** [CMakeFiles/ale-bin.dir/build.make:183: CMakeFiles/ale-bin.dir/src/common/ScreenExporter.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:100: CMakeFiles/ale-bin.dir/all] Error 2
make: *** [Makefile:130: all] Error 2
I just figured it out, I had to create a new user and things worked
I've got this error and can't find anything about it (-lAdIdAccess):
ld: warning: directory not found for option '-L/Users/macbook/Desktop/rapid ball/Rapid'
ld: warning: directory not found for option '-LBall'
ld: warning: directory not found for option '-LBall/googleanalytics'
ld: library not found for -lAdIdAccess
clang: error: linker command failed with exit code 1 (use -v to see invocation)
What should I do?
I'm trying to cross compile a package applicaiton with gcc-eabi. I have modified the configuration file to point to all the target directories. But the linker still gives an error when linking some shared libraries. The exact error is below:
Linking CXX shared library /home/aeodrs/JAUS++-2.110519-src/libraries/jaus++/2.0/lib /libcxutils.so
/home/aeodrs/JAUS++-2.110519-src/libraries/jaus++/2.0/lib/libcxjpeg-6b.a: could not read symbols: File format not recognized collect2: ld returned 1 exit status
make[2]: *** [/home/aeodrs/JAUS++-2.110519-src/libraries/jaus++/2.0/lib/libcxutils.so] Error 1
make[1]: *** [libcxutils/CxUtils/libcxutils/CMakeFiles/cxutils.dir/all] Error 2
make: *** [all] Error 2
aeodrs#ubuntu:~/JAUS++-2.110519-src/libraries/jaus++/2.0/build/cmake$
I'm not sure why the linker can't read or is corrupting the library file.
I am giving it a go at compiling lsyncd on Mac OS X (Lion) and I got a little stuck at my configure script not being able to locate my lua libraries:-
calvin$ ./configure
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... ./install-sh -c -d
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking for style of include used by make... GNU
checking dependency style of gcc... gcc3
checking whether make sets $(MAKE)... (cached) yes
checking pkg-config is at least version 0.9.0... yes
checking for LUA... no
checking for LUA... no
checking for LUA... no
checking for LUA... no
configure: error: Package requirements (lua >= 5.1.3) were not met:
No package 'lua' found
Consider adjusting the PKG_CONFIG_PATH environment variable if you
installed software in a non-standard prefix.
Alternatively, you may set the environment variables LUA_CFLAGS
and LUA_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details.
I do have lua installed via macports.
calvin$ lua -v
Lua 5.1.4 Copyright (C) 1994-2008 Lua.org, PUC-Rio
calvin$ which lua
/opt/local/bin/lua
UPDATE
I know for sure that the lua.pc file is located in:
calvin$ sudo find /opt/local -name "lua.pc"
/opt/local/lib/pkgconfig/lua.pc
and so, gone to the extent of explicitly specifying the PKG_CONFIG and PKG_CONFIG_PATH environment variables in my .bashrc file and sourcing it. Like this:
export PKG_CONFIG="/opt/local/lib/pkgconfig:$PKG_CONFIG"
export PKG_CONFIG_PATH="/opt/local/lib/pkgconfig:$PKG_CONFIG_PATH"
What do I need to do to set the correct PKG_CONFIG_PATH environment variable so that my configure script can find lua?
UPDATE #2
So I added in
export LUA_CFLAGS="/opt/local/include"
export LUA_LIBS="/opt/local/lib"
in my .bashrc file, and with that done, I can now run ./configure --without-inotify successfully, with the following output:-
calvin$ ./configure --without-inotify
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... ./install-sh -c -d
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking for style of include used by make... GNU
checking dependency style of gcc... gcc3
checking whether make sets $(MAKE)... (cached) yes
checking pkg-config is at least version 0.9.0... yes
checking for LUA... yes
checking how to run the C preprocessor... gcc -E
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking sys/inotify.h usability... no
checking sys/inotify.h presence... no
checking for sys/inotify.h... no
compiling without inotify
configure: creating ./config.status
config.status: creating Makefile
config.status: creating config.h
config.status: config.h is unchanged
config.status: executing depfiles commands
Unfortunately, running make doesn't work as it seems that the lsyncd.h header file is unable to include lua.h.
calvin$ make
make all-am
gcc -DHAVE_CONFIG_H -I. -g -O2 -Wall /opt/local/include -MT lsyncd.o -MD -MP -MF .deps/lsyncd.Tpo -c -o lsyncd.o lsyncd.c
In file included from lsyncd.c:16:
lsyncd.h:27:17: error: lua.h: No such file or directory
In file included from lsyncd.c:16:
lsyncd.h:52: error: expected ‘)’ before ‘*’ token
lsyncd.h:55: error: expected ‘)’ before ‘*’ token
lsyncd.h:88: error: expected ‘)’ before ‘*’ token
lsyncd.h:115: error: expected ‘)’ before ‘*’ token
lsyncd.h:118: error: expected ‘;’ before ‘void’
lsyncd.h:130: error: expected ‘)’ before ‘*’ token
lsyncd.h:131: error: expected ‘;’, ‘,’ or ‘)’ before ‘void’
lsyncd.c:44:20: error: lualib.h: No such file or directory
lsyncd.c:45:21: error: lauxlib.h: No such file or directory
lsyncd.c:64:3: error: #error "need at least one notifcation system. please rerun ./configure"
lsyncd.c:175:3: warning: #warning having to use old style realpath()
lsyncd.c:337: error: expected ‘)’ before ‘*’ token
lsyncd.c:432: error: expected ‘)’ before ‘*’ token
lsyncd.c: In function ‘pipe_tidy’:
lsyncd.c:453: error: ‘struct observance’ has no member named ‘extra’
lsyncd.c: At top level:
lsyncd.c:522: error: expected ‘)’ before ‘*’ token
lsyncd.c:564: error: expected ‘)’ before ‘*’ token
lsyncd.c:565: error: expected ‘;’, ‘,’ or ‘)’ before ‘void’
lsyncd.c: In function ‘nonobserve_fd’:
lsyncd.c:650: error: ‘struct observance’ has no member named ‘tidy’
lsyncd.c: At top level:
lsyncd.c:662: error: expected ‘)’ before ‘*’ token
lsyncd.c:689: error: expected ‘)’ before ‘*’ token
lsyncd.c:730: error: expected ‘)’ before ‘*’ token
lsyncd.c:731: error: expected ‘)’ before ‘*’ token
lsyncd.c:740: error: expected ‘)’ before ‘*’ token
lsyncd.c:800: error: expected ‘)’ before ‘*’ token
lsyncd.c:821: error: expected ‘)’ before ‘*’ token
lsyncd.c:968: error: expected ‘)’ before ‘*’ token
lsyncd.c:1011: error: expected ‘)’ before ‘*’ token
lsyncd.c:1045: error: expected ‘)’ before ‘*’ token
lsyncd.c:1097: error: expected ‘)’ before ‘*’ token
lsyncd.c:1111: error: expected ‘)’ before ‘*’ token
lsyncd.c:1186: error: expected ‘)’ before ‘*’ token
lsyncd.c:1241: error: expected ‘)’ before ‘*’ token
lsyncd.c:1268: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘lsyncdlib’
lsyncd.c:1286: error: expected ‘)’ before ‘*’ token
lsyncd.c:1309: error: expected ‘)’ before ‘*’ token
lsyncd.c:1334: error: expected ‘)’ before ‘*’ token
lsyncd.c:1346: error: expected ‘)’ before ‘*’ token
lsyncd.c:1358: error: expected ‘)’ before ‘*’ token
lsyncd.c:1371: error: expected ‘)’ before ‘*’ token
lsyncd.c:1423: error: expected ‘)’ before ‘*’ token
lsyncd.c:1449: error: expected ‘)’ before ‘*’ token
lsyncd.c:1497: error: expected ‘)’ before ‘*’ token
lsyncd.c: In function ‘main1’:
lsyncd.c:1669: error: ‘lua_State’ undeclared (first use in this function)
lsyncd.c:1669: error: (Each undeclared identifier is reported only once
lsyncd.c:1669: error: for each function it appears in.)
lsyncd.c:1669: error: ‘L’ undeclared (first use in this function)
lsyncd.c:1677: warning: implicit declaration of function ‘lua_open’
lsyncd.c:1678: warning: implicit declaration of function ‘luaL_openlibs’
lsyncd.c:1683: warning: implicit declaration of function ‘lua_getglobal’
lsyncd.c:1684: warning: implicit declaration of function ‘luaL_checkstring’
lsyncd.c:1684: warning: assignment makes pointer from integer without a cast
lsyncd.c:1693: warning: implicit declaration of function ‘lua_pop’
lsyncd.c:1710: warning: implicit declaration of function ‘printlogf0’
lsyncd.c:1717: warning: implicit declaration of function ‘register_lsyncd’
lsyncd.c:1754: warning: implicit declaration of function ‘luaL_loadfile’
lsyncd.c:1755: warning: implicit declaration of function ‘lua_tostring’
lsyncd.c:1762: warning: implicit declaration of function ‘luaL_loadbuffer’
lsyncd.c:1776: warning: implicit declaration of function ‘lua_pcall’
lsyncd.c:1776: error: ‘LUA_MULTRET’ undeclared (first use in this function)
lsyncd.c:1780: warning: implicit declaration of function ‘lua_pushlightuserdata’
lsyncd.c:1782: warning: implicit declaration of function ‘lua_insert’
lsyncd.c:1784: warning: implicit declaration of function ‘lua_settable’
lsyncd.c:1784: error: ‘LUA_REGISTRYINDEX’ undeclared (first use in this function)
lsyncd.c:1789: warning: implicit declaration of function ‘lua_gettable’
lsyncd.c:1790: warning: implicit declaration of function ‘lua_pushstring’
lsyncd.c:1792: warning: implicit declaration of function ‘lua_remove’
lsyncd.c:1800: warning: assignment makes pointer from integer without a cast
lsyncd.c:1831: warning: implicit declaration of function ‘load_runner_func’
lsyncd.c:1847: warning: implicit declaration of function ‘lua_newtable’
lsyncd.c:1849: warning: implicit declaration of function ‘lua_pushnumber’
lsyncd.c:1866: warning: assignment makes pointer from integer without a cast
lsyncd.c:1930: warning: implicit declaration of function ‘lua_pushboolean’
lsyncd.c:1935: warning: implicit declaration of function ‘masterloop’
lsyncd.c:1943: error: ‘struct observance’ has no member named ‘tidy’
lsyncd.c:1965: warning: implicit declaration of function ‘lua_close’
make[1]: *** [lsyncd.o] Error 1
make: *** [all] Error 2
Any suggestions?
SOLVED IT
./configure --without-inotify --with-fsevents CFLAGS="-I /Users/calvin/xnu-1699.24.23/" LUA_CFLAGS="-I /opt/local/include" LUA_LIBS="/opt/local/lib/liblua.a"
Dependencies are:
XNU corresponding to the version of Mac OS X, http://www.opensource.apple.com/source/xnu/xnu-1699.24.23/ for my scenario
asciidoc (which I installed through macports)
some minor syntax error in lsyncd, I have sent a pull request to the lsyncd developer https://github.com/axkibe/lsyncd
and a minor change in Makefile (after Makefile is generated from configure) from
this
doc/lsyncd.1: doc/lsyncd.1.xml
xsltproc -o $# -nonet /etc/asciidoc/docbook-xsl/manpage.xsl $<
to
doc/lsyncd.1: doc/lsyncd.1.xml
xsltproc -o $# -nonet /opt/local/etc/asciidoc/docbook-xsl/manpage.xsl $<
Then run
make
And lsyncd should be successfully compiled.
I'm trying to build a arm-elf-gcc cross compiler.
So firts I installed binutils 2.18 with the following configure options:
./configure --target=arm-elf --enable-interwork --enable-multilib
This seems to work fine.
next I installed gmp, mpfr and libmpc
so now to the gcc itself.
//edit - removed previous error and updated with the current one (I tried to build everything separately)
First I install a bootstrap gcc with these configure options:
--target=arm-elf --disable-libssp --with-newlib --without-headers --with-gnu-as --with-gnu-ld
And afterwards I try to build newlib 1.17.0 with it
--target=arm-elf --disable-werror --disable-newlib-supplied-syscalls --disable-nls --with-gnu-as --with-gnu-ld
But this still results in the same error. Maybe newlib tries to build for x86 architecture with the apple gcc (I'm running these things all on OS X) which maybe doesn't understand these parameters?
cc1: error: unrecognized command line option "-msse4"
../../../../../../newlib/libc/argz/dummy.c:1: error: bad value (core2) for -march= switch
cc1: error: unrecognized command line option "-msse4"
FATAL:/usr/bin/../libexec/gcc/darwin/x86_64/as: I don't understand 'm' flag!
../../../../../../newlib/libc/argz/argz_add.c:1: error: bad value (core2) for -march= switch
cc1: error: unrecognized command line option "-msse4"
../../../../../../newlib/libc/argz/argz_add_sep.c:1: error: bad value (core2) for -march= switch
cc1: error: unrecognized command line option "-msse4"
make[8]: *** [lib_a-argz_add.o] Error 1
make[8]: *** Waiting for unfinished jobs....
../../../../../../newlib/libc/argz/argz_append.c:1: error: bad value (core2) for -march= switch
FATAL:/usr/bin/../libexec/gcc/darwin/x86_64/as: I don't understand 'm' flag!
cc1: error: unrecognized command line option "-msse4"
../../../../../../newlib/libc/argz/argz_create.c:1: error: bad value (core2) for -march= switch
cc1: error: unrecognized command line option "-msse4"
../../../../../../newlib/libc/argz/argz_count.c:1: error: bad value (core2) for -march= switch
FATAL:/usr/bin/../libexec/gcc/darwin/x86_64/as: I don't understand 'm' flag!
cc1: error: unrecognized command line option "-msse4"
../../../../../../newlib/libc/argz/argz_delete.c:1: error: bad value (core2) for -march= switch
make[8]: *** [lib_a-dummy.o] Error 1
make[8]: *** [lib_a-argz_create.o] Error 1
FATAL:/usr/bin/../libexec/gcc/darwin/x86_64/as: I don't understand 'm' flag!
FATAL:/usr/bin/../libexec/gcc/darwin/x86_64/as: I don't understand 'm' flag!
FATAL:/usr/bin/../libexec/gcc/darwin/x86_64/as: I don't understand 'm' flag!
make[8]: *** [lib_a-argz_add_sep.o] Error 1
make[8]: *** [lib_a-argz_delete.o] Error 1
FATAL:/usr/bin/../libexec/gcc/darwin/x86_64/as: I don't understand 'm' flag!
make[8]: *** [lib_a-argz_count.o] Error 1
make[8]: *** [lib_a-argz_append.o] Error 1
FATAL:/usr/bin/../libexec/gcc/darwin/x86_64/as: I don't understand 'm' flag!
cc1: error: unrecognized command line option "-msse4"
../../../../../../newlib/libc/argz/argz_create_sep.c:1: error: bad value (core2) for -march= switch
make[8]: *** [lib_a-argz_create_sep.o] Error 1
make[7]: *** [all-recursive] Error 1
make[6]: *** [all-recursive] Error 1
make[5]: *** [all] Error 2
make[4]: *** [multi-do] Error 1
make[3]: *** [all-multi] Error 2
make[2]: *** [all] Error 2
make[1]: *** [all-target-newlib] Error 2
make: *** [all] Error 2
Not every combination of binutils, gcc, and newlib work. I gave up a long time ago personally trying to find any combinations. Last time I was successful was in the gcc 3.x days, and you cant cross compile gcc 3.x with gcc 4.x or at least it is getting harder.
Maybe try without the interwork and multilib until you get straight arm working. Maybe you need an eabi in there in some form arm-non-eabi, something like that?
Here is a combination that gets a working gcc and libgcc
http://www.cowlark.com/2009-07-04-building-gcc/
code sourcery should have their build information available to figure out how to, at least get as far as binutils and gcc.
Somehow you are getting a core2 architecture in there, I dont see anything obvious though.
Yes this is an old post, but I found it as I was looking for an answer.
Now I found the answer, so I'll post it here.
Look closely at the "as" - which as is actually executed, your as for the host-computer or for the target architecture ?
The answer is: The as for the target architecture.
This happens when you build on Mac - both on PowerPC and on intel.
You should set up your PATH environment variable right after building binutils, so that the correct binutils will be found, otherwise your native x86 (or PowerPC) tools will be used to build your ARM target. That just won't work.