Error while compiling gdb - linux

I get the following error when compiling GDB.
../readline/libreadline.a ../opcodes/libopcodes.a ../bfd/libbfd.a ../libiberty/libiberty.a ../libdecnumber/libdecnumber.a -ldl -ltermcap -lz -lm -L/usr/lib/python2.7/config -lpthread -ldl -lutil -lm -lpython2.7 -Xlinker -export-dynamic -Wl,-O1 -Wl,-Bsymbolic-functions -lexpat ../libiberty/libiberty.a build-gnulib/import/libgnu.a
python.o: In function `gdbpy_target_charset':
python.c:(.text+0x7b5): undefined reference to `PyUnicodeUCS2_Decode'
python.o: In function `gdbpy_target_wide_charset':
python.c:(.text+0x820): undefined reference to `PyUnicodeUCS2_Decode'
py-cmd.o: In function `cmdpy_function':
py-cmd.c:(.text+0x39b): undefined reference to `PyUnicodeUCS2_Decode'
py-cmd.o: In function `cmdpy_completer':
py-cmd.c:(.text+0x74c): undefined reference to `PyUnicodeUCS2_Decode'
py-cmd.c:(.text+0x7c0): undefined reference to `PyUnicodeUCS2_Decode'
py-frame.o:py-frame.c:(.text+0x29b): more undefined references to `PyUnicodeUCS2_Decode' follow
py-utils.o: In function `python_string_to_unicode':
py-utils.c:(.text+0xe1): undefined reference to `PyUnicodeUCS2_FromEncodedObject'
py-utils.o: In function `unicode_to_encoded_string':
py-utils.c:(.text+0x13c): undefined reference to `PyUnicodeUCS2_AsEncodedString'
py-utils.o: In function `unicode_to_encoded_python_string':
py-utils.c:(.text+0x1c7): undefined reference to `PyUnicodeUCS2_AsEncodedString'
py-utils.o: In function `target_string_to_unicode':
py-utils.c:(.text+0x409): undefined reference to `PyUnicodeUCS2_Decode'
py-value.o: In function `valpy_string':
py-value.c:(.text+0xb8b): undefined reference to `PyUnicodeUCS2_Decode'
py-value.o: In function `valpy_str':
py-value.c:(.text+0x141b): undefined reference to `PyUnicodeUCS2_Decode'
collect2: ld returned 1 exit status
make[2]: *** [gdb] Error 1
make[2]: Leaving directory
What might be the reason for it?

Related

undefined reference to dss_ functions

