makestrs: cannot execute binary file: Exec format error

Asked by Milav Soni

Hello Friends,

I downloaded motif-2.3.4 from Ubuntu Packages.

I want to cross-compile it for ARM.

For configuration i write following command and extra i added "ac_cv_func_setpgrp_void=yes" in config.cache

$ . autogen.sh -C --prefix=/home/teqdiligent/HMI_SCADA/Phytec_Lib/motif/wega_build/ --host=arm-cortexa8-linux-gnueabihf

When I run "make V=1" i face following error.
.......................................................
.......................................................
make[1]: Entering directory `/home/teqdiligent/HMI_SCADA/Phytec_Lib/motif/motif-2.3.4/lib'
Making all in Xm
make[2]: Entering directory `/home/teqdiligent/HMI_SCADA/Phytec_Lib/motif/motif-2.3.4/lib/Xm'
test -f xmstring.list || ln -s ./xmstring.list xmstring.list
test -f XmStrDefs.ht || ln -s ./XmStrDefs.ht XmStrDefs.ht
test -f XmStrDefs22.ht || ln -s ./XmStrDefs22.ht XmStrDefs22.ht
test -f XmStrDefs23.ht || ln -s ./XmStrDefs23.ht XmStrDefs23.ht
test -f XmStrDefsI.ht || ln -s ./XmStrDefsI.ht XmStrDefsI.ht
test -f XmStrDefs.ct || ln -s ./XmStrDefs.ct XmStrDefs.ct
../../config/util/makestrs -f xmstring.list >XmStrDefs.c
/bin/bash: ../../config/util/makestrs: cannot execute binary file: Exec format error
make[2]: *** [XmStrDefs.h] Error 126
make[2]: Leaving directory `/home/teqdiligent/HMI_SCADA/Phytec_Lib/motif/motif-2.3.4/lib/Xm'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/teqdiligent/HMI_SCADA/Phytec_Lib/motif/motif-2.3.4/lib'
make: *** [all-recursive] Error 1
root@ubuntu:/home/teqdiligent/HMI_SCADA/Phytec_Lib/motif/motif-2.3.4#

Please suggest me if i am going in to right way.

Question information

Language:
English Edit question
Status:
Answered
For:
Ubuntu motif Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:

This question was reopened

Revision history for this message
Manfred Hampl (m-hampl) said :
#1

Why do you want to cross-compile yourself? There are ready-made packages for all architectures that are supported in Ubuntu, including armhf and arm64.

What is the output of the commands

uname -a
lsb_release -crid
dpkg --print-architecture

on the machine on which you are trying to compile, and on the target machine?

Revision history for this message
Milav Soni (milav19soni) said :
#2

Hello Hampl,

Thank You For your response.

Yes I know ready-made packages are available for "armhf" architecture.

Actually I have one "Test.c" code that use motif library. and i want to make executable for "AM335X" (Phytec Wega Board).

But I am confused which library and header files are to be link to "Test.c".

is it libmotif_commom?
is it libmotif_dev?
is it libmrm4?
is it libuil4?
is it libxm4?
is it mwm?
is it uil?

Or

all are link to "Test.c"..

 So that i want to do cross compile the "motif library" and so that i have only assign two path.
 1)Xm_CFLAGS=-I \path\ to\include
 2)Xm_LIBS=-L\path\to\lib

But in ready made packages i did not know what is the path of "Xm_CFLAGS" and ")Xm_LIBS".

please suggest me.

/*------------------Output of command---------------------*/
---In Build Machine (PC)

root@ubuntu:/home/teqdiligent/HMI_SCADA/Phytec_Lib/motif# uname -a
Linux ubuntu 4.2.0-27-generic #32~14.04.1-Ubuntu SMP Fri Jan 22 15:32:26 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux
root@ubuntu:/home/teqdiligent/HMI_SCADA/Phytec_Lib/motif# lsb_release -crid
Distributor ID: Ubuntu
Description: Ubuntu 14.04.4 LTS
Release: 14.04
Codename: trusty
root@ubuntu:/home/teqdiligent/HMI_SCADA/Phytec_Lib/motif# dpkg --print-architecture
amd64
root@ubuntu:/home/teqdiligent/HMI_SCADA/Phytec_Lib/motif#

/*------------------Output of command---------------------*/
---In Target Machine (Phytec Wega Board)

root@phyBOARD-WEGA-AM335x:/ uname -a
Linux phyBOARD-WEGA-AM335x 3.2.0-PD13.0.0 #1 Thu Feb 27 12:27:01 IST 2014 armv7l GNU/Linux
root@phyBOARD-WEGA-AM335x:/ lsb_release -crid
-sh: lsb_release: not found
root@phyBOARD-WEGA-AM335x:/ dpkg --print-architecture
-sh: dpkg: not found
root@phyBOARD-WEGA-AM335x:/

Thank You Once again

Revision history for this message
Manfred Hampl (m-hampl) said :
#3

Ok, I think, I understand. Your problem is not related to the motif packages in Ubuntu or Ubuntu in general, but to (cross-)compliling software for a Phytec Wega Board.

Which error messages do you receive, if you try compiling/linking your Test.c program without setting Xm_CFLAGS and Xm_LIBS? This might show some details indicating what's missing.

Revision history for this message
Milav Soni (milav19soni) said :
#4

Hello, Hampl

when i cross-compiling Test.c using "arm-cortexa8-linux-gnueabihf" Toolchain, i got following error.

"/../../arm-cortexa8-linux-gnueabihf/bin/ld: cannot find -lXm"

Thank you.

Revision history for this message
Milav Soni (milav19soni) said :
#5

Hello Hampl,

The above problem is now solved.

from "libmotif_dev" i just make executable it for Phytec Wega Board using below command.

$arm-cortexa8-linux-gnueabihf-AR -x libXm.a
$arm-cortexa8-linux-gnueabihf-CC -shared *.o -o libXm.so
 rm *.o

Than i link .so file to the Test.c file, and "cannot find -lXm" error solve.

But now i got more errors as below.

/*------------------------------------------------------------------------------------------------------------------*/

root@ubuntu:/home/teqdiligent/HMI_SCADA/genlogic/glg_bb/glg/examples_c_cpp/misc/Blinking# make -f makefile
( /home/teqdiligent/HMI_SCADA/Toolchain/arm-cortexa8-linux-gnueabihf/bin/arm-cortexa8-linux-gnueabihf-gcc -L/home/teqdiligent/HMI_SCADA/genlogic/glg_bb/glg/lib -L/home/teqdiligent/HMI_SCADA/Phytec_Lib/freetype/wega_build_1/lib -lfreetype -L/home/teqdiligent/HMI_SCADA/Phytec_Lib/fontconfig/wega_build/lib -lfontconfig -L/home/teqdiligent/HMI_SCADA/Phytec_Lib/Xft/wega_build/lib -lXft -L/home/teqdiligent/HMI_SCADA/Phytec_Lib/jpeg/wega_build/lib -ljpeg -L/home/teqdiligent/HMI_SCADA/Phytec_Lib/X11/wega_build/lib -lX11 -L/home/teqdiligent/HMI_SCADA/Phytec_Lib/Xt/wega_build/lib -lXt -L/home/teqdiligent/HMI_SCADA/Phytec_Lib/motif/libmotif_dev/usr/lib/arm-linux-gnueabihf -lXm -L. -o GlgBlinkingExampleG GlgBlinkingExampleG.o \
  -lglg_int -lglg -lglg_map_stub \
  -lXm -lXt -lX11 \
                -lXft -lfontconfig -lfreetype -lz -ljpeg -lpng \
                 -lm -ldl -lpthread \
  || ( rm GlgBlinkingExampleG ; exit 1 ) )
/home/teqdiligent/HMI_SCADA/Toolchain/arm-cortexa8-linux-gnueabihf/bin/../lib/gcc/arm-cortexa8-linux-gnueabihf/4.7.3/../../../../arm-cortexa8-linux-gnueabihf/bin/ld: warning: libpng16.so.16, needed by /home/teqdiligent/HMI_SCADA/Phytec_Lib/freetype/wega_build_1/lib/libfreetype.so, not found (try using -rpath or -rpath-link)
/home/teqdiligent/HMI_SCADA/Toolchain/arm-cortexa8-linux-gnueabihf/bin/../lib/gcc/arm-cortexa8-linux-gnueabihf/4.7.3/../../../../arm-cortexa8-linux-gnueabihf/bin/ld: warning: libz.so.1, needed by /home/teqdiligent/HMI_SCADA/Phytec_Lib/freetype/wega_build_1/lib/libfreetype.so, not found (try using -rpath or -rpath-link)
/home/teqdiligent/HMI_SCADA/Toolchain/arm-cortexa8-linux-gnueabihf/bin/../lib/gcc/arm-cortexa8-linux-gnueabihf/4.7.3/../../../../arm-cortexa8-linux-gnueabihf/bin/ld: warning: libexpat.so.1, needed by /home/teqdiligent/HMI_SCADA/Phytec_Lib/fontconfig/wega_build/lib/libfontconfig.so, not found (try using -rpath or -rpath-link)
/home/teqdiligent/HMI_SCADA/Toolchain/arm-cortexa8-linux-gnueabihf/bin/../lib/gcc/arm-cortexa8-linux-gnueabihf/4.7.3/../../../../arm-cortexa8-linux-gnueabihf/bin/ld: warning: libuuid.so.1, needed by /home/teqdiligent/HMI_SCADA/Phytec_Lib/fontconfig/wega_build/lib/libfontconfig.so, not found (try using -rpath or -rpath-link)
/home/teqdiligent/HMI_SCADA/Toolchain/arm-cortexa8-linux-gnueabihf/bin/../lib/gcc/arm-cortexa8-linux-gnueabihf/4.7.3/../../../../arm-cortexa8-linux-gnueabihf/bin/ld: warning: libxcb.so.1, needed by /home/teqdiligent/HMI_SCADA/Phytec_Lib/X11/wega_build/lib/libX11.so, not found (try using -rpath or -rpath-link)
/home/teqdiligent/HMI_SCADA/Toolchain/arm-cortexa8-linux-gnueabihf/bin/../lib/gcc/arm-cortexa8-linux-gnueabihf/4.7.3/../../../../arm-cortexa8-linux-gnueabihf/bin/ld: warning: libXau.so.6, needed by /home/teqdiligent/HMI_SCADA/Phytec_Lib/X11/wega_build/lib/libX11.so, not found (try using -rpath or -rpath-link)
/home/teqdiligent/HMI_SCADA/Toolchain/arm-cortexa8-linux-gnueabihf/bin/../lib/gcc/arm-cortexa8-linux-gnueabihf/4.7.3/../../../../arm-cortexa8-linux-gnueabihf/bin/ld: warning: libSM.so.6, needed by /home/teqdiligent/HMI_SCADA/Phytec_Lib/Xt/wega_build/lib/libXt.so, not found (try using -rpath or -rpath-link)
/home/teqdiligent/HMI_SCADA/Toolchain/arm-cortexa8-linux-gnueabihf/bin/../lib/gcc/arm-cortexa8-linux-gnueabihf/4.7.3/../../../../arm-cortexa8-linux-gnueabihf/bin/ld: warning: libICE.so.6, needed by /home/teqdiligent/HMI_SCADA/Phytec_Lib/Xt/wega_build/lib/libXt.so, not found (try using -rpath or -rpath-link)
/home/teqdiligent/HMI_SCADA/Phytec_Lib/Xt/wega_build/lib/libXt.so: undefined reference to `SmcModifyCallbacks'
/home/teqdiligent/HMI_SCADA/Phytec_Lib/Xft/wega_build/lib/libXft.so: undefined reference to `XRenderFindVisualFormat'
/home/teqdiligent/HMI_SCADA/Phytec_Lib/freetype/wega_build_1/lib/libfreetype.so: undefined reference to `png_set_expand_gray_1_2_4_to_8@PNG16_0'
/home/teqdiligent/HMI_SCADA/Phytec_Lib/freetype/wega_build_1/lib/libfreetype.so: undefined reference to `png_read_end@PNG16_0'
/home/teqdiligent/HMI_SCADA/Phytec_Lib/X11/wega_build/lib/libX11.so: undefined reference to `xcb_connection_has_error'
/home/teqdiligent/HMI_SCADA/Phytec_Lib/freetype/wega_build_1/lib/libfreetype.so: undefined reference to `png_get_error_ptr@PNG16_0'
/home/teqdiligent/HMI_SCADA/Phytec_Lib/Xt/wega_build/lib/libXt.so: undefined reference to `SmcSaveYourselfDone'
/home/teqdiligent/HMI_SCADA/Phytec_Lib/Xft/wega_build/lib/libXft.so: undefined reference to `XRenderFindStandardFormat'
/home/teqdiligent/HMI_SCADA/Phytec_Lib/Xt/wega_build/lib/libXt.so: undefined reference to `SmcInteractRequest'
/home/teqdiligent/HMI_SCADA/Phytec_Lib/Xt/wega_build/lib/libXt.so: undefined reference to `SmcRequestSaveYourselfPhase2'
/home/teqdiligent/HMI_SCADA/Phytec_Lib/fontconfig/wega_build/lib/libfontconfig.so: undefined reference to `XML_ParserCreate'
/home/teqdiligent/HMI_SCADA/Phytec_Lib/motif/libmotif_dev/usr/lib/arm-linux-gnueabihf/libXm.so: undefined reference to `_XEditResGet8'
/home/teqdiligent/HMI_SCADA/Phytec_Lib/freetype/wega_build_1/lib/libfreetype.so: undefined reference to `png_set_gray_to_rgb@PNG16_0'
/home/teqdiligent/HMI_SCADA/Phytec_Lib/X11/wega_build/lib/libX11.so: undefined reference to `xcb_get_maximum_request_length'
/home/teqdiligent/HMI_SCADA/Phytec_Lib/Xft/wega_build/lib/libXft.so: undefined reference to `XRenderCreateGlyphSet'
/home/teqdiligent/HMI_SCADA/Phytec_Lib/fontconfig/wega_build/lib/libfontconfig.so: undefined reference to `uuid_parse'
/home/teqdiligent/HMI_SCADA/Phytec_Lib/Xft/wega_build/lib/libXft.so: undefined reference to `XRenderCreatePicture'
/home/teqdiligent/HMI_SCADA/Phytec_Lib/motif/libmotif_dev/usr/lib/arm-linux-gnueabihf/libXm.so: undefined reference to `_XEditResGetSigned16'
/home/teqdiligent/HMI_SCADA/Phytec_Lib/Xft/wega_build/lib/libXft.so: undefined reference to `XRenderSetPictureClipRectangles'
/home/teqdiligent/HMI_SCADA/Phytec_Lib/Xft/wega_build/lib/libXft.so: undefined reference to `XRenderFreePicture'
/home/teqdiligent/HMI_SCADA/Phytec_Lib/motif/libmotif_dev/usr/lib/arm-linux-gnueabihf/libXm.so: undefined reference to `XShapeQueryExtension'
/home/teqdiligent/HMI_SCADA/Phytec_Lib/freetype/wega_build_1/lib/libfreetype.so: undefined reference to `png_read_info@PNG16_0'
/home/teqdiligent/HMI_SCADA/Phytec_Lib/Xt/wega_build/lib/libXt.so: undefined reference to `SmcDeleteProperties'
/home/teqdiligent/HMI_SCADA/Phytec_Lib/Xt/wega_build/lib/libXt.so: undefined reference to `SmcCloseConnection'
/home/teqdiligent/HMI_SCADA/Phytec_Lib/Xt/wega_build/lib/libXt.so: undefined reference to `SmcGetIceConnection'
/home/teqdiligent/HMI_SCADA/Phytec_Lib/motif/libmotif_dev/usr/lib/arm-linux-gnueabihf/libXm.so: undefined reference to `_XEditResPut8'
/home/teqdiligent/HMI_SCADA/Phytec_Lib/freetype/wega_build_1/lib/libfreetype.so: undefined reference to `png_destroy_read_struct@PNG16_0'
/home/teqdiligent/HMI_SCADA/Phytec_Lib/fontconfig/wega_build/lib/libfontconfig.so: undefined reference to `XML_GetErrorCode'
/home/teqdiligent/HMI_SCADA/Phytec_Lib/Xt/wega_build/lib/libXt.so: undefined reference to `SmcOpenConnection'
/home/teqdiligent/HMI_SCADA/Phytec_Lib/fontconfig/wega_build/lib/libfontconfig.so: undefined reference to `XML_SetUserData'
/home/teqdiligent/HMI_SCADA/Phytec_Lib/Xft/wega_build/lib/libXft.so: undefined reference to `XRenderChangePicture'
/home/teqdiligent/HMI_SCADA/Phytec_Lib/fontconfig/wega_build/lib/libfontconfig.so: undefined reference to `XML_SetDoctypeDeclHandler'
/home/teqdiligent/HMI_SCADA/Phytec_Lib/Xft/wega_build/lib/libXft.so: undefined reference to `XRenderFreeGlyphs'
/home/teqdiligent/HMI_SCADA/Phytec_Lib/freetype/wega_build_1/lib/libfreetype.so: undefined reference to `png_set_read_user_transform_fn@PNG16_0'
/home/teqdiligent/HMI_SCADA/Phytec_Lib/freetype/wega_build_1/lib/libfreetype.so: undefined reference to `png_read_image@PNG16_0'
/home/teqdiligent/HMI_SCADA/Phytec_Lib/X11/wega_build/lib/libX11.so: undefined reference to `xcb_wait_for_reply64'
/home/teqdiligent/HMI_SCADA/Phytec_Lib/freetype/wega_build_1/lib/libfreetype.so: undefined reference to `png_create_read_struct@PNG16_0'
/home/teqdiligent/HMI_SCADA/Phytec_Lib/X11/wega_build/lib/libX11.so: undefined reference to `xcb_get_file_descriptor'
/home/teqdiligent/HMI_SCADA/Phytec_Lib/Xt/wega_build/lib/libXt.so: undefined reference to `SmcInteractDone'
/home/teqdiligent/HMI_SCADA/Phytec_Lib/Xft/wega_build/lib/libXft.so: undefined reference to `XRenderFillRectangle'
/home/teqdiligent/HMI_SCADA/Phytec_Lib/X11/wega_build/lib/libX11.so: undefined reference to `xcb_connect'
/home/teqdiligent/HMI_SCADA/Phytec_Lib/freetype/wega_build_1/lib/libfreetype.so: undefined reference to `png_get_IHDR@PNG16_0'
/home/teqdiligent/HMI_SCADA/Phytec_Lib/freetype/wega_build_1/lib/libfreetype.so: undefined reference to `png_read_update_info@PNG16_0'
/home/teqdiligent/HMI_SCADA/Phytec_Lib/Xft/wega_build/lib/libXft.so: undefined reference to `XRenderQuerySubpixelOrder'
/home/teqdiligent/HMI_SCADA/Phytec_Lib/freetype/wega_build_1/lib/libfreetype.so: undefined reference to `png_set_longjmp_fn@PNG16_0'
/home/teqdiligent/HMI_SCADA/Phytec_Lib/motif/libmotif_dev/usr/lib/arm-linux-gnueabihf/libXm.so: undefined reference to `_XEditResPutString8'
/home/teqdiligent/HMI_SCADA/Phytec_Lib/Xft/wega_build/lib/libXft.so: undefined reference to `XRenderSetPictureClipRegion'
/home/teqdiligent/HMI_SCADA/Phytec_Lib/motif/libmotif_dev/usr/lib/arm-linux-gnueabihf/libXm.so: undefined reference to `_XEditResGet32'
/home/teqdiligent/HMI_SCADA/Phytec_Lib/fontconfig/wega_build/lib/libfontconfig.so: undefined reference to `uuid_generate_random'
/home/teqdiligent/HMI_SCADA/Phytec_Lib/X11/wega_build/lib/libX11.so: undefined reference to `xcb_get_setup'
/home/teqdiligent/HMI_SCADA/Phytec_Lib/Xft/wega_build/lib/libXft.so: undefined reference to `XRenderCompositeString16'
/home/teqdiligent/HMI_SCADA/Phytec_Lib/fontconfig/wega_build/lib/libfontconfig.so: undefined reference to `uuid_copy'
/home/teqdiligent/HMI_SCADA/Phytec_Lib/X11/wega_build/lib/libX11.so: undefined reference to `xcb_poll_for_queued_event'
/home/teqdiligent/HMI_SCADA/Phytec_Lib/freetype/wega_build_1/lib/libfreetype.so: undefined reference to `png_get_valid@PNG16_0'
/home/teqdiligent/HMI_SCADA/Phytec_Lib/fontconfig/wega_build/lib/libfontconfig.so: undefined reference to `XML_ParseBuffer'
/home/teqdiligent/HMI_SCADA/Phytec_Lib/Xt/wega_build/lib/libXt.so: undefined reference to `IceProcessMessages'
/home/teqdiligent/HMI_SCADA/Phytec_Lib/Xft/wega_build/lib/libXft.so: undefined reference to `XRenderQueryVersion'
/home/teqdiligent/HMI_SCADA/Phytec_Lib/freetype/wega_build_1/lib/libfreetype.so: undefined reference to `png_set_read_fn@PNG16_0'
/home/teqdiligent/HMI_SCADA/Phytec_Lib/Xft/wega_build/lib/libXft.so: undefined reference to `XRenderFreeGlyphSet'
/home/teqdiligent/HMI_SCADA/Phytec_Lib/fontconfig/wega_build/lib/libfontconfig.so: undefined reference to `uuid_unparse'
/home/teqdiligent/HMI_SCADA/Phytec_Lib/X11/wega_build/lib/libX11.so: undefined reference to `xcb_wait_for_event'
/home/teqdiligent/HMI_SCADA/Phytec_Lib/Xt/wega_build/lib/libXt.so: undefined reference to `IceConnectionNumber'
/home/teqdiligent/HMI_SCADA/Phytec_Lib/fontconfig/wega_build/lib/libfontconfig.so: undefined reference to `XML_GetCurrentLineNumber'
/home/teqdiligent/HMI_SCADA/Phytec_Lib/X11/wega_build/lib/libX11.so: undefined reference to `xcb_poll_for_event'
/home/teqdiligent/HMI_SCADA/Phytec_Lib/Xft/wega_build/lib/libXft.so: undefined reference to `XRenderCompositeString8'
/home/teqdiligent/HMI_SCADA/Phytec_Lib/motif/libmotif_dev/usr/lib/arm-linux-gnueabihf/libXm.so: undefined reference to `_XEditResPut32'
/home/teqdiligent/HMI_SCADA/Phytec_Lib/motif/libmotif_dev/usr/lib/arm-linux-gnueabihf/libXm.so: undefined reference to `_XEditResResetStream'
/home/teqdiligent/HMI_SCADA/Phytec_Lib/motif/libmotif_dev/usr/lib/arm-linux-gnueabihf/libXm.so: undefined reference to `XmuNCopyISOLatin1Lowered'
/home/teqdiligent/HMI_SCADA/Phytec_Lib/motif/libmotif_dev/usr/lib/arm-linux-gnueabihf/libXm.so: undefined reference to `_XEditResPutWidgetInfo'
/home/teqdiligent/HMI_SCADA/Phytec_Lib/freetype/wega_build_1/lib/libfreetype.so: undefined reference to `png_create_info_struct@PNG16_0'
/home/teqdiligent/HMI_SCADA/Phytec_Lib/freetype/wega_build_1/lib/libfreetype.so: undefined reference to `png_set_tRNS_to_alpha@PNG16_0'
/home/teqdiligent/HMI_SCADA/Phytec_Lib/motif/libmotif_dev/usr/lib/arm-linux-gnueabihf/libXm.so: undefined reference to `png_set_longjmp_fn'
/home/teqdiligent/HMI_SCADA/Phytec_Lib/freetype/wega_build_1/lib/libfreetype.so: undefined reference to `png_set_interlace_handling@PNG16_0'
/home/teqdiligent/HMI_SCADA/Phytec_Lib/motif/libmotif_dev/usr/lib/arm-linux-gnueabihf/libXm.so: undefined reference to `XShapeCombineRectangles'
/home/teqdiligent/HMI_SCADA/Phytec_Lib/fontconfig/wega_build/lib/libfontconfig.so: undefined reference to `XML_ErrorString'
/home/teqdiligent/HMI_SCADA/Phytec_Lib/Xft/wega_build/lib/libXft.so: undefined reference to `XRenderAddGlyphs'
/home/teqdiligent/HMI_SCADA/Phytec_Lib/Xft/wega_build/lib/libXft.so: undefined reference to `XRenderFindFormat'
/home/teqdiligent/HMI_SCADA/Phytec_Lib/motif/libmotif_dev/usr/lib/arm-linux-gnueabihf/libXm.so: undefined reference to `_XEditResGetString8'
/home/teqdiligent/HMI_SCADA/Phytec_Lib/motif/libmotif_dev/usr/lib/arm-linux-gnueabihf/libXm.so: undefined reference to `XShapeCombineMask'
/home/teqdiligent/HMI_SCADA/Phytec_Lib/Xft/wega_build/lib/libXft.so: undefined reference to `XRenderCompositeText32'
/home/teqdiligent/HMI_SCADA/Phytec_Lib/freetype/wega_build_1/lib/libfreetype.so: undefined reference to `png_error@PNG16_0'
/home/teqdiligent/HMI_SCADA/Phytec_Lib/fontconfig/wega_build/lib/libfontconfig.so: undefined reference to `XML_ParserFree'
/home/teqdiligent/HMI_SCADA/Phytec_Lib/Xft/wega_build/lib/libXft.so: undefined reference to `XRenderCompositeString32'
/home/teqdiligent/HMI_SCADA/Phytec_Lib/Xft/wega_build/lib/libXft.so: undefined reference to `XRenderQueryExtension'
/home/teqdiligent/HMI_SCADA/Phytec_Lib/fontconfig/wega_build/lib/libfontconfig.so: undefined reference to `XML_SetElementHandler'
/home/teqdiligent/HMI_SCADA/Phytec_Lib/Xft/wega_build/lib/libXft.so: undefined reference to `XRenderCompositeText16'
/home/teqdiligent/HMI_SCADA/Phytec_Lib/Xft/wega_build/lib/libXft.so: undefined reference to `XRenderCompositeText8'
/home/teqdiligent/HMI_SCADA/Phytec_Lib/fontconfig/wega_build/lib/libfontconfig.so: undefined reference to `XML_GetBuffer'
/home/teqdiligent/HMI_SCADA/Phytec_Lib/Xt/wega_build/lib/libXt.so: undefined reference to `SmcClientID'
/home/teqdiligent/HMI_SCADA/Phytec_Lib/X11/wega_build/lib/libX11.so: undefined reference to `xcb_parse_display'
/home/teqdiligent/HMI_SCADA/Phytec_Lib/X11/wega_build/lib/libX11.so: undefined reference to `xcb_generate_id'
/home/teqdiligent/HMI_SCADA/Phytec_Lib/motif/libmotif_dev/usr/lib/arm-linux-gnueabihf/libXm.so: undefined reference to `_XEditResGetWidgetInfo'
/home/teqdiligent/HMI_SCADA/Phytec_Lib/freetype/wega_build_1/lib/libfreetype.so: undefined reference to `png_set_filler@PNG16_0'
/home/teqdiligent/HMI_SCADA/Phytec_Lib/X11/wega_build/lib/libX11.so: undefined reference to `xcb_disconnect'
/home/teqdiligent/HMI_SCADA/Phytec_Lib/X11/wega_build/lib/libX11.so: undefined reference to `xcb_take_socket'
/home/teqdiligent/HMI_SCADA/Phytec_Lib/X11/wega_build/lib/libX11.so: undefined reference to `xcb_poll_for_reply64'
/home/teqdiligent/HMI_SCADA/Phytec_Lib/X11/wega_build/lib/libX11.so: undefined reference to `xcb_writev'
/home/teqdiligent/HMI_SCADA/Phytec_Lib/freetype/wega_build_1/lib/libfreetype.so: undefined reference to `png_get_io_ptr@PNG16_0'
/home/teqdiligent/HMI_SCADA/Phytec_Lib/freetype/wega_build_1/lib/libfreetype.so: undefined reference to `png_set_packing@PNG16_0'
/home/teqdiligent/HMI_SCADA/Phytec_Lib/motif/libmotif_dev/usr/lib/arm-linux-gnueabihf/libXm.so: undefined reference to `_XEditResPut16'
/home/teqdiligent/HMI_SCADA/Phytec_Lib/freetype/wega_build_1/lib/libfreetype.so: undefined reference to `png_set_palette_to_rgb@PNG16_0'
/home/teqdiligent/HMI_SCADA/Phytec_Lib/fontconfig/wega_build/lib/libfontconfig.so: undefined reference to `XML_SetCharacterDataHandler'
/home/teqdiligent/HMI_SCADA/Phytec_Lib/X11/wega_build/lib/libX11.so: undefined reference to `xcb_connect_to_display_with_auth_info'
/home/teqdiligent/HMI_SCADA/Phytec_Lib/motif/libmotif_dev/usr/lib/arm-linux-gnueabihf/libXm.so: undefined reference to `_XEditResGet16'
/home/teqdiligent/HMI_SCADA/Phytec_Lib/Xt/wega_build/lib/libXt.so: undefined reference to `SmcSetProperties'
/home/teqdiligent/HMI_SCADA/Phytec_Lib/freetype/wega_build_1/lib/libfreetype.so: undefined reference to `png_set_strip_16@PNG16_0'
collect2: error: ld returned 1 exit status
rm: cannot remove ‘GlgBlinkingExampleG’: No such file or directory
make: *** [GlgBlinkingExampleG] Error 1

/*------------------------------------------------------------------------------------------------------------------*/

Revision history for this message
Manfred Hampl (m-hampl) said :
#6

It seems that you are missing some additional libraries.

If you examine the error messages, you see two different types:
... warning: libSM.so.6, needed by ... not found
and
... undefined reference to `SmcClientID'

