All of lore.kernel.org
 help / color / mirror / Atom feed
* [LTP] LTP cross compilation
@ 2009-05-17 19:39 Hichem Boussetta
  2009-05-18  8:14 ` Hichem Boussetta
  0 siblings, 1 reply; 5+ messages in thread
From: Hichem Boussetta @ 2009-05-17 19:39 UTC (permalink / raw)
  To: ltp-list


[-- Attachment #1.1.1: Type: text/plain, Size: 1610 bytes --]

Hi all,

It is the first time that I use ltp and I am having some troubles trying 
to cross compile it.
I have seen a cross compilation example in the installation manual. It 
is about cross compiling for a powerpc processor.

CROSS_COMPILER=/opt/ppc64/powerpc64-linux/bin/powerpc64-linux-
CROSS_CFLAGS= -mpowerpc64
LDFLAGS=-static
LOADLIBES=-lpthread -lc -lresolv -lnss_dns -lnss_files -lm -lc
LIB_DIR=/lib64
export LOADLIBES LIB_DIR

In my case, I a compiling for an arm processor. I tried to do the same 
by the specifying the toolchain prefix, the CC, LD, AR and the LIB_DIR. 
But, I get always this error when cross compiling :

getdelays.c: In function 'print_delayacct':
getdelays.c:215: error: 'struct taskstats' has no member named 
'freepages_count'
getdelays.c:216: error: 'struct taskstats' has no member named 
'freepages_delay_total'
make[5]: *** [getdelays] Erreur 1

In fact, I omitted the libraries nss_dns and lnss_files since didn't 
find them in the lib directories of my toolchain. I am not sure about 
that, but I don't think the problem is related to this libraries since 
they do not exist in my host machine either, and here, the compilation 
of ltp worked well. Perhaps, the problem is due to the fact that I 
didn't put any option in the CROSS_CFLAGS since I found nowhere how to 
get this information.

If someone knows any thing about this or succeeded to cross compile ltp, 
it would be really nice if he could tell me, because I am really stuck 
now :-)

Thanks,

-- 
Hichem BOUSSETTA
Elève ingénieur
Ecole Polytechnique de Tunisie



[-- Attachment #1.1.2: boussettahichem.vcf --]
[-- Type: text/x-vcard, Size: 366 bytes --]

begin:vcard
fn:Hichem
n:Boussetta;Hichem
org;quoted-printable:Ecole Polytechnique de Tunisie;Signaux et syst=C3=A8mes
adr:;;;La marsa;Tunis;2078;Tunisie
email;internet:boussettahichem@yahoo.fr
title;quoted-printable:El=C3=A8ve ing=C3=A9nieur
tel;cell:(+216) 21 149 549
note:Date de naissance : 17-04-1986
url:http://hichem.boussetta.netcv.fr/
version:2.1
end:vcard


[-- Attachment #1.2: S/MIME Cryptographic Signature --]
[-- Type: application/x-pkcs7-signature, Size: 3278 bytes --]

[-- Attachment #2: Type: text/plain, Size: 334 bytes --]

------------------------------------------------------------------------------
Crystal Reports - New Free Runtime and 30 Day Trial
Check out the new simplified licensing option that enables 
unlimited royalty-free distribution of the report engine 
for externally facing server and web deployment. 
http://p.sf.net/sfu/businessobjects

[-- Attachment #3: Type: text/plain, Size: 155 bytes --]

_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [LTP] LTP cross compilation
  2009-05-17 19:39 [LTP] LTP cross compilation Hichem Boussetta
@ 2009-05-18  8:14 ` Hichem Boussetta
  2009-05-29 11:55   ` Garrett Cooper
  0 siblings, 1 reply; 5+ messages in thread
From: Hichem Boussetta @ 2009-05-18  8:14 UTC (permalink / raw)
  To: Hichem Boussetta; +Cc: ltp-list


[-- Attachment #1.1.1: Type: text/plain, Size: 2902 bytes --]

Hichem Boussetta a écrit :
> Hi all,
>
> It is the first time that I use ltp and I am having some troubles 
> trying to cross compile it.
> I have seen a cross compilation example in the installation manual. It 
> is about cross compiling for a powerpc processor.
>
> CROSS_COMPILER=/opt/ppc64/powerpc64-linux/bin/powerpc64-linux-
> CROSS_CFLAGS= -mpowerpc64
> LDFLAGS=-static
> LOADLIBES=-lpthread -lc -lresolv -lnss_dns -lnss_files -lm -lc
> LIB_DIR=/lib64
> export LOADLIBES LIB_DIR
>
> In my case, I a compiling for an arm processor. I tried to do the same 
> by the specifying the toolchain prefix, the CC, LD, AR and the 
> LIB_DIR. But, I get always this error when cross compiling :
>
> getdelays.c: In function 'print_delayacct':
> getdelays.c:215: error: 'struct taskstats' has no member named 
> 'freepages_count'
> getdelays.c:216: error: 'struct taskstats' has no member named 
> 'freepages_delay_total'
> make[5]: *** [getdelays] Erreur 1
>
> In fact, I omitted the libraries nss_dns and lnss_files since didn't 
> find them in the lib directories of my toolchain. I am not sure about 
> that, but I don't think the problem is related to this libraries since 
> they do not exist in my host machine either, and here, the compilation 
> of ltp worked well. Perhaps, the problem is due to the fact that I 
> didn't put any option in the CROSS_CFLAGS since I found nowhere how to 
> get this information.
>
> If someone knows any thing about this or succeeded to cross compile 
> ltp, it would be really nice if he could tell me, because I am really 
> stuck now :-)
>
> Thanks,
>
Hi all,

I think that I've figured out how to configure LTP for cross
compilation. In fact, we need to put the right parameters during the
configuration. We should append the cross toolchain's bin directory to
the path and add --host=$(toolchain_prefix) to the configure script. By
doing that, ltp succeds to find out the binary utilities that it should
use (gcc, ld ,ar, ranlib, ...). We should also specify the path to the
include and lib directory of the toolchain we are using by setting the
variables CPPFLAGS and LDFLAGS. However, I still get a compilation error
that I think it is related to the fact that some libraries are missing
(signalfd for example). The message I receive is this :

getdelays.c: In function 'print_delayacct':
getdelays.c:215: error: 'struct taskstats' has no member named
'freepages_count'
getdelays.c:216: error: 'struct taskstats' has no member named
'freepages_delay_total'

Does anyone know how to overcome this problem or does this mean that it
is not possible to cross compile LTP ? In fact, the crosstoolchains I am
using are generated using crosstool-ng. So, I don't think that the
problem is due to the toolchain.

Regards,

-- 
Hichem BOUSSETTA
Elève ingénieur
Ecole Polytechnique de Tunisie




[-- Attachment #1.1.2: boussettahichem.vcf --]
[-- Type: text/x-vcard, Size: 366 bytes --]

begin:vcard
fn:Hichem
n:Boussetta;Hichem
org;quoted-printable:Ecole Polytechnique de Tunisie;Signaux et syst=C3=A8mes
adr:;;;La marsa;Tunis;2078;Tunisie
email;internet:boussettahichem@yahoo.fr
title;quoted-printable:El=C3=A8ve ing=C3=A9nieur
tel;cell:(+216) 21 149 549
note:Date de naissance : 17-04-1986
url:http://hichem.boussetta.netcv.fr/
version:2.1
end:vcard


[-- Attachment #1.2: S/MIME Cryptographic Signature --]
[-- Type: application/x-pkcs7-signature, Size: 3278 bytes --]

[-- Attachment #2: Type: text/plain, Size: 334 bytes --]

------------------------------------------------------------------------------
Crystal Reports - New Free Runtime and 30 Day Trial
Check out the new simplified licensing option that enables 
unlimited royalty-free distribution of the report engine 
for externally facing server and web deployment. 
http://p.sf.net/sfu/businessobjects

[-- Attachment #3: Type: text/plain, Size: 155 bytes --]

_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [LTP] LTP cross compilation
  2009-05-18  8:14 ` Hichem Boussetta
