gcc linking error - linux

I'm trying to build libvterm's demo included in the source.
I have this folder structure:
- libvterm/
... // all sources are here
- libvterm.so
- vterm.h
- demo/
- vshell.c
Within the demo directory I did:
$ gcc -o vshell `pkg-config --cflags --libs glib-2.0 ncurses` vshell.c -L.. -I.. -lvterm
I get lots of undefined reference to errors, even after definind -I and -L to point to the right directory:
/tmp/ccAlNYtQ.o: In function `main':
vshell.c:(.text+0x24): undefined reference to `initscr'
vshell.c:(.text+0x29): undefined reference to `noecho'
vshell.c:(.text+0x2e): undefined reference to `start_color'
vshell.c:(.text+0x33): undefined reference to `raw'
vshell.c:(.text+0x38): undefined reference to `stdscr'
vshell.c:(.text+0x48): undefined reference to `nodelay'
vshell.c:(.text+0x4d): undefined reference to `stdscr'
vshell.c:(.text+0x5d): undefined reference to `keypad'
vshell.c:(.text+0x62): undefined reference to `stdscr'
vshell.c:(.text+0x6b): undefined reference to `stdscr'
vshell.c:(.text+0x84): undefined reference to `stdscr'
vshell.c:(.text+0x8d): undefined reference to `stdscr'
vshell.c:(.text+0xfb): undefined reference to `init_pair'
vshell.c:(.text+0x118): undefined reference to `stdscr'
vshell.c:(.text+0x121): undefined reference to `stdscr'
vshell.c:(.text+0x141): undefined reference to `stdscr'
vshell.c:(.text+0x151): undefined reference to `waddch'
vshell.c:(.text+0x176): undefined reference to `stdscr'
vshell.c:(.text+0x17e): undefined reference to `wrefresh'
vshell.c:(.text+0x1a2): undefined reference to `newwin'
vshell.c:(.text+0x1e1): undefined reference to `mvwprintw'
vshell.c:(.text+0x1ee): undefined reference to `wrefresh'
vshell.c:(.text+0x2ac): undefined reference to `wtouchln'
vshell.c:(.text+0x2b9): undefined reference to `wrefresh'
vshell.c:(.text+0x2be): undefined reference to `stdscr'
vshell.c:(.text+0x2c6): undefined reference to `wrefresh'
vshell.c:(.text+0x2d2): undefined reference to `stdscr'
vshell.c:(.text+0x2da): undefined reference to `wgetch'
vshell.c:(.text+0x308): undefined reference to `endwin'
../libvterm.so: undefined reference to `forkpty'
../libvterm.so: undefined reference to `g_free'
../libvterm.so: undefined reference to `has_colors'
../libvterm.so: undefined reference to `acs_map'
../libvterm.so: undefined reference to `wchgat'
../libvterm.so: undefined reference to `beep'
../libvterm.so: undefined reference to `pair_content'
../libvterm.so: undefined reference to `COLOR_PAIRS'
../libvterm.so: undefined reference to `g_realloc'
../libvterm.so: undefined reference to `g_malloc0'
../libvterm.so: undefined reference to `wmove'
collect2: ld returned 1 exit status
What am I missing?

Try reordering your link command...
gcc -o vshell vshell.c -L.. -I.. -lvterm `pkg-config --cflags --libs glib-2.0 ncurses`
At some point, the gnu linker changed to require the object first and the libraries last/later.

Related

Cannot link an application with libavcodec

I'm trying to make a simplest app with usage of ffmpeg libs.
Here is my code:
main.c:
#include <libavcodec/avcodec.h>
#include <libavformat/avformat.h>
#include <libswscale/swscale.h>
int main()
{
avformat_network_init();
return 0;
}
compiler command:
gcc -o main main.c -Wall -lavformat -lavcodec -lswresample -lswscale -lavutil -lm -lz -lpthread -L/usr/local/lib/
leads to :
/usr/local/lib//libavformat.a(matroskaenc.o): In function
get_aac_sample_rates':
/home/ievdokimov/repos/FFmpeg/libavformat/matroskaenc.c:709: undefined
reference toavpriv_mpeg4audio_get_config2'
/home/ievdokimov/repos/FFmpeg/libavformat/matroskaenc.c:709: undefined
reference to avpriv_mpeg4audio_get_config2'
/usr/local/lib//libavformat.a(mux.o): In function
ff_interleave_add_packet':
/home/ievdokimov/repos/FFmpeg/libavformat/mux.c:936: undefined
reference to av_packet_make_refcounted'
/usr/local/lib//libavformat.a(utils.o): In function
ff_packet_list_put':
/home/ievdokimov/repos/FFmpeg/libavformat/utils.c:461: undefined
reference to av_packet_make_refcounted'
/usr/local/lib//libavformat.a(utils.o): In functionparse_packet':
/home/ievdokimov/repos/FFmpeg/libavformat/utils.c:1494: undefined
reference to av_packet_make_refcounted'
/usr/local/lib//libavformat.a(utils.o): In functionff_read_packet':
/home/ievdokimov/repos/FFmpeg/libavformat/utils.c:876: undefined
reference to av_packet_make_refcounted'
/usr/local/lib//libavformat.a(codec2.o): In function
codec2_read_header_common':
/home/ievdokimov/repos/FFmpeg/libavformat/codec2.c:74: undefined
reference to avpriv_codec2_mode_bit_rate'
/home/ievdokimov/repos/FFmpeg/libavformat/codec2.c:75: undefined
reference toavpriv_codec2_mode_frame_size'
/home/ievdokimov/repos/FFmpeg/libavformat/codec2.c:76: undefined
reference to avpriv_codec2_mode_block_align'
/home/ievdokimov/repos/FFmpeg/libavformat/codec2.c:74: undefined
reference toavpriv_codec2_mode_bit_rate'
/home/ievdokimov/repos/FFmpeg/libavformat/codec2.c:75: undefined
reference to avpriv_codec2_mode_frame_size'
/home/ievdokimov/repos/FFmpeg/libavformat/codec2.c:76: undefined
reference toavpriv_codec2_mode_block_align'
/usr/local/lib//libavformat.a(isom.o): In function
ff_mp4_read_dec_config_descr':
/home/ievdokimov/repos/FFmpeg/libavformat/isom.c:552: undefined
reference toavpriv_mpeg4audio_get_config2'
/usr/local/lib//libavformat.a(latmenc.o): In function
latm_decode_extradata':
/home/ievdokimov/repos/FFmpeg/libavformat/latmenc.c:65: undefined
reference toavpriv_mpeg4audio_get_config2'
/home/ievdokimov/repos/FFmpeg/libavformat/latmenc.c:65: undefined
reference to avpriv_mpeg4audio_get_config2'
/usr/local/lib//libavformat.a(matroskadec.o): In function
matroska_decode_buffer':
/home/ievdokimov/repos/FFmpeg/libavformat/matroskadec.c:1657:
undefined reference to BZ2_bzDecompressInit'
/home/ievdokimov/repos/FFmpeg/libavformat/matroskadec.c:1672:
undefined reference toBZ2_bzDecompress'
/home/ievdokimov/repos/FFmpeg/libavformat/matroskadec.c:1665:
undefined reference to BZ2_bzDecompressEnd'
/home/ievdokimov/repos/FFmpeg/libavformat/matroskadec.c:1675:
undefined reference toBZ2_bzDecompressEnd'
/usr/local/lib//libavformat.a(mxfenc.o): In function
get_ue_golomb_31':
/home/ievdokimov/repos/FFmpeg/./libavcodec/golomb.h:140: undefined
reference toff_ue_golomb_vlc_code'
/usr/local/lib//libavformat.a(mxfenc.o): In function
mxf_parse_dnxhd_frame':
/home/ievdokimov/repos/FFmpeg/libavformat/mxfenc.c:2030: undefined
reference toavpriv_dnxhd_get_hr_frame_size'
/usr/local/lib//libavformat.a(rtpenc_vc2hq.o): In function
init_get_bits_xe':
/home/ievdokimov/repos/FFmpeg/./libavcodec/get_bits.h:628: undefined
reference toff_interleaved_golomb_vlc_len'
/usr/local/lib//libavformat.a(rtpenc_vc2hq.o): In function
get_interleaved_ue_golomb':
/home/ievdokimov/repos/FFmpeg/./libavcodec/golomb.h:197: undefined
reference toff_interleaved_dirac_golomb_vlc_code'
/home/ievdokimov/repos/FFmpeg/./libavcodec/golomb.h:185: undefined
reference to ff_interleaved_dirac_golomb_vlc_code'
/home/ievdokimov/repos/FFmpeg/./libavcodec/golomb.h:197: undefined
reference toff_interleaved_dirac_golomb_vlc_code'
/home/ievdokimov/repos/FFmpeg/./libavcodec/golomb.h:197: undefined
reference to ff_interleaved_dirac_golomb_vlc_code'
/home/ievdokimov/repos/FFmpeg/./libavcodec/golomb.h:185: undefined
reference toff_interleaved_dirac_golomb_vlc_code'
/usr/local/lib//libavformat.a(rtpenc_vc2hq.o):/home/ievdokimov/repos/FFmpeg/./libavcodec/golomb.h:185:
more undefined references to ff_interleaved_dirac_golomb_vlc_code'
follow /usr/local/lib//libavformat.a(rtpenc_vc2hq.o): In function
get_interleaved_ue_golomb':
/home/ievdokimov/repos/FFmpeg/./libavcodec/golomb.h:183: undefined
reference to ff_interleaved_ue_golomb_vlc_code'
/home/ievdokimov/repos/FFmpeg/./libavcodec/golomb.h:183: undefined
reference toff_interleaved_ue_golomb_vlc_code'
/home/ievdokimov/repos/FFmpeg/./libavcodec/golomb.h:183: undefined
reference to ff_interleaved_ue_golomb_vlc_code'
/usr/local/lib//libavformat.a(spdifdec.o): In function
spdif_get_offset_and_codec':
/home/ievdokimov/repos/FFmpeg/libavformat/spdifdec.c:63: undefined
reference to av_adts_header_parse'
/home/ievdokimov/repos/FFmpeg/libavformat/spdifdec.c:63: undefined
reference toav_adts_header_parse'
/usr/local/lib//libavformat.a(spdifenc.o): In function
spdif_header_aac':
/home/ievdokimov/repos/FFmpeg/libavformat/spdifenc.c:362: undefined
reference toav_adts_header_parse'
/usr/local/lib//libavformat.a(ac3dec.o): In function ac3_eac3_probe':
/home/ievdokimov/repos/FFmpeg/libavformat/ac3dec.c:63: undefined
reference toav_ac3_parse_header'
/home/ievdokimov/repos/FFmpeg/libavformat/ac3dec.c:60: undefined
reference to av_ac3_parse_header'
/usr/local/lib//libavformat.a(adtsenc.o): In function
adts_decode_extradata':
/home/ievdokimov/repos/FFmpeg/libavformat/adtsenc.c:56: undefined
reference to `avpriv_mpeg4audio_get_config2' collect2: error: ld
returned 1 exit status
Is there any way to fix that?
It seems like the libavformat.sofile version is different from other libraries.
Please check the version compatible with other libraries like liavcodec

