I'd like to build C++ program with libjpeg library, but when I try to build it, I get errors below.
g++ main.cpp -o main.o
main.cpp:26:22: warning: conversion from string literal to 'char *' is deprecated [- Wdeprecated-writable-strings]
char *filename = "output.jpg";
^
1 warning generated.
Undefined symbols for architecture x86_64:
"_jpeg_CreateCompress", referenced from:
_main in main-sUpMU6.o
"_jpeg_destroy_compress", referenced from:
_main in main-sUpMU6.o
"_jpeg_finish_compress", referenced from:
_main in main-sUpMU6.o
"_jpeg_set_defaults", referenced from:
_main in main-sUpMU6.o
"_jpeg_set_quality", referenced from:
_main in main-sUpMU6.o
"_jpeg_start_compress", referenced from:
_main in main-sUpMU6.o
"_jpeg_std_error", referenced from:
_main in main-sUpMU6.o
"_jpeg_stdio_dest", referenced from:
_main in main-sUpMU6.o
"_jpeg_write_scanlines", referenced from:
_main in main-sUpMU6.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [main.o] Error 1
The structure of my project is like this.
./myCodes
main.h main.cpp Makefile
./jpeg-9
libjpeg src and build outputs
Make file is like this.
ulibjpeg: main.o
g++ -v -L../jpeg-9/cjpeg -L../jpeg-9/djpeg -L../jpeg-9 -l../jpeg-9 -ljpeg main.o -o ulibjpeg
main.o: main.cpp
g++ main.cpp -o main.o
I think I have to add libraries of libjpeg, but which files do I have to add and how can I add add that libraries in g++ options?
Here's the files of ./jpeg-9 directories.
Makefile jccoefct.c jcprepct.lo jdmarker.o jmemmgr.lo makefile.bcc rdjpgcom.1
Makefile.am jccoefct.lo jcprepct.o jdmaster.c jmemmgr.o makefile.dj rdjpgcom.c
Makefile.in jccoefct.o jcsample.c jdmaster.lo jmemname.c makefile.manx rdjpgcom.o
README jccolor.c jcsample.lo jdmaster.o jmemnobs.c makefile.mc6 rdppm.c
aclocal.m4 jccolor.lo jcsample.o jdmerge.c jmemnobs.lo makefile.mms rdppm.o
ar-lib jccolor.o jctrans.c jdmerge.lo jmemnobs.o makefile.sas rdrle.c
cderror.h jcdctmgr.c jctrans.lo jdmerge.o jmemsys.h makefile.unix rdrle.o
cdjpeg.c jcdctmgr.lo jctrans.o jdpostct.c jmorecfg.h makefile.vc rdswitch.c
cdjpeg.h jcdctmgr.o jdapimin.c jdpostct.lo jpegint.h makefile.vms rdswitch.o
cdjpeg.o jchuff.c jdapimin.lo jdpostct.o jpeglib.h makefile.wat rdtarga.c
change.log jchuff.lo jdapimin.o jdsample.c jpegtran makejdep.vc6 rdtarga.o
cjpeg jchuff.o jdapistd.c jdsample.lo jpegtran.1 makejdsp.vc6 stamp-h1
cjpeg.1 jcinit.c jdapistd.lo jdsample.o jpegtran.c makejdsw.vc6 structure.txt
cjpeg.c jcinit.lo jdapistd.o jdtrans.c jpegtran.o makejfil.v10 testimg.bmp
cjpeg.o jcinit.o jdarith.c jdtrans.lo jquant1.c makejmak.vc6 testimg.jpg
ckconfig.c jcmainct.c jdarith.lo jdtrans.o jquant1.lo makejsln.v10 testimg.ppm
coderules.txt jcmainct.lo jdarith.o jerror.c jquant1.o makejvcx.v10 testimgp.jpg
config.guess jcmainct.o jdatadst.c jerror.h jquant2.c makeproj.mac testorig.jpg
config.log jcmarker.c jdatadst.lo jerror.lo jquant2.lo makerdep.vc6 testprog.jpg
config.status jcmarker.lo jdatadst.o jerror.o jquant2.o makerdsp.vc6 transupp.c
config.sub jcmarker.o jdatasrc.c jfdctflt.c jutils.c makerfil.v10 transupp.h
configure jcmaster.c jdatasrc.lo jfdctflt.lo jutils.lo makermak.vc6 transupp.o
configure.ac jcmaster.lo jdatasrc.o jfdctflt.o jutils.o makervcx.v10 usage.txt
depcomp jcmaster.o jdcoefct.c jfdctfst.c jversion.h maketdep.vc6 wizard.txt
djpeg jcomapi.c jdcoefct.lo jfdctfst.lo libjpeg.la maketdsp.vc6 wrbmp.c
djpeg.1 jcomapi.lo jdcoefct.o jfdctfst.o libjpeg.map maketfil.v10 wrbmp.o
djpeg.c jcomapi.o jdcolor.c jfdctint.c libjpeg.txt maketmak.vc6 wrgif.c
djpeg.o jconfig.bcc jdcolor.lo jfdctint.lo libtool maketvcx.v10 wrgif.o
example.c jconfig.cfg jdcolor.o jfdctint.o ltmain.sh makewdep.vc6 wrjpgcom
filelist.txt jconfig.dj jdct.h jidctflt.c makcjpeg.st makewdsp.vc6 wrjpgcom.1
install-sh jconfig.h jddctmgr.c jidctflt.lo makdjpeg.st makewfil.v10 wrjpgcom.c
install.txt jconfig.mac jddctmgr.lo jidctflt.o makeadsw.vc6 makewmak.vc6 wrjpgcom.o
jaricom.c jconfig.manx jddctmgr.o jidctfst.c makeasln.v10 makewvcx.v10 wrppm.c
jaricom.lo jconfig.mc6 jdhuff.c jidctfst.lo makecdep.vc6 makljpeg.st wrppm.o
jaricom.o jconfig.sas jdhuff.lo jidctfst.o makecdsp.vc6 maktjpeg.st wrrle.c
jcapimin.c jconfig.st jdhuff.o jidctint.c makecfil.v10 makvms.opt wrrle.o
jcapimin.lo jconfig.txt jdinput.c jidctint.lo makecmak.vc6 missing wrtarga.c
jcapimin.o jconfig.vc jdinput.lo jidctint.o makecvcx.v10 rdbmp.c wrtarga.o
jcapistd.c jconfig.vms jdinput.o jinclude.h makeddep.vc6 rdbmp.o
jcapistd.lo jconfig.wat jdmainct.c jmemansi.c makeddsp.vc6 rdcolmap.c
jcapistd.o jcparam.c jdmainct.lo jmemdos.c makedfil.v10 rdcolmap.o
jcarith.c jcparam.lo jdmainct.o jmemdosa.asm makedmak.vc6 rdgif.c
jcarith.lo jcparam.o jdmarker.c jmemmac.c makedvcx.v10 rdgif.o
jcarith.o jcprepct.c jdmarker.lo jmemmgr.c makefile.ansi rdjpgcom
I'd like to use the program on multi-platform, so I'd rather not installed libjpeg library.
Use libjpeg in the compile command:
gcc main.c -ljpeg -o main.o
I wrote a tutorial for C: http://www.staerk.de/thorsten/C_Programming_Tutorial
Related
I'm using Raspberry pi 4, here I cloned this repo, and after I followed instructions they have given
First I run ./configure without any error
After that I tried to clean
make clean
Then I tried to make
After that I got some error as shown below:
~/qtcam/src $ make
Makefile:1725: warning: overriding recipe for target 'install_itemfolder_01'
Makefile:1716: warning: ignoring old recipe for target 'install_itemfolder_01'
Makefile:1729: warning: overriding recipe for target 'uninstall_itemfolder_01'
Makefile:1720: warning: ignoring old recipe for target 'uninstall_itemfolder_01'
g++ -Wl,-O1 -o Qtcam main.o logger.o about.o cameraproperty.o videostreaming.o uvccamera.o v4l2-api.o seecam_10cug_m.o seecam_10cug_bayer.o seecam_11cug.o seecam_cu50.o seecam_ar0130.o videoencoder.o seecam_cu51.o see3cam_cu130.o h264decoder.o ascella.o seecam_cu30.o see3cam_130.o see3cam_30.o seecam_81.o see3cam_cu135.o see3cam_cu40.o see3cam_cu20.o uvcExtCx3sni.o keyEventReceive.o nilecam20_usb.o nilecam30_usb.o h264camera.o see3cam_cu55.o see3cam_130A.o audioinput.o see3cam_cu38.o alsa.o fscam_cu135.o see3camcu55_mh.o see3cam_20cug.o see3cam_cu22.o see3cam_130d.o see3cam_24cug.o see3cam_cu81.o seecam_cu80.o see3cam_160.o ecam51_usb.o ecam82_usb.o see3cam_cu27.o see3cam_1332.o ecam83_usb.o see3cam_cu1330m.o see3cam_135m.o see3cam_cu136m.o barcode_camera.o qtquick2applicationviewer.o moc_qtquick2applicationviewer.o moc_about.o moc_cameraproperty.o moc_videostreaming.o moc_uvccamera.o moc_seecam_10cug_m.o moc_seecam_10cug_bayer.o moc_seecam_11cug.o moc_seecam_cu80.o moc_seecam_cu50.o moc_seecam_ar0130.o moc_seecam_cu51.o moc_see3cam_cu130.o moc_h264decoder.o moc_ascella.o moc_seecam_cu30.o moc_see3cam_130.o moc_common_enums.o moc_see3cam_30.o moc_seecam_81.o moc_see3cam_cu135.o moc_see3cam_cu40.o moc_see3cam_cu20.o moc_uvcExtCx3sni.o moc_keyEventReceive.o moc_nilecam30_usb.o moc_nilecam20_usb.o moc_h264camera.o moc_see3cam_cu55.o moc_see3cam_130A.o moc_audioinput.o moc_see3cam_cu38.o moc_fscam_cu135.o moc_see3camcu55_mh.o moc_see3cam_20cug.o moc_see3cam_cu22.o moc_see3cam_130d.o moc_see3cam_24cug.o moc_see3cam_cu81.o moc_see3cam_160.o moc_ecam51_usb.o moc_ecam82_usb.o moc_see3cam_cu27.o moc_see3cam_1332.o moc_ecam83_usb.o moc_see3cam_cu1330m.o moc_see3cam_135m.o moc_see3cam_cu136m.o moc_barcode_camera.o /usr/lib/arm-linux-gnueabihf/libQt5Widgets.so /usr/lib/arm-linux-gnueabihf/libQt5Multimedia.so /usr/lib/arm-linux-gnueabihf/libQt5Quick.so /usr/lib/arm-linux-gnueabihf/libQt5Gui.so /usr/lib/arm-linux-gnueabihf/libQt5Concurrent.so /usr/lib/arm-linux-gnueabihf/libQt5QmlModels.so /usr/lib/arm-linux-gnueabihf/libQt5Qml.so /usr/lib/arm-linux-gnueabihf/libQt5Network.so /usr/lib/arm-linux-gnueabihf/libQt5Core.so -lGLESv2 -lpthread -latomic
/usr/bin/ld: audioinput.o: undefined reference to symbol 'pa_context_disconnect##PULSE_0'
/usr/bin/ld: /lib/arm-linux-gnueabihf/libpulse.so.0: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status
make: *** [Makefile:468: Qtcam] Error 1
Can anyone tell me how to solve this error?
With vcpkg, after I enabled ZMQ_BUILD_DRAFT_API for both the zeromq and cppzmq. The build fails with the following errors
1>------ Build started: Project: myproj, Configuration: Debug x64 ------
1>my1.cpp
1>my2.cpp
1>my3.cpp
1>my4.cpp
1>my5.obj : error LNK2019: unresolved external symbol __imp_zmq_poller_new referenced in function "public: __cdecl zmq::poller_t<unsigned __int64>::poller_t<unsigned __int64>(void)" (??0?$poller_t#_K#zmq##QEAA#XZ)
1>my5.obj : error LNK2019: unresolved external symbol __imp_zmq_poller_destroy referenced in function "public: void __cdecl zmq::poller_t<unsigned __int64>::destroy_poller_t::operator()(void *)" (??Rdestroy_poller_t#?$poller_t#_K#zmq##QEAAXPEAX#Z)
1>my5.obj : error LNK2019: unresolved external symbol __imp_zmq_poller_add referenced in function "private: void __cdecl zmq::poller_t<unsigned __int64>::add_impl(class zmq::socket_ref,enum zmq::event_flags,unsigned __int64 *)" (?add_impl#?$poller_t#_K#zmq##AEAAXVsocket_ref#2#W4event_flags#2#PEA_K#Z)
1>my5.obj : error LNK2019: unresolved external symbol __imp_zmq_poller_remove referenced in function "public: void __cdecl zmq::poller_t<unsigned __int64>::remove(class zmq::socket_ref)" (?remove#?$poller_t#_K#zmq##QEAAXVsocket_ref#2##Z)
1>my5.obj : error LNK2019: unresolved external symbol __imp_zmq_poller_wait_all referenced in function "public: unsigned __int64 __cdecl zmq::poller_t<unsigned __int64>::wait_all(class std::vector<struct zmq::poller_event<unsigned __int64>,class std::allocator<struct zmq::poller_event<unsigned __int64> > > &,class std::chrono::duration<__int64,struct std::ratio<1,1000> >)" (?wait_all#?$poller_t#_K#zmq##QEAA_KAEAV?$vector#U?$poller_event#_K#zmq##V?$allocator#U?$poller_event#_K#zmq###std###std##V?$duration#_JU?$ratio#$00$0DOI##std###chrono#4##Z)
1>G:\build\x64\Debug\myproj.exe : fatal error LNK1120: 5 unresolved externals
1>Done building project "myproj.vcxproj" -- FAILED.
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
Here is my portfile.cmake for zeromq
include(vcpkg_common_functions)
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO zeromq/libzmq
REF 8d34332ff2301607df0fc9971a2fbe903c0feb7c
SHA512 8b3a9b6c4e5236353672b6deb64c94ac79deb116962405f01fe36e2fd8ddc48ec65d88ffc06746ce2e13c93eaeb04e4ba73de8f9d6f2a57a73111765d5ba8ad7
HEAD_REF master
)
string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" BUILD_STATIC)
string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "dynamic" BUILD_SHARED)
vcpkg_check_features(
OUT_FEATURE_OPTIONS FEATURE_OPTIONS
FEATURES
sodium WITH_LIBSODIUM
INVERTED_FEATURES
websockets-sha1 DISABLE_WS
)
vcpkg_configure_cmake(
SOURCE_PATH ${SOURCE_PATH}
PREFER_NINJA
OPTIONS
-DZMQ_BUILD_TESTS=OFF
-DPOLLER=select
-DBUILD_STATIC=${BUILD_STATIC}
-DBUILD_SHARED=${BUILD_SHARED}
-DWITH_PERF_TOOL=OFF
-DWITH_DOCS=OFF
-DWITH_NSS=OFF
-DZMQ_BUILD_DRAFT_API=ON
${FEATURE_OPTIONS}
OPTIONS_DEBUG
"-DCMAKE_PDB_OUTPUT_DIRECTORY=${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg"
)
vcpkg_install_cmake()
vcpkg_copy_pdbs()
if(EXISTS ${CURRENT_PACKAGES_DIR}/CMake)
vcpkg_fixup_cmake_targets(CONFIG_PATH CMake)
endif()
if(EXISTS ${CURRENT_PACKAGES_DIR}/share/cmake/ZeroMQ)
vcpkg_fixup_cmake_targets(CONFIG_PATH share/cmake/ZeroMQ)
endif()
file(COPY
${CMAKE_CURRENT_LIST_DIR}/vcpkg-cmake-wrapper.cmake
DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}
)
if(VCPKG_LIBRARY_LINKAGE STREQUAL "static")
vcpkg_replace_string(${CURRENT_PACKAGES_DIR}/include/zmq.h
"defined ZMQ_STATIC"
"1 //defined ZMQ_STATIC"
)
endif()
if(VCPKG_LIBRARY_LINKAGE STREQUAL "static")
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin)
endif()
# Handle copyright
file(RENAME ${CURRENT_PACKAGES_DIR}/share/zmq/COPYING.LESSER.txt ${CURRENT_PACKAGES_DIR}/share/zeromq/copyright)
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include ${CURRENT_PACKAGES_DIR}/debug/share ${CURRENT_PACKAGES_DIR}/share/zmq)
# CMake integration test
vcpkg_test_cmake(PACKAGE_NAME ZeroMQ)
and here is the one for cppzmq
include(vcpkg_common_functions)
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO zeromq/cppzmq
REF v4.4.1
SHA512 5178a24413e44a6d99e57db7c9859c72279304272baa0e1fb810174cdf592cb567cab98428ef3ab611042bdf4bc506867421662409d1f0d82c233cb83ebdb801
HEAD_REF master
)
vcpkg_configure_cmake(
SOURCE_PATH ${SOURCE_PATH}
PREFER_NINJA
OPTIONS
-DCPPZMQ_BUILD_TESTS=OFF
-DZMQ_BUILD_DRAFT_API=ON
)
vcpkg_install_cmake()
vcpkg_fixup_cmake_targets(CONFIG_PATH share/cmake/cppzmq)
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug ${CURRENT_PACKAGES_DIR}/share/cppzmq/libzmq-pkg-config)
# Handle copyright
file(COPY ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/cppzmq)
file(RENAME ${CURRENT_PACKAGES_DIR}/share/cppzmq/LICENSE ${CURRENT_PACKAGES_DIR}/share/cppzmq/copyright)
DUMPBIN output of the exported symbols shows that the relevant symbols are missing
Microsoft (R) COFF/PE Dumper Version 14.16.27032.1
Copyright (C) Microsoft Corporation. All rights reserved.
Dump of file E:\_dev\vcpkg\installed\x64-windows\lib\libzmq-mt-4_3_3.lib
File Type: LIBRARY
COFF SYMBOL TABLE
000 01016998 ABS notype Static | #comp.id
001 00000000 SECT2 notype External | __IMPORT_DESCRIPTOR_libzmq-mt-4_3_3
002 C0000040 SECT2 notype Section | .idata$2
003 00000000 SECT3 notype Static | .idata$6
004 C0000040 UNDEF notype Section | .idata$4
005 C0000040 UNDEF notype Section | .idata$5
006 00000000 UNDEF notype External | __NULL_IMPORT_DESCRIPTOR
007 00000000 UNDEF notype External | libzmq-mt-4_3_3_NULL_THUNK_DATA
String Table Size = 0x62 bytes
COFF SYMBOL TABLE
000 01016998 ABS notype Static | #comp.id
001 00000000 SECT2 notype External | __NULL_IMPORT_DESCRIPTOR
String Table Size = 0x1D bytes
COFF SYMBOL TABLE
000 01016998 ABS notype Static | #comp.id
001 00000000 SECT2 notype External | libzmq-mt-4_3_3_NULL_THUNK_DATA
String Table Size = 0x25 bytes
Exports
ordinal name
zmq_atomic_counter_dec
zmq_atomic_counter_destroy
zmq_atomic_counter_inc
zmq_atomic_counter_new
zmq_atomic_counter_set
zmq_atomic_counter_value
zmq_bind
zmq_close
zmq_connect
zmq_ctx_destroy
zmq_ctx_get
zmq_ctx_new
zmq_ctx_set
zmq_ctx_shutdown
zmq_ctx_term
zmq_curve_keypair
zmq_curve_public
zmq_device
zmq_disconnect
zmq_errno
zmq_getsockopt
zmq_has
zmq_init
zmq_msg_close
zmq_msg_copy
zmq_msg_data
zmq_msg_get
zmq_msg_gets
zmq_msg_init
zmq_msg_init_data
zmq_msg_init_size
zmq_msg_more
zmq_msg_move
zmq_msg_recv
zmq_msg_send
zmq_msg_set
zmq_msg_size
zmq_poll
zmq_proxy
zmq_proxy_steerable
zmq_recv
zmq_recviov
zmq_recvmsg
zmq_send
zmq_send_const
zmq_sendiov
zmq_sendmsg
zmq_setsockopt
zmq_sleep
zmq_socket
zmq_socket_monitor
zmq_stopwatch_intermediate
zmq_stopwatch_start
zmq_stopwatch_stop
zmq_strerror
zmq_term
zmq_threadclose
zmq_threadstart
zmq_timers_add
zmq_timers_cancel
zmq_timers_destroy
zmq_timers_execute
zmq_timers_new
zmq_timers_reset
zmq_timers_set_interval
zmq_timers_timeout
zmq_unbind
zmq_version
zmq_z85_decode
zmq_z85_encode
Summary
DB .debug$S
14 .idata$2
14 .idata$3
8 .idata$4
8 .idata$5
14 .idata$6
How to enable the DRAFT API with vcpkg?
Solved with the help from the 0MQ github community:
I was using a wrong switch.
It must be -DENABLE_DRAFTS=ON here. ZMQ_BUILD_DRAFT_API is the
preprocessor definition, but the CMake option is called ENABLE_DRAFTS.
On top of that, the preprocessor ZMQ_BUILD_DRAFT_API must still be defined in the VS project.
I wish info like this could be easier to look up.
To build it with the draft api support on the current version it uses the feature flag on the command line:
vcpkg.exe install zeromq[draft]:x64-windows zeromq[draft]:x86-windows cppzmq[draft]:x64-windows cppzmq[draft]:x86-windows
What does this "ELF section name out of range" error mean?
I am trying to build a binary, but constantly getting this linker error.
root#ubuntu:/home/ubuntu/e2c/e2c_core# make all
arm-oe-linux-gnueabi-g++ --sysroot=/home/ubuntu/sysroots/aarch64-oe-linux/ -O0 -g -Wall -fmessage-length=0 -MD -MP -DLINUX=1 -DUSE_CONFIG_FILE=1 --sysroot=/home/ubuntu/sysroots/aarch64-oe-linux/ -fstack-protector -fPIE -z relro -z now -D_FORTIFY_SOURCE=2 -std=c++0x -O3 -Wall -fmessage-length=0 -MD -MP -DLINUX=1 -DUSE_CONFIG_FILE=1 -D__MOCANA_DISABLE_INLINE_ASSEMBLY__ -I. -Iapi/ -Icfg/ -Iplatform/ -Icore/ -Icore/Diagnostics/ -Icore/GreyhoundThread/ -Icore/LIB_Mocana/ -Icore/LIB_ProtonE/ -Icore/Mocana/ -Icore/PKI/ -Icore/Telemetry/ -Icore/UTCtimeSync/ -Icore/jsmn/ -I../e2c_api/ -Ilib/atecclib/ -Ilib/atecclib/lib/ -Ilib/config/ -I../boost/ -I/home/ubuntu/Downloads/libwebsockets/build/include/ -Icore/LIB_Mocana/src/ocsp/ -Iunity/ -include core/E2C_global_include.h -o e2c_core main.o api/api_diy.o api/api_rci.o api/api_sta.o api/TelemetryInterface.o cfg/CloudVariantSetup.o cfg/SwVersion.o core/e2c_core_config.o core/E2C_internal_main.o core/Diagnostics/LegacyDBdiag.o core/GreyhoundThread/FirmwareDownload.o core/GreyhoundThread/GreyhoundThread.o core/GreyhoundThread/Provisioning.o core/GreyhoundThread/UTCtimeSync.o core/GreyhoundThread/WS_Provisioning.o core/jsmn/jsmn.o core/LIB_Mocana/src/asn1/ASN1TreeWalker.o core/LIB_Mocana/src/asn1/derencoder.o core/LIB_Mocana/src/asn1/oiddefs.o core/LIB_Mocana/src/asn1/oidutils.o core/LIB_Mocana/src/asn1/parseasn1.o core/LIB_Mocana/src/asn1/parsecert.o core/LIB_Mocana/src/common/absstream.o core/LIB_Mocana/src/common/altivec.o core/LIB_Mocana/src/common/circ_buf.o core/LIB_Mocana/src/common/circq.o core/LIB_Mocana/src/common/datetime.o core/LIB_Mocana/src/common/debug_console.o core/LIB_Mocana/src/common/dynarray.o core/LIB_Mocana/src/common/hash_table.o core/LIB_Mocana/src/common/hash_value.o core/LIB_Mocana/src/common/int128.o core/LIB_Mocana/src/common/int64.o core/LIB_Mocana/src/common/jacobi.o core/LIB_Mocana/src/common/lucas.o core/LIB_Mocana/src/common/math_arm.o core/LIB_Mocana/src/common/mbitmap.o core/LIB_Mocana/src/common/memfile.o core/LIB_Mocana/src/common/memory_debug.o core/LIB_Mocana/src/common/mem_part.o core/LIB_Mocana/src/common/mem_pool.o core/LIB_Mocana/src/common/merrors.o core/LIB_Mocana/src/common/mocana.o core/LIB_Mocana/src/common/moc_net.o core/LIB_Mocana/src/common/moc_stream.o core/LIB_Mocana/src/common/mprintf.o core/LIB_Mocana/src/common/mrtos.o core/LIB_Mocana/src/common/mstdlib.o core/LIB_Mocana/src/common/mtcp.o core/LIB_Mocana/src/common/prime.o core/LIB_Mocana/src/common/random.o core/LIB_Mocana/src/common/redblack.o core/LIB_Mocana/src/common/rng_seed.o core/LIB_Mocana/src/common/sizedbuffer.o core/LIB_Mocana/src/common/timer.o core/LIB_Mocana/src/common/tree.o core/LIB_Mocana/src/common/uri.o core/LIB_Mocana/src/common/utils.o core/LIB_Mocana/src/common/vlong.o core/LIB_Mocana/src/crypto/aesalgo.o core/LIB_Mocana/src/crypto/aesalgoNi.o core/LIB_Mocana/src/crypto/aes_ccm.o core/LIB_Mocana/src/crypto/aes_cmac.o core/LIB_Mocana/src/crypto/aes.o core/LIB_Mocana/src/crypto/aes_ctr.o core/LIB_Mocana/src/crypto/aes_eax.o core/LIB_Mocana/src/crypto/aes_ecb.o core/LIB_Mocana/src/crypto/aes_keywrap.o core/LIB_Mocana/src/crypto/aes_xcbc_mac_96.o core/LIB_Mocana/src/crypto/aes_xts.o core/LIB_Mocana/src/crypto/ansix9_63_kdf.o core/LIB_Mocana/src/crypto/arc2.o core/LIB_Mocana/src/crypto/arc4.o core/LIB_Mocana/src/crypto/asn1cert.o core/LIB_Mocana/src/crypto/base64m.o core/LIB_Mocana/src/crypto/blowfish.o core/LIB_Mocana/src/crypto/ca_mgmt.o core/LIB_Mocana/src/crypto/cert_store.o core/LIB_Mocana/src/crypto/cms_aux.o core/LIB_Mocana/src/crypto/crypto.o core/LIB_Mocana/src/crypto/des.o core/LIB_Mocana/src/crypto/dh.o core/LIB_Mocana/src/crypto/dsa2.o core/LIB_Mocana/src/crypto/dsa.o core/LIB_Mocana/src/crypto/fips.o core/LIB_Mocana/src/crypto/gcm.o core/LIB_Mocana/src/crypto/hmac.o core/LIB_Mocana/src/crypto/key_utils.o core/LIB_Mocana/src/crypto/md2.o core/LIB_Mocana/src/crypto/md45.o core/LIB_Mocana/src/crypto/md4.o core/LIB_Mocana/src/crypto/md5.o core/LIB_Mocana/src/crypto/nil.o core/LIB_Mocana/src/crypto/nist_rng.o core/LIB_Mocana/src/crypto/pem_key.o core/LIB_Mocana/src/crypto/pkcs10.o core/LIB_Mocana/src/crypto/pkcs12.o core/LIB_Mocana/src/crypto/pkcs1.o core/LIB_Mocana/src/crypto/pkcs5.o core/LIB_Mocana/src/crypto/pkcs7.o core/LIB_Mocana/src/crypto/pkcs8.o core/LIB_Mocana/src/crypto/pkcs_common.o core/LIB_Mocana/src/crypto/pkcs.o core/LIB_Mocana/src/crypto/pkcs_key.o core/LIB_Mocana/src/crypto/primeec_atecc.o core/LIB_Mocana/src/crypto/primeec.o core/LIB_Mocana/src/crypto/primefld.o core/LIB_Mocana/src/crypto/pubcrypto.o core/LIB_Mocana/src/crypto/rc2algo.o core/LIB_Mocana/src/crypto/rc4algo.o core/LIB_Mocana/src/crypto/rsa.o core/LIB_Mocana/src/crypto/sec_key.o core/LIB_Mocana/src/crypto/sha1.o core/LIB_Mocana/src/crypto/sha256.o core/LIB_Mocana/src/crypto/sha512.o core/LIB_Mocana/src/crypto/three_des.o core/LIB_Mocana/src/ocsp/client/ocsp_client.o core/LIB_Mocana/src/ocsp/ocsp_context.o core/LIB_Mocana/src/ocsp/ocsp.o core/LIB_Mocana/src/ocsp/ocsp_http.o core/LIB_Mocana/src/ocsp/ocsp_message.o core/LIB_Mocana/src/platform/linux_rtos.o core/LIB_Mocana/src/platform/linux_tcp_async.o core/LIB_Mocana/src/platform/linux_tcp.o core/LIB_Mocana/src/platform/linux_udp.o core/LIB_Mocana/src/ssl/ssl.o core/LIB_Mocana/src/ssl/ssl_ocsp.o core/LIB_Mocana/src/ssl/sslsock.o core/LIB_ProtonE/src/buffer.o core/LIB_ProtonE/src/error.o core/LIB_ProtonE/src/log.o core/LIB_ProtonE/src/parser.o core/LIB_ProtonE/src/pn_platform.o core/LIB_ProtonE/src/scanner.o core/LIB_ProtonE/src/selectable.o core/LIB_ProtonE/src/types.o core/LIB_ProtonE/src/url.o core/LIB_ProtonE/src/util.o core/LIB_ProtonE/src/codec/codec.o core/LIB_ProtonE/src/codec/decoder.o core/LIB_ProtonE/src/codec/encoder.o core/LIB_ProtonE/src/dispatcher/dispatcher.o core/LIB_ProtonE/src/engine/engine.o core/LIB_ProtonE/src/events/event.o core/LIB_ProtonE/src/framing/framing.o core/LIB_ProtonE/src/message/message.o core/LIB_ProtonE/src/messenger/messenger.o core/LIB_ProtonE/src/messenger/store.o core/LIB_ProtonE/src/messenger/subscription.o core/LIB_ProtonE/src/messenger/transform.o core/LIB_ProtonE/src/object/iterator.o core/LIB_ProtonE/src/object/list.o core/LIB_ProtonE/src/object/map.o core/LIB_ProtonE/src/object/object.o core/LIB_ProtonE/src/object/record.o core/LIB_ProtonE/src/object/string.o core/LIB_ProtonE/src/posix/io.o core/LIB_ProtonE/src/posix/selector.o core/LIB_ProtonE/src/sasl/none_sasl.o core/LIB_ProtonE/src/sasl/sasl.o core/LIB_ProtonE/src/ssl/mocanassl_proton.o core/LIB_ProtonE/src/transport/autodetect.o core/LIB_ProtonE/src/transport/transport.o core/Mocana/MocSetup.o core/Mocana/MocTest.o core/Mocana/TLS_http_get.o core/PKI/CertificateStore.o core/PKI/ILVT.o core/PKI/MDKcode.o core/Telemetry/AMQPlayer.o core/Telemetry/GatewayTerminatedMessages.o core/Telemetry/GHbase64.o core/Telemetry/GHsequence.o core/Telemetry/MsgRouting.o core/Telemetry/RegistrationFlag.o core/Telemetry/TelemetryThread.o core/Telemetry/WSlayer.o core/Telemetry/WS_Stats.o core/Telemetry/PELIB/PELIBassert.o core/Telemetry/PELIB/PELIBmemoryMgmt.o core/Telemetry/PELIB/PELIBplatform.o core/UTCtimeSync/UTCtime.o core/UTCtimeSync/UTCtimeSyncJSON.o platform/Daemon.o platform/Linux_api.o platform/Logger.o platform/Platform.o platform/STA_DNScache.o platform/e2c/BL-RO-Store.o platform/e2c/ConfigStore.o platform/e2c/DebugPrint.o platform/e2c/DeviceConfig.o platform/e2c/E2C_FILE.o platform/e2c/MemoryManager.o platform/e2c/PlatformFileSystem.o lib/config/grammar.o lib/config/libconfig.o lib/config/scanctx.o lib/config/scanner.o lib/config/strbuf.o lib/config/libconfigcpp.o lib/atecclib/libatecc508.a -L../e2c_api/ -L/home/ubuntu/Downloads/libwebsockets/build/lib/ -Wl,--whole-archive -lpthread -ldl -Wl,--no-whole-archive -le2c_api -lrt -lwebsockets -luuid -lcurl
/home/ubuntu/sysroots/x86_64-oesdk-linux/usr/libexec/arm-oe-linux-gnueabi/gcc/arm-oe-linux-gnueabi/4.9.3/real-ld: fatal error: /home/ubuntu/sysroots/aarch64-oe-linux/usr/lib/libstdc++.so: ELF section name out of range
What does this actually mean?
In my case I was getting ld : error : myfile: file too short, or sometimes:
ld: warning: myfile has a section extending past end of file
ld : error : myfile: ELF section name out of range
because I was patching for Nix a folder containing both source code and binary blob… and since the number of files to patch was high I used a script to patch them all at the same time (using find and sed -i). Unfortunately, sed was also applied on binary files, which completely corrupted them.
I realized that by printing objdump -a myfile before and after the patching (I would get an error in the second case).
I am using go-QT binding(https://github.com/therecipe/qt). My code is compiling & working good for amd64 but when I try to cross compile it for arm devices (Raspberrypi), it gives below error. Please advise how to solve this issue
**src/github.com/therecipe/qt/core/core.cpp:9:30: fatal error:
QAbstractAnimation: No such file or directory
compilation terminated.**
Environment Variables
GOARCH="arm"
GOBIN=""
GOEXE=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOOS="linux"
GOPATH="/home/minhaj/GoLang"
GORACE=""
GOROOT="/usr/local/go"
GOTOOLDIR="/usr/local/go/pkg/tool/linux_amd64"
GCCGO="gccgo"
GOARM=""
CC="arm-linux-gnueabi-gcc"
GOGCCFLAGS="-fPIC -marm -pthread -fmessage-length=0 -fdebug-prefix-
map=/tmp/go-build728594690=/tmp/go-build -gno-record-gcc-switches"
CXX="arm-linux-gnueabi-g++"
CGO_ENABLED="1"
PKG_CONFIG="pkg-config"
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
Compilation Result
go build -v IndoorMass/
crypto
encoding
encoding/base64
crypto/sha256
unicode/utf16
flag
encoding/json
golang.org/x/image/math/fixed
github.com/golang/freetype/raster
golang.org/x/image/font
github.com/icza/mjpeg
github.com/golang/freetype/truetype
github.com/skip2/go-qrcode/bitset
github.com/skip2/go-qrcode/reedsolomon
path/filepath
io/ioutil
github.com/skip2/go-qrcode
container/list
golang.org/x/net/context
github.com/mattn/go-sqlite3
IndoorMass/General
github.com/tidwall/match
github.com/tidwall/gjson
compress/gzip
crypto/subtle
crypto/cipher
crypto/aes
internal/syscall/unix
math/rand
math/big
crypto/rand
crypto/des
crypto/elliptic
crypto/sha512
encoding/asn1
crypto/ecdsa
crypto/hmac
crypto/internal/cipherhw
crypto/md5
crypto/rc4
crypto/rsa
crypto/sha1
crypto/dsa
crypto/x509/pkix
encoding/hex
encoding/pem
internal/nettrace
internal/singleflight
net
crypto/x509
vendor/golang_org/x/crypto/chacha20poly1305/internal/chacha20
vendor/golang_org/x/crypto/poly1305
vendor/golang_org/x/crypto/chacha20poly1305
vendor/golang_org/x/crypto/curve25519
crypto/tls
vendor/golang_org/x/net/http2/hpack
vendor/golang_org/x/net/idna
vendor/golang_org/x/net/lex/httplex
vendor/golang_org/x/text/transform
vendor/golang_org/x/text/unicode/norm
vendor/golang_org/x/text/width
mime
mime/quotedprintable
net/textproto
mime/multipart
net/http/httptrace
net/http/internal
path
net/http
IndoorMass/Server
github.com/kaey/framebuffer
os/exec
github.com/mrmorphic/hwio
github.com/DexterInd/GrovePi/Software/Go/grovepi
IndoorMass/Sensor
github.com/therecipe/qt
github.com/therecipe/qt/core
# github.com/therecipe/qt/core
src/github.com/therecipe/qt/core/core.cpp:9:30: fatal error:
QAbstractAnimation: No such file or directory
compilation terminated.
IndoorMass/DB
IndoorMass/Manager
I already spent lots of time on trying to crosscompile Qt 5.2.1 (as a recommended and stable one) from my x86 Ubuntu to ARM Beagle Bone Black. After about 20 minutes the compilation ends with a strange mistake. This is the end of the compilation console output:
rm -f libQt5Core.so.5.2.1 libQt5Core.so libQt5Core.so.5 libQt5Core.so.5.2
/home/piotrek/gcc-linaro-arm-linux-gnueabihf-4.9-2014.09_linux/bin/arm-linux-gnueabihf-g++ --sysroot=/media/rootfs -Wl,--no-undefined -Wl,-O1 -shared -Wl,-Bsymbolic-functions -Wl,--dynamic-list,/home/piotrek/qt-everywhere-opensource-src-5.2.1/qtbase/src/corelib/QtCore.dynlist -Wl,-soname,libQt5Core.so.5 -o libQt5Core.so.5.2.1 .obj/qabstractanimation.o .obj/qvariantanimation.o .obj/qpropertyanimation.o .obj/qanimationgroup.o .obj/qsequentialanimationgroup.o .obj/qparallelanimationgroup.o .obj/qpauseanimation.o .obj/qatomic_unix.o .obj/qglobal.o .obj/qglobalstatic.o .obj/qlibraryinfo.o .obj/qmalloc.o .obj/qnumeric.o .obj/qlogging.o .obj/qatomic.o .obj/qexception.o .obj/qresultstore.o .obj/qfutureinterface.o .obj/qfuturewatcher.o .obj/qmutex.o .obj/qreadwritelock.o .obj/qrunnable.o .obj/qmutexpool.o .obj/qsemaphore.o .obj/qthread.o .obj/qthreadpool.o .obj/qthreadstorage.o .obj/qthread_unix.o .obj/qwaitcondition_unix.o .obj/qarraydata.o .obj/qbitarray.o .obj/qbytearray.o .obj/qbytearraymatcher.o .obj/qcollator.o .obj/qcommandlineoption.o .obj/qcommandlineparser.o .obj/qcryptographichash.o .obj/qdatetime.o .obj/qdatetimeparser.o .obj/qeasingcurve.o .obj/qelapsedtimer.o .obj/qfreelist.o .obj/qhash.o .obj/qline.o .obj/qlinkedlist.o .obj/qlist.o .obj/qlocale.o .obj/qlocale_tools.o .obj/qpoint.o .obj/qmap.o .obj/qmargins.o .obj/qmessageauthenticationcode.o .obj/qcontiguouscache.o .obj/qrect.o .obj/qregexp.o .obj/qregularexpression.o .obj/qrefcount.o .obj/qshareddata.o .obj/qsharedpointer.o .obj/qsimd.o .obj/qsize.o .obj/qstring.o .obj/qstringbuilder.o .obj/qstringlist.o .obj/qtextboundaryfinder.o .obj/qtimeline.o .obj/qtimezone.o .obj/qtimezoneprivate.o .obj/qunicodetools.o .obj/qvector.o .obj/qvsnprintf.o .obj/qelapsedtimer_unix.o .obj/qlocale_unix.o .obj/qtimezoneprivate_tz.o .obj/adler32.o .obj/compress.o .obj/crc32.o .obj/deflate.o .obj/gzclose.o .obj/gzlib.o .obj/gzread.o .obj/gzwrite.o .obj/infback.o .obj/inffast.o .obj/inflate.o .obj/inftrees.o .obj/trees.o .obj/uncompr.o .obj/zutil.o .obj/qlocale_icu.o .obj/qcollator_icu.o .obj/qtimezoneprivate_icu.o .obj/pcre16_byte_order.o .obj/pcre16_chartables.o .obj/pcre16_compile.o .obj/pcre16_config.o .obj/pcre16_dfa_exec.o .obj/pcre16_exec.o .obj/pcre16_fullinfo.o .obj/pcre16_get.o .obj/pcre16_globals.o .obj/pcre16_jit_compile.o .obj/pcre16_maketables.o .obj/pcre16_newline.o .obj/pcre16_ord2utf16.o .obj/pcre16_refcount.o .obj/pcre16_string_utils.o .obj/pcre16_study.o .obj/pcre16_tables.o .obj/pcre16_ucd.o .obj/pcre16_utf16_utils.o .obj/pcre16_valid_utf16.o .obj/pcre16_version.o .obj/pcre16_xclass.o .obj/harfbuzz-buffer.o .obj/harfbuzz-gdef.o .obj/harfbuzz-gsub.o .obj/harfbuzz-gpos.o .obj/harfbuzz-impl.o .obj/harfbuzz-open.o .obj/harfbuzz-stream.o .obj/harfbuzz-shaper-all.o .obj/qharfbuzz.o .obj/qabstractfileengine.o .obj/qbuffer.o .obj/qdatastream.o .obj/qdataurl.o .obj/qtldurl.o .obj/qdebug.o .obj/qdir.o .obj/qdiriterator.o .obj/qfile.o .obj/qfiledevice.o .obj/qfileinfo.o .obj/qipaddress.o .obj/qiodevice.o .obj/qlockfile.o .obj/qnoncontiguousbytedevice.o .obj/qprocess.o .obj/qtextstream.o .obj/qtemporarydir.o .obj/qtemporaryfile.o .obj/qresource.o .obj/qresource_iterator.o .obj/qsavefile.o .obj/qstandardpaths.o .obj/qurl.o .obj/qurlidna.o .obj/qurlquery.o .obj/qurlrecode.o .obj/qsettings.o .obj/qfsfileengine.o .obj/qfsfileengine_iterator.o .obj/qfilesystemwatcher.o .obj/qfilesystemwatcher_polling.o .obj/qfilesystementry.o .obj/qfilesystemengine.o .obj/qfileselector.o .obj/qloggingcategory.o .obj/qloggingregistry.o .obj/qfsfileengine_unix.o .obj/qfilesystemengine_unix.o .obj/qlockfile_unix.o .obj/qprocess_unix.o .obj/qfilesystemiterator_unix.o .obj/qstandardpaths_unix.o .obj/qfilesystemwatcher_inotify.o .obj/qabstractitemmodel.o .obj/qabstractproxymodel.o .obj/qitemselectionmodel.o .obj/qidentityproxymodel.o .obj/qsortfilterproxymodel.o .obj/qstringlistmodel.o .obj/qjson.o .obj/qjsondocument.o .obj/qjsonobject.o .obj/qjsonarray.o .obj/qjsonvalue.o .obj/qjsonwriter.o .obj/qjsonparser.o .obj/qpluginloader.o .obj/qfactoryloader.o .obj/quuid.o .obj/qlibrary.o .obj/qelfparser_p.o .obj/qmachparser.o .obj/qlibrary_unix.o .obj/qabstracteventdispatcher.o .obj/qabstractnativeeventfilter.o .obj/qbasictimer.o .obj/qeventloop.o .obj/qcoreapplication.o .obj/qcoreevent.o .obj/qmetaobject.o .obj/qmetatype.o .obj/qmetaobjectbuilder.o .obj/qmimedata.o .obj/qobject.o .obj/qobjectcleanuphandler.o .obj/qsignalmapper.o .obj/qsocketnotifier.o .obj/qtimer.o .obj/qtranslator.o .obj/qvariant.o .obj/qcoreglobaldata.o .obj/qsharedmemory.o .obj/qsystemsemaphore.o .obj/qpointer.o .obj/qmath.o .obj/qsystemerror.o .obj/qcore_unix.o .obj/qcrashhandler.o .obj/qeventdispatcher_unix.o .obj/qtimerinfo_unix.o .obj/qeventdispatcher_glib.o .obj/qsharedmemory_unix.o .obj/qsystemsemaphore_unix.o .obj/qisciicodec.o .obj/qlatincodec.o .obj/qtextcodec.o .obj/qtsciicodec.o .obj/qutfcodec.o .obj/qicucodec.o .obj/qstatemachine.o .obj/qabstractstate.o .obj/qstate.o .obj/qfinalstate.o .obj/qhistorystate.o .obj/qabstracttransition.o .obj/qsignaltransition.o .obj/qeventtransition.o .obj/qmimedatabase.o .obj/qmimetype.o .obj/qmimemagicrulematcher.o .obj/qmimetypeparser.o .obj/qmimemagicrule.o .obj/qmimeglobpattern.o .obj/qmimeprovider.o .obj/qxmlstream.o .obj/qxmlutils.o .obj/qrc_mimetypes.o .obj/moc_qabstractanimation_p.o .obj/moc_qnamespace.o .obj/moc_qthread.o .obj/moc_qthreadpool.o .obj/moc_qfuturewatcher.o .obj/moc_qeasingcurve.o .obj/moc_qlocale.o .obj/moc_qtimeline.o .obj/moc_qfile.o .obj/moc_qfiledevice.o .obj/moc_qiodevice.o .obj/moc_qnoncontiguousbytedevice_p.o .obj/moc_qtextstream_p.o .obj/moc_qtemporaryfile.o .obj/moc_qsavefile.o .obj/moc_qsettings.o .obj/moc_qfilesystemwatcher_p.o .obj/moc_qfilesystemwatcher_polling_p.o .obj/moc_qfilesystemwatcher_inotify_p.o .obj/moc_qabstractitemmodel.o .obj/moc_qstringlistmodel.o .obj/moc_qpluginloader.o .obj/moc_qlibrary.o .obj/moc_qfactoryloader_p.o .obj/moc_qabstracteventdispatcher.o .obj/moc_qeventloop.o .obj/moc_qcoreapplication.o .obj/moc_qcoreevent.o .obj/moc_qmimedata.o .obj/moc_qsocketnotifier.o .obj/moc_qtimer.o .obj/moc_qtranslator.o .obj/moc_qobjectcleanuphandler.o .obj/moc_qsharedmemory.o .obj/moc_qeventdispatcher_unix_p.o .obj/moc_qeventdispatcher_glib_p.o .obj/moc_qabstractstate.o .obj/moc_qstate.o .obj/moc_qfinalstate.o .obj/moc_qhistorystate.o .obj/moc_qabstracttransition.o .obj/moc_qsignaltransition.o .obj/moc_qeventtransition.o -lrt -ldl -lpthread -licui18n -licuuc -lm -ldl -pthread -L/media/rootfs/usr/lib/arm-linux-gnueabihf -lgthread-2.0 -lglib-2.0 -lrt
/home/piotrek/gcc-linaro-arm-linux-gnueabihf-4.9-2014.09_linux/bin/../lib/gcc/arm-linux-gnueabihf/4.9.2/../../../../arm-linux-gnueabihf/bin/ld: /media/rootfs/usr/lib/arm-linux-gnueabihf/libglib-2.0.a(libglib_2_0_la-gmain.o): relocation R_ARM_THM_MOVW_ABS_NC against `a local symbol' can not be used when making a shared object; recompile with -fPIC
/media/rootfs/usr/lib/arm-linux-gnueabihf/libglib-2.0.a: error adding symbols: Bad value
collect2: error: ld returned 1 exit status
make[3]: *** [../../lib/libQt5Core.so.5.2.1] Error 1
make[3]: Leaving directory `/home/piotrek/qt-everywhere-opensource-src-5.2.1/qtbase/src/corelib'
make[2]: *** [sub-corelib-make_first] Error 2
make[2]: Leaving directory `/home/piotrek/qt-everywhere-opensource-src-5.2.1/qtbase/src'
make[1]: *** [sub-src-make_first] Error 2
make[1]: Leaving directory `/home/piotrek/qt-everywhere-opensource-src-5.2.1/qtbase'
make: *** [module-qtbase-make_first] Error 2
I start the compilation process with standard command:
sudo make -j4
I believe the important part of the error output is:
(libglib_2_0_la-gmain.o): relocation R_ARM_THM_MOVW_ABS_NC against `a local symbol' can not be used when making a shared object; recompile with -fPIC
My Qt was configured with following command:
(device linux-beagleboard-g++ was edited for the Beaglebone)
sudo ./configure -prefix /home/piotrek/qt-everywhere-opensource-src-5.4.0 -device linux-beagleboard-g++ -device-option CROSS_COMPILE=/home/piotrek/gcc-linaro-arm-linux-gnueabihf-4.9-2014.09_linux/bin/arm-linux-gnueabihf- -sysroot /media/rootfs -release -opensource -confirm-license -opengl es2 -v -qt-zlib -qt-libpng -qt-libjpeg -qt-freetype -qt-harfbuzz -qt-pcre -qt-xcb -qt-xkbcommon
How can i eliminate this error and push the compilation foreward? Where does it come form?
This is not related to your problem, I am asking anyways. Why do you to use Qt5.2.1. It quite old and lacking many improvements of newer versions.