KDevelop and cross plateforme

abdeslam BENZEGHIOUA abbe at teamlog.com
Mon Jul 29 08:56:12 UTC 2002


Hello,

I always have the same problem I manage not to produce a binary for the 
plate-form uclinux 2.x (crossed plate-forme)

Here are all the stages of creation of the project :

1. In KDE Application Wizards I hace chosed :
    Terminal C
    project name : Mytest
    and I pressed Create to create the project.

2. In Menu options ...    
    +- KDevloper Setup
        +- Compiler
-----  Parameter setting of the compliation on the system  ----
               This computer is : i386    
                OS : linux    

------ Configuration for the target machine ----------
                 Architecture  : arm
                Plate-forme : linux

                Commands system of the preprocessor C : gcc
                Commands system of the compiler C : gcc
                Commands system of the compiler C++ : gcc


In menu Project ...
    +- Options ...
                Options of compiler :   configuration is by default
                          In the tab Flags and warnings   
  
By default  the complier configuration is :

Architecture : i386                          plate-forme : linux

I set :
                  
Flags of compiler C (CFLAGS) :
 -g -O -Wall -mapcs-32 -mcpu=arm7tdmi -fpic -msingle-pic-base -mno-got 
-msoft-float -D__uclinux__
Flags of compiler C++ (CFLAGS) :
-g -O -Wall -mapcs-32 -mcpu=arm7tdmi -fpic -msingle-pic-base -mno-got 
-msoft-float -D__uclinux__
           
       In the tab Flags for the publishing(edition) of the links
                 (LDFLAGS)
     Anothers flags :  -T 
/usr/local/NETLx/userapps/glibc_apps/rt_init/user.ld


In the end when I press OK , I obtain :

Exécute «./configure» dans le dossier contenant les fichiers sources
checking build system type... i386-pc-linux-gnu
checking host system type... i386-pc-linux-gnu
checking target system type... i386-pc-linux-gnu
checking for a BSD compatible install... /usr/bin/install -c
checking for -p flag to install... yes
checking whether build environment is sane... yes
checking for mawk... no
checking for gawk... gawk
checking whether make sets ${MAKE}... yes
checking for style of include used by make... GNU
checking for i386-linux-g++... arm-uclinux-gcc
checking whether we are using the GNU C++ compiler... no
checking whether arm-uclinux-gcc accepts -g... no
checking dependency style of arm-uclinux-gcc... gcc
checking for i386-linux-gcc... arm-uclinux-gcc
checking for C compiler default output... a.out
checking whether the C compiler works... configure: error: cannot run C 
compiled programs.
If you meant to cross compile, use `--host'.
*** Failure ***


When I look the Build option ... Configure I foud :
 --build=i386-linux --host=i386-linux --target=i386-linux

When I change this configuration in :
 --build=i386-linux --host=arm-linux --target=arm-linux

I obtain :

checking build system type... i386-pc-linux-gnu
checking host system type... arm-unknown-linux-gnu
checking target system type... arm-unknown-linux-gnu
checking for a BSD compatible install... /usr/bin/install -c
checking for -p flag to install... yes
checking whether build environment is sane... yes
checking for mawk... no
checking for gawk... gawk
checking whether make sets ${MAKE}... yes
checking for style of include used by make... GNU
checking for arm-linux-g++... arm-uclinux-gcc
checking whether we are using the GNU C++ compiler... no
checking whether arm-uclinux-gcc accepts -g... no
checking dependency style of arm-uclinux-gcc... gcc
checking for arm-linux-gcc... arm-uclinux-gcc
checking for C compiler default output... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... yes
checking for executable suffix...
checking for object suffix... o
checking whether we are using the GNU C compiler... yes
checking whether arm-uclinux-gcc accepts -g... yes
checking dependency style of arm-uclinux-gcc... gcc
checking how to run the C preprocessor... i386-linux-cpp
configure: error: C preprocessor "i386-linux-cpp" fails sanity check
*** Failure ***

I tried all the options possible, but the result is always the same, the 
impossible to generate a
binary for the platform uclinux (crossed plate-forme).

In indicated: if I replace Makefile generated by Kdevelop, by my 
Makefile, I obtain
the looked for result (a binary for uclinux)

-------------- my Makefile -------------

OBJFMT        = elf
OBJFMTD       = elfdebug
OBJFMT2FLT    = ldelf2flt
LDFLAGS          = -T $(NETARMROOT)/userapps/glibc_apps/rt_init/user.ld
LD            = arm-uclinux-ld

CFLAGS        = -g -O -Wall -mapcs-32 -mcpu=arm7tdmi -fpic 
-msingle-pic-base -mno-got -msoft-float -D__uclinux__
CC            = arm-uclinux-gcc

SRC           = main.c
OBJ           = $(SRC:.c=.o)

all: hello_glibc hello_glibc.elfdebug

hello_glibc.elf: $(OBJ)
    $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(OBJ) $(LIBS) $(NETLIBS)

hello_glibc: hello_glibc.elf
    $(OBJFMT2FLT) -s 40960 -o $@ $<

hello_glibc.elfdebug: hello_glibc.elf
    $(LD) $(LDFLAGS) -o $@ $<

clean:
    rm -f $(OBJ) hello_glibc *.elf *.elfdebug *.map

------------------------------------------------------------------


Please can you help me.

Regards.

Abdeslam.




Reinaldo Nolasco Sanches wrote:

>I was told you...
>
>In Menu options ...    
>    +- KDevloper Setup
>        +- Compiler
>               This computer is : i386    
>                OS : linux      (I use linux 8.0)
>             ----------------------------------
>                Archtecture  : arm
>                Plate-forme : linux
>
>                Commands system of the preprocessor C : arm-uclinux-gcc
>                Commands system of the compiler C : arm-uclinux-gcc
>                Commands system of the compiler C++ : arm-uclinux-g++
>
>Change informatiom...
>
>
>                Commands system of the preprocessor C : gcc
>                Commands system of the compiler C : gcc
>                Commands system of the compiler C++ : g++
>
>You will compile in cross-plataform...
>
>You run ./configure with this arguments...
>
>In menu build...
>configure...
>    when dialog show in...
>       you see... parameters are in... then... you only need press OK
>
>and your application will be compile in cross-plataform...
>
>
>
>
>=====
>"When you know Slackware, you know Linux... when you know Red Hat, all you know is Red hat"
>
>- Anyone seen smoking will be assumed to be on fire and will be summarily put out.
>- Power doesn't corrupt people, people corrupt power.
>
>- r_linux at yahoo.com -- http://slackware.linuxbr.org
>- UIN: 42853394 - irc.brasnet.org(#slackware)
>
>__________________________________________________
>Do You Yahoo!?
>Sign up for SBC Yahoo! Dial - First Month Free
>http://sbc.yahoo.com
>
>-
>to unsubscribe from this list send an email to kdevelop-request at kdevelop.org with the following body:
>unsubscribe »your-email-address«
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kdevelop/attachments/20020729/e9007c9b/attachment.html>


More information about the KDevelop mailing list