I am new to fortran and cmake, so I'm sure there is a simple fix I am missing!
error message:
100%] Linking Fortran executable dynamicmpm
CMakeFiles/dynamicmpm.dir/Solver.FOR.o: In function `modsolver_mp_createprofiledss_':
Solver.FOR:(.text+0x1143): undefined reference to `dss_create_'
Solver.FOR:(.text+0x11a8): undefined reference to `dss_define_structure_'
Solver.FOR:(.text+0x1471): undefined reference to `dss_reorder_'
CMakeFiles/dynamicmpm.dir/Solver.FOR.o: In function `modsolver_mp_solveequations_':
Solver.FOR:(.text+0x35ec): undefined reference to `dss_factor_real_d__'
Solver.FOR:(.text+0x361d): undefined reference to `dss_solve_real_d_'
CMakeFiles/dynamicmpm.dir/Solver.FOR.o: In function `modsolver_mp_destroyequations_':
Solver.FOR:(.text+0x4495): undefined reference to `dss_delete_'
CMakeFiles/dynamicmpm.dir/Solver.FOR.o: In function `modsolver_mp_initialisereducedsolution_':
Solver.FOR:(.text+0x5a58): undefined reference to `dss_create_'
Solver.FOR:(.text+0x5abd): undefined reference to `dss_define_structure_'
Solver.FOR:(.text+0x606d): undefined reference to `dss_reorder_'
I included use mkl_dss at the top of the Solver.FOR file
inside the cmakefile:
CMAKE_MINIMUM_REQUIRED(VERSION 2.8)
PROJECT(MPM)
enable_language (Fortran)
set(CMAKE_Fortran_COMPILER_ID "GNU")
add_compile_options(-nologo -O2 -ldl -assume buffered_io -fpp -Dinternal_release
-reentrancy threaded -free -warn all -real_size 64 -Qauto -fp:strict
-fp:constant -libs:static -threads -Qmkl:sequential -Qm64
-fmax-identifier-length=63 -ffree-form -ffree-line-length-none -fdefault-real-8)
set(SRCS MOHRStrainSoftening.FOR getversion.for GlobalConstants.FOR mkl_dss.f90 String.for
Feedback.for FileIO.for MatrixMath.FOR timing.for ISORT.FOR GeoMath.FOR Counters.FOR
ElemCalcTETRA.FOR ReadCalculationData.FOR ElemCalcQUAD.FOR InitialiseKernel.FOR
ElemCalcTRI.FOR ReadMaterialData.FOR ElemCalc.FOR Particle.FOR MeshInfo.FOR
ElemConnections.FOR RotBoundCond.FOR ReadGeometryData.FOR InitialiseElementType.for
Solver.FOR MPMData.FOR WriteMPMData.FOR WriteVTKASCII.FOR TwoLayerFormulation.FOR
MPMDYNUnsatConsolidation.FOR WriteVTKBinary.FOR MPMStrainSmoothing.FOR WriteVTKOutput.FOR
MPMDYNConsolidation.FOR MPMStresses.FOR MPMDynContact.FOR MPMDynViscousBoundary.FOR
WriteTestData.FOR Liquid.FOR WriteVTK2Layer.FOR ReadMPMData.FOR RigidBody.f WriteNodalData.FOR
MPMMeshAdjustment.FOR MPMEmptyElements.FOR WriteResultData.FOR MPMConvPhase.FOR
ErrorHandler.for AdjustParticleDiscretisation.FOR MPMExcavation.FOR MPMInit.FOR MPMDYNBTSig.FOR
LagrangianPhase.FOR MPMDYNStresses.FOR MPMDYNConvPhase.FOR MPMQuasiStaticImplicit.FOR
MPMDynamicExplicit.FOR Kernel.for GetStrain.FOR Anura3D.for FORMDE.FOR BuildLoad.FOR
BuildDElastic.FOR MOHR.FOR BuildBJacDet.FOR PRNSTR.FOR GetPrinStress.FOR)
add_executable(dynamicmpm ${SRCS})
I'm sure I am just not linking it properly but I can't seem to find the mistake. I include mkl_dss.f90 in SRCS and have the appropriate use statement in SOLVER.FOR
I am including a link to my previous SO post in case that might be useful:
Executable file does not exist after compiling Fortran code

Building Mplayer from sources in Linux

I've encountered a problem trying to build Mplayer from sources (svn version). I run 'configure' script with no parameters. It indicates no problems. FFmpeg compiles fine, but the last stage, that is building mplayer, fails:
ffmpeg/libavcodec/h263dec.o: In function `ff_h263_decode_frame':
h263dec.c:(.text+0xddb): undefined reference to `ff_h263_find_frame_end'
h263dec.c:(.text+0xfa0): undefined reference to `ff_mpeg4_find_frame_end'
ffmpeg/libavcodec/mlpdec.o: In function `read_access_unit':
mlpdec.c:(.text+0x128a): undefined reference to `ff_mlp_read_major_sync'
ffmpeg/libavcodec/ac3dec_fixed.o: In function `ac3_decode_frame':
ac3dec_fixed.c:(.text+0x73a3): undefined reference to `ff_ac3_parse_header'
ac3dec_fixed.c:(.text+0x7d4f): undefined reference to `ff_ac3_parse_header'
ffmpeg/libavcodec/ac3dec_float.o: In function `ac3_decode_frame':
ac3dec_float.c:(.text+0x687f): undefined reference to `ff_ac3_parse_header'
ac3dec_float.c:(.text+0x727b): undefined reference to `ff_ac3_parse_header'
ffmpeg/libavcodec/eac3_core_bsf.o: In function `eac3_core_filter':
eac3_core_bsf.c:(.text+0x7d): undefined reference to `ff_ac3_parse_header'
ffmpeg/libavcodec/eac3_core_bsf.o:eac3_core_bsf.c:(.text+0x174): more undefined references to `ff_ac3_parse_header' follow
collect2: error: ld returned 1 exit status
Makefile:747: recipe for target 'mplayer' failed
make: *** [mplayer] Error 1
The above resulted from:
cc -o mplayer command.o m_property.o mixer.o mp_fifo.o mplayer.o parser-mpcmd.o pnm_loader.o input/input.o libao2/ao_mpegpes.o libao2/ao_null.o libao2/ao_pcm.o libao2/audio_out.o libvo/aspect.o libvo/geometry.o libvo/video_out.o libvo/vo_mpegpes.o libvo/vo_null.o sub/spuenc.o libvo/vo_aa.o libao2/ao_alsa.o input/appleir.o libvo/vo_caca.o libvo/vo_dga.o libvo/vo_directfb2.o libvo/vo_dfbmga.o libvo/vo_fbdev.o libvo/vo_fbdev2.o libvo/vo_png.o libvo/vo_gif89a.o libvo/gl_common.o libvo/vo_gl.o libvo/csputils.o libvo/sdl_common.o libvo/x11_common.o libvo/vo_gl_tiled.o libao2/ao_jack.o libvo/vo_jpeg.o input/lirc.o libvo/vo_matrixview.o libvo/matrixview.o libvo/vo_md5sum.o libvo/vo_mng.o libao2/ao_nas.o udp_sync.o libao2/ao_openal.o libao2/ao_oss.o libvo/vo_pnm.o libao2/ao_pulse.o libao2/ao_sdl.o libvo/vo_sdl.o libvo/vo_tga.o libvo/vo_v4l2.o libao2/ao_v4l2.o libvo/vo_vdpau.o libvo/vo_cvidix.o libvo/vosub_vidix.o vidix/vidix.o vidix/drivers.o vidix/dha.o vidix/mtrr.o vidix/pci.o vidix/pci_names.o vidix/pci_dev_ids.o vidix/cyberblade_vid.o vidix/mach64_vid.o vidix/mga_vid.o vidix/mga_crtc2_vid.o vidix/nvidia_vid.o vidix/pm2_vid.o vidix/pm3_vid.o vidix/radeon_vid.o vidix/rage128_vid.o vidix/s3_vid.o vidix/sis_vid.o vidix/sis_bridge.o vidix/unichrome_vid.o libvo/vo_x11.o libvo/vo_xover.o libvo/vo_xv.o libvo/vo_xvidix.o libvo/vo_yuv4mpeg.o asxparser.o bstr.o codec-cfg.o cpudetect.o edl.o fmt-conversion.o m_config.o m_option.o m_struct.o mp_msg.o mp_strings.o mpcommon.o parser-cfg.o path.o playtree.o playtreeparser.o subopt-helper.o libaf/af.o libaf/af_center.o libaf/af_channels.o libaf/af_comp.o libaf/af_delay.o libaf/af_dummy.o libaf/af_equalizer.o libaf/af_extrastereo.o libaf/af_format.o libaf/af_gate.o libaf/af_hrtf.o libaf/af_karaoke.o libaf/af_pan.o libaf/af_resample.o libaf/af_scaletempo.o libaf/af_sinesuppress.o libaf/af_stats.o libaf/af_sub.o libaf/af_surround.o libaf/af_sweep.o libaf/af_tools.o libaf/af_volnorm.o libaf/af_volume.o libaf/filter.o libaf/format.o libaf/reorder_ch.o libaf/window.o libmpcodecs/ad.o libmpcodecs/ad_alaw.o libmpcodecs/ad_dvdpcm.o libmpcodecs/ad_hwac3.o libmpcodecs/ad_hwmpa.o libmpcodecs/ad_pcm.o libmpcodecs/dec_audio.o libmpcodecs/dec_teletext.o libmpcodecs/dec_video.o libmpcodecs/img_format.o libmpcodecs/mp_image.o libmpcodecs/pullup.o libmpcodecs/vd.o libmpcodecs/vd_hmblck.o libmpcodecs/vd_lzo.o libmpcodecs/vd_mpegpes.o libmpcodecs/vd_mtga.o libmpcodecs/vd_null.o libmpcodecs/vd_raw.o libmpcodecs/vd_sgi.o libmpcodecs/vd_black.o libmpcodecs/vf.o libmpcodecs/vf_1bpp.o libmpcodecs/vf_2xsai.o libmpcodecs/vf_blackframe.o libmpcodecs/vf_boxblur.o libmpcodecs/vf_crop.o libmpcodecs/vf_cropdetect.o libmpcodecs/vf_decimate.o libmpcodecs/vf_delogo.o libmpcodecs/vf_denoise3d.o libmpcodecs/vf_detc.o libmpcodecs/vf_dint.o libmpcodecs/vf_divtc.o libmpcodecs/vf_down3dright.o libmpcodecs/vf_dsize.o libmpcodecs/vf_dvbscale.o libmpcodecs/vf_eq.o libmpcodecs/vf_eq2.o libmpcodecs/vf_expand.o libmpcodecs/vf_field.o libmpcodecs/vf_fil.o libmpcodecs/vf_filmdint.o libmpcodecs/vf_fixpts.o libmpcodecs/vf_flip.o libmpcodecs/vf_format.o libmpcodecs/vf_framestep.o libmpcodecs/vf_gradfun.o libmpcodecs/vf_halfpack.o libmpcodecs/vf_harddup.o libmpcodecs/vf_hqdn3d.o libmpcodecs/vf_hue.o libmpcodecs/vf_il.o libmpcodecs/vf_ilpack.o libmpcodecs/vf_ivtc.o libmpcodecs/vf_kerndeint.o libmpcodecs/vf_mirror.o libmpcodecs/vf_noformat.o libmpcodecs/vf_noise.o libmpcodecs/vf_ow.o libmpcodecs/vf_palette.o libmpcodecs/vf_perspective.o libmpcodecs/vf_phase.o libmpcodecs/vf_pp7.o libmpcodecs/vf_pullup.o libmpcodecs/vf_rectangle.o libmpcodecs/vf_remove_logo.o libmpcodecs/vf_rgbtest.o libmpcodecs/vf_rotate.o libmpcodecs/vf_sab.o libmpcodecs/vf_scale.o libmpcodecs/vf_smartblur.o libmpcodecs/vf_softpulldown.o libmpcodecs/vf_stereo3d.o libmpcodecs/vf_softskip.o libmpcodecs/vf_swapuv.o libmpcodecs/vf_telecine.o libmpcodecs/vf_test.o libmpcodecs/vf_tfields.o libmpcodecs/vf_tile.o libmpcodecs/vf_tinterlace.o libmpcodecs/vf_unsharp.o libmpcodecs/vf_vo.o libmpcodecs/vf_yadif.o libmpcodecs/vf_yuvcsp.o libmpcodecs/vf_yvu9.o libmpdemux/aac_hdr.o libmpdemux/asfheader.o libmpdemux/aviheader.o libmpdemux/aviprint.o libmpdemux/demuxer.o libmpdemux/demux_aac.o libmpdemux/demux_asf.o libmpdemux/demux_audio.o libmpdemux/demux_avi.o libmpdemux/demux_demuxers.o libmpdemux/demux_film.o libmpdemux/demux_fli.o libmpdemux/demux_lmlm4.o libmpdemux/demux_mf.o libmpdemux/demux_mkv.o libmpdemux/demux_mov.o libmpdemux/demux_mpg.o libmpdemux/demux_nsv.o libmpdemux/demux_pva.o libmpdemux/demux_rawaudio.o libmpdemux/demux_rawvideo.o libmpdemux/demux_realaud.o libmpdemux/demux_real.o libmpdemux/demux_roq.o libmpdemux/demux_smjpeg.o libmpdemux/demux_ts.o libmpdemux/demux_ty.o libmpdemux/demux_ty_osd.o libmpdemux/demux_viv.o libmpdemux/demux_vqf.o libmpdemux/demux_y4m.o libmpdemux/ebml.o libmpdemux/extension.o libmpdemux/mf.o libmpdemux/mp3_hdr.o libmpdemux/mp_taglists.o libmpdemux/mpeg_hdr.o libmpdemux/mpeg_packetizer.o libmpdemux/parse_es.o libmpdemux/parse_mp4.o libmpdemux/video.o libmpdemux/yuv4mpeg.o libmpdemux/yuv4mpeg_ratio.o osdep/getch2.o osdep/timer-linux.o stream/open.o stream/stream.o stream/stream_bd.o stream/stream_cue.o stream/stream_file.o stream/stream_mf.o stream/stream_null.o stream/url.o sub/eosd.o sub/find_sub.o sub/osd.o sub/spudec.o sub/sub.o sub/sub_cc.o sub/subreader.o sub/vobsub.o stream/ai_alsa.o stream/ai_oss.o sub/font_load.o stream/stream_cdda.o stream/cdinfo.o stream/stream_cddb.o stream/dvb_tune.o stream/stream_dvb.o stream/stream_dvdnav.o stream/stream_dvd.o stream/stream_dvd_common.o libmpcodecs/ad_faad.o libvo/aclib.o av_helpers.o av_opts.o libaf/af_lavcac3enc.o libaf/af_lavcresample.o libmpcodecs/ad_ffmpeg.o libmpcodecs/ad_spdif.o libmpcodecs/vd_ffmpeg.o libmpcodecs/vf_geq.o libmpcodecs/vf_lavc.o libmpcodecs/vf_lavcdeint.o libmpcodecs/vf_screenshot.o libmpdemux/demux_lavf.o stream/stream_ffmpeg.o sub/av_sub.o libmpcodecs/vf_fspp.o libmpcodecs/vf_qp.o libmpcodecs/vf_spp.o libmpcodecs/vf_uspp.o sub/font_load_ft.o stream/stream_ftp.o libmpdemux/demux_gif.o libmpcodecs/vf_bmovl.o libaf/af_export.o osdep/mmap_anon.o libmpcodecs/vd_ijpg.o libaf/af_ladspa.o libmpcodecs/ad_liba52.o libmpcodecs/vf_ass.o sub/ass_mp.o sub/subassconvert.o stream/stream_bluray.o libaf/af_bs2b.o libmpcodecs/ad_libdca.o libmpcodecs/ad_libdv.o libmpcodecs/vd_libdv.o libmpdemux/demux_rawdv.o libmpcodecs/ad_libmad.o libmpcodecs/vd_libmpeg2.o stream/stream_smb.o libmpcodecs/vd_theora.o libmpdemux/demux_mng.o libmpcodecs/ad_mpg123.o stream/stream_rtsp.o stream/freesdp/common.o stream/freesdp/errorlist.o stream/freesdp/parser.o stream/librtsp/rtsp.o stream/librtsp/rtsp_rtp.o stream/librtsp/rtsp_session.o stream/stream_netstream.o stream/asf_mmst_streaming.o stream/asf_streaming.o stream/cookies.o stream/http.o stream/network.o stream/pnm.o stream/rtp.o stream/udp.o stream/tcp.o stream/stream_rtp.o stream/stream_udp.o stream/realrtsp/asmrp.o stream/realrtsp/real.o stream/realrtsp/rmff.o stream/realrtsp/sdpplin.o stream/realrtsp/xbuffer.o libmpcodecs/vd_mpng.o libmpcodecs/vf_pp.o stream/stream_pvr.o libmpcodecs/ad_realaud.o libmpcodecs/vd_realvid.o libmpcodecs/ad_speex.o stream/cache2.o stream/frequencies.o stream/stream_tv.o stream/tv.o stream/tvi_dummy.o stream/tvi_v4l2.o stream/audio_in.o sub/unrar_exec.o stream/stream_vcd.o libmpcodecs/ad_libvorbis.o libmpdemux/demux_ogg.o stream/stream_vstream.o libmpcodecs/vd_xanim.o libmpcodecs/vd_xvid4.o osdep/shmem.o ffmpeg/libpostproc/libpostproc.a ffmpeg/libavfilter/libavfilter.a ffmpeg/libavformat/libavformat.a ffmpeg/libavcodec/libavcodec.a ffmpeg/libswscale/libswscale.a ffmpeg/libswresample/libswresample.a ffmpeg/libavutil/libavutil.a -Wl,--version-script,binary.ver -Wl,-z,noexecstack -ffast-math -fpie -pie -lncurses -lrt -lgnutls -lsmbclient -lpng -lz -lmng -lz -ljpeg -lgif -lasound -ldl -lpthread -lbluray -ldvdread -lcdio_cdda -lcdio -lcdio_paranoia -lfreetype -lfontconfig -lfribidi -lass -lenca -lz -llzo2 -lmad -logg -lvorbisidec -lspeex -lgsm -ltheoradec -logg -lmpg123 -la52 -lmpeg2 -ldca -lfaad -lopus -lbs2b -lrtmp -ldv -lcrystalhd -lxvidcore -lvstream-client -lpthread -ldl -rdynamic -L/usr/lib/x86_64-linux-gnu -ldvdnav -lpthread -lm -ldirectfb -lXext -lX11 -lpthread -lXss -lXv -lvdpau -lXinerama -lXxf86vm -lXxf86dga -laa -lcaca -lSDL -lGL -ldl -laudio -lXt -lpulse -ljack -lopenal -lx264 -lpthread -lmp3lame -llirc_client
Any hints or ideas? I will appreciate any help.
ac3_parser.c, h263_parser.c in ffmpeg/libavcodec failed to compile, perhaps others. Try updating the svn version. If that doesn't work try workaround:
cd ffmpeg/libavcodec
cc -I../.. -I.. -c -o ac3_parser.o ac3_parser.c
ar rT libavcodec.a ac3_parser.o
repeat as necessary for what is missing...
cd -
make all

Compilation of MAX_HS solver with IBM CPLEX

i'm trying to get started with a max-sat solver named: MAX_HS.
The documentation is only a readme file, is not so much but it's clear what you have to do:
https://github.com/fbacchus/MaxHS
I've installed CPLEX library from IBM and configured the file as indicated in the documentation, but when I compile i'm getting an error, this is my terminal log:
\\install -d /usr/local/include/maxhs
install -d /usr/local/include/minisat
for dir in maxhs/core maxhs/ifaces maxhs/ds maxhs/utils; do \
install -d /usr/local/include/$dir ; \
done
for dir in minisat/mtl minisat/utils minisat/core minisat/simp; do \
install -d /usr/local/include/$dir ; \
done
for h in minisat/mtl/Alg.h minisat/mtl/Map.h minisat/mtl/Alloc.h minisat/mtl/Vec.h minisat/mtl/Rnd.h minisat/mtl/Sort.h minisat/mtl/IntMap.h minisat/mtl/Queue.h minisat/mtl/IntTypes.h minisat/mtl/Heap.h minisat/mtl/XAlloc.h minisat/core/SolverTypes.h minisat/core/Dimacs.h minisat/core/Solver.h minisat/utils/System.h minisat/utils/ParseUtils.h
minisat/utils/Options.h minisat/simp/SimpSolver.h ;
do \
install -m 644 $h /usr/local/include/$h ; \
done
for h in maxhs/core/Bvars.h maxhs/core/Dimacs.h maxhs/core/MaxSolverTypes.h maxhs/core/Assumptions.h maxhs/core/Wcnf.h maxhs/core/MaxSolver.h maxhs/ifaces/miniSatSolver.h maxhs/ifaces/GreedySolver.h maxhs/ifaces/Cplex.h maxhs/ifaces/greedySatSolver.h maxhs/ifaces/muser.h maxhs/ifaces/SatSolver.h maxhs/ds/Packed.h maxhs/utils/io.h maxhs/utils/Params.h maxhs/utils/hash.h ;
do \
install -m 644 $h /usr/local/include/$h ; \
done
install -d /usr/local/lib
install -m 644 build/release/lib/libmaxhs.a /usr/local/lib
Linking Binary: build/release/bin/maxhs
/opt/ibm/ILOG/CPLEX_Studio128/cplex/lib/x86-64_linux/static_pic/libcplex.a(mkl_memory_patched.o): In function `mkl_serv_set_memory_limit':
mkl_memory.c:(.text+0x5a9): undefined reference to `dlopen'
mkl_memory.c:(.text+0x5ca): undefined reference to `dlsym'
mkl_memory.c:(.text+0x618): undefined reference to `dlsym'
mkl_memory.c:(.text+0x62e): undefined reference to `dlsym'
mkl_memory.c:(.text+0x644): undefined reference to `dlsym'
mkl_memory.c:(.text+0x739): undefined reference to `dlerror'
mkl_memory.c:(.text+0x78c): undefined reference to `dlopen'
mkl_memory.c:(.text+0x840): undefined reference to `dlopen'
mkl_memory.c:(.text+0x856): undefined reference to `dlerror'
mkl_memory.c:(.text+0x91a): undefined reference to `dlopen'
mkl_memory.c:(.text+0x922): undefined reference to `dlerror'
mkl_memory.c:(.text+0x937): undefined reference to `dlsym'
mkl_memory.c:(.text+0x95a): undefined reference to `dlopen'
mkl_memory.c:(.text+0x962): undefined reference to `dlerror'
mkl_memory.c:(.text+0x972): undefined reference to `dlsym'
mkl_memory.c:(.text+0x98d): undefined reference to `dlerror'
...
...
...
64_linux/static_pic/libcplex.a(mkl_semaphore.o): In function `_Init_MKL_Loader':
mkl_semaphore.c:(.text+0x4ed): undefined reference to `dladdr'
/opt/ibm/ILOG/CPLEX_Studio128/cplex/lib/x86-64_linux/static_pic/libcplex.a(libc_is_static_interface.o): In function `mkl_serv_libc_is_static':
libc_is_static_interface.c:(.text+0x10): undefined reference to `dladdr'
/opt/ibm/ILOG/CPLEX_Studio128/cplex/lib/x86-64_linux/static_pic/libcplex.a(load_library_HOST.o): In function `mkl_ueaa_prv_load_backend_lib':
load_library.c:(.text+0x1cd): undefined reference to `dlopen'
load_library.c:(.text+0x1ef): undefined reference to `dlvsym'
load_library.c:(.text+0x218): undefined reference to `dlvsym'
load_library.c:(.text+0x241): undefined reference to `dlvsym'
load_library.c:(.text+0x26a): undefined reference to `dlvsym'
load_library.c:(.text+0x293): undefined reference to `dlvsym'
/opt/ibm/ILOG/CPLEX_Studio128/cplex/lib/x86-64_linux/static_pic/libcplex.a(load_library_HOST.o):load_library.c:(.text+0x2bc): more undefined references to `dlvsym' follow
/opt/ibm/ILOG/CPLEX_Studio128/cplex/lib/x86-64_linux/static_pic/libcplex.a(mkl_aa_fw_load_orsl_lite_lib_HOST.o): In function `mkl_aa_fw_load_orsl_lite_lib':
mkl_aa_fw_load_orsl_lite_lib.c:(.text+0xb9): undefined reference to `dlopen'
mkl_aa_fw_load_orsl_lite_lib.c:(.text+0xd4): undefined reference to `dlsym'
mkl_aa_fw_load_orsl_lite_lib.c:(.text+0xf2): undefined reference to `dlsym'
mkl_aa_fw_load_orsl_lite_lib.c:(.text+0x110): undefined reference to `dlsym'
mkl_aa_fw_load_orsl_lite_lib.c:(.text+0x12e): undefined reference to `dlsym'
collect2: error: ld returned 1 exit status
Makefile:155: recipe for target 'build/release/bin/maxhs' failed
make: *** [build/release/bin/maxhs] Error 1
Really don't know what can cause the error as the library are the official licensed IBM cplex library and the only setup is the one who assign the right path to the IBM library. I guess i've done correctly this step as when the path was wrong and no IBM library was found i was getting another error.
Any ideas?
Thank you!
With CPLEX 12.8 you have to link with the dynamic linker library. You can see this in the example makefiles shipped with CPLEX. Looking at the Makefile in the MaxHS git repository, you could try changing the following line (this has not been tested):
MAXHS_LDFLAGS = -Wall -lz -L$(CPLEXLIBDIR) -lcplex -lpthread
to:
MAXHS_LDFLAGS = -Wall -lz -L$(CPLEXLIBDIR) -lcplex -lpthread -ldl
If that works, you should consider creating an issue for the maintainers of MaxHS.
Alternately, you could install an older version of CPLEX (e.g., 12.7.1).

