All of lore.kernel.org
 help / color / mirror / Atom feed
* [Xenomai-help] problem compiling for user space
@ 2007-05-25  8:58 Rodolfo Bamberg
  2007-05-25  9:06 ` Gilles Chanteperdrix
  0 siblings, 1 reply; 8+ messages in thread
From: Rodolfo Bamberg @ 2007-05-25  8:58 UTC (permalink / raw)
  To: Xenomai help

I am trying to cross-compile for i386 a user-space xenomai RT binary, I
installed xenomai in the root file system of the target with the
--build=i386-linux-uclibc option to cross compile for the target. 

Here's the relevant makefile part of the program I'm trying to compile:

XENOMAI_INCLUDE_DIR_USP    :=/tftpboot/192.168.0.2/include
XENOMAI_INCLUDE_LIB_USP :=/tftpboot/192.168.0.2/lib

user:
    i386-linux-uclibc-gcc -I$(XENOMAI_INCLUDE_DIR_USP)
-L$(XENOMAI_INCLUDE_LIB_USP) -lnative -o rt_process_user rt_process_user.c
    chmod a+x rt_process_user

and here the error:

 # make user
i386-linux-uclibc-gcc -I/tftpboot/192.168.0.2/include
-L/tftpboot/192.168.0.2/lib -lnative -o rt_process_user rt_process_user.c
rt_process_user.c: In function 'latency_init':
rt_process_user.c:115: warning: passing argument 2 of 'rt_task_start'
from incompatible pointer type
/home/rodolfo/buildroot-2/build_i386/staging_dir/lib/gcc/i386-linux-uclibc/4.1.2/../../../../i386-linux-uclibc/bin/ld:
warning: libc.so.6, needed by /tftpboot/192.168.0.2/lib/libnative.so,
not found (try using -rpath or -rpath-link)
/tftpboot/192.168.0.2/lib/libnative.so: undefined reference to
`free@domain.hid'........

does anyone know why it needs libc.so.6? thanks!



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

* Re: [Xenomai-help] problem compiling for user space
  2007-05-25  8:58 [Xenomai-help] problem compiling for user space Rodolfo Bamberg
@ 2007-05-25  9:06 ` Gilles Chanteperdrix
  2007-05-25  9:13   ` Rodolfo Bamberg
       [not found]   ` <4656A7FA.9000408@domain.hid>
  0 siblings, 2 replies; 8+ messages in thread
From: Gilles Chanteperdrix @ 2007-05-25  9:06 UTC (permalink / raw)
  To: Rodolfo Bamberg; +Cc: Xenomai help

Rodolfo Bamberg wrote:
> I am trying to cross-compile for i386 a user-space xenomai RT binary, I
> installed xenomai in the root file system of the target with the
> --build=i386-linux-uclibc option to cross compile for the target. 
> 
> Here's the relevant makefile part of the program I'm trying to compile:
> 
> XENOMAI_INCLUDE_DIR_USP    :=/tftpboot/192.168.0.2/include
> XENOMAI_INCLUDE_LIB_USP :=/tftpboot/192.168.0.2/lib
> 
> user:
>     i386-linux-uclibc-gcc -I$(XENOMAI_INCLUDE_DIR_USP)
> -L$(XENOMAI_INCLUDE_LIB_USP) -lnative -o rt_process_user rt_process_user.c
>     chmod a+x rt_process_user
> 
> and here the error:
> 
>  # make user
> i386-linux-uclibc-gcc -I/tftpboot/192.168.0.2/include
> -L/tftpboot/192.168.0.2/lib -lnative -o rt_process_user rt_process_user.c
> rt_process_user.c: In function 'latency_init':
> rt_process_user.c:115: warning: passing argument 2 of 'rt_task_start'
> from incompatible pointer type
> /home/rodolfo/buildroot-2/build_i386/staging_dir/lib/gcc/i386-linux-uclibc/4.1.2/../../../../i386-linux-uclibc/bin/ld:
> warning: libc.so.6, needed by /tftpboot/192.168.0.2/lib/libnative.so,
> not found (try using -rpath or -rpath-link)
> /tftpboot/192.168.0.2/lib/libnative.so: undefined reference to
> `free@domain.hid'........
> 
> does anyone know why it needs libc.so.6? thanks!