I assume that the "undefined references" will be solved by adding all the libraries mentioned in the "needed" warnings.

(I am no expert in cross compiling, so I do not really know how to add these libraries in your situation.)

Revision history for this message
Milav Soni (milav19soni) said :
#7

hello Hampl,

Currently i face following errors. can you help me to sort out following error.

/home/teqdiligent/HMI_SCADA/Toolchain/arm-cortexa8-linux-gnueabihf/bin/../lib/gcc/arm-cortexa8-linux-gnueabihf/4.7.3/../../../../arm-cortexa8-linux-gnueabihf/bin/ld: warning: libz.so.1, needed by /home/teqdiligent/HMI_SCADA/Phytec_Lib/freetype/wega_build/lib/libfreetype.so, not found (try using -rpath or -rpath-link)
/home/teqdiligent/HMI_SCADA/Phytec_Lib/libpng/wega_build/lib/libpng16.so: undefined reference to `inflateReset2@ZLIB_1.2.3.4'
/home/teqdiligent/HMI_SCADA/Phytec_Lib/libpng/wega_build/lib/libpng16.so: undefined reference to `inflateValidate@ZLIB_1.2.

The all are error now solved , but above error is still pending.

Thank You

Revision history for this message
Manfred Hampl (m-hampl) said :
#8