ros_astra_camera install error in Pi4 (undefined reference error)

I have an error with installing ros_astra_camera. I have already successfully built libuvc_camera in another workspace but there are still error about libuvc_camera. Is it because of path issues or i didnt really install properly?
I followed the steps and also downloaded from astra camera git. My workspace currently has dynamic_reconfigure, Image_common, rgbd_launch, ros_astra_camera and rplidar_ros.
As for downloading it's dependencies (libuvs and libuvc_camera) i have follow the steps on answer. As for others, i have git clone from their git repo and cmake . and make
I'm currently using a Pi4 with raspbian buster with ros melodic.
Please help me. I need this to install the astra pro camera driver for my final year project.
[ 98%] Built target astra_camera_nodelet
/usr/bin/ld: CMakeFiles/camera_node.dir/src/libuvc_camera/camera_driver.cpp.o: in function `libuvc_camera::CameraDriver::~CameraDriver()':
camera_driver.cpp:(.text+0xcb4): undefined reference to `uvc_free_frame'
/usr/bin/ld: camera_driver.cpp:(.text+0xcd4): undefined reference to `uvc_exit'
/usr/bin/ld: CMakeFiles/camera_node.dir/src/libuvc_camera/camera_driver.cpp.o: in function `libuvc_camera::CameraDriver::getUVCExposureCb(astra_camera::GetUVCExposureRequest_<std::allocator<void> >&, astra_camera::GetUVCExposureResponse_<std::allocator<void> >&)':
camera_driver.cpp:(.text+0xe84): undefined reference to `uvc_get_exposure_abs'
/usr/bin/ld: CMakeFiles/camera_node.dir/src/libuvc_camera/camera_driver.cpp.o: in function `libuvc_camera::CameraDriver::setUVCExposureCb(astra_camera::SetUVCExposureRequest_<std::allocator<void> >&, astra_camera::SetUVCExposureResponse_<std::allocator<void> >&)':
camera_driver.cpp:(.text+0xef8): undefined reference to `uvc_set_ae_mode'
/usr/bin/ld: camera_driver.cpp:(.text+0xf14): undefined reference to `uvc_set_ae_mode'
/usr/bin/ld: camera_driver.cpp:(.text+0x104c): undefined reference to `uvc_set_exposure_abs'
/usr/bin/ld: CMakeFiles/camera_node.dir/src/libuvc_camera/camera_driver.cpp.o: in function `libuvc_camera::CameraDriver::getUVCGainCb(astra_camera::GetUVCGainRequest_<std::allocator<void> >&, astra_camera::GetUVCGainResponse_<std::allocator<void> >&)':
camera_driver.cpp:(.text+0x10e4): undefined reference to `uvc_get_gain'
/usr/bin/ld: CMakeFiles/camera_node.dir/src/libuvc_camera/camera_driver.cpp.o: in function `libuvc_camera::CameraDriver::setUVCGainCb(astra_camera::SetUVCGainRequest_<std::allocator<void> >&, astra_camera::SetUVCGainResponse_<std::allocator<void> >&)':
camera_driver.cpp:(.text+0x1154): undefined reference to `uvc_set_gain'
/usr/bin/ld: CMakeFiles/camera_node.dir/src/libuvc_camera/camera_driver.cpp.o: in function `libuvc_camera::CameraDriver::getUVCWhiteBalanceCb(astra_camera::GetUVCWhiteBalanceRequest_<std::allocator<void> >&, astra_camera::GetUVCWhiteBalanceResponse_<std::allocator<void> >&)':
camera_driver.cpp:(.text+0x11ac): undefined reference to `uvc_get_white_balance_temperature'
/usr/bin/ld: CMakeFiles/camera_node.dir/src/libuvc_camera/camera_driver.cpp.o: in function `libuvc_camera::CameraDriver::setUVCWhiteBalanceCb(astra_camera::SetUVCWhiteBalanceRequest_<std::allocator<void> >&, astra_camera::SetUVCWhiteBalanceResponse_<std::allocator<void> >&)':
camera_driver.cpp:(.text+0x1220): undefined reference to `uvc_set_white_balance_temperature_auto'
/usr/bin/ld: camera_driver.cpp:(.text+0x123c): undefined reference to `uvc_set_white_balance_temperature_auto'
/usr/bin/ld: camera_driver.cpp:(.text+0x125c): undefined reference to `uvc_set_white_balance_temperature'
/usr/bin/ld: CMakeFiles/camera_node.dir/src/libuvc_camera/camera_driver.cpp.o: in function `libuvc_camera::CameraDriver::Start()':
camera_driver.cpp:(.text+0x12cc): undefined reference to `uvc_init'
/usr/bin/ld: camera_driver.cpp:(.text+0x12ec): undefined reference to `uvc_perror'
/usr/bin/ld: CMakeFiles/camera_node.dir/src/libuvc_camera/camera_driver.cpp.o: in function `libuvc_camera::CameraDriver::Stop()':
camera_driver.cpp:(.text+0x1440): undefined reference to `uvc_exit'
/usr/bin/ld: CMakeFiles/camera_node.dir/src/libuvc_camera/camera_driver.cpp.o: in function `libuvc_camera::CameraDriver::ReconfigureCallback(libuvc_camera::UVCCameraConfig&, unsigned int)':
camera_driver.cpp:(.text+0x1594): undefined reference to `uvc_set_scanning_mode'
/usr/bin/ld: camera_driver.cpp:(.text+0x1710): undefined reference to `uvc_set_ae_mode'
/usr/bin/ld: camera_driver.cpp:(.text+0x1884): undefined reference to `uvc_set_ae_priority'
/usr/bin/ld: camera_driver.cpp:(.text+0x1a0c): undefined reference to `uvc_set_exposure_abs'
/usr/bin/ld: camera_driver.cpp:(.text+0x1c08): undefined reference to `uvc_set_focus_auto'
/usr/bin/ld: camera_driver.cpp:(.text+0x1d7c): undefined reference to `uvc_set_focus_abs'
/usr/bin/ld: camera_driver.cpp:(.text+0x1ef0): undefined reference to `uvc_set_gain'
/usr/bin/ld: camera_driver.cpp:(.text+0x2074): undefined reference to `uvc_set_iris_abs'
/usr/bin/ld: camera_driver.cpp:(.text+0x21f0): undefined reference to `uvc_set_brightness'
/usr/bin/ld: camera_driver.cpp:(.text+0x2374): undefined reference to `uvc_set_pantilt_abs'
/usr/bin/ld: CMakeFiles/camera_node.dir/src/libuvc_camera/camera_driver.cpp.o: in function `libuvc_camera::CameraDriver::ImageCallback(uvc_frame*)':
camera_driver.cpp:(.text+0x2974): undefined reference to `uvc_yuyv2bgr'
/usr/bin/ld: camera_driver.cpp:(.text+0x2994): undefined reference to `uvc_perror'
/usr/bin/ld: camera_driver.cpp:(.text+0x2a24): undefined reference to `uvc_mjpeg2rgb'
/usr/bin/ld: camera_driver.cpp:(.text+0x2a44): undefined reference to `uvc_perror'
/usr/bin/ld: camera_driver.cpp:(.text+0x2b0c): undefined reference to `uvc_any2bgr'
/usr/bin/ld: camera_driver.cpp:(.text+0x2b2c): undefined reference to `uvc_perror'
/usr/bin/ld: CMakeFiles/camera_node.dir/src/libuvc_camera/camera_driver.cpp.o: in function `libuvc_camera::CameraDriver::OpenCamera(libuvc_camera::UVCCameraConfig&)':
camera_driver.cpp:(.text+0x3e80): undefined reference to `uvc_find_devices'
/usr/bin/ld: camera_driver.cpp:(.text+0x3ea0): undefined reference to `uvc_perror'
/usr/bin/ld: camera_driver.cpp:(.text+0x3f24): undefined reference to `uvc_unref_device'
/usr/bin/ld: camera_driver.cpp:(.text+0x4070): undefined reference to `uvc_open'
/usr/bin/ld: camera_driver.cpp:(.text+0x417c): undefined reference to `uvc_get_bus_number'
/usr/bin/ld: camera_driver.cpp:(.text+0x4194): undefined reference to `uvc_get_device_address'
/usr/bin/ld: camera_driver.cpp:(.text+0x42bc): undefined reference to `uvc_get_bus_number'
/usr/bin/ld: camera_driver.cpp:(.text+0x42d4): undefined reference to `uvc_get_device_address'
/usr/bin/ld: camera_driver.cpp:(.text+0x42e4): undefined reference to `uvc_strerror'
/usr/bin/ld: camera_driver.cpp:(.text+0x4348): undefined reference to `uvc_unref_device'
/usr/bin/ld: camera_driver.cpp:(.text+0x4364): undefined reference to `uvc_set_status_callback'
/usr/bin/ld: camera_driver.cpp:(.text+0x43d4): undefined reference to `uvc_get_stream_ctrl_format_size'
/usr/bin/ld: camera_driver.cpp:(.text+0x4400): undefined reference to `uvc_perror'
/usr/bin/ld: camera_driver.cpp:(.text+0x4410): undefined reference to `uvc_close'
/usr/bin/ld: camera_driver.cpp:(.text+0x4420): undefined reference to `uvc_unref_device'
/usr/bin/ld: camera_driver.cpp:(.text+0x4534): undefined reference to `uvc_print_diag'
/usr/bin/ld: camera_driver.cpp:(.text+0x4558): undefined reference to `uvc_start_streaming'
/usr/bin/ld: camera_driver.cpp:(.text+0x4578): undefined reference to `uvc_perror'
/usr/bin/ld: camera_driver.cpp:(.text+0x4588): undefined reference to `uvc_close'
/usr/bin/ld: camera_driver.cpp:(.text+0x4598): undefined reference to `uvc_unref_device'
/usr/bin/ld: camera_driver.cpp:(.text+0x45bc): undefined reference to `uvc_free_frame'
/usr/bin/ld: camera_driver.cpp:(.text+0x45e4): undefined reference to `uvc_allocate_frame'
/usr/bin/ld: CMakeFiles/camera_node.dir/src/libuvc_camera/camera_driver.cpp.o: in function `libuvc_camera::CameraDriver::CloseCamera()':
camera_driver.cpp:(.text+0x4788): undefined reference to `uvc_close'
/usr/bin/ld: camera_driver.cpp:(.text+0x47a4): undefined reference to `uvc_unref_device'
collect2: error: ld returned 1 exit status
make[2]: *** [ros_astra_camera/CMakeFiles/camera_node.dir/build.make:163: devel/lib/astra_camera/camera_node] Error 1
make[1]: *** [CMakeFiles/Makefile2:3405: ros_astra_camera/CMakeFiles/camera_node.dir/all] Error 2
make: *** [Makefile:141: all] Error 2
Invoking "make -j4 -l4" failed
Your Problem is that workspace cannot find libuvc libraries.
make sure :
you have successfully compiled libuvc and other libraries required (check devel/lib folder in your workspace for related .so files).
your workspace is sourced when compiling (put source /<path>/<to>/<workspace>/devel/setup.bash into your .bashrc).
check if cmake can find the required library (simple way is to print output libuvc_LIBRARIES using message.
Hope this helps your problem.

Arch linux build caffe error

I'm trying to build caffe from this repo: caffe-textmaps
But after I've fallow each step and I've install everything that I need I receive this error message:
CXX/LD -o .build_release/tools/caffe.bin
.build_release/tools/caffe.o: In function `test()':
caffe.cpp:(.text+0x3bc): undefined reference to `caffe::Caffe::singleton_'
caffe.cpp:(.text+0x3ee): undefined reference to `caffe::Net<float>::Net(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, caffe::Phase)'
caffe.cpp:(.text+0x150b): undefined reference to `caffe::Caffe::singleton_'
.build_release/tools/caffe.o: In function `train()':
caffe.cpp:(.text+0x218a): undefined reference to `caffe::Caffe::singleton_'
caffe.cpp:(.text+0x231e): undefined reference to `caffe::Caffe::singleton_'
.build_release/tools/caffe.o: In function `time()':
caffe.cpp:(.text+0x2871): undefined reference to `caffe::Caffe::singleton_'
caffe.cpp:(.text+0x28a4): undefined reference to `caffe::Net<float>::Net(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, caffe::Phase)'
caffe.cpp:(.text+0x2cfd): undefined reference to `void caffe::caffe_gpu_dot<float>(int, float const*, float const*, float*)'
caffe.cpp:(.text+0x3cdf): undefined reference to `caffe::Caffe::singleton_'
.build_release/tools/caffe.o:(.data.rel.ro._ZTVN5caffe9SGDSolverIfEE[_ZTVN5caffe9SGDSolverIfEE]+0x30): undefined reference to `caffe::SGDSolver<float>::SnapshotSolverState(caffe::SolverState*)'
.build_release/tools/caffe.o:(.data.rel.ro._ZTVN5caffe9SGDSolverIfEE[_ZTVN5caffe9SGDSolverIfEE]+0x38): undefined reference to `caffe::SGDSolver<float>::RestoreSolverState(caffe::SolverState const&)'
.build_release/tools/caffe.o:(.data.rel.ro._ZTVN5caffe14NesterovSolverIfEE[_ZTVN5caffe14NesterovSolverIfEE]+0x30): undefined reference to `caffe::SGDSolver<float>::SnapshotSolverState(caffe::SolverState*)'
.build_release/tools/caffe.o:(.data.rel.ro._ZTVN5caffe14NesterovSolverIfEE[_ZTVN5caffe14NesterovSolverIfEE]+0x38): undefined reference to `caffe::SGDSolver<float>::RestoreSolverState(caffe::SolverState const&)'
.build_release/tools/caffe.o:(.data.rel.ro._ZTVN5caffe13AdaGradSolverIfEE[_ZTVN5caffe13AdaGradSolverIfEE]+0x30): undefined reference to `caffe::SGDSolver<float>::SnapshotSolverState(caffe::SolverState*)'
.build_release/tools/caffe.o:(.data.rel.ro._ZTVN5caffe13AdaGradSolverIfEE[_ZTVN5caffe13AdaGradSolverIfEE]+0x38): undefined reference to `caffe::SGDSolver<float>::RestoreSolverState(caffe::SolverState const&)'
collect2: error: ld returned 1 exit status
make: *** [Makefile:562: .build_release/tools/caffe.bin] Error 1
Could anyone of you give me some advice how can I fix this problem?

libldap.so: undefined reference to

Got the following linking problem when pip installing uWSGI in a virtualenv, am I missing some packages?
* uWSGI linking *
gcc -pthread -o /srv/www/ldap/bin/uwsgi core/utils.o core/protocol.o core/socket.o core/logging.o core/master.o core/master_utils.o core/emperor.o core/notify.o core/mule.o core/subscription.o core/stats.o core/sendfile.o core/async.o core/master_checks.o core/offload.o core/io.o core/static.o core/websockets.o core/spooler.o core/snmp.o core/exceptions.o core/config.o core/setup_utils.o core/clock.o core/init.o core/buffer.o core/reader.o core/writer.o core/alarm.o core/plugins.o core/lock.o core/cache.o core/daemons.o core/errors.o core/hash.o core/master_events.o core/queue.o core/event.o core/signal.o core/strings.o core/progress.o core/timebomb.o core/ini.o core/rpc.o core/gateway.o core/loop.o core/cookie.o core/querystring.o core/rb_timers.o core/uwsgi.o proto/base.o proto/uwsgi.o proto/http.o proto/fastcgi.o proto/scgi.o lib/linux_ns.o core/zlib.o core/yaml.o core/ldap.o core/ssl.o core/legion.o proto/zeromq.o core/xmlconf.o core/sqlite3.o plugins/python/python_plugin.o plugins/python/pyutils.o plugins/python/pyloader.o plugins/python/wsgi_handlers.o plugins/pyth/usr/lib/x86_64-linux-gnu/libldap.so: undefined reference to `ber_write#OPENLDAP_2.4_2'
/usr/lib/x86_64-linux-gnu/libldap.so: undefined reference to `ber_memvfree_x#OPENLDAP_2.4_2'
/usr/lib/x86_64-linux-gnu/libldap.so: undefined reference to `ber_pvt_sb_copy_out#OPENLDAP_2.4_2'
/usr/lib/x86_64-linux-gnu/libldap.so: undefined reference to `ber_memfree_x#OPENLDAP_2.4_2'
/usr/lib/x86_64-linux-gnu/libldap.so: undefined reference to `ber_free#OPENLDAP_2.4_2'
/usr/lib/x86_64-linux-gnu/libldap.so: undefined reference to `ber_log_dump#OPENLDAP_2.4_2'
/usr/lib/x86_64-linux-gnu/libldap.so: undefined reference to `ber_pvt_sb_buf_init#OPENLDAP_2.4_2'
/usr/lib/x86_64-linux-gnu/libldap.so: undefined reference to `ber_pvt_socket_set_nonblock#OPENLDAP_2.4_2'
/usr/lib/x86_64-linux-gnu/libldap.so: undefined reference to `ber_bvreplace#OPENLDAP_2.4_2'
/usr/lib/x86_64-linux-gnu/libldap.so: undefined reference to `ber_bvfree#OPENLDAP_2.4_2'
/usr/lib/x86_64-linux-gnu/libldap.so: undefined reference to `ber_next_element#OPENLDAP_2.4_2'
/usr/lib/x86_64-linux-gnu/libldap.so: undefined reference to `ber_sockbuf_add_io#OPENLDAP_2.4_2'
/usr/lib/x86_64-linux-gnu/libldap.so: undefined reference to `ber_sockbuf_ctrl#OPENLDAP_2.4_2'
/usr/lib/x86_64-linux-gnu/libldap.so: undefined reference to `ber_bvarray_free#OPENLDAP_2.4_2'
/usr/lib/x86_64-linux-gnu/libldap.so: undefined reference to `ber_skip_data#OPENLDAP_2.4_2'
/usr/lib/x86_64-linux-gnu/libldap.so: undefined reference to `ber_skip_tag#OPENLDAP_2.4_2'
/usr/lib/x86_64-linux-gnu/libldap.so: undefined reference to `ber_first_element#OPENLDAP_2.4_2'
/usr/lib/x86_64-linux-gnu/libldap.so: undefined reference to `ber_bvecfree#OPENLDAP_2.4_2'
/usr/lib/x86_64-linux-gnu/libldap.so: undefined reference to `ber_strdup_x#OPENLDAP_2.4_2'
/usr/lib/x86_64-linux-gnu/libldap.so: undefined reference to `ber_get_stringbv#OPENLDAP_2.4_2'
/usr/lib/x86_64-linux-gnu/libldap.so: undefined reference to `ber_alloc_t#OPENLDAP_2.4_2'
/usr/lib/x86_64-linux-gnu/libldap.so: undefined reference to `ber_sockbuf_io_debug#OPENLDAP_2.4_2'
/usr/lib/x86_64-linux-gnu/libldap.so: undefined reference to `ber_dup#OPENLDAP_2.4_2'
/usr/lib/x86_64-linux-gnu/libldap.so: undefined reference to `ber_sockbuf_io_udp#OPENLDAP_2.4_2'
/usr/lib/x86_64-linux-gnu/libldap.so: undefined reference to `ber_init#OPENLDAP_2.4_2'
/usr/lib/x86_64-linux-gnu/libldap.so: undefined reference to `ber_set_option#OPENLDAP_2.4_2'
/usr/lib/x86_64-linux-gnu/libldap.so: undefined reference to `ber_pvt_sb_do_write#OPENLDAP_2.4_2'
/usr/lib/x86_64-linux-gnu/libldap.so: undefined reference to `ber_pvt_log_print#OPENLDAP_2.4_2'
/usr/lib/x86_64-linux-gnu/libldap.so: undefined reference to `ber_flatten2#OPENLDAP_2.4_2'
/usr/lib/x86_64-linux-gnu/libldap.so: undefined reference to `ber_pvt_sb_grow_buffer#OPENLDAP_2.4_2'
/usr/lib/x86_64-linux-gnu/libldap.so: undefined reference to `ber_read#OPENLDAP_2.4_2'
/usr/lib/x86_64-linux-gnu/libldap.so: undefined reference to `ber_pvt_log_printf#OPENLDAP_2.4_2'
/usr/lib/x86_64-linux-gnu/libldap.so: undefined reference to `ber_get_int#OPENLDAP_2.4_2'
/usr/lib/x86_64-linux-gnu/libldap.so: undefined reference to `ber_sockbuf_free#OPENLDAP_2.4_2'
/usr/lib/x86_64-linux-gnu/libldap.so: undefined reference to `ber_pvt_sb_buf_destroy#OPENLDAP_2.4_2'
/usr/lib/x86_64-linux-gnu/libldap.so: undefined reference to `ber_str2bv#OPENLDAP_2.4_2'
/usr/lib/x86_64-linux-gnu/libldap.so: undefined reference to `ber_int_sb_close#OPENLDAP_2.4_2'
/usr/lib/x86_64-linux-gnu/libldap.so: undefined reference to `ber_get_next#OPENLDAP_2.4_2'
/usr/lib/x86_64-linux-gnu/libldap.so: undefined reference to `ber_get_option#OPENLDAP_2.4_2'
/usr/lib/x86_64-linux-gnu/libldap.so: undefined reference to `ber_scanf#OPENLDAP_2.4_2'
/usr/lib/x86_64-linux-gnu/libldap.so: undefined reference to `ber_rewind#OPENLDAP_2.4_2'
/usr/lib/x86_64-linux-gnu/libldap.so: undefined reference to `ber_sockbuf_io_tcp#OPENLDAP_2.4_2'
/usr/lib/x86_64-linux-gnu/libldap.so: undefined reference to `ber_ptrlen#OPENLDAP_2.4_2'
/usr/lib/x86_64-linux-gnu/libldap.so: undefined reference to `ber_dupbv#OPENLDAP_2.4_2'
/usr/lib/x86_64-linux-gnu/libldap.so: undefined reference to `ber_flatten#OPENLDAP_2.4_2'
/usr/lib/x86_64-linux-gnu/libldap.so: undefined reference to `ber_printf#OPENLDAP_2.4_2'
/usr/lib/x86_64-linux-gnu/libldap.so: undefined reference to `ber_strndup_x#OPENLDAP_2.4_2'
/usr/lib/x86_64-linux-gnu/libldap.so: undefined reference to `ber_strdup#OPENLDAP_2.4_2'
/usr/lib/x86_64-linux-gnu/libldap.so: undefined reference to `ber_memcalloc#OPENLDAP_2.4_2'
/usr/lib/x86_64-linux-gnu/libldap.so: undefined reference to `ber_reset#OPENLDAP_2.4_2'
/usr/lib/x86_64-linux-gnu/libldap.so: undefined reference to `ber_sockbuf_remove_io#OPENLDAP_2.4_2'
/usr/lib/x86_64-linux-gnu/libldap.so: undefined reference to `ber_sockbuf_io_fd#OPENLDAP_2.4_2'
/usr/lib/x86_64-linux-gnu/libldap.so: undefined reference to `ber_memcalloc_x#OPENLDAP_2.4_2'
/usr/lib/x86_64-linux-gnu/libldap.so: undefined reference to `ber_memrealloc#OPENLDAP_2.4_2'
/usr/lib/x86_64-linux-gnu/libldap.so: undefined reference to `ber_init2#OPENLDAP_2.4_2'
/usr/lib/x86_64-linux-gnu/libldap.so: undefined reference to `ber_int_sb_read#OPENLDAP_2.4_2'
/usr/lib/x86_64-linux-gnu/libldap.so: undefined reference to `ber_memfree#OPENLDAP_2.4_2'
/usr/lib/x86_64-linux-gnu/libldap.so: undefined reference to `ber_memrealloc_x#OPENLDAP_2.4_2'
/usr/lib/x86_64-linux-gnu/libldap.so: undefined reference to `ber_memvfree#OPENLDAP_2.4_2'
/usr/lib/x86_64-linux-gnu/libldap.so: undefined reference to `ber_memalloc#OPENLDAP_2.4_2'
/usr/lib/x86_64-linux-gnu/libldap.so: undefined reference to `ber_decode_oid#OPENLDAP_2.4_2'
/usr/lib/x86_64-linux-gnu/libldap.so: undefined reference to `ber_memalloc_x#OPENLDAP_2.4_2'
/usr/lib/x86_64-linux-gnu/libldap.so: undefined reference to `ber_flush2#OPENLDAP_2.4_2'
/usr/lib/x86_64-linux-gnu/libldap.so: undefined reference to `ber_peek_tag#OPENLDAP_2.4_2'
/usr/lib/x86_64-linux-gnu/libldap.so: undefined reference to `ber_sockbuf_io_readahead#OPENLDAP_2.4_2'
/usr/lib/x86_64-linux-gnu/libldap.so: undefined reference to `ber_sockbuf_alloc#OPENLDAP_2.4_2'
/usr/lib/x86_64-linux-gnu/libldap.so: undefined reference to `ber_get_enum#OPENLDAP_2.4_2'
collect2: ld returned 1 exit status
The problem was caused by libldap.so which installed by liblidap2-dev in order to compile openldap server.
Once I removed that package uwsgi started to compile fine again.

Qt Linking Error

I configure qt-x11 with following options
./configure -prefix /iTalk/qtx11 -prefix-install -bindir /iTalk/qtx11-install/bin -libdir /iTalk/qtx11-install/lib -docdir /iTalk/qtx11-install/doc -headerdir /iTalk/qtx11-install/include -datadir /iTalk/qtx11-install/data -examplesdir /iTalk/qtx11-install/examples -demosdir /iTalk/qtx11-install/demos -debug.
Now I am getting following errors in Fedora Core 6.
Can you please tell me where the problem is?
obj/debug-shared/qapplication_x11.o: In function `qt_init(QApplicationPrivate*, int, _XDisplay*, unsigned long, unsigned long)':
/iTalk/QT4/qt/src/gui/kernel/qapplication_x11.cpp:1713: undefined reference to `FcInit'
.obj/debug-shared/qfontdatabase.o: In function `queryFont':
/iTalk/QT4/qt/src/gui/text/qfontdatabase_x11.cpp:1727: undefined reference to `FcFreeTypeQuery'
.obj/debug-shared/qfontdatabase.o: In function `registerFont':
/iTalk/QT4/qt/src/gui/text/qfontdatabase_x11.cpp:1959: undefined reference to `FcConfigGetCurrent'
/iTalk/QT4/qt/src/gui/text/qfontdatabase_x11.cpp:1963: undefined reference to `FcConfigGetFonts'
/iTalk/QT4/qt/src/gui/text/qfontdatabase_x11.cpp:1965: undefined reference to `FcConfigAppFontAddFile'
/iTalk/QT4/qt/src/gui/text/qfontdatabase_x11.cpp:1966: undefined reference to `FcConfigGetFonts'
/iTalk/QT4/qt/src/gui/text/qfontdatabase_x11.cpp:1985: undefined reference to `FcConfigGetBlanks'
/iTalk/QT4/qt/src/gui/text/qfontdatabase_x11.cpp:1997: undefined reference to `FcPatternDel'
/iTalk/QT4/qt/src/gui/text/qfontdatabase_x11.cpp:1998: undefined reference to `FcPatternAddString'
/iTalk/QT4/qt/src/gui/text/qfontdatabase_x11.cpp:2001: undefined reference to `FcPatternGetString'
/iTalk/QT4/qt/src/gui/text/qfontdatabase_x11.cpp:2006: undefined reference to `FcFontSetAdd'
.obj/debug-shared/qfontdatabase.o: In function `qt_FcPatternToQFontDef(_FcPattern*, QFontDef const&)':
/iTalk/QT4/qt/src/gui/text/qfontdatabase_x11.cpp:746: undefined reference to `FcPatternGetString'
/iTalk/QT4/qt/src/gui/text/qfontdatabase_x11.cpp:751: undefined reference to `FcPatternGetDouble'
/iTalk/QT4/qt/src/gui/text/qfontdatabase_x11.cpp:759: undefined reference to `FcPatternGetDouble'
/iTalk/QT4/qt/src/gui/text/qfontdatabase_x11.cpp:771: undefined reference to `FcPatternGetInteger'
/iTalk/QT4/qt/src/gui/text/qfontdatabase_x11.cpp:776: undefined reference to `FcPatternGetInteger'
/iTalk/QT4/qt/src/gui/text/qfontdatabase_x11.cpp:786: undefined reference to `FcPatternGetBool'
/iTalk/QT4/qt/src/gui/text/qfontdatabase_x11.cpp:793: undefined reference to `FcPatternGetInteger'
/iTalk/QT4/qt/src/gui/text/qfontdatabase_x11.cpp:800: undefined reference to `FcPatternGetInteger'
.obj/debug-shared/qfontdatabase.o: In function `FcFontSetRemove':
/iTalk/QT4/qt/src/gui/text/qfontdatabase_x11.cpp:1573: undefined reference to `FcPatternDestroy'
.obj/debug-shared/qfontdatabase.o: In function `qt_fontSetForPattern(_FcPattern*, QFontDef const&)':
/iTalk/QT4/qt/src/gui/text/qfontdatabase_x11.cpp:1657: undefined reference to `FcFontSort'
/iTalk/QT4/qt/src/gui/text/qfontdatabase_x11.cpp:1671: undefined reference to `FcPatternGetBool'
.obj/debug-shared/qfontdatabase.o: In function `qt_addPatternProps(_FcPattern*, int, int, QFontDef const&)':
/iTalk/QT4/qt/src/gui/text/qfontdatabase_x11.cpp:1449: undefined reference to `FcPatternAddInteger'
/iTalk/QT4/qt/src/gui/text/qfontdatabase_x11.cpp:1456: undefined reference to `FcPatternAddInteger'
/iTalk/QT4/qt/src/gui/text/qfontdatabase_x11.cpp:1459: undefined reference to `FcPatternAddDouble'
/iTalk/QT4/qt/src/gui/text/qfontdatabase_x11.cpp:1464: undefined reference to `FcPatternAddInteger'
/iTalk/QT4/qt/src/gui/text/qfontdatabase_x11.cpp:1468: undefined reference to `FcPatternAddBool'
/iTalk/QT4/qt/src/gui/text/qfontdatabase_x11.cpp:1471: undefined reference to `FcPatternAddBool'
/iTalk/QT4/qt/src/gui/text/qfontdatabase_x11.cpp:1476: undefined reference to `FcLangSetCreate'
/iTalk/QT4/qt/src/gui/text/qfontdatabase_x11.cpp:1477: undefined reference to `FcLangSetAdd'
/iTalk/QT4/qt/src/gui/text/qfontdatabase_x11.cpp:1478: undefined reference to `FcPatternAddLangSet'
/iTalk/QT4/qt/src/gui/text/qfontdatabase_x11.cpp:1479: undefined reference to `FcLangSetDestroy'
.obj/debug-shared/qfontdatabase.o: In function `tryPatternLoad':
/iTalk/QT4/qt/src/gui/text/qfontdatabase_x11.cpp:1588: undefined reference to `FcPatternDuplicate'
/iTalk/QT4/qt/src/gui/text/qfontdatabase_x11.cpp:1593: undefined reference to `FcConfigSubstitute'
/iTalk/QT4/qt/src/gui/text/qfontdatabase_x11.cpp:1594: undefined reference to `FcDefaultSubstitute'
/iTalk/QT4/qt/src/gui/text/qfontdatabase_x11.cpp:1596: undefined reference to `FcFontMatch'
/iTalk/QT4/qt/src/gui/text/qfontdatabase_x11.cpp:1606: undefined reference to `FcPatternDuplicate'
/iTalk/QT4/qt/src/gui/text/qfontdatabase_x11.cpp:1613: undefined reference to `FcPatternGetCharSet'
/iTalk/QT4/qt/src/gui/text/qfontdatabase_x11.cpp:1615: undefined reference to `FcCharSetHasChar'
/iTalk/QT4/qt/src/gui/text/qfontdatabase_x11.cpp:1619: undefined reference to `FcPatternGetLangSet'
/iTalk/QT4/qt/src/gui/text/qfontdatabase_x11.cpp:1621: undefined reference to `FcLangSetHasLang'
/iTalk/QT4/qt/src/gui/text/qfontdatabase_x11.cpp:1628: undefined reference to `FcPatternDel'
/iTalk/QT4/qt/src/gui/text/qfontdatabase_x11.cpp:1629: undefined reference to `FcPatternAddBool'
/iTalk/QT4/qt/src/gui/text/qfontdatabase_x11.cpp:1646: undefined reference to `FcPatternDestroy'
/iTalk/QT4/qt/src/gui/text/qfontdatabase_x11.cpp:1648: undefined reference to `FcPatternDestroy'
.obj/debug-shared/qfontdatabase.o: In function `loadFontConfig':
/iTalk/QT4/qt/src/gui/text/qfontdatabase_x11.cpp:1023: undefined reference to `FcObjectSetCreate'
/iTalk/QT4/qt/src/gui/text/qfontdatabase_x11.cpp:1024: undefined reference to `FcPatternCreate'
/iTalk/QT4/qt/src/gui/text/qfontdatabase_x11.cpp:1037: undefined reference to `FcObjectSetAdd'
/iTalk/QT4/qt/src/gui/text/qfontdatabase_x11.cpp:1040: undefined reference to `FcFontList'
/iTalk/QT4/qt/src/gui/text/qfontdatabase_x11.cpp:1041: undefined reference to `FcObjectSetDestroy'
/iTalk/QT4/qt/src/gui/text/qfontdatabase_x11.cpp:1042: undefined reference to `FcPatternDestroy'
/iTalk/QT4/qt/src/gui/text/qfontdatabase_x11.cpp:1046: undefined reference to `FcPatternGetString'
/iTalk/QT4/qt/src/gui/text/qfontdatabase_x11.cpp:1057: undefined reference to `FcPatternGetInteger'
/iTalk/QT4/qt/src/gui/text/qfontdatabase_x11.cpp:1059: undefined reference to `FcPatternGetInteger'
/iTalk/QT4/qt/src/gui/text/qfontdatabase_x11.cpp:1061: undefined reference to `FcPatternGetInteger'
/iTalk/QT4/qt/src/gui/text/qfontdatabase_x11.cpp:1063: undefined reference to `FcPatternGetString'
/iTalk/QT4/qt/src/gui/text/qfontdatabase_x11.cpp:1065: undefined reference to `FcPatternGetInteger'
/iTalk/QT4/qt/src/gui/text/qfontdatabase_x11.cpp:1067: undefined reference to `FcPatternGetBool'
/iTalk/QT4/qt/src/gui/text/qfontdatabase_x11.cpp:1069: undefined reference to `FcPatternGetString'
/iTalk/QT4/qt/src/gui/text/qfontdatabase_x11.cpp:1074: undefined reference to `FcPatternGetLangSet'
/iTalk/QT4/qt/src/gui/text/qfontdatabase_x11.cpp:1081: undefined reference to `FcLangSetHasLang'
/iTalk/QT4/qt/src/gui/text/qfontdatabase_x11.cpp:1100: undefined reference to `FcPatternGetCharSet'
/iTalk/QT4/qt/src/gui/text/qfontdatabase_x11.cpp:1107: undefined reference to `FcCharSetHasChar'
/iTalk/QT4/qt/src/gui/text/qfontdatabase_x11.cpp:1116: undefined reference to `FcPatternGetString'
/iTalk/QT4/qt/src/gui/text/qfontdatabase_x11.cpp:1136: undefined reference to `FcPatternGetInteger'
/iTalk/QT4/qt/src/gui/text/qfontdatabase_x11.cpp:1153: undefined reference to `FcPatternGetDouble'
/iTalk/QT4/qt/src/gui/text/qfontdatabase_x11.cpp:1161: undefined reference to `FcFontSetDestroy'
.obj/debug-shared/qfontdatabase.o: In function `getFcPattern':
/iTalk/QT4/qt/src/gui/text/qfontdatabase_x11.cpp:1494: undefined reference to `FcPatternCreate'
/iTalk/QT4/qt/src/gui/text/qfontdatabase_x11.cpp:1509: undefined reference to `FcPatternAdd'
/iTalk/QT4/qt/src/gui/text/qfontdatabase_x11.cpp:1516: undefined reference to `FcPatternAddWeak'
/iTalk/QT4/qt/src/gui/text/qfontdatabase_x11.cpp:1524: undefined reference to `FcPatternAddWeak'
/iTalk/QT4/qt/src/gui/text/qfontdatabase_x11.cpp:1531: undefined reference to `FcPatternAddInteger'
/iTalk/QT4/qt/src/gui/text/qfontdatabase_x11.cpp:1533: undefined reference to `FcPatternAddBool'
/iTalk/QT4/qt/src/gui/text/qfontdatabase_x11.cpp:1535: undefined reference to `FcPatternAddBool'
/iTalk/QT4/qt/src/gui/text/qfontdatabase_x11.cpp:1539: undefined reference to `FcDefaultSubstitute'
/iTalk/QT4/qt/src/gui/text/qfontdatabase_x11.cpp:1540: undefined reference to `FcConfigSubstitute'
/iTalk/QT4/qt/src/gui/text/qfontdatabase_x11.cpp:1541: undefined reference to `FcConfigSubstitute'
/iTalk/QT4/qt/src/gui/text/qfontdatabase_x11.cpp:1550: undefined reference to `FcPatternAddWeak'
/iTalk/QT4/qt/src/gui/text/qfontdatabase_x11.cpp:1557: undefined reference to `FcPatternAddWeak'
/iTalk/QT4/qt/src/gui/text/qfontdatabase_x11.cpp:1564: undefined reference to `FcPatternAddWeak'
.obj/debug-shared/qfontdatabase.o: In function `loadFc':
/iTalk/QT4/qt/src/gui/text/qfontdatabase_x11.cpp:1707: undefined reference to `FcFontSetDestroy'
/iTalk/QT4/qt/src/gui/text/qfontdatabase_x11.cpp:1716: undefined reference to `FcPatternDestroy'
/iTalk/QT4/qt/src/gui/text/qfontdatabase_x11.cpp:1718: undefined reference to `FcPatternDestroy'
.obj/debug-shared/qfontdatabase.o: In function `QFontDatabase::removeAllApplicationFonts()':
/iTalk/QT4/qt/src/gui/text/qfontdatabase_x11.cpp:2048: undefined reference to `FcConfigAppFontClear'
.obj/debug-shared/qfontdatabase.o: In function `QFontDatabase::removeApplicationFont(int)':
/iTalk/QT4/qt/src/gui/text/qfontdatabase_x11.cpp:2027: undefined reference to `FcConfigAppFontClear'
.obj/debug-shared/qfontengine_x11.o: In function `qt_x11ft_convert_pattern(_FcPattern*, QByteArray*, int*, bool*)':
/iTalk/QT4/qt/src/gui/text/qfontengine_x11.cpp:970: undefined reference to `FcPatternGetString'
/iTalk/QT4/qt/src/gui/text/qfontengine_x11.cpp:972: undefined reference to `FcPatternGetInteger'
/iTalk/QT4/qt/src/gui/text/qfontengine_x11.cpp:975: undefined reference to `FcPatternGetBool'
.obj/debug-shared/qfontengine_x11.o: In function `QFontEngineX11FT':
/iTalk/QT4/qt/src/gui/text/qfontengine_x11.cpp:999: undefined reference to `FcPatternGetInteger'
/iTalk/QT4/qt/src/gui/text/qfontengine_x11.cpp:1016: undefined reference to `FcPatternGetInteger'
/iTalk/QT4/qt/src/gui/text/qfontengine_x11.cpp:1041: undefined reference to `FcPatternGetBool'
/iTalk/QT4/qt/src/gui/text/qfontengine_x11.cpp:1077: undefined reference to `FcPatternGetBool'
/iTalk/QT4/qt/src/gui/text/qfontengine_x11.cpp:1106: undefined reference to `FcPatternDestroy'
/iTalk/QT4/qt/src/gui/text/qfontengine_x11.cpp:1112: undefined reference to `FcPatternGetCharSet'
/iTalk/QT4/qt/src/gui/text/qfontengine_x11.cpp:1113: undefined reference to `FcCharSetCopy'
/iTalk/QT4/qt/src/gui/text/qfontengine_x11.cpp:1115: undefined reference to `FcPatternDestroy'
/iTalk/QT4/qt/src/gui/text/qfontengine_x11.cpp:999: undefined reference to `FcPatternGetInteger'
/iTalk/QT4/qt/src/gui/text/qfontengine_x11.cpp:1016: undefined reference to `FcPatternGetInteger'
/iTalk/QT4/qt/src/gui/text/qfontengine_x11.cpp:1041: undefined reference to `FcPatternGetBool'
/iTalk/QT4/qt/src/gui/text/qfontengine_x11.cpp:1077: undefined reference to `FcPatternGetBool'
/iTalk/QT4/qt/src/gui/text/qfontengine_x11.cpp:1106: undefined reference to `FcPatternDestroy'
/iTalk/QT4/qt/src/gui/text/qfontengine_x11.cpp:1112: undefined reference to `FcPatternGetCharSet'
/iTalk/QT4/qt/src/gui/text/qfontengine_x11.cpp:1113: undefined reference to `FcCharSetCopy'
/iTalk/QT4/qt/src/gui/text/qfontengine_x11.cpp:1115: undefined reference to `FcPatternDestroy'
.obj/debug-shared/qfontengine_x11.o: In function `engineForPattern':
/iTalk/QT4/qt/src/gui/text/qfontengine_x11.cpp:868: undefined reference to `FcFontMatch'
.obj/debug-shared/qfontengine_x11.o: In function `QFontEngineMultiFT::loadEngine(int)':
/iTalk/QT4/qt/src/gui/text/qfontengine_x11.cpp:929: undefined reference to `FcPatternEqual'
/iTalk/QT4/qt/src/gui/text/qfontengine_x11.cpp:932: undefined reference to `FcPatternDestroy'
/iTalk/QT4/qt/src/gui/text/qfontengine_x11.cpp:941: undefined reference to `FcPatternDuplicate'
/iTalk/QT4/qt/src/gui/text/qfontengine_x11.cpp:951: undefined reference to `FcConfigSubstitute'
/iTalk/QT4/qt/src/gui/text/qfontengine_x11.cpp:952: undefined reference to `FcDefaultSubstitute'
/iTalk/QT4/qt/src/gui/text/qfontengine_x11.cpp:956: undefined reference to `FcPatternDestroy'
.obj/debug-shared/qfontengine_x11.o: In function `~QFontEngineMultiFT':
/iTalk/QT4/qt/src/gui/text/qfontengine_x11.cpp:895: undefined reference to `FcPatternDestroy'
/iTalk/QT4/qt/src/gui/text/qfontengine_x11.cpp:897: undefined reference to `FcPatternDestroy'
/iTalk/QT4/qt/src/gui/text/qfontengine_x11.cpp:899: undefined reference to `FcFontSetDestroy'
/iTalk/QT4/qt/src/gui/text/qfontengine_x11.cpp:895: undefined reference to `FcPatternDestroy'
/iTalk/QT4/qt/src/gui/text/qfontengine_x11.cpp:897: undefined reference to `FcPatternDestroy'
/iTalk/QT4/qt/src/gui/text/qfontengine_x11.cpp:899: undefined reference to `FcFontSetDestroy'
/iTalk/QT4/qt/src/gui/text/qfontengine_x11.cpp:895: undefined reference to `FcPatternDestroy'
/iTalk/QT4/qt/src/gui/text/qfontengine_x11.cpp:897: undefined reference to `FcPatternDestroy'
/iTalk/QT4/qt/src/gui/text/qfontengine_x11.cpp:899: undefined reference to `FcFontSetDestroy'
.obj/debug-shared/qfontengine_ft.o: In function `QFontEngineFT::stringToCMap(QChar const*, int, QGlyphLayout*, int*, QFlags) const':
/iTalk/QT4/qt/src/gui/text/qfontengine_ft.cpp:1546: undefined reference to `FcCharSetHasChar'
/iTalk/QT4/qt/src/gui/text/qfontengine_ft.cpp:1581: undefined reference to `FcCharSetHasChar'
.obj/debug-shared/qfontengine_ft.o: In function `QFreetypeFace::release(QFontEngine::FaceId const&)':
/iTalk/QT4/qt/src/gui/text/qfontengine_ft.cpp:308: undefined reference to `FcCharSetDestroy'
collect2: ld returned 1 exit status
make[1]: *** [../../lib/libQtGui.so.4.5.3] Error 1
make[1]: Leaving directory `/iTalk/QT4/qt/src/gui'
make: *** [sub-gui-make_default-ordered] Error 2
You're missing references to FontConfig.
./configure takes a -no-fontconfig switch, but better would be to figure out why ./configure isn't including FontConfig properly. (The logs you posted don't go far enough back to even figure out what the failed link command is.)
This looks like the known problem on Red Hat based systems and the old version of FontConfig that they use. There are good instructions for fixing the problem at http://theitdepartment.wordpress.com/2009/03/15/centos-qt-fcfreetypequeryface/ .
the thing is that the fontconfig version provided by red hat is too old and missing a symbol (I read that it is the sub sub version number that is to low and that is causing the missing symbol). If you simply update fontconfig it doesnt seem to work for me because it finds the oldest version still but when I change the makefile to link to the newer libfontconfig.so directly it work. In your .pro file add the following line: LIB+= /path/to/your/NewFontConfiglib.so.X.X Also, simply doing a yum update doesnt work, it says package up to date, I read a post that showed how to add the newer one. Later on, I decided I need to build my app standalone so I started building a static version of Qt and got into the same problem.....I was not sure how to modify that makefile though and came across this post so hopefully it will work. Take a look at this post: CentOS 5.2 + Qt 4.5 + FcFreeTypeQueryFace

Resources