Well, it is pretty obvious from the error message you show us:
libnative.so uses free and is linked with glibc. If you want to compile
your applications with i386-linux-uclibc, you should compile Xenomai
with the same compiler.

-- 
                                                 Gilles Chanteperdrix


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

* Re: [Xenomai-help] problem compiling for user space
  2007-05-25  9:06 ` Gilles Chanteperdrix
@ 2007-05-25  9:13   ` Rodolfo Bamberg
       [not found]   ` <4656A7FA.9000408@domain.hid>
  1 sibling, 0 replies; 8+ messages in thread
From: Rodolfo Bamberg @ 2007-05-25  9:13 UTC (permalink / raw)
  To: Xenomai-help

I thought I did compile xenomai for the same target by passing the
--build=i386-linux-uclibc option to .configure.

Gilles Chanteperdrix wrote:
> Rodolfo Bamberg wrote:
>   
>> I am trying to cross-compile for i386 a user-space xenomai RT binary, I
>> installed xenomai in the root file system of the target with the
>> --build=i386-linux-uclibc option to cross compile for the target. 
>>
>> Here's the relevant makefile part of the program I'm trying to compile:
>>
>> XENOMAI_INCLUDE_DIR_USP    :=/tftpboot/192.168.0.2/include
>> XENOMAI_INCLUDE_LIB_USP :=/tftpboot/192.168.0.2/lib
>>
>> user:
>>     i386-linux-uclibc-gcc -I$(XENOMAI_INCLUDE_DIR_USP)
>> -L$(XENOMAI_INCLUDE_LIB_USP) -lnative -o rt_process_user rt_process_user.c
>>     chmod a+x rt_process_user
>>
>> and here the error:
>>
>>  # make user
>> i386-linux-uclibc-gcc -I/tftpboot/192.168.0.2/include
>> -L/tftpboot/192.168.0.2/lib -lnative -o rt_process_user rt_process_user.c
>> rt_process_user.c: In function 'latency_init':
>> rt_process_user.c:115: warning: passing argument 2 of 'rt_task_start'
>> from incompatible pointer type
>> /home/rodolfo/buildroot-2/build_i386/staging_dir/lib/gcc/i386-linux-uclibc/4.1.2/../../../../i386-linux-uclibc/bin/ld:
>> warning: libc.so.6, needed by /tftpboot/192.168.0.2/lib/libnative.so,
>> not found (try using -rpath or -rpath-link)
>> /tftpboot/192.168.0.2/lib/libnative.so: undefined reference to
>> `free@domain.hid'........
>>
>> does anyone know why it needs libc.so.6? thanks!
>>     
>
> Well, it is pretty obvious from the error message you show us:
> libnative.so uses free and is linked with glibc. If you want to compile
> your applications with i386-linux-uclibc, you should compile Xenomai
> with the same compiler.
>
>   




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

* Re: [Xenomai-help] problem compiling for user space
       [not found]   ` <4656A7FA.9000408@domain.hid>
@ 2007-05-25  9:19     ` Gilles Chanteperdrix
       [not found]     ` <4656A938.9000501@domain.hid>
  1 sibling, 0 replies; 8+ messages in thread
From: Gilles Chanteperdrix @ 2007-05-25  9:19 UTC (permalink / raw)
  To: Xenomai help

Rodolfo Bamberg wrote:
> I thought I did compile xenomai for the same target by passing the
> --build=i386-linux-uclibc option to .configure.

No, to cross compile, you should pass --host=i386-linux-uclibc not
--build. For informations on cross-compiling Xenomai, see README.INSTALL.

-- 
                                                 Gilles Chanteperdrix



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

* Re: [Xenomai-help] problem compiling for user space
       [not found]     ` <4656A938.9000501@domain.hid>
@ 2007-05-25  9:21       ` Rodolfo Bamberg
  2007-05-25  9:35         ` Gilles Chanteperdrix
  0 siblings, 1 reply; 8+ messages in thread
