compiler construction - PCL - Glib Compiling from source, FFI linking -


i need install pcl (point cloud library) on linux server without root access. downloaded source , checked dependences. , here go...

these dependencies i've found:

pcl --boost ----zlib ----bzip --eigen --flann ----hdf5 ----libusb ------udev --------glib ----------libffi ----------zlib  --vtk

i need compile glib source. glib requires ffi libraries downloaded them, compiled , installed them in

/home/franz/downloads/libffi-3.0.13/installed

then set these variables:

    ld_library_path=/home/franz/downloads/libffi-3.0.13/installed/lib     libffi_cflags="-i/home/franz/downloads/libffi-3.0.13/installed/lib/libffi-3.0.13/include" libffi_libs="-lffi -l/home/franz/downloads/libffi-3.0.13/installed/lib" 

then ./configure , make. got these errors:

make[4]: entering directory `/home/franz/downloads/glib-2.37.5/gobject' /bin/bash ../libtool  --tag=cc   --mode=link gcc -wall -wstrict-prototypes -werror=declaration-after-statement -werror=missing-prototypes -werror=implicit-function-declaration -werror=pointer-arith -werror=init-self -werror=format-security -werror=format=2 -werror=missing-include-dirs -g -o2   -o gobject-query gobject-query.o ./libgobject-2.0.la ../glib/libglib-2.0.la  libtool: link: gcc -wall -wstrict-prototypes -werror=declaration-after-statement -werror=missing-prototypes -werror=implicit-function-declaration -werror=pointer-arith -werror=init-self -werror=format-security -werror=format=2 -werror=missing-include-dirs -g -o2 -o .libs/gobject-query gobject-query.o  ./.libs/libgobject-2.0.so -l/home/franz/downloads/libffi-3.0.13/installed/lib /home/franz/downloads/glib-2.37.5/glib/.libs/libglib-2.0.so ../glib/.libs/libglib-2.0.so -lpthread -lrt -wl,-rpath -wl,/home/franz/downloads/glib-2.37.5/installed/lib ./.libs/libgobject-2.0.so: undefined reference `ffi_type_void' ./.libs/libgobject-2.0.so: undefined reference `ffi_type_double' ./.libs/libgobject-2.0.so: undefined reference `ffi_prep_cif' ./.libs/libgobject-2.0.so: undefined reference `ffi_type_sint32' ./.libs/libgobject-2.0.so: undefined reference `ffi_type_float' ./.libs/libgobject-2.0.so: undefined reference `ffi_type_uint64' ./.libs/libgobject-2.0.so: undefined reference `ffi_type_sint64' ./.libs/libgobject-2.0.so: undefined reference `ffi_type_pointer' ./.libs/libgobject-2.0.so: undefined reference `ffi_type_uint32' ./.libs/libgobject-2.0.so: undefined reference `ffi_call' 

then saw libraries wanted include , setted libffi_cflags/libs in configure not present in make, changed cc variable force compiler use libraries:

libffi_cflags="-i/home/franz/downloads/libffi-3.0.13/installed/lib/libffi-3.0.13/include" libffi_libs="-lffi -l/home/franz/downloads/libffi-3.0.13/installed/lib" zlib_cflags="-i/home/franz/downloads/zlib-1.2.8/installed/include" zlib_libs="-l/home/franz/downloads/zlib-1.2.8/installed/lib" cc="gcc $libffi_cflags $libffi_libs" cxx="/usr/bin/g++-4.4 $libffi_cflags $libffi_libs" ./configure --prefix=`pwd`/installed 

and make

in way instead of gcc in make process, we'll gcc -i... -lffi -l... , worked far. same error in location:

 make[4]: entering directory `/home/franz/downloads/glib-2.37.5/gio' /bin/bash ../libtool  --tag=cc   --mode=link gcc -i/home/franz/downloads/libffi-3.0.13/installed/lib/libffi-3.0.13/include -lffi -l/home/franz/downloads/libffi-3.0.13/installed/lib -wall -wstrict-prototypes -werror=declaration-after-statement -werror=missing-prototypes -werror=implicit-function-declaration -werror=pointer-arith -werror=init-self -werror=format-security -werror=format=2 -werror=missing-include-dirs -g -o2   -o gio-querymodules gio-querymodules.o ../glib/libglib-2.0.la ../gobject/libgobject-2.0.la ../gmodule/libgmodule-2.0.la libgio-2.0.la   libtool: link: gcc -i/home/franz/downloads/libffi-3.0.13/installed/lib/libffi-3.0.13/include -wall -wstrict-prototypes -werror=declaration-after-statement -werror=missing-prototypes -werror=implicit-function-declaration -werror=pointer-arith -werror=init-self -werror=format-security -werror=format=2 -werror=missing-include-dirs -g -o2 -o .libs/gio-querymodules gio-querymodules.o  -l/home/franz/downloads/libffi-3.0.13/installed/lib ../glib/.libs/libglib-2.0.so ../gobject/.libs/libgobject-2.0.so ../gmodule/.libs/libgmodule-2.0.so ./.libs/libgio-2.0.so -l/home/franz/downloads/zlib-1.2.8/installed/lib /home/franz/downloads/glib-2.37.5/gobject/.libs/libgobject-2.0.so /home/franz/downloads/glib-2.37.5/gmodule/.libs/libgmodule-2.0.so -ldl /home/franz/downloads/glib-2.37.5/glib/.libs/libglib-2.0.so -lpthread -lrt /home/franz/downloads/libffi-3.0.13/installed/lib/../lib/libffi.so -lresolv -wl,-rpath -wl,/home/franz/downloads/glib-2.37.5/installed/lib -wl,-rpath -wl,/home/franz/downloads/libffi-3.0.13/installed/lib/../lib ../gobject/.libs/libgobject-2.0.so: undefined reference `ffi_type_void' ../gobject/.libs/libgobject-2.0.so: undefined reference `ffi_type_double' ../gobject/.libs/libgobject-2.0.so: undefined reference `ffi_prep_cif' ../gobject/.libs/libgobject-2.0.so: undefined reference `ffi_type_sint32' ../gobject/.libs/libgobject-2.0.so: undefined reference `ffi_type_float' ../gobject/.libs/libgobject-2.0.so: undefined reference `ffi_type_uint64' ../gobject/.libs/libgobject-2.0.so: undefined reference `ffi_type_sint64' ../gobject/.libs/libgobject-2.0.so: undefined reference `ffi_type_pointer' ../gobject/.libs/libgobject-2.0.so: undefined reference `ffi_type_uint32' ../gobject/.libs/libgobject-2.0.so: undefined reference `ffi_call'

the problem in case libraries present (you can see -lffi -l<ffi_libs_path> error same before).

any idea how work? repeat cannot install libraries because cannot have root access. suggestion appreciated.

use

export libffi_libs="-l/your/path/to-ffi libraries/ -lffi"


Comments

Popular posts from this blog

image - ClassNotFoundException when add a prebuilt apk into system.img in android -

I need to import mysql 5.1 to 5.5? -

Java, Hibernate, MySQL - store UTC date-time -