You still miss a library, probably provided by the package zlib1g or zlib1g-dev.

Revision history for this message
Milav Soni (milav19soni) said :
#9

Hello Hampl,

Can you please provide me a Source file of zlib1g for cross compilation?

Thank You

Revision history for this message
Manfred Hampl (m-hampl) said :
#10
Revision history for this message
Milav Soni (milav19soni) said :
#11

Hello Hampl,

Thank you so much for your response.

I downloaded zlib1g-dev_1.2.3.4.dfsg-3ubuntu4_armhf.deb.

I want to make libz.a to libz.so.1.

are you know how to make it?

because in package lib folder i have only following elements.
1)libz.a
2)libz.so
3)pkgconfig

but when i cross build libpng than it gives following error.
/home/teqdiligent/HMI_SCADA/Phytec_Lib/zlib1g/usr/lib/arm-linux-gnueabihf/libz.a: could not read symbols: Bad value
collect2: error: ld returned 1 exit status
make[1]: *** [libpng16.la] Error 1
make[1]: Leaving directory `/home/teqdiligent/HMI_SCADA/Phytec_Lib/libpng/libpng-1.6.36'
make: *** [all] Error 2

can you please help me?

Revision history for this message
Manfred Hampl (m-hampl) said :
#12

I suggest you try with the file https://launchpad.net/ubuntu/+archive/primary/+files/zlib1g_1.2.3.4.dfsg-3ubuntu4_armhf.deb which contains libz.so.1.2.3.4 and libz.so.1 (as link to it).
Hopefully you can use it for your purposes.

As already written: I never tried cross-compiling myself and do not know any details how to do this for your board.

Revision history for this message
Milav Soni (milav19soni) said :
#13

okay Hampl,

This help is so helpful for me...thank you once again.

I downloaded it zlib1g_1.2.3.4.dfsg-3ubuntu4_armhf.deb.

But in package there is no include folder in that, so that i face error no zlib founded.

when i build libpng.

Thank you so much.

Revision history for this message
Manfred Hampl (m-hampl) said :
#14

You probably need to combine the contents of zlib1g_*.deb and zlib1g-dev_*.deb zlib1g contains the so file, zlib1g-dev the includes.

Revision history for this message
Milav Soni (milav19soni) said :
#15

sorry for disturb again,

The same procedure is done by me, but when i cross compile libpng it gives following error.

/home/teqdiligent/HMI_SCADA/Phytec_Lib/zlib1g/zlib1g_nodev/lib/arm-linux-gnueabihf/libz.a: could not read symbols: Bad value
collect2: error: ld returned 1 exit status
make[1]: *** [libpng16.la] Error 1

Revision history for this message
Manfred Hampl (m-hampl) said :
#16

Sorry. This is not an Ubuntu problem, and this goes beyond my knowledge of cross-building.

Just looking at your output:
Something seems to be wrong with libza.
Is this from the Ubuntu package, or the result of cross-compiling?

Revision history for this message
Milav Soni (milav19soni) said :
#17

it is from Ubuntu Package.

But when download the https://zlib.net/fossils/zlib-1.2.3.4.tar.gz, the error is now solved.

I get binary file of my test.c.

Thank You so much for you constant support.

it is so much helpful.

Revision history for this message
Milav Soni (milav19soni) said :
#18

Thanks Manfred Hampl, that solved my question.

Revision history for this message
Milav Soni (milav19soni) said :
#19

Hello Hampl,

When Execute Binary in Target Board..I face following error.

root@phyBOARD-WEGA-AM335x:~/phytec/GLG/Application/Blinking_1 ./GlgBlinkingExamp
leG
./GlgBlinkingExampleG: error while loading shared libraries: /usr/lib/libXm.so: unexpected reloc type 0x03

What is solution of this error?

Revision history for this message
Manfred Hampl (m-hampl) said :
#20

Just do a web search for the message, and you will find lots of hits, e.g. https://stackoverflow.com/questions/33474070/unexpected-reloc-type-0x03

Apparently some of the of the options used in compiling and linking are incompatible.
I, however, do not know how to solve the problem.

Revision history for this message
Milav Soni (milav19soni) said :
#21

Hello Hampl,

Did you know which library is missing for following error?

/home/teqdiligent/HMI_SCADA/Phytec_Lib/xauth/Xauth_Source/xauth-1.0.10/process.c:1923: undefined reference to `XSecurityQueryExtension'
/home/teqdiligent/HMI_SCADA/Phytec_Lib/xauth/Xauth_Source/xauth-1.0.10/process.c:1934: undefined reference to `XSecurityAllocXauth'
/home/teqdiligent/HMI_SCADA/Phytec_Lib/xauth/Xauth_Source/xauth-1.0.10/process.c:1946: undefined reference to `XSecurityGenerateAuthorization'
/home/teqdiligent/HMI_SCADA/Phytec_Lib/xauth/Xauth_Source/xauth-1.0.10/process.c:1970: undefined reference to `XSecurityFreeXauth'
/home/teqdiligent/HMI_SCADA/Phytec_Lib/xauth/Xauth_Source/xauth-1.0.10/process.c:1971: undefined reference to `XSecurityFreeXauth'