From: Rodolfo Bamberg @ 2007-05-25  9:21 UTC (permalink / raw)
  To: Xenomai help

Gilles Chanteperdrix wrote:
> Rodolfo Bamberg wrote:
>   
>> I thought I did compile xenomai for the same target by passing the
>> --build=i386-linux-uclibc option to .configure.
>>     
>
> No, to cross compile, you should pass --host=i386-linux-uclibc not
> --build. For informations on cross-compiling Xenomai, see README.INSTALL.
>
>   
I runned now configure with the correct --host option, and when I run
make install i get
this error:

Making install in cyclic
make[3]: Entering directory
`/home/rodolfo/xenomai/xenomai-2.3.1/src/testsuite/cyclic'
if i386-linux-uclibc-gcc -DHAVE_CONFIG_H -I. -I. -I../../../src/include 
-I../../../include/posix -O2 -D_GNU_SOURCE -D_REENTRANT -Wall -pipe
-fstrict-aliasing -Wno-strict-aliasing -D__XENO__ -D__IN_XENO__
-Wstrict-prototypes -DIPIPE_TRACE=1 -I../../../include    -MT
cyclictest-cyclictest.o -MD -MP -MF ".deps/cyclictest-cyclictest.Tpo" -c
-o cyclictest-cyclictest.o `test -f 'cyclictest.c' || echo
'./'`cyclictest.c; \
        then mv -f ".deps/cyclictest-cyclictest.Tpo"
".deps/cyclictest-cyclictest.Po"; else rm -f
".deps/cyclictest-cyclictest.Tpo"; exit 1; fi
/bin/sh ../../../libtool --tag=CC --mode=link i386-linux-uclibc-gcc    
-o cyclictest
-Wl,@/home/rodolfo/xenomai/xenomai-2.3.1/src/skins/posix/posix.wrappers 
cyclictest-cyclictest.o ../../skins/posix/libpthread_rt.la -lpthread -lrt
i386-linux-uclibc-gcc -o .libs/cyclictest
-Wl,@/home/rodolfo/xenomai/xenomai-2.3.1/src/skins/posix/posix.wrappers
cyclictest-cyclictest.o  ../../skins/posix/.libs/libpthread_rt.so
-lpthread -lrt -Wl,--rpath -Wl,/tftpboot/192.168.0.2//lib
collect2: ld terminated with signal 11 [Segmentation fault]

Is this a bug in my toolchain?? Tanks Gilles.


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

* Re: [Xenomai-help] problem compiling for user space
  2007-05-25  9:21       ` Rodolfo Bamberg
@ 2007-05-25  9:35         ` Gilles Chanteperdrix
  0 siblings, 0 replies; 8+ messages in thread
From: Gilles Chanteperdrix @ 2007-05-25  9:35 UTC (permalink / raw)
  To: Rodolfo Bamberg; +Cc: Xenomai help

Rodolfo Bamberg wrote:
> Gilles Chanteperdrix wrote:
> 
>>Rodolfo Bamberg wrote:
>>  
>>
>>>I thought I did compile xenomai for the same target by passing the
>>>--build=i386-linux-uclibc option to .configure.
>>>    
>>
>>No, to cross compile, you should pass --host=i386-linux-uclibc not
>>--build. For informations on cross-compiling Xenomai, see README.INSTALL.
>>
>>  
> 
> I runned now configure with the correct --host option, and when I run
> make install i get
> this error:
> 
> Making install in cyclic
> make[3]: Entering directory
> `/home/rodolfo/xenomai/xenomai-2.3.1/src/testsuite/cyclic'
> if i386-linux-uclibc-gcc -DHAVE_CONFIG_H -I. -I. -I../../../src/include 
> -I../../../include/posix -O2 -D_GNU_SOURCE -D_REENTRANT -Wall -pipe
> -fstrict-aliasing -Wno-strict-aliasing -D__XENO__ -D__IN_XENO__
> -Wstrict-prototypes -DIPIPE_TRACE=1 -I../../../include    -MT
> cyclictest-cyclictest.o -MD -MP -MF ".deps/cyclictest-cyclictest.Tpo" -c
> -o cyclictest-cyclictest.o `test -f 'cyclictest.c' || echo
> './'`cyclictest.c; \
>         then mv -f ".deps/cyclictest-cyclictest.Tpo"
> ".deps/cyclictest-cyclictest.Po"; else rm -f
> ".deps/cyclictest-cyclictest.Tpo"; exit 1; fi
> /bin/sh ../../../libtool --tag=CC --mode=link i386-linux-uclibc-gcc    
> -o cyclictest
> -Wl,@/home/rodolfo/xenomai/xenomai-2.3.1/src/skins/posix/posix.wrappers 
> cyclictest-cyclictest.o ../../skins/posix/libpthread_rt.la -lpthread -lrt
> i386-linux-uclibc-gcc -o .libs/cyclictest
> -Wl,@/home/rodolfo/xenomai/xenomai-2.3.1/src/skins/posix/posix.wrappers
> cyclictest-cyclictest.o  ../../skins/posix/.libs/libpthread_rt.so
> -lpthread -lrt -Wl,--rpath -Wl,/tftpboot/192.168.0.2//lib
> collect2: ld terminated with signal 11 [Segmentation fault]
> 
> Is this a bug in my toolchain?? Tanks Gilles.