qvfb compilation error - undefined reference to `png_create_write_struct'

I am getting error while compiling qvfb for x11.
1> Now where is this png_create_write_struct is declared that i am getting error related to it ?
2> Does qvbf compilation for x11 looks for libpng in host file system or it looks for libpng inside QT_source_code ?
3> Please suggest How to resolve this error to compile successfully ?
#/qt-everywhere-opensource-src-4.8.5/tools/qvfb$ make
e-opensource-src-4.8.5/lib -L/usr/X11R6/lib -lQtGui -lQtCore -lGL -lpthread -lXext -lX11 -lm
.obj/release-shared/qanimationwriter.o: In function `QAnimationWriter::QAnimationWriter(QString const&, char const*)':
qanimationwriter.cpp:(.text+0xbf): undefined reference to `png_create_write_struct'
qanimationwriter.cpp:(.text+0xca): undefined reference to `png_create_info_struct'
qanimationwriter.cpp:(.text+0xe0): undefined reference to `png_set_compression_level'
qanimationwriter.cpp:(.text+0xff): undefined reference to `png_set_write_fn'
.obj/release-shared/qanimationwriter.o: In function `QAnimationWriterMNG::write(png_struct_def*, unsigned char*, unsigned int)':
qanimationwriter.cpp:(.text._ZN19QAnimationWriterMNG5writeEP14png_struct_defPhj[QAnimationWriterMNG::write(png_struct_def*, unsigned char*, unsigned int)]+0xb): undefined reference to `png_get_io_ptr'
.obj/release-shared/qanimationwriter.o: In function `QAnimationWriterMNG::composeImage(QImage const&, QPoint const&)':
qanimationwriter.cpp:(.text._ZN19QAnimationWriterMNG12composeImageERK6QImageRK6QPoint[QAnimationWriterMNG::composeImage(QImage const&, QPoint const&)]+0x65): undefined reference to `png_write_chunk'
qanimationwriter.cpp:(.text._ZN19QAnimationWriterMNG12composeImageERK6QImageRK6QPoint[QAnimationWriterMNG::composeImage(QImage const&, QPoint const&)]+0x78): undefined reference to `png_set_sig_bytes'
qanimationwriter.cpp:(.text._ZN19QAnimationWriterMNG12composeImageERK6QImageRK6QPoint[QAnimationWriterMNG::composeImage(QImage const&, QPoint const&)]+0xda): undefined reference to `png_set_IHDR'
qanimationwriter.cpp:(.text._ZN19QAnimationWriterMNG12composeImageERK6QImageRK6QPoint[QAnimationWriterMNG::composeImage(QImage const&, QPoint const&)]+0xec): undefined reference to `png_write_info'
qanimationwriter.cpp:(.text._ZN19QAnimationWriterMNG12composeImageERK6QImageRK6QPoint[QAnimationWriterMNG::composeImage(QImage const&, QPoint const&)]+0x107): undefined reference to `png_set_bgr'
qanimationwriter.cpp:(.text._ZN19QAnimationWriterMNG12composeImageERK6QImageRK6QPoint[QAnimationWriterMNG::composeImage(QImage const&, QPoint const&)]+0x154): undefined reference to `png_write_image'
qanimationwriter.cpp:(.text._ZN19QAnimationWriterMNG12composeImageERK6QImageRK6QPoint[QAnimationWriterMNG::composeImage(QImage const&, QPoint const&)]+0x172): undefined reference to `png_write_end'
qanimationwriter.cpp:(.text._ZN19QAnimationWriterMNG12composeImageERK6QImageRK6QPoint[QAnimationWriterMNG::composeImage(QImage const&, QPoint const&)]+0x184): undefined reference to `png_destroy_write_struct'
qanimationwriter.cpp:(.text._ZN19QAnimationWriterMNG12composeImageERK6QImageRK6QPoint[QAnimationWriterMNG::composeImage(QImage const&, QPoint const&)]+0x1a8): undefined reference to `png_create_write_struct'
qanimationwriter.cpp:(.text._ZN19QAnimationWriterMNG12composeImageERK6QImageRK6QPoint[QAnimationWriterMNG::composeImage(QImage const&, QPoint const&)]+0x1b3): undefined reference to `png_create_info_struct'
qanimationwriter.cpp:(.text._ZN19QAnimationWriterMNG12composeImageERK6QImageRK6QPoint[QAnimationWriterMNG::composeImage(QImage const&, QPoint const&)]+0x1c9): undefined reference to `png_set_compression_level'
qanimationwriter.cpp:(.text._ZN19QAnimationWriterMNG12composeImageERK6QImageRK6QPoint[QAnimationWriterMNG::composeImage(QImage const&, QPoint const&)]+0x1e8): undefined reference to `png_set_write_fn'
qanimationwriter.cpp:(.text._ZN19QAnimationWriterMNG12composeImageERK6QImageRK6QPoint[QAnimationWriterMNG::composeImage(QImage const&, QPoint const&)]+0x21f): undefined reference to `png_set_filler'
.obj/release-shared/qanimationwriter.o: In function `QAnimationWriterMNG::~QAnimationWriterMNG()':
qanimationwriter.cpp:(.text._ZN19QAnimationWriterMNGD0Ev[_ZN19QAnimationWriterMNGD5Ev]+0x9e): undefined reference to `png_write_chunk'
qanimationwriter.cpp:(.text._ZN19QAnimationWriterMNGD0Ev[_ZN19QAnimationWriterMNGD5Ev]+0xb0): undefined reference to `png_destroy_write_struct'
qanimationwriter.cpp:(.text._ZN19QAnimationWriterMNGD0Ev[_ZN19QAnimationWriterMNGD5Ev]+0x176): undefined reference to `png_write_chunk'
.obj/release-shared/qanimationwriter.o: In function `QAnimationWriterMNG::setImage(QImage const&)':
qanimationwriter.cpp:(.text._ZN19QAnimationWriterMNG8setImageERK6QImage[QAnimationWriterMNG::setImage(QImage const&)]+0xc3): undefined reference to `png_write_chunk'
.obj/release-shared/qanimationwriter.o: In function `QAnimationWriterMNG::~QAnimationWriterMNG()':
qanimationwriter.cpp:(.text._ZN19QAnimationWriterMNGD2Ev[_ZN19QAnimationWriterMNGD5Ev]+0x9e): undefined reference to `png_write_chunk'
qanimationwriter.cpp:(.text._ZN19QAnimationWriterMNGD2Ev[_ZN19QAnimationWriterMNGD5Ev]+0xb0): undefined reference to `png_destroy_write_struct'
qanimationwriter.cpp:(.text._ZN19QAnimationWriterMNGD2Ev[_ZN19QAnimationWriterMNGD5Ev]+0x16e): undefined reference to `png_write_chunk'
collect2: ld returned 1 exit status
make: *** [../../bin/qvfb] Error 1
locate command for libpng returns :--
#locate libpng
/lib/i386-linux-gnu/libpng12.so.0
/lib/i386-linux-gnu/libpng12.so.0.46.0
/usr/share/doc/libpng12-0
/usr/share/doc/libpng12-0/ANNOUNCE
/usr/share/doc/libpng12-0/KNOWNBUG
/usr/share/doc/libpng12-0/README.Debian
/usr/share/doc/libpng12-0/README.gz
/usr/share/doc/libpng12-0/TODO
/usr/share/doc/libpng12-0/changelog.Debian.gz
/usr/share/doc/libpng12-0/copyright
/usr/share/doc/libpng12-0/libpng-1.2.46.txt.gz
/usr/share/doc-base/libpng12
/var/lib/doc-base/documents/libpng12
/var/lib/dpkg/info/libpng12-0:i386.list
/var/lib/dpkg/info/libpng12-0:i386.md5sums
/var/lib/dpkg/info/libpng12-0:i386.postinst
/var/lib/dpkg/info/libpng12-0:i386.postrm
/var/lib/dpkg/info/libpng12-0:i386.shlibs
Now if my library is here /lib/i386-linux-gnu/libpng12.so.0 after running nm command :---
$ nm -D /lib/i386-linux-gnu/libpng12.so.0
00000000 A PNG12_0
w _Jv_RegisterClasses
w __cxa_finalize
U __fprintf_chk
w __gmon_start__
U __longjmp_chk
U __memcpy_chk
U __snprintf_chk
U __stack_chk_fail
U _setjmp
U abort
U crc32
U deflate
U deflateEnd
U deflateInit2_
U deflateReset
U fflush
U fputc
U fread
U free
U fwrite
U gmtime
U inflate
U inflateEnd
U inflateInit_
U inflateReset
U malloc
U memcmp
U memcpy
U memset
00004700 T png_access_version_number
00018540 T png_build_grayscale_palette
000039b0 T png_check_sig
0001de60 T png_chunk_error
0001def0 T png_chunk_warning
00014160 T png_convert_from_struct_tm
000141a0 T png_convert_from_time_t
00004470 T png_convert_to_rfc1123
00003c80 T png_create_info_struct
00011120 T png_create_read_struct
00010ca0 T png_create_read_struct_2
00015840 T png_create_write_struct
000154c0 T png_create_write_struct_2
00003cf0 T png_data_freer
000043b0 T png_destroy_info_struct
000130f0 T png_destroy_read_struct
00014930 T png_destroy_write_struct
0001db30 T png_error
0001d8f0 T png_free
00003d80 T png_free_data
0001d8b0 T png_free_default
00006e80 T png_get_IHDR
000071a0 T png_get_PLTE
00007410 T png_get_asm_flagmask
00007400 T png_get_asm_flags
00006a90 T png_get_bKGD
000067f0 T png_get_bit_depth
00006ad0 T png_get_cHRM
00006bf0 T png_get_cHRM_fixed
00006a50 T png_get_channels
00006810 T png_get_color_type
000073e0 T png_get_compression_buffer_size
00006870 T png_get_compression_type
000045c0 T png_get_copyright
0001dfb0 T png_get_error_ptr
00006830 T png_get_filter_type
00006cd0 T png_get_gAMA
00006d10 T png_get_gAMA_fixed
00006e40 T png_get_hIST
00004600 T png_get_header_ver
00004620 T png_get_header_version
00006d90 T png_get_iCCP
000067d0 T png_get_image_height
000067b0 T png_get_image_width
000076e0 T png_get_int_32
00006850 T png_get_interlace_type
00004430 T png_get_io_ptr
000045e0 T png_get_libpng_ver
0001da30 T png_get_mem_ptr
00007430 T png_get_mmx_bitdepth_threshold
00007420 T png_get_mmx_flagmask
00007440 T png_get_mmx_rowbytes_threshold
00006fa0 T png_get_oFFs
00007010 T png_get_pCAL
00007130 T png_get_pHYs
00006930 T png_get_pixel_aspect_ratio
000068f0 T png_get_pixels_per_meter
000204b0 T png_get_progressive_ptr
000073a0 T png_get_rgb_to_gray_status
00006770 T png_get_rowbytes
00006790 T png_get_rows
000071f0 T png_get_sBIT
000070e0 T png_get_sCAL
00006e10 T png_get_sPLT
00006d50 T png_get_sRGB
00006a70 T png_get_signature
000072a0 T png_get_tIME
000072e0 T png_get_tRNS
00007230 T png_get_text
00007710 T png_get_uint_16
00007630 T png_get_uint_31
000076b0 T png_get_uint_32
00007370 T png_get_unknown_chunks
000073c0 T png_get_user_chunk_ptr
00007470 T png_get_user_height_max
0000c720 T png_get_user_transform_ptr
00007450 T png_get_user_width_max
00006750 T png_get_valid
00006990 T png_get_x_offset_microns
000069f0 T png_get_x_offset_pixels
00006890 T png_get_x_pixels_per_meter
000069c0 T png_get_y_offset_microns
00006a20 T png_get_y_offset_pixels
000068c0 T png_get_y_pixels_per_meter
00004640 T png_handle_as_unknown
00003c50 T png_info_init
00003b70 T png_info_init_3
00004450 T png_init_io
00020a90 R png_libpng_ver
0001d7b0 T png_malloc
0001d770 T png_malloc_default
0001d940 T png_malloc_warn
0001d9a0 T png_memcpy_check
0001d9d0 T png_memset_check
00004710 T png_mmx_support
000209e0 R png_pass_dsp_mask
00020a50 R png_pass_inc
000209fc R png_pass_mask
00020a6c R png_pass_start
00020a18 R png_pass_yinc
00020a34 R png_pass_ystart
00006400 T png_permit_empty_plte
00006430 T png_permit_mng_features
00020370 T png_process_data
00020400 T png_progressive_combine_row
00012cd0 T png_read_destroy
000126a0 T png_read_end
00012600 T png_read_image
00011690 T png_read_info
00013250 T png_read_png
00011ea0 T png_read_row
00012510 T png_read_rows
00011e00 T png_read_update_info
000046c0 T png_reset_zstream
0000cb70 T png_save_int_32
0000cba0 T png_save_uint_16
0000cb40 T png_save_uint_32
00005320 T png_set_IHDR
00005750 T png_set_PLTE
0000c110 T png_set_add_alpha
00006700 T png_set_asm_flags
00004d60 T png_set_bKGD
00015d70 T png_set_background
0000bfb0 T png_set_bgr
00004da0 T png_set_cHRM
00004f20 T png_set_cHRM_fixed
00006660 T png_set_compression_buffer_size
00015890 T png_set_compression_level
000158b0 T png_set_compression_mem_level
00015990 T png_set_compression_method
000158d0 T png_set_compression_strategy
000158f0 T png_set_compression_window_bits
00015c20 T png_set_crc_action
00015e70 T png_set_dither
0001df80 T png_set_error_fn
00016a40 T png_set_expand
00016a80 T png_set_expand_gray_1_2_4_to_8
0000c0a0 T png_set_filler
00014a60 T png_set_filter
00014d00 T png_set_filter_heuristics
00014580 T png_set_flush
000050a0 T png_set_gAMA
00005180 T png_set_gAMA_fixed
000169c0 T png_set_gamma
00016aa0 T png_set_gray_1_2_4_to_8
00016ae0 T png_set_gray_to_rgb
00005240 T png_set_hIST
000059c0 T png_set_iCCP
0000c070 T png_set_interlace_handling
000066e0 T png_set_invalid
0000c180 T png_set_invert_alpha
0000c1a0 T png_set_invert_mono
00006450 T png_set_keep_unknown_chunks
0001da00 T png_set_mem_fn
00006720 T png_set_mmx_thresholds
00005470 T png_set_oFFs
000054a0 T png_set_pCAL
00005720 T png_set_pHYs
0000bff0 T png_set_packing
0000c020 T png_set_packswap
00016a60 T png_set_palette_to_rgb
00020450 T png_set_progressive_read_fn
00013620 T png_set_read_fn
00013230 T png_set_read_status_fn
000065c0 T png_set_read_user_chunk_fn
00016d80 T png_set_read_user_transform_fn
00016c70 T png_set_rgb_to_gray
00016b00 T png_set_rgb_to_gray_fixed
000065e0 T png_set_rows
00005830 T png_set_sBIT
000056c0 T png_set_sCAL
00005fb0 T png_set_sPLT
00005860 T png_set_sRGB
00005880 T png_set_sRGB_gAMA_and_cHRM
0000c040 T png_set_shift
00003880 T png_set_sig_bytes
00015e30 T png_set_strip_16
00015e50 T png_set_strip_alpha
0001dfd0 T png_set_strip_error_numbers
0000bfd0 T png_set_swap
0000c160 T png_set_swap_alpha
00005df0 T png_set_tIME
00005e30 T png_set_tRNS
00016ac0 T png_set_tRNS_to_alpha
00005d90 T png_set_text
000063c0 T png_set_unknown_chunk_location
000061e0 T png_set_unknown_chunks
00006730 T png_set_user_limits
0000c6f0 T png_set_user_transform_info
000137c0 T png_set_write_fn
000159f0 T png_set_write_status_fn
00015a10 T png_set_write_user_transform_fn
000038f0 T png_sig_cmp
00011e70 T png_start_read_image
0001dcf0 T png_warning
0000cee0 T png_write_chunk
0000cd10 T png_write_chunk_data
0000ce60 T png_write_chunk_end
0000cc60 T png_write_chunk_start
000146d0 T png_write_destroy
00013f60 T png_write_end
000145a0 T png_write_flush
000144b0 T png_write_image
00013b20 T png_write_info
00013860 T png_write_info_before_PLTE
00015a30 T png_write_png
000141d0 T png_write_row
00014530 T png_write_rows
U pow
U stderr
U strlen
U strtod
I searched for png.h file :---
# locate png.h
/home/dinesh/qt_source/qt_source_x11/qt-everywhere-opensource-src-4.8.5/src/3rdparty/libpng/png.h
/usr/lib/syslinux/com32/include/png.h
Now lib png source is inside QT_source also :---
/qt-everywhere-opensource-src-4.8.5/src/3rdparty/libpng$ ls
ANNOUNCE pngconf.h pnglibconf.h pngrtran.c pngwrite.c
CHANGES pngdebug.h pngmem.c pngrutil.c pngwtran.c
INSTALL pngerror.c pngpread.c pngset.c pngwutil.c
libpng-manual.txt pngget.c pngpriv.h pngstruct.h README
LICENSE png.h pngread.c pngtrans.c
png.c pnginfo.h pngrio.c pngwio.c
==================================== EDIT ==========================
I performed these steps, both failed :---
1> I followed following link http://www.brunolinux.com/02-The_Terminal/ldconfig.html and
added following line to ld.so.conf file /lib/i386-linux-gnu/ . Then i run the ldconfig command.
I directly copied the command line result of make & added -lpng to it & run it
qt-everywhere-opensource-src-4.8.5/tools/qvfb$ g++ -Wl,-rpath-link,/home/dinesh/qt_source/qt_source_x11/qt-everywhere-opensource-src-4.8.5/lib -Wl,-O1 -Wl,-rpath,/opt/Qt5.1.1/4.8.5_X11/gcc/lib -Wl,-rpath,/opt/Qt5.1.1/4.8.5_X11/gcc/lib -o ../../bin/qvfb .obj/release-shared/qvfb.o .obj/release-shared/qvfbview.o .obj/release-shared/qvfbratedlg.o .obj/release-shared/main.o .obj/release-shared/qanimationwriter.o .obj/release-shared/qvfbprotocol.o .obj/release-shared/qvfbshmem.o .obj/release-shared/qvfbmmap.o .obj/release-shared/qlock.o .obj/release-shared/qwslock.o .obj/release-shared/qwssignalhandler.o .obj/release-shared/deviceskin.o .obj/release-shared/qvfbx11view.o .obj/release-shared/x11keyfaker.o .obj/release-shared/moc_qvfb.o .obj/release-shared/moc_qvfbview.o .obj/release-shared/moc_qvfbratedlg.o .obj/release-shared/moc_gammaview.o .obj/release-shared/moc_qvfbprotocol.o .obj/release-shared/moc_qvfbshmem.o .obj/release-shared/moc_qvfbmmap.o .obj/release-shared/moc_deviceskin.o .obj/release-shared/moc_qvfbx11view.o .obj/release-shared/moc_x11keyfaker.o .obj/release-shared/qrc_ClamshellPhone.o .obj/release-shared/qrc_SmartPhone2.o .obj/release-shared/qrc_SmartPhone.o .obj/release-shared/qrc_SmartPhoneWithButtons.o .obj/release-shared/qrc_TouchscreenPhone.o .obj/release-shared/qrc_PortableMedia.o .obj/release-shared/qrc_S60-QVGA-Candybar.o .obj/release-shared/qrc_S60-nHD-Touchscreen.o .obj/release-shared/qrc_qvfb.o -lpng -L/home/dinesh/qt_source/qt_source_x11/qt-everywhere-opensource-src-4.8.5/lib -L/usr/X11R6/lib -lXtst -lQtOpenGL -L/home/dinesh/qt_source/qt_source_x11/qt-everywhere-opensource-src-4.8.5/lib -L/usr/X11R6/lib -lQtGui -lQtCore -lGL -lpthread -lXext -lX11 -lm
/usr/bin/ld: cannot find -lpng
collect2: ld returned 1 exit status
make: *** [../../bin/qvfb] Error 1
2> Above step did not worked so i performed below step.
I modified the qvfb.pro file of QT & added the option at the end LIBS += -lpng
qt-everywhere-opensource-src-4.8.5/tools/qvfb$ sudo make
/home/dinesh/qt_source/qt_source_x11/qt-everywhere-opensource-src-4.8.5/bin/qmake -spec ../../mkspecs/linux-g++ -o Makefile qvfb.pro
g++ -Wl,-rpath-link,/home/dinesh/qt_source/qt_source_x11/qt-everywhere-opensource-src-4.8.5/lib -Wl,-O1 -Wl,-rpath,/opt/Qt5.1.1/4.8.5_X11/gcc/lib -Wl,-rpath,/opt/Qt5.1.1/4.8.5_X11/gcc/lib -o ../../bin/qvfb .obj/release-shared/qvfb.o .obj/release-shared/qvfbview.o .obj/release-shared/qvfbratedlg.o .obj/release-shared/main.o .obj/release-shared/qanimationwriter.o .obj/release-shared/qvfbprotocol.o .obj/release-shared/qvfbshmem.o .obj/release-shared/qvfbmmap.o .obj/release-shared/qlock.o .obj/release-shared/qwslock.o .obj/release-shared/qwssignalhandler.o .obj/release-shared/deviceskin.o .obj/release-shared/qvfbx11view.o .obj/release-shared/x11keyfaker.o .obj/release-shared/moc_qvfb.o .obj/release-shared/moc_qvfbview.o .obj/release-shared/moc_qvfbratedlg.o .obj/release-shared/moc_gammaview.o .obj/release-shared/moc_qvfbprotocol.o .obj/release-shared/moc_qvfbshmem.o .obj/release-shared/moc_qvfbmmap.o .obj/release-shared/moc_deviceskin.o .obj/release-shared/moc_qvfbx11view.o .obj/release-shared/moc_x11keyfaker.o .obj/release-shared/qrc_ClamshellPhone.o .obj/release-shared/qrc_SmartPhone2.o .obj/release-shared/qrc_SmartPhone.o .obj/release-shared/qrc_SmartPhoneWithButtons.o .obj/release-shared/qrc_TouchscreenPhone.o .obj/release-shared/qrc_PortableMedia.o .obj/release-shared/qrc_S60-QVGA-Candybar.o .obj/release-shared/qrc_S60-nHD-Touchscreen.o .obj/release-shared/qrc_qvfb.o -L/home/dinesh/qt_source/qt_source_x11/qt-everywhere-opensource-src-4.8.5/lib -L/usr/X11R6/lib -lXtst -lpng -lQtOpenGL -L/home/dinesh/qt_source/qt_source_x11/qt-everywhere-opensource-src-4.8.5/lib -L/usr/X11R6/lib -lQtGui -lQtCore -lGL -lpthread -lXext -lX11 -lm
/usr/bin/ld: cannot find -lpng
collect2: ld returned 1 exit status
make: *** [../../bin/qvfb] Error 1
============================= EDIT =================
Thanks everyone its working.
creating softlink works :--
ln -s /lib/i386-linux-gnu/libpng12.so.0 /lib/i386-linux-gnu/libpng.so
this worked :---
-L/lib/i386-linux-gnu -lpng
Also you can directly modify your qvfb.pro file, instead of putting in directly in command line :---
LIBS = -L/lib/i386-linux-gnu -lpng
I had the same problem. If you look at the compilation line to link qvfb that causes the error, you'll see that it just misses -lpng to indicate to link with libpng. It's just a workaround, but once you've run 'make' once, you can simply copy and past the faulty compilation line and add -lpng at the end. It worked for me.

