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.
Related
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?
I am trying to compile p0sixspwn on a Raspberry Pi, and after installing the endless dependencies (libimobiledevice <1.1.0, libusbmuxd, etc.) I successfully ran ./autogen.sh but when I tried running "make", I was met with the following errors (yes I am running as root):
root#raspberrypi:/home/pi/p0sixspwn# make
make all-recursive
make[1]: Entering directory '/home/pi/p0sixspwn'
Making all in src
make[2]: Entering directory '/home/pi/p0sixspwn/src'
gcc -DHAVE_CONFIG_H -I. -I.. -I../include -fPIC -I/usr/local/include -I/usr/local/include/libxml2 -I/usr/local/include -I/usr/local/include/libxml2 -I/usr/local/include -I/usr/local/lib/libzip/include -g -O2 -c -o pris0nbarake-idevicebackup2.o `test -f 'idevicebackup2.c' || echo './'`idevicebackup2.c
gcc -DHAVE_CONFIG_H -I. -I.. -I../include -fPIC -I/usr/local/include -I/usr/local/include/libxml2 -I/usr/local/include -I/usr/local/include/libxml2 -I/usr/local/include -I/usr/local/lib/libzip/include -g -O2 -c -o pris0nbarake-jailbreak.o `test -f 'jailbreak.c' || echo './'`jailbreak.c
In file included from jailbreak.c:56:0:
MobileDevice.h:193:1: error: unknown type name ‘mach_error_t’
MobileDevice.h:207:1: error: unknown type name ‘mach_error_t’
MobileDevice.h:229:1: error: unknown type name ‘mach_error_t’
MobileDevice.h:241:1: error: unknown type name ‘mach_error_t’
MobileDevice.h:258:1: error: unknown type name ‘mach_error_t’
MobileDevice.h:258:61: error: unknown type name ‘CFStringRef’
MobileDevice.h:262:1: error: unknown type name ‘mach_error_t’
MobileDevice.h:262:72: error: unknown type name ‘CFStringRef’
In file included from jailbreak.c:56:0:
MobileDevice.h:271:1: error: unknown type name ‘mach_error_t’
MobileDevice.h:386:1: error: unknown type name ‘CFMutableDictionaryRef’
MobileDevice.h:386:54: error: unknown type name ‘CFAllocatorRef’
MobileDevice.h:412:11: error: unknown type name ‘CFDictionaryRef’
MobileDevice.h:414:11: error: unknown type name ‘CFDictionaryRef’
MobileDevice.h:419:44: error: unknown type name ‘CFStringRef’
MobileDevice.h:420:5: error: unknown type name ‘CFStringRef’
MobileDevice.h:420:36: error: unknown type name ‘CFStringRef’
MobileDevice.h:421:15: error: unknown type name ‘CFStringRef’
MobileDevice.h:421:47: error: unknown type name ‘CFStringRef’
MobileDevice.h:422:54: error: unknown type name ‘CFStringRef’
MobileDevice.h:426:1: error: unknown type name ‘mach_error_t’
MobileDevice.h:427:1: error: unknown type name ‘mach_error_t’
MobileDevice.h:428:1: error: unknown type name ‘mach_error_t’
MobileDevice.h:429:1: error: unknown type name ‘mach_error_t’
MobileDevice.h:430:1: error: unknown type name ‘CFStringRef’
MobileDevice.h:430:71: error: unknown type name ‘CFStringRef’
MobileDevice.h:431:1: error: unknown type name ‘CFStringRef’
MobileDevice.h:433:33: error: unknown type name ‘CFStringRef’
MobileDevice.h:435:1: error: unknown type name ‘mach_error_t’
MobileDevice.h:435:57: error: unknown type name ‘CFStringRef’
MobileDevice.h:435:84: error: unknown type name ‘CFStringRef’
MobileDevice.h:436:1: error: unknown type name ‘mach_error_t’
MobileDevice.h:436:51: error: unknown type name ‘CFStringRef’
MobileDevice.h:437:1: error: unknown type name ‘mach_error_t’
MobileDevice.h:437:54: error: unknown type name ‘notify_callback’
MobileDevice.h:438:1: error: unknown type name ‘mach_error_t’
MobileDevice.h:441:1: error: unknown type name ‘mach_error_t’
MobileDevice.h:442:1: error: unknown type name ‘mach_error_t’
MobileDevice.h:442:57: error: unknown type name ‘CFMutableDictionaryRef’
MobileDevice.h:482:5: error: unknown type name ‘CFDictionaryRef’
jailbreak.c:417:1: error: unknown type name ‘kern_return_t’
jailbreak.c:417:51: error: unknown type name ‘CFPropertyListRef’
jailbreak.c:418:1: error: unknown type name ‘CFPropertyListRef’
jailbreak.c:422:24: error: unknown type name ‘CFDataRef’
jailbreak.c: In function ‘cb2’:
jailbreak.c:481:9: error: unknown type name ‘CFStringRef’
jailbreak.c:483:9: error: unknown type name ‘UniChar’
jailbreak.c:505:9: error: unknown type name ‘CFPropertyListRef’
jailbreak.c:505:36: warning: initialization makes integer from pointer without a cast [enabled by default]
jailbreak.c:506:9: error: unknown type name ‘CFMutableDictionaryRef’
jailbreak.c:506:75: error: ‘kCFTypeDictionaryKeyCallBacks’ undeclared (first use in this function)
jailbreak.c:506:75: note: each undeclared identifier is reported only once for each function it appears in
jailbreak.c:506:107: error: ‘kCFTypeDictionaryValueCallBacks’ undeclared (first use in this function)
jailbreak.c:518:113: error: ‘kCFAllocatorNull’ undeclared (first use in this function)
jailbreak.c:533:9: warning: passing argument 1 of ‘strstr’ makes pointer from integer without a cast [enabled by default]
/usr/include/string.h:342:14: note: expected ‘const char *’ but argument is of type ‘int’
jailbreak.c: In function ‘stroke_lockdownd’:
jailbreak.c:562:5: warning: passing argument 2 of ‘idevice_connection_send’ from incompatible pointer type [enabled by default]
../include/libimobiledevice/libimobiledevice.h:94:17: note: expected ‘const char *’ but argument is of type ‘uint32_t *’
jailbreak.c:565:5: warning: passing argument 2 of ‘idevice_connection_receive_timeout’ from incompatible pointer type [enabled by default]
../include/libimobiledevice/libimobiledevice.h:95:17: note: expected ‘char *’ but argument is of type ‘unsigned int *’
jailbreak.c:569:9: warning: passing argument 3 of ‘idevice_connection_receive_timeout’ makes integer from pointer without a cast [enabled by default]
../include/libimobiledevice/libimobiledevice.h:95:17: note: expected ‘uint32_t’ but argument is of type ‘unsigned int *’
Makefile:413: recipe for target 'pris0nbarake-jailbreak.o' failed
make[2]: *** [pris0nbarake-jailbreak.o] Error 1
make[2]: Leaving directory '/home/pi/p0sixspwn/src'
Makefile:340: recipe for target 'all-recursive' failed
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory '/home/pi/p0sixspwn'
Makefile:271: recipe for target 'all' failed
make: *** [all] Error 2
root#raspberrypi:/home/pi/p0sixspwn#
I have googled "error: unknown type name" but to me this seemed to mean different things for different stuff (I may be wrong though).
Here is what it said after I ran ./autogen.sh in case it is of any importance:
root#raspberrypi:/home/pi/p0sixspwn# ./autogen.sh
libtoolize: putting auxiliary files in `.'.
libtoolize: linking file `./ltmain.sh'
libtoolize: putting macros in AC_CONFIG_MACRO_DIR, `m4'.
libtoolize: linking file `m4/libtool.m4'
libtoolize: linking file `m4/ltoptions.m4'
libtoolize: linking file `m4/ltsugar.m4'
libtoolize: linking file `m4/ltversion.m4'
libtoolize: linking file `m4/lt~obsolete.m4'
libtoolize: Consider adding `-I m4' to ACLOCAL_AMFLAGS in Makefile.am.
configure.ac:10: installing `./compile'
configure.ac:7: installing `./config.guess'
configure.ac:7: installing `./config.sub'
configure.ac:8: installing `./install-sh'
configure.ac:8: installing `./missing'
gui/Makefile.am: installing `./depcomp'
libtoolize: Consider adding `-I m4' to ACLOCAL_AMFLAGS in Makefile.am.
checking build system type... armv6l-unknown-linux-gnueabihf
checking host system type... armv6l-unknown-linux-gnueabihf
checking target system type... armv6l-unknown-linux-gnueabihf
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... no
checking for mawk... mawk
checking whether make sets $(MAKE)... yes
checking for style of include used by make... GNU
checking for gcc... gcc
checking whether the C compiler works...
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 dependency style of gcc... none
checking whether gcc and cc understand -c and -o together... yes
checking how to print strings... printf
checking for a sed that does not truncate output... /bin/sed
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for fgrep... /bin/grep -F
checking for ld used by gcc... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... yes
checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm -B
checking the name lister (/usr/bin/nm -B) interface... BSD nm
checking whether ln -s works... yes
checking the maximum length of command line arguments... 1572864
checking whether the shell understands some XSI constructs... yes
checking whether the shell understands "+="... yes
checking how to convert armv6l-unknown-linux-gnueabihf file names to armv6l-unknown-linux-gnueabihf format... func_convert_file_noop
checking how to convert armv6l-unknown-linux-gnueabihf file names to toolchain format... func_convert_file_noop
checking for /usr/bin/ld option to reload object files... -r
checking for objdump... objdump
checking how to recognize dependent libraries... pass_all
checking for dlltool... no
checking how to associate runtime and link libraries... printf %s\n
checking for ar... ar
checking for archiver #FILE support... #
checking for strip... strip
checking for ranlib... ranlib
checking command to parse /usr/bin/nm -B output from gcc object... ok
checking for sysroot... no
checking for mt... mt
checking if mt is a manifest tool... no
checking how to run the C preprocessor... gcc -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 for dlfcn.h... yes
checking for objdir... .libs
checking if gcc supports -fno-rtti -fno-exceptions... no
checking for gcc option to produce PIC... -fPIC -DPIC
checking if gcc PIC flag -fPIC -DPIC works... yes
checking if gcc static flag -static works... yes
checking if gcc supports -c -o file.o... yes
checking if gcc supports -c -o file.o... (cached) yes
checking whether the gcc linker (/usr/bin/ld) supports shared libraries... yes
checking whether -lc should be explicitly linked in... no
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... yes
checking for g++... g++
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking dependency style of g++... none
checking how to run the C++ preprocessor... g++ -E
checking for ld used by g++... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... yes
checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes
checking for g++ option to produce PIC... -fPIC -DPIC
checking if g++ PIC flag -fPIC -DPIC works... yes
checking if g++ static flag -static works... yes
checking if g++ supports -c -o file.o... yes
checking if g++ supports -c -o file.o... (cached) yes
checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes
checking dynamic linker characteristics... (cached) GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking for pkg-config... /usr/bin/pkg-config
checking pkg-config is at least version 0.9.0... yes
checking for libimobiledevice... yes
checking for libplist... yes
checking for libzip... yes
configure: creating ./config.status
config.status: creating Makefile
config.status: creating src/Makefile
config.status: creating gui/Makefile
config.status: creating config.h
config.status: executing depfiles commands
config.status: executing libtool commands
root#raspberrypi:/home/pi/p0sixspwn#
I currently do not have the option to install it on another computer.
This is also my first post so I am a noob.
If anybody could help that would be great!
Sadly, it is not possible to compile p0sixspwn on the Raspberry Pi (or any Linux distribution) at the moment. It is hard to compile it on a mac, and even harder on Windows.
If there was some way to get Wine working on the Raspberry Pi, or editing the source code, then it might be possible. But for now, it is not.
EDIT:
It is sort of possible. Compile CFLite and include that. There will be a couple errors, but you can figure it out pretty easily.
I was encountering the following errors when installing watir-webdriver gem via command: sudo gem install watir-webdriver. Please help.
Here are the details:
Building native extensions. This could take a while...
ERROR: Error installing watir-webdriver:
ERROR: Failed to build gem native extension.
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/bin/ruby extconf.rb
checking for ffi.h... no
checking for ffi.h in /usr/local/include,/usr/include/ffi... yes
checking for ffi_call() in -lffi... yes
checking for ffi_prep_closure()... yes
checking for ffi_raw_call()... no
checking for rb_thread_blocking_region()... yes
checking for rb_thread_call_with_gvl()... yes
checking for rb_thread_call_without_gvl()... yes
checking for ffi_prep_cif_var()... no
creating extconf.h
creating Makefile
make "DESTDIR="
compiling AbstractMemory.c
compiling ArrayType.c
compiling Buffer.c
compiling Call.c
Call.c:303:5: warning: implicit declaration of function 'rb_thread_call_without_gvl' is invalid in C99 [-Wimplicit-function-declaration]
rbffi_thread_blocking_region(call_blocking_function, data, (void *) -1, NULL);
^
./Thread.h:78:39: note: expanded from macro 'rbffi_thread_blocking_region'
# define rbffi_thread_blocking_region rb_thread_call_without_gvl
^
1 warning generated.
compiling ClosurePool.c
compiling DataConverter.c
DataConverter.c:43:1: warning: control may reach end of non-void function [-Wreturn-type]
}
^
1 warning generated.
compiling DynamicLibrary.c
compiling ffi.c
compiling Function.c
Function.c:479:33: warning: incompatible pointer types passing 'VALUE (void *)' to parameter of type 'void *(*)(void *)' [-Wincompatible-pointer-types]
rb_thread_call_with_gvl(callback_with_gvl, &cb);
^~~~~~~~~~~~~~~~~
Function.c:102:46: note: passing argument to parameter 'func' here
extern void *rb_thread_call_with_gvl(void *(*func)(void *), void *data1);
^
Function.c:563:9: warning: implicit declaration of function 'rb_thread_call_without_gvl' is invalid in C99 [-Wimplicit-function-declaration]
rb_thread_call_without_gvl(async_cb_wait, &w, async_cb_stop, &w);
^
Function.c:738:1: warning: control reaches end of non-void function [-Wreturn-type]
}
^
3 warnings generated.
compiling FunctionInfo.c
compiling LastError.c
compiling LongDouble.c
compiling MappedType.c
compiling MemoryPointer.c
compiling MethodHandle.c
compiling Platform.c
compiling Pointer.c
compiling Struct.c
compiling StructByReference.c
compiling StructByValue.c
compiling StructLayout.c
compiling Thread.c
compiling Type.c
compiling Types.c
compiling Variadic.c
linking shared-object ffi_c.bundle
clang: error: unknown argument: '-multiply_definedsuppress' [-Wunused-command-line-argument-hard-error-in-future]
clang: note: this will be a hard error (cannot be downgraded to a warning) in the future
make: *** [ffi_c.bundle] Error 1
Gem files will remain installed in /Library/Ruby/Gems/2.0.0/gems/ffi-1.9.3 for inspection.
Results logged to /Library/Ruby/Gems/2.0.0/gems/ffi-1.9.3/ext/ffi_c/gem_make.out
This looks like an issue with ffi gem. I see you have Ruby 2.0. Try using ffi's version 1.0.9 which should work fine in this case.
So, execute below command first before installing watir-webdriver.
sudo gem install ffi --version='1.0.9'
Or, if you're using bundle, use following
gem 'ffi', '1.0.9'
I'm having an issue installing Imagick as i have just installed ImageMagick 6.8.1 Q16 onto our CentOS 6.3 system
Please note i am running all comands as root
I then am trying the following: pecl install imagick and the following error appear (full error):
[root#T1600-904 /]# pecl install imagick
downloading imagick-3.1.0RC2.tgz ...
Starting to download imagick-3.1.0RC2.tgz (93,264 bytes)
.....................done: 93,264 bytes
15 source files, building
running: phpize
Configuring for:
PHP Api Version: 20090626
Zend Module Api No: 20090626
Zend Extension Api No: 220090626
Please provide the prefix of Imagemagick installation [autodetect] :
building in /tmp/pear/install/pear-build-rootPvQgOJ/imagick-3.1.0RC2
running: /tmp/pear/install/imagick/configure --with-imagick
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for a sed that does not truncate output... /bin/sed
checking for cc... cc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables...
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether cc accepts -g... yes
checking for cc option to accept ISO C89... none needed
checking how to run the C preprocessor... cc -E
checking for icc... no
checking for suncc... no
checking whether cc understands -c and -o together... yes
checking for system library directory... lib
checking if compiler supports -R... no
checking if compiler supports -Wl,-rpath,... yes
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking target system type... x86_64-unknown-linux-gnu
checking for PHP prefix... /usr
checking for PHP includes... -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM
-I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib
checking for PHP extension directory... /usr/lib64/php/modules
checking for PHP installed headers prefix... /usr/include/php
checking if debug is enabled... no
checking if zts is enabled... no
checking for re2c... no
configure: WARNING: You will need re2c 0.13.4 or later if you want to regenerate PHP parsers.
checking for gawk... gawk
checking whether to enable the imagick extension... yes, shared
checking whether to enable the imagick GraphicsMagick backend... no
checking ImageMagick MagickWand API configuration program... found in /usr/local/bin/MagickWand-
config
checking if ImageMagick version is at least 6.2.4... found version 6.8.1 Q16
checking for MagickWand.h header file... found in /usr/local/include/ImageMagick
/wand/MagickWand.h
checking PHP version is at least 5.1.3... yes. found 5.3.3
Package MagickWand was not found in the pkg-config search path.
Perhaps you should add the directory containing `MagickWand.pc'
to the PKG_CONFIG_PATH environment variable
No package 'MagickWand' found
Package MagickWand was not found in the pkg-config search path.
Perhaps you should add the directory containing `MagickWand.pc'
to the PKG_CONFIG_PATH environment variable
No package 'MagickWand' found
checking for a sed that does not truncate output... (cached) /bin/sed
checking for fgrep... /bin/grep -F
checking for ld used by cc... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... yes
checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm -B
checking the name lister (/usr/bin/nm -B) interface... BSD nm
checking whether ln -s works... yes
checking the maximum length of command line arguments... 1966080
checking whether the shell understands some XSI constructs... yes
checking whether the shell understands "+="... yes
checking for /usr/bin/ld option to reload object files... -r
checking for objdump... objdump
checking how to recognize dependent libraries... pass_all
checking for ar... ar
checking for strip... strip
checking for ranlib... ranlib
checking command to parse /usr/bin/nm -B output from cc object... ok
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 memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking for dlfcn.h... yes
checking for objdir... .libs
checking if cc supports -fno-rtti -fno-exceptions... no
checking for cc option to produce PIC... -fPIC -DPIC
checking if cc PIC flag -fPIC -DPIC works... yes
checking if cc static flag -static works... no
checking if cc supports -c -o file.o... yes
checking if cc supports -c -o file.o... (cached) yes
checking whether the cc linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes
checking whether -lc should be explicitly linked in... no
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... no
configure: creating ./config.status
config.status: creating config.h
config.status: executing libtool commands
running: make
/bin/sh /tmp/pear/install/pear-build-rootPvQgOJ/imagick-3.1.0RC2/libtool --mode=compile cc -I.
-I/tmp/pear/install/imagick -DPHP_ATOM_INC -I/tmp/pear/install/pear-build-rootPvQgOJ/imagick-
3.1.0RC2/include -I/tmp/pear/install/pear-build-rootPvQgOJ/imagick-3.1.0RC2/main -I/tmp
/pear/install/imagick -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr
/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib -DHAVE_CONFIG_H -g
-O2 -c /tmp/pear/install/imagick/imagick_file.c -o imagick_file.lo
libtool: compile: cc -I. -I/tmp/pear/install/imagick -DPHP_ATOM_INC -I/tmp/pear/install/pear-
build-rootPvQgOJ/imagick-3.1.0RC2/include -I/tmp/pear/install/pear-build-rootPvQgOJ/imagick-
3.1.0RC2/main -I/tmp/pear/install/imagick -I/usr/include/php -I/usr/include/php/main -I/usr
/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext
/date/lib -DHAVE_CONFIG_H -g -O2 -c /tmp/pear/install/imagick/imagick_file.c -fPIC -DPIC -o
.libs/imagick_file.o
In file included from /tmp/pear/install/imagick/imagick_file.c:21:
/tmp/pear/install/imagick/php_imagick.h:49:31: error: wand/MagickWand.h: No such file or
directory
In file included from /tmp/pear/install/imagick/php_imagick_file.h:24,
from /tmp/pear/install/imagick/imagick_file.c:22:
/tmp/pear/install/imagick/php_imagick_defs.h:72: error: expected specifier-qualifier-list
before âMagickWandâ
/tmp/pear/install/imagick/php_imagick_defs.h:80: error: expected specifier-qualifier-list
before âDrawingWandâ
/tmp/pear/install/imagick/php_imagick_defs.h:86: error: expected specifier-qualifier-list
before âPixelIteratorâ
/tmp/pear/install/imagick/php_imagick_defs.h:98: error: expected specifier-qualifier-list
before âPixelWandâ
In file included from /tmp/pear/install/imagick/imagick_file.c:22:
/tmp/pear/install/imagick/php_imagick_file.h:43: error: âMaxTextExtentâ undeclared here (not in
a function)
/tmp/pear/install/imagick/imagick_file.c: In function âphp_imagick_file_initâ:
/tmp/pear/install/imagick/imagick_file.c:75: error: âMagickPathâ undeclared (first use in this
function)
/tmp/pear/install/imagick/imagick_file.c:75: error: (Each undeclared identifier is reported
only once
/tmp/pear/install/imagick/imagick_file.c:75: error: for each function it appears in.)
/tmp/pear/install/imagick/imagick_file.c:99: error: âHeadPathâ undeclared (first use in this
function)
/tmp/pear/install/imagick/imagick_file.c:100: error: âTailPathâ undeclared (first use in this
function)
/tmp/pear/install/imagick/imagick_file.c: In function
âphp_imagick_read_image_using_imagemagickâ:
/tmp/pear/install/imagick/imagick_file.c:124: error: âphp_imagick_objectâ has no member named
âmagick_wandâ
/tmp/pear/install/imagick/imagick_file.c:124: error: âMagickFalseâ undeclared (first use in
this function)
/tmp/pear/install/imagick/imagick_file.c:128: error: âphp_imagick_objectâ has no member named
âmagick_wandâ
/tmp/pear/install/imagick/imagick_file.c:135: error: âphp_imagick_objectâ has no member named
âmagick_wandâ
/tmp/pear/install/imagick/imagick_file.c:137: error: âphp_imagick_objectâ has no member named
âmagick_wandâ
/tmp/pear/install/imagick/imagick_file.c: In function
âphp_imagick_read_image_using_php_streamsâ:
/tmp/pear/install/imagick/imagick_file.c:144: error: âMagickBooleanTypeâ undeclared (first use
in this function)
/tmp/pear/install/imagick/imagick_file.c:144: error: expected â;â before âstatusâ
/tmp/pear/install/imagick/imagick_file.c:177: error: âstatusâ undeclared (first use in this
function)
/tmp/pear/install/imagick/imagick_file.c:177: error: âphp_imagick_objectâ has no member named
âmagick_wandâ
/tmp/pear/install/imagick/imagick_file.c:179: error: âphp_imagick_objectâ has no member named
âmagick_wandâ
/tmp/pear/install/imagick/imagick_file.c:184: error: âMagickFalseâ undeclared (first use in
this function)
/tmp/pear/install/imagick/imagick_file.c:189: error: âphp_imagick_objectâ has no member named
âmagick_wandâ
/tmp/pear/install/imagick/imagick_file.c:196: error: âphp_imagick_objectâ has no member named
âmagick_wandâ
/tmp/pear/install/imagick/imagick_file.c: In function âphp_imagick_write_fileâ:
/tmp/pear/install/imagick/imagick_file.c:247: error: âMagickBooleanTypeâ undeclared (first use
in this function)
/tmp/pear/install/imagick/imagick_file.c:247: error: expected â;â before âstatusâ
/tmp/pear/install/imagick/imagick_file.c:258: error: âstatusâ undeclared (first use in this
function)
/tmp/pear/install/imagick/imagick_file.c:258: error: âphp_imagick_objectâ has no member named
âmagick_wandâ
/tmp/pear/install/imagick/imagick_file.c:260: error: âphp_imagick_objectâ has no member named
âmagick_wandâ
/tmp/pear/install/imagick/imagick_file.c:264: error: âMagickFalseâ undeclared (first use in
this function)
/tmp/pear/install/imagick/imagick_file.c: In function âphp_imagick_stream_handlerâ:
/tmp/pear/install/imagick/imagick_file.c:277: error: âMagickBooleanTypeâ undeclared (first use
in this function)
/tmp/pear/install/imagick/imagick_file.c:277: error: expected â;â before âstatusâ
/tmp/pear/install/imagick/imagick_file.c:306: error: âstatusâ undeclared (first use in this
function)
/tmp/pear/install/imagick/imagick_file.c:306: error: âphp_imagick_objectâ has no member named
âmagick_wandâ
/tmp/pear/install/imagick/imagick_file.c:310: error: âphp_imagick_objectâ has no member named
âmagick_wandâ
/tmp/pear/install/imagick/imagick_file.c:314: error: âphp_imagick_objectâ has no member named
âmagick_wandâ
/tmp/pear/install/imagick/imagick_file.c:318: error: âphp_imagick_objectâ has no member named
âmagick_wandâ
/tmp/pear/install/imagick/imagick_file.c:326: error: âMagickFalseâ undeclared (first use in
this function)
make: *** [imagick_file.lo] Error 1
ERROR: `make' failed
Looking at the output above, where the install went wrong is:
In file included from /tmp/pear/install/imagick/imagick_file.c:21:
/tmp/pear/install/imagick/php_imagick.h:49:31: error: wand/MagickWand.h: No such file or
directory
Meaning, the 'MagickWand.h' could not be found.
Firstly you can try by installing 'pkg-config' as it's required by /usr/local/bin/Wand-config
$ yum install pkg-config
And try installing imagick again, this may fix the issue.
If not, try installing it manually and change the 'config.m4' file in the source directory to match what the install is actually looking for. This is as follows:
$ cd /usr/local
$ wget http://pecl.php.net/get/imagick-2.2.2.tgz
$ tar zxvf ./imagick-2.2.2.tgz
$ cd imagick-2.2.2
Then, before you proceed open the config.m4 file:
$ nano config.m4
Find the line:
if test -r $WAND_DIR/include/ImageMagick/wand/MagickWand.h;
and change it to:
if test -r $WAND_DIR/include/ImageMagick-6/wand/MagickWand.h;
NOTE: the ImageMagick-6. Change it to match your required path/version.
And continue with the install:
$ phpize
$ ./configure
$ make
$ make test
$ make install
Hopefully this helps someone...
I'm trying to cross compile a helloworld kernel module with specifications:
host: intel x86 32 bit, linux-3.0.0
target: ARM machine (Parrot AR.Drone), linux-2.6.27.47
I'm using the makefile:
PWD := $(shell pwd)
obj-m := test.o
all:
$(MAKE) -C /path/to/kernel M=$(PWD) CROSS_COMPILE=arm-none-linux-gnueabi- ARCH=arm modules
Where arm-none-linux-gnueabi- is the prefix of the arm toolchain.
Using the 2.6.27.47 kernel from kernel.org, this gives following errors:
make -C /home/jens/linux-2.6.27.47 M=/home/jens/test CROSS_COMPILE=arm-none-linux-gnueabi- ARCH=arm KBUILD_VERBOSE=1 modules
make[1]: Entering directory `/home/jens/linux-2.6.27.47'
mkdir -p /home/jens/test/.tmp_versions ; rm -f /home/jens/test/.tmp_versions/*
WARNING: Symbol version dump /home/jens/linux-2.6.27.47/Module.symvers
is missing; modules will have no dependencies and modversions.
make -f scripts/Makefile.build obj=/home/jens/test
arm-none-linux-gnueabi-gcc -Wp,-MD,/home/jens/test/.test.o.d -nostdinc -isystem /opt/CodeSourcery/bin/../lib/gcc/arm-none-linux-gnueabi/4.3.3/include -D__KERNEL__ -Iinclude -I/home/jens/linux-2.6.27.47/arch/arm/include -include include/linux/autoconf.h -mlittle-endian -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -Werror-implicit-function-declaration -fno-delete-null-pointer-checks -O2 -marm -fno-omit-frame-pointer -mapcs -mno-sched-prolog -mabi=apcs-gnu -mno-thumb-interwork -msoft-float -Uarm -fno-stack-protector -fno-omit-frame-pointer -fno-optimize-sibling-calls -g -pg -Wdeclaration-after-statement -Wno-pointer-sign -fno-strict-overflow -DMODULE -D"KBUILD_STR(s)=#s" -D"KBUILD_BASENAME=KBUILD_STR(test)" -D"KBUILD_MODNAME=KBUILD_STR(test)" -c -o /home/jens/test/.tmp_test.o /home/jens/test/test.c
In file included from include/asm/system.h:10,
from include/asm/processor.h:17,
from include/linux/prefetch.h:14,
from include/linux/list.h:6,
from include/linux/module.h:9,
from /home/jens/test/test.c:1:
include/linux/kernel.h:195: warning: 'regparm' attribute directive ignored
include/linux/kernel.h:197: warning: 'regparm' attribute directive ignored
include/linux/kernel.h:221: warning: 'regparm' attribute directive ignored
In file included from include/linux/thread_info.h:47,
from include/linux/preempt.h:9,
from include/linux/spinlock.h:50,
from include/linux/seqlock.h:29,
from include/linux/time.h:8,
from include/linux/stat.h:60,
from include/linux/module.h:10,
from /home/jens/test/test.c:1:
include/asm/thread_info.h:172: error: invalid register name for 'current_stack_pointer'
In file included from include/linux/gfp.h:4,
from include/linux/kmod.h:22,
from include/linux/module.h:13,
from /home/jens/test/test.c:1:
include/linux/mmzone.h:18:26: error: linux/bounds.h: No such file or directory
include/linux/mmzone.h:197:5: warning: "MAX_NR_ZONES" is not defined
In file included from include/linux/gfp.h:4,
from include/linux/kmod.h:22,
from include/linux/module.h:13,
from /home/jens/test/test.c:1:
include/linux/mmzone.h:218: error: 'MAX_NR_ZONES' undeclared here (not in a function)
In file included from include/linux/rwsem.h:22,
from include/linux/notifier.h:14,
from include/linux/memory_hotplug.h:6,
from include/linux/mmzone.h:560,
from include/linux/gfp.h:4,
from include/linux/kmod.h:22,
from include/linux/module.h:13,
from /home/jens/test/test.c:1:
include/asm/rwsem.h:48: warning: 'regparm' attribute directive ignored
include/asm/rwsem.h:50: warning: 'regparm' attribute directive ignored
include/asm/rwsem.h:52: warning: 'regparm' attribute directive ignored
include/asm/rwsem.h:54: warning: 'regparm' attribute directive ignored
In file included from include/asm/smp.h:12,
from include/linux/smp.h:28,
from include/linux/topology.h:33,
from include/linux/mmzone.h:683,
from include/linux/gfp.h:4,
from include/linux/kmod.h:22,
from include/linux/module.h:13,
from /home/jens/test/test.c:1:
include/asm/mpspec.h:9:25: error: mach_mpspec.h: No such file or directory
In file included from include/asm/smp.h:12,
from include/linux/smp.h:28,
from include/linux/topology.h:33,
from include/linux/mmzone.h:683,
from include/linux/gfp.h:4,
from include/linux/kmod.h:22,
from include/linux/module.h:13,
from /home/jens/test/test.c:1:
include/asm/mpspec.h:36: error: 'MAX_MP_BUSSES' undeclared here (not in a function)
In file included from include/asm/smp.h:15,
from include/linux/smp.h:28,
from include/linux/topology.h:33,
from include/linux/mmzone.h:683,
from include/linux/gfp.h:4,
from include/linux/kmod.h:22,
from include/linux/module.h:13,
from /home/jens/test/test.c:1:
include/asm/io_apic.h:149: error: 'MAX_IRQ_SOURCES' undeclared here (not in a function)
In file included from include/linux/smp.h:28,
from include/linux/topology.h:33,
from include/linux/mmzone.h:683,
from include/linux/gfp.h:4,
from include/linux/kmod.h:22,
from include/linux/module.h:13,
from /home/jens/test/test.c:1:
include/asm/smp.h:187:28: error: mach_apicdef.h: No such file or directory
In file included from include/linux/smp.h:28,
from include/linux/topology.h:33,
from include/linux/mmzone.h:683,
from include/linux/gfp.h:4,
from include/linux/kmod.h:22,
from include/linux/module.h:13,
from /home/jens/test/test.c:1:
include/asm/smp.h: In function 'hard_smp_processor_id':
include/asm/smp.h:191: error: implicit declaration of function 'GET_APIC_ID'
make[2]: *** [/home/jens/test/test.o] Error 1
make[1]: *** [_module_/home/jens/test] Error 2
make[1]: Leaving directory `/home/jens/linux-2.6.27.47'
make: *** [test_arm2] Error 2
It's here that I'm stuck.
My problem was, like sessyargc.jp suggested, due to a bad configuration. I had applied the default configuration, while I was supposed to use an arm-specific configuration. Using this, the compile problems were solved.