I am afraid yes. Maybe the @ option is not supported by your version of
ld? Could you try using the @ option to ld on a simple hello world program?

-- 
                                                 Gilles Chanteperdrix


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

* Re: [Xenomai-help] problem compiling for user space
@ 2007-08-29 16:36 Ravid Baruch Naali
  2007-08-29 17:04 ` Jan Kiszka
  0 siblings, 1 reply; 8+ messages in thread
From: Ravid Baruch Naali @ 2007-08-29 16:36 UTC (permalink / raw)
  To: xenomai

hello Rodolfo,


I've just encountered the same problem:


collect2: ld terminated with signal 11 [Segmentation fault]


I have the exact same configuration as I can understand you have 
(i386-linux-uclibc)


So I was wondering if you ever found a way to overcome this problem

If so please send me the details.


Thanks in advance

Ravid


-- 
Ravid Baruch Naali
ravidbn@domain.hid
+972 4 6732729
+972 52 5830021



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

* Re: [Xenomai-help] problem compiling for user space
  2007-08-29 16:36 Ravid Baruch Naali
@ 2007-08-29 17:04 ` Jan Kiszka
  0 siblings, 0 replies; 8+ messages in thread
From: Jan Kiszka @ 2007-08-29 17:04 UTC (permalink / raw)
  To: Ravid Baruch Naali; +Cc: xenomai

[-- Attachment #1: Type: text/plain, Size: 523 bytes --]

Ravid Baruch Naali wrote:
> hello Rodolfo,
> 
> 
> I've just encountered the same problem:
> 
> 
> collect2: ld terminated with signal 11 [Segmentation fault]
> 
> 
> I have the exact same configuration as I can understand you have 
> (i386-linux-uclibc)
> 
> 
> So I was wondering if you ever found a way to overcome this problem

Update your toolchain. For the background of this bug (and a patch in
case you build the chain on your own):

http://cygwin.com/ml/binutils/2006-12/msg00309.html

Jan


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 250 bytes --]

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

end of thread, other threads:[~2007-08-29 17:04 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-05-25  8:58 [Xenomai-help] problem compiling for user space Rodolfo Bamberg
2007-05-25  9:06 ` Gilles Chanteperdrix
2007-05-25  9:13   ` Rodolfo Bamberg
     [not found]   ` <4656A7FA.9000408@domain.hid>
2007-05-25  9:19     ` Gilles Chanteperdrix
     [not found]     ` <4656A938.9000501@domain.hid>
2007-05-25  9:21       ` Rodolfo Bamberg
2007-05-25  9:35         ` Gilles Chanteperdrix
  -- strict thread matches above, loose matches on Subject: below --
2007-08-29 16:36 Ravid Baruch Naali
2007-08-29 17:04 ` Jan Kiszka

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.