can you please help me?

thank you

Revision history for this message
Manfred Hampl (m-hampl) said :
#22

Just do a web search!

This is what I found:
https://refspecs.linuxfoundation.org/LSB_1.2.0/gLSB/libxext.html#FTN.STD-18-43 - probably libXext

Revision history for this message
Milav Soni (milav19soni) said :
#23

Thanks Manfred Hampl, that solved my question.

Revision history for this message
Milav Soni (milav19soni) said :
#24

Thank you so much Hampl,

The above link is helpful. i solved my error.

When i run my GUI code in my custom LCD based hardware, it gives following error.

X does not support <C> locale.
Internal Error: Can't open display <DefaultDisplay>, exiting.

can you please help me?

thank you

Revision history for this message
Manfred Hampl (m-hampl) said :
#25

Sorry, no idea, and not an Ubuntu problem.

Just some ideas:
What is the output of the command "locale -a" on the target machine?
Does setting a different LANG setting (something like "export LANG=en_US.UTF-8") help?

Revision history for this message
Milav Soni (milav19soni) said :
#26

Okay.

The output of "locale -a" is following::
-sh: locale: not found

and I set LANG variable in Target as "en_US.UTF-8" , but same error

X does not support <C> locale.
Internal Error: Can't open display <DefaultDisplay>, exiting.

Thank You

Revision history for this message
Manfred Hampl (m-hampl) said :
#27

Sorry. I cannot help further.
What operating system is this, if it does not have the "locale" command?
This is a problem that has to be discussed with somebody how knows about software on your "AM335X" Phytec Wega Board, and not here in the Ubuntu support area.

Revision history for this message
Milav Soni (milav19soni) said :
#28

okay hampl,

Thank You so much.

Yes, it is custom kernel. not all module are available.

Okay sure.

Revision history for this message
Manfred Hampl (m-hampl) said :
#29

"locale" and language settings are not part of the kernel (or kernel modules), but come with other software (e.g. on Ubuntu with the glibc package - GNU C Library).
Again: not an Ubuntu topic, but something related to the software for the Phytec Wega Board.

Revision history for this message
Milav Soni (milav19soni) said :
#30

okay hampl,

can you please help me to sort out following error?

Error:-

root@phyBOARD-WEGA-AM335x:/opt/GLG/Phytec_Lib/Xt xterm
Warning: This program is an suid-root program or is being run by the root user.
The full text of the error or warning message cannot be safely formatted
in this environment. You may get a more descriptive message by running the
program as a non-root user or by removing the suid bit on the executable.
xterm: Xt error: Can't open display: %s

When execute the xterm command than it gives above error,

Revision history for this message
Manfred Hampl (m-hampl) said :
#31

Sorry, no idea.
This is not an Ubuntu problem.
You need support for a Phytec Wega Board. You will not find it in the Ubuntu question area.

Revision history for this message
Milav Soni (milav19soni) said :
#32

Hello Hampl,

can you please help me which library is needed for following error?

make[1]: Entering directory `/home/teqdiligent/HMI_SCADA/Phytec_Lib/XOrg_Xserver/SOURCE/Xserver/xorg-server-1.20.3/randr'
  CC randr.lo
randr.c:231:21: error: unknown type name 'xRRLeaseNotifyEvent'
randr.c:232:21: error: unknown type name 'xRRLeaseNotifyEvent'
randr.c: In function 'SRRNotifyEvent':
randr.c:271:10: error: 'RRNotify_Lease' undeclared (first use in this function)
randr.c:271:10: note: each undeclared identifier is reported only once for each function it appears in
randr.c:272:9: warning: implicit declaration of function 'SRRLeaseNotifyEvent' [-Wimplicit-function-declaration]
randr.c:272:9: warning: nested extern declaration of 'SRRLeaseNotifyEvent' [-Wnested-externs]
randr.c:272:30: error: 'xRRLeaseNotifyEvent' undeclared (first use in this function)
randr.c:272:51: error: expected expression before ')' token
randr.c: In function 'TellChanged':
randr.c:563:30: error: 'RRLeaseNotifyMask' undeclared (first use in this function)
make[1]: *** [randr.lo] Error 1
make[1]: Leaving directory `/home/teqdiligent/HMI_SCADA/Phytec_Lib/XOrg_Xserver/SOURCE/Xserver/xorg-server-1.20.3/randr'
make: *** [all-recursive] Error 1

I tried randarproto, Xrandar. and link also.

but still i face same error.

Revision history for this message
Manfred Hampl (m-hampl) said :
#33

The error messages do not look like missing libraries.
A quick web search shows https://patchwork.kernel.org/patch/9705651/
It seems that it needs randrproto (or randr?) version 1.6.0 (or higher). Which version do you use?

Revision history for this message
Milav Soni (milav19soni) said :
#34

hello Hampl,

I already do this patch.
I use version 1.6.0.

Revision history for this message
Manfred Hampl (m-hampl) said :
#35

Maybe the compiler uses a wrong include directory and pulls in an older version of randrproto.h and/or randr.h

I suggest that you check with the commands

sudo updatedb
locate randr.h
locate randrproto.h

Revision history for this message
Milav Soni (milav19soni) said :
#36

HERE i have check the command.

root@ubuntu:/home/teqdiligent/HMI_SCADA/Phytec_Lib/XOrg_Xserver/SOURCE/Xserver/xorg-server-1.20.3# sudo updatedb
root@ubuntu:/home/teqdiligent/HMI_SCADA/Phytec_Lib/XOrg_Xserver/SOURCE/Xserver/xorg-server-1.20.3# locate randr.h
/home/teqdiligent/HMI_SCADA/BB_LIB/X11/extensions/Xrandr.h
/home/teqdiligent/HMI_SCADA/BB_LIB/X11/extensions/randr.h
/home/teqdiligent/HMI_SCADA/Phytec_Image_Backup/Rootfs/home/phytec/GLG/Phytec_Lib/xcb/libxcb-1.13.1/src/randr.h
/home/teqdiligent/HMI_SCADA/Phytec_Image_Backup/Rootfs/home/phytec/GLG/Phytec_Lib/xcb/wega_build_13/include/xcb/randr.h
/home/teqdiligent/HMI_SCADA/Phytec_Lib/XOrg_Xserver/SOURCE/lib_needed/Xrandr/libXrandr-1.5.1/include/X11/extensions/Xrandr.h
/home/teqdiligent/HMI_SCADA/Phytec_Lib/XOrg_Xserver/SOURCE/lib_needed/Xrandr/wega_build/include/X11/extensions/Xrandr.h
/home/teqdiligent/HMI_SCADA/Phytec_Lib/XOrg_Xserver/SOURCE/lib_needed/proto/UPDATED_SOURCE/wega_build/include/X11/extensions/randr.h
/home/teqdiligent/HMI_SCADA/Phytec_Lib/XOrg_Xserver/SOURCE/lib_needed/proto/UPDATED_SOURCE/xorgproto-debian-unstable/include/X11/extensions/randr.h
/home/teqdiligent/HMI_SCADA/Phytec_Lib/XOrg_Xserver/SOURCE/lib_needed/proto/randrproto/randrproto-1.5.0/randr.h
/home/teqdiligent/HMI_SCADA/Phytec_Lib/XOrg_Xserver/SOURCE/lib_needed/proto/randrproto/wega_build/include/X11/extensions/randr.h
/home/teqdiligent/HMI_SCADA/Phytec_Lib/XOrg_Xserver/SOURCE/lib_needed/proto/xorgproto/wega_build/include/X11/extensions/randr.h
/home/teqdiligent/HMI_SCADA/Phytec_Lib/XOrg_Xserver/SOURCE/lib_needed/proto/xorgproto/xorgproto-2018.4/include/X11/extensions/randr.h
/home/teqdiligent/HMI_SCADA/Phytec_Lib/XOrg_Xserver/xserver-xorg/usr/share/doc/xorg/howto/use-xrandr.html
/home/teqdiligent/HMI_SCADA/Phytec_Lib/xcb/libxcb-1.13.1/src/randr.h
/home/teqdiligent/HMI_SCADA/Phytec_Lib/xcb/wega_build_13/include/xcb/randr.h
/usr/include/xcb/randr.h
/usr/local/include/xcb/randr.h
root@ubuntu:/home/teqdiligent/HMI_SCADA/Phytec_Lib/XOrg_Xserver/SOURCE/Xserver/xorg-server-1.20.3# locate randrproto.h
/home/teqdiligent/HMI_SCADA/BB_LIB/X11/extensions/randrproto.h
/home/teqdiligent/HMI_SCADA/Phytec_Lib/XOrg_Xserver/SOURCE/lib_needed/proto/UPDATED_SOURCE/wega_build/include/X11/extensions/randrproto.h
/home/teqdiligent/HMI_SCADA/Phytec_Lib/XOrg_Xserver/SOURCE/lib_needed/proto/UPDATED_SOURCE/xorgproto-debian-unstable/include/X11/extensions/randrproto.h
/home/teqdiligent/HMI_SCADA/Phytec_Lib/XOrg_Xserver/SOURCE/lib_needed/proto/randrproto/randrproto-1.5.0/randrproto.h
/home/teqdiligent/HMI_SCADA/Phytec_Lib/XOrg_Xserver/SOURCE/lib_needed/proto/randrproto/wega_build/include/X11/extensions/randrproto.h
/home/teqdiligent/HMI_SCADA/Phytec_Lib/XOrg_Xserver/SOURCE/lib_needed/proto/xorgproto/wega_build/include/X11/extensions/randrproto.h
/home/teqdiligent/HMI_SCADA/Phytec_Lib/XOrg_Xserver/SOURCE/lib_needed/proto/xorgproto/xorgproto-2018.4/include/X11/extensions/randrproto.h
root@ubuntu:/home/teqdiligent/HMI_SCADA/Phytec_Lib/XOrg_Xserver/SOURCE/Xserver/xorg-server-1.20.3#

Revision history for this message
Manfred Hampl (m-hampl) said :
#37

There are several different versions of the header files, and my suspicion is that during compilation the wrong ones (with version 1.5) are used.
This is something that you have to check and verify yourself.

Revision history for this message
Milav Soni (milav19soni) said :
#38

hello,

I want to run Xserver and start X window System in arm based board.

When I run the command $Xorg It gives following error,

[ 3136.173] (EE) open /dev/dri/card0: No such file or directory
[ 3136.893] (II) config/udev: Adding input device ti-tsc (/dev/input/mouse0)
[ 3136.893] (II) No input driver specified, ignoring this device.
[ 3136.893] (II) This device may have been added with another device file.
[ 3150.895] (II) UnloadModule: "libinput"
[ 3150.977] (II) Server terminated successfully (0). Closing log file.

When I run the command $Xorg -configure to generatr xorg.conf file it gives following error,

[ 3912.477] (WW) Falling back to old probe method for dummy
[ 3912.477] (WW) Falling back to old probe method for modesetting
[ 3912.477] (WW) Falling back to old probe method for fbdev
[ 3912.477] No devices to configure. Configuration failed.
[ 3912.477] (EE) Server terminated with error (2). Closing log file.

can you please tell me what is the solution of this error?

I want to start xserver and run x window system in arm based target board.

can you tell me a proper step to achieve this?

Revision history for this message
Manfred Hampl (m-hampl) said :
#39

This is related to the programs running on your arm board and has absolutely no relationship to Ubuntu.
We cannot help.

Remark: On Ubuntu systems Xorg usually is not started manually but by xinit which in turn is started by startx. I do not know how the operating system of your arm board has been configured in that aspect.

Can you help with this problem?

Provide an answer of your own, or ask Milav Soni for more information if necessary.

To post a message you must log in.