@ 2009-05-29 11:55   ` Garrett Cooper
  0 siblings, 0 replies; 5+ messages in thread
From: Garrett Cooper @ 2009-05-29 11:55 UTC (permalink / raw)
  To: Hichem Boussetta; +Cc: ltp-list

On Mon, May 18, 2009 at 1:14 AM, Hichem Boussetta
<boussettahichem@yahoo.fr> wrote:
> Hichem Boussetta a écrit :
>>
>> Hi all,
>>
>> It is the first time that I use ltp and I am having some troubles trying
>> to cross compile it.
>> I have seen a cross compilation example in the installation manual. It is
>> about cross compiling for a powerpc processor.
>>
>> CROSS_COMPILER=/opt/ppc64/powerpc64-linux/bin/powerpc64-linux-
>> CROSS_CFLAGS= -mpowerpc64
>> LDFLAGS=-static
>> LOADLIBES=-lpthread -lc -lresolv -lnss_dns -lnss_files -lm -lc
>> LIB_DIR=/lib64
>> export LOADLIBES LIB_DIR
>>
>> In my case, I a compiling for an arm processor. I tried to do the same by
>> the specifying the toolchain prefix, the CC, LD, AR and the LIB_DIR. But, I
>> get always this error when cross compiling :
>>
>> getdelays.c: In function 'print_delayacct':
>> getdelays.c:215: error: 'struct taskstats' has no member named
>> 'freepages_count'
>> getdelays.c:216: error: 'struct taskstats' has no member named
>> 'freepages_delay_total'
>> make[5]: *** [getdelays] Erreur 1
>>
>> In fact, I omitted the libraries nss_dns and lnss_files since didn't find
>> them in the lib directories of my toolchain. I am not sure about that, but I
>> don't think the problem is related to this libraries since they do not exist
>> in my host machine either, and here, the compilation of ltp worked well.
>> Perhaps, the problem is due to the fact that I didn't put any option in the
>> CROSS_CFLAGS since I found nowhere how to get this information.
>>
>> If someone knows any thing about this or succeeded to cross compile ltp,
>> it would be really nice if he could tell me, because I am really stuck now
>> :-)
>>
>> Thanks,
>>
> Hi all,
>
> I think that I've figured out how to configure LTP for cross
> compilation. In fact, we need to put the right parameters during the
> configuration. We should append the cross toolchain's bin directory to
> the path and add --host=$(toolchain_prefix) to the configure script. By
> doing that, ltp succeds to find out the binary utilities that it should
> use (gcc, ld ,ar, ranlib, ...). We should also specify the path to the
> include and lib directory of the toolchain we are using by setting the
> variables CPPFLAGS and LDFLAGS. However, I still get a compilation error
> that I think it is related to the fact that some libraries are missing
> (signalfd for example). The message I receive is this :
>
> getdelays.c: In function 'print_delayacct':
> getdelays.c:215: error: 'struct taskstats' has no member named
> 'freepages_count'
> getdelays.c:216: error: 'struct taskstats' has no member named
> 'freepages_delay_total'
>
> Does anyone know how to overcome this problem or does this mean that it
> is not possible to cross compile LTP ? In fact, the crosstoolchains I am
> using are generated using crosstool-ng. So, I don't think that the
> problem is due to the toolchain.

Your code may be mismatched with the testcode which means the autoconf
stuff needs to be fixed.
-Garrett

------------------------------------------------------------------------------
Register Now for Creativity and Technology (CaT), June 3rd, NYC. CaT 
is a gathering of tech-side developers & brand creativity professionals. Meet
the minds behind Google Creative Lab, Visual Complexity, Processing, & 
iPhoneDevCamp as they present alongside digital heavyweights like Barbarian 
Group, R/GA, & Big Spaceship. http://p.sf.net/sfu/creativitycat-com 
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [LTP] LTP cross compilation
  2015-09-23  7:13 kamal p
@ 2015-09-24  2:43 ` $rik
  0 siblings, 0 replies; 5+ messages in thread