static link openssl to sqlcipher

I have build sqlcipher for Linux but it depends on openssl. I want to configure sqlcipher to work without external openssl library by linking it statically.
I configure sqlcipher with this command
./configure --prefix=/home/admin/Downloads/qt-everywhere-opensource-src-4.8.0/src/plugins/sqldrivers/sqlcipher/ --disable-shared --enable-static --enable-tempstore=yes CFLAGS="-DSQLITE_HAS_CODEC" LDFLAGS="/usr/lib64/libcrypto.a"
make
after that I got next strings:
/libtool --mode=link gcc -DSQLITE_HAS_CODEC -DSQLITE_OS_UNIX=1 -I. -I./src -I./ext/rtree -D_HAVE_SQLITE_CONFIG_H -DNDEBUG -I/usr/include -DSQLITE_THREADSAFE=1 -DSQLITE_OMIT_LOAD_EXTENSION=1 /usr/lib64/libcrypto.a -DHAVE_READLINE=0 \
-o sqlite3 ./src/shell.c libsqlite3.la \
-lpthread -rpath "/home/admin/Downloads/qt-everywhere-opensource-src-4.8.0/src/plugins/sqldrivers/sqlcipher/lib"
libtool: link: gcc -DSQLITE_HAS_CODEC -DSQLITE_OS_UNIX=1 -I. -I./src -I./ext/rtree -D_HAVE_SQLITE_CONFIG_H -DNDEBUG -I/usr/include -DSQLITE_THREADSAFE=1 -DSQLITE_OMIT_LOAD_EXTENSION=1 -DHAVE_READLINE=0 -o sqlite3 ./src/shell.c /usr/lib64/libcrypto.a ./.libs/libsqlite3.a -lpthread -Wl,-rpath -Wl,/home/admin/Downloads/qt-everywhere-opensource-src-4.8.0/src/plugins/sqldrivers/sqlcipher/lib
./.libs/libsqlite3.a(sqlite3.o): In function `sqlcipher_activate':
sqlite3.c:(.text+0xb66): undefined reference to `EVP_get_cipherbyname'
sqlite3.c:(.text+0xb70): undefined reference to `OPENSSL_add_all_algorithms_noconf'
./.libs/libsqlite3.a(sqlite3.o): In function `sqlcipher_random':
sqlite3.c:(.text+0xc0c): undefined reference to `RAND_bytes'
./.libs/libsqlite3.a(sqlite3.o): In function `sqlcipher_codec_ctx_set_cipher':
sqlite3.c:(.text+0x11a2): undefined reference to `EVP_get_cipherbyname'
sqlite3.c:(.text+0x11ba): undefined reference to `EVP_CIPHER_key_length'
sqlite3.c:(.text+0x11d4): undefined reference to `EVP_CIPHER_iv_length'
sqlite3.c:(.text+0x11ee): undefined reference to `EVP_CIPHER_block_size'
sqlite3.c:(.text+0x11fd): undefined reference to `EVP_sha1'
sqlite3.c:(.text+0x1205): undefined reference to `EVP_MD_size'
./.libs/libsqlite3.a(sqlite3.o): In function `sqlcipher_page_hmac':
sqlite3.c:(.text+0x1880): undefined reference to `HMAC_CTX_init'
sqlite3.c:(.text+0x1885): undefined reference to `EVP_sha1'
sqlite3.c:(.text+0x18b9): undefined reference to `HMAC_Init_ex'
sqlite3.c:(.text+0x18d9): undefined reference to `HMAC_Update'
sqlite3.c:(.text+0x18f8): undefined reference to `HMAC_Update'
sqlite3.c:(.text+0x1917): undefined reference to `HMAC_Final'
sqlite3.c:(.text+0x1929): undefined reference to `HMAC_CTX_cleanup'
./.libs/libsqlite3.a(sqlite3.o): In function `sqlcipher_page_cipher':
sqlite3.c:(.text+0x1b35): undefined reference to `EVP_CipherInit'
sqlite3.c:(.text+0x1b4a): undefined reference to `EVP_CIPHER_CTX_set_padding'
sqlite3.c:(.text+0x1b7a): undefined reference to `EVP_CipherInit'
sqlite3.c:(.text+0x1ba2): undefined reference to `EVP_CipherUpdate'
sqlite3.c:(.text+0x1bcc): undefined reference to `EVP_CipherFinal'
sqlite3.c:(.text+0x1be2): undefined reference to `EVP_CIPHER_CTX_cleanup'
./.libs/libsqlite3.a(sqlite3.o): In function `sqlcipher_cipher_ctx_key_derive':
sqlite3.c:(.text+0x1d3a): undefined reference to `PKCS5_PBKDF2_HMAC_SHA1'
sqlite3.c:(.text+0x1e08): undefined reference to `PKCS5_PBKDF2_HMAC_SHA1'
collect2: ld returned 1 exit status
make: *** [sqlite3] Error 1
I have installed openssl and openssl-dev packages and /usr/lib64/libcrypto.a exists.
What I do wrong?
Adjust your CFLAGS to include the path to the OpenSSL header files. Something like this:
CFLAGS="-DSQLITE_HAS_CODEC -I/path/to/openssl/include"

Resources