makestrs: cannot execute binary file: Exec format error
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_
$ . autogen.sh -C --prefix=
When I run "make V=1" i face following error.
.......
.......
make[1]: Entering directory `/home/
Making all in Xm
make[2]: Entering directory `/home/
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/
/bin/bash: ../../config/
make[2]: *** [XmStrDefs.h] Error 126
make[2]: Leaving directory `/home/
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/
make: *** [all-recursive] Error 1
root@ubuntu:
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:
Revision history for this message
|
#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-
on the machine on which you are trying to compile, and on the target machine?
Revision history for this message
|
#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=
But in ready made packages i did not know what is the path of "Xm_CFLAGS" and ")Xm_LIBS".
please suggest me.
/*-----
---In Build Machine (PC)
root@ubuntu:
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:
Distributor ID: Ubuntu
Description: Ubuntu 14.04.4 LTS
Release: 14.04
Codename: trusty
root@ubuntu:
amd64
root@ubuntu:
/*-----
---In Target Machine (Phytec Wega Board)
root@phyBOARD-
Linux phyBOARD-
root@phyBOARD-
-sh: lsb_release: not found
root@phyBOARD-
-sh: dpkg: not found
root@phyBOARD-
Thank You Once again
Revision history for this message
|
#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
|
#4 |
Hello, Hampl
when i cross-compiling Test.c using "arm-cortexa8-
"/../..
Thank you.
Revision history for this message
|
#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-
$arm-cortexa8-
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/teqdilige
-lglg_int -lglg -lglg_map_stub \
-lXm -lXt -lX11 \
|| ( rm GlgBlinkingExampleG ; exit 1 ) )
/home/teqdilige
/home/teqdilige
/home/teqdilige
/home/teqdilige
/home/teqdilige
/home/teqdilige
/home/teqdilige
/home/teqdilige
/home/teqdilige
/home/teqdilige
/home/teqdilige
/home/teqdilige
/home/teqdilige
/home/teqdilige
/home/teqdilige
/home/teqdilige
/home/teqdilige
/home/teqdilige
/home/teqdilige
/home/teqdilige
/home/teqdilige
/home/teqdilige
/home/teqdilige
/home/teqdilige
/home/teqdilige
/home/teqdilige
/home/teqdilige
/home/teqdilige
/home/teqdilige
/home/teqdilige
/home/teqdilige
/home/teqdilige
/home/teqdilige
/home/teqdilige
/home/teqdilige
/home/teqdilige
/home/teqdilige
/home/teqdilige
/home/teqdilige
/home/teqdilige
/home/teqdilige
/home/teqdilige
/home/teqdilige
/home/teqdilige
/home/teqdilige
/home/teqdilige
/home/teqdilige
/home/teqdilige
/home/teqdilige
/home/teqdilige
/home/teqdilige
/home/teqdilige
/home/teqdilige
/home/teqdilige
/home/teqdilige
/home/teqdilige
/home/teqdilige
/home/teqdilige
/home/teqdilige
/home/teqdilige
/home/teqdilige
/home/teqdilige
/home/teqdilige
/home/teqdilige
/home/teqdilige
/home/teqdilige
/home/teqdilige
/home/teqdilige
/home/teqdilige
/home/teqdilige
/home/teqdilige
/home/teqdilige
/home/teqdilige
/home/teqdilige
/home/teqdilige
/home/teqdilige
/home/teqdilige
/home/teqdilige
/home/teqdilige
/home/teqdilige
/home/teqdilige
/home/teqdilige
/home/teqdilige
/home/teqdilige
/home/teqdilige
/home/teqdilige
/home/teqdilige
/home/teqdilige
/home/teqdilige
/home/teqdilige
/home/teqdilige
/home/teqdilige
/home/teqdilige
/home/teqdilige
/home/teqdilige
/home/teqdilige
/home/teqdilige
/home/teqdilige
/home/teqdilige
/home/teqdilige
/home/teqdilige
/home/teqdilige
/home/teqdilige
/home/teqdilige
/home/teqdilige
/home/teqdilige
/home/teqdilige
/home/teqdilige
/home/teqdilige
/home/teqdilige
/home/teqdilige
/home/teqdilige
/home/teqdilige
/home/teqdilige
collect2: error: ld returned 1 exit status
rm: cannot remove ‘GlgBlinkingExa
make: *** [GlgBlinkingExa
/*-----
Revision history for this message
|
#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
|
#7 |
hello Hampl,
Currently i face following errors. can you help me to sort out following error.
/home/teqdilige
/home/teqdilige
/home/teqdilige
The all are error now solved , but above error is still pending.
Thank You
Revision history for this message
|
#8 |
You still miss a library, probably provided by the package zlib1g or zlib1g-dev.
Revision history for this message
|
#9 |
Hello Hampl,
Can you please provide me a Source file of zlib1g for cross compilation?
Thank You
Revision history for this message
|
#10 |
Revision history for this message
|
#11 |
Hello Hampl,
Thank you so much for your response.
I downloaded zlib1g-
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/teqdilige
collect2: error: ld returned 1 exit status
make[1]: *** [libpng16.la] Error 1
make[1]: Leaving directory `/home/
make: *** [all] Error 2
can you please help me?
Revision history for this message
|
#12 |
I suggest you try with the file https:/
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
|
#13 |
okay Hampl,
This help is so helpful for me...thank you once again.
I downloaded it zlib1g_
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
|
#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
|
#15 |
sorry for disturb again,
The same procedure is done by me, but when i cross compile libpng it gives following error.
/home/teqdilige
collect2: error: ld returned 1 exit status
make[1]: *** [libpng16.la] Error 1
Revision history for this message
|
#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
|
#17 |
it is from Ubuntu Package.
But when download the https:/
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
|
#18 |
Thanks Manfred Hampl, that solved my question.
Revision history for this message
|
#19 |
Hello Hampl,
When Execute Binary in Target Board..I face following error.
root@phyBOARD-
leG
./GlgBlinkingEx
What is solution of this error?
Revision history for this message
|
#20 |
Just do a web search for the message, and you will find lots of hits, e.g. https:/
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
|
#21 |
Hello Hampl,
Did you know which library is missing for following error?
/home/teqdilige
/home/teqdilige
/home/teqdilige
/home/teqdilige
/home/teqdilige
can you please help me?
thank you
Revision history for this message
|
#22 |
Just do a web search!
This is what I found:
https:/
Revision history for this message
|
#23 |
Thanks Manfred Hampl, that solved my question.
Revision history for this message
|
#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
|
#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
|
#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
|
#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
|
#28 |
okay hampl,
Thank You so much.
Yes, it is custom kernel. not all module are available.
Okay sure.
Revision history for this message
|
#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
|
#30 |
okay hampl,
can you please help me to sort out following error?
Error:-
root@phyBOARD-
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
|
#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
|
#32 |
Hello Hampl,
can you please help me which library is needed for following error?
make[1]: Entering directory `/home/
CC randr.lo
randr.c:231:21: error: unknown type name 'xRRLeaseNotify
randr.c:232:21: error: unknown type name 'xRRLeaseNotify
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 'SRRLeaseNotify
randr.c:272:9: warning: nested extern declaration of 'SRRLeaseNotify
randr.c:272:30: error: 'xRRLeaseNotify
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/
make: *** [all-recursive] Error 1
I tried randarproto, Xrandar. and link also.
but still i face same error.
Revision history for this message
|
#33 |
The error messages do not look like missing libraries.
A quick web search shows https:/
It seems that it needs randrproto (or randr?) version 1.6.0 (or higher). Which version do you use?
Revision history for this message
|
#34 |
hello Hampl,
I already do this patch.
I use version 1.6.0.
Revision history for this message
|
#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
|
#36 |
HERE i have check the command.
root@ubuntu:
root@ubuntu:
/home/teqdilige
/home/teqdilige
/home/teqdilige
/home/teqdilige
/home/teqdilige
/home/teqdilige
/home/teqdilige
/home/teqdilige
/home/teqdilige
/home/teqdilige
/home/teqdilige
/home/teqdilige
/home/teqdilige
/home/teqdilige
/home/teqdilige
/usr/include/
/usr/local/
root@ubuntu:
/home/teqdilige
/home/teqdilige
/home/teqdilige
/home/teqdilige
/home/teqdilige
/home/teqdilige
/home/teqdilige
root@ubuntu:
Revision history for this message
|
#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
|
#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
|
#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.