From: $rik @ 2015-09-24  2:43 UTC (permalink / raw)
  To: ltp

>arm-none-linux-gnueabi-gcc: unrecognized option '-static-lpthread'

provide a space between -static and -lpthread. If you are making
bionic changes to LTP, then make it to pthread.

On Wed, Sep 23, 2015 at 12:43 PM, kamal p <pkamalbhaskar@gmail.com> wrote:
> Hi,
>
>    when I cross compiling the LTP i've faced an issue ,which is related to
> linking error such as undefined reference to 'pthread_mutex_lock'. In
> additon to './configure' i've given CFLAGS="-static"
> LDFLAGS="-static-pthread" ..Is these was the correct? If no, please tell me
> how will I cross compile LTP with relevent and clear procedure.
>
>      Error which I got is as follows:
>       make -C "lib" \
>         -f "/home/kamal/Desktop/CrossCom_ltp/ltp-full-20150903/lib/Makefile"
> all
> make[1]: Entering directory
> `/home/kamal/Desktop/CrossCom_ltp/ltp-full-20150903/lib'
> make[2]: Entering directory
> `/home/kamal/Desktop/CrossCom_ltp/ltp-full-20150903/lib/tests'
> arm-none-linux-gnueabi-gcc -static -g -O2 -fno-strict-aliasing -pipe -Wall
> -W -static -Wold-style-definition -W  -I../../include -I../../include
> -static-lpthread  -L../../lib  trerrno.c   -lltp -o trerrno
> arm-none-linux-gnueabi-gcc: unrecognized option '-static-lpthread'
> ../../lib/libltp.a(safe_macros.o): In function `safe_getpwnam':
> /home/kamal/Desktop/CrossCom_ltp/ltp-full-20150903/lib/safe_macros.c:118:
> warning: Using 'getpwnam' in statically linked applications requires at
> runtime the shared libraries from the glibc version used for linking
> ../../lib/libltp.a(tst_res.o): In function `tst_environ':
> /home/kamal/Desktop/CrossCom_ltp/ltp-full-20150903/lib/tst_res.c:587:
> undefined reference to `pthread_mutex_lock'
> /home/kamal/Desktop/CrossCom_ltp/ltp-full-20150903/lib/tst_res.c:592:
> undefined reference to `pthread_mutex_unlock'
>
> Regards,
> Kamal bhaskar
>
>
>
> --
> Mailing list info: http://lists.linux.it/listinfo/ltp
>



-- 
Thanks & Regards,
M.Srikanth Kumar.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [LTP] LTP cross compilation
@ 2015-09-23  7:13 kamal p
  2015-09-24  2:43 ` $rik
  0 siblings, 1 reply; 5+ messages in thread
From: kamal p @ 2015-09-23  7:13 UTC (permalink / raw)
  To: ltp

Hi,

   when I cross compiling the LTP i've faced an issue ,which is related to
linking error such as undefined reference to 'pthread_mutex_lock'. In
additon to './configure' i've given CFLAGS="-static"
LDFLAGS="-static-pthread" ..Is these was the correct? If no, please tell me
how will I cross compile LTP with relevent and clear procedure.

     Error which I got is as follows:
      make -C "lib" \
        -f
"/home/kamal/Desktop/CrossCom_ltp/ltp-full-20150903/lib/Makefile" all
make[1]: Entering directory
`/home/kamal/Desktop/CrossCom_ltp/ltp-full-20150903/lib'
make[2]: Entering directory
`/home/kamal/Desktop/CrossCom_ltp/ltp-full-20150903/lib/tests'
arm-none-linux-gnueabi-gcc -static -g -O2 -fno-strict-aliasing -pipe -Wall
-W -static -Wold-style-definition -W  -I../../include -I../../include
-static-lpthread  -L../../lib  trerrno.c   -lltp -o trerrno
arm-none-linux-gnueabi-gcc: unrecognized option '-static-lpthread'
../../lib/libltp.a(safe_macros.o): In function `safe_getpwnam':
/home/kamal/Desktop/CrossCom_ltp/ltp-full-20150903/lib/safe_macros.c:118:
warning: Using 'getpwnam' in statically linked applications requires at
runtime the shared libraries from the glibc version used for linking
../../lib/libltp.a(tst_res.o): In function `tst_environ':
/home/kamal/Desktop/CrossCom_ltp/ltp-full-20150903/lib/tst_res.c:587:
undefined reference to `pthread_mutex_lock'
/home/kamal/Desktop/CrossCom_ltp/ltp-full-20150903/lib/tst_res.c:592:
undefined reference to `pthread_mutex_unlock'

Regards,
Kamal bhaskar
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.linux.it/pipermail/ltp/attachments/20150923/038809c7/attachment.html>

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2015-09-24  2:43 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-05-17 19:39 [LTP] LTP cross compilation Hichem Boussetta
2009-05-18  8:14 ` Hichem Boussetta
2009-05-29 11:55   ` Garrett Cooper
2015-09-23  7:13 kamal p
2015-09-24  2:43 ` $rik

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.