SliTaz SliTaz Forum

You are not logged in.

#1 2011-05-31 12:59:43

totoetsasoeur
Moderator
Registered: 2011-03-29
Posts: 247

need help to compile mspgcc4

Hi,

I have the project of writing a complete guide on how to use msp430 microcontrolers with Slitaz. If everything goes well, the next step will be a Slitaz package. :-)

The first issue I am faced to, is to compile the compiler mspgcc4. I followed the instructions but the process ends with this message:

checking for gcc... gcc

checking for C compiler default output file name...

configure: error: in `/mspgcc4/build/binutils-2.21-build':

configure: error: C compiler cannot create executables

See `config.log' for more details.

sh do-binutils.sh "/opt/msp430-gcc-4.4.5" "2.21" "http://ftp.uni-kl.de" "build" exited with status code 77.

Failed to execute sh do-binutils.sh "/opt/msp430-gcc-4.4.5" "2.21" "http://ftp.uni-kl.de" "build" at buildgcc.pl line 248.

When checking the config.log file, I do not see any relevant point:

root@slitaz:/mspgcc4# cat build/binutils-2.21-build/config.log

This file contains any messages produced by compilers while

running configure, to aid debugging if configure makes a mistake.

It was created by configure, which was

generated by GNU Autoconf 2.64.  Invocation command line was

  $ /mspgcc4/build/binutils-2.21-build/../binutils-2.21/configure --prefix=/opt/msp430-gcc-4.4.5 --target=msp430 --disable-werror --disable-nls

## --------- ##

## Platform. ##

## --------- ##

hostname = slitaz

uname -m = i686

uname -r = 2.6.37-slitaz

uname -s = Linux

uname -v = #2 SMP Sat May 21 19:25:28 CEST 2011

/usr/bin/uname -p = unknown

/bin/uname -X     = unknown

/bin/arch              = unknown

/usr/bin/arch -k       = unknown

/usr/convex/getsysinfo = unknown

/usr/bin/hostinfo      = unknown

/bin/machine           = unknown

/usr/bin/oslevel       = unknown

/bin/universe          = unknown

PATH: /usr/sbin

PATH: /usr/bin

PATH: /sbin

PATH: /bin

PATH: /usr/games

PATH: /usr/local/sbin

PATH: /usr/local/bin

PATH: /opt/msp430-gcc-4.4.5/bin

Could any one give me some advices on where/what to check?

Thx

Stephane

Offline

#2 2011-05-31 13:27:19

Trixar_za
Administrator
Registered: 2011-03-29
Posts: 1,506

Re: need help to compile mspgcc4

SliTaz has no /usr/local/ directory so you may want to use --prefix=/usr with the ./configure stage.

Offline

#3 2011-05-31 14:01:30

pankso
Administrator
Registered: 2026-06-27
Posts: 341
Website

Re: need help to compile mspgcc4

Hi totoetsasoeur and Trixar_za,

@Trixar_za, you correct but I guess he used ./configure since with cook with set all path automaticaly now.

@totoetsasoeur: Well, you want to make a package! Absolulty great! But you did'n choose the easiest! No problem I will help you make it compile!

I guess you downloaded the source, extract and then: ./configure ? It's nice and the way I also use to create a new package since you can do ./configure --help to have all package compilation options. On the other side using cook will setup your environment correctly and provide a working gcc since I guess this is just your problem for now.

I also guess you installed gcc only ? GCC is the compiler but can't do much alone, it needs a linker (binutils) and a main C library (glibc), this is called a toolchain and we have a package called slitaz-toolchain wich is the minimum we need to start compiling. Getting:

"configure: error: C compiler cannot create executables"

Usually mean binutils it not installed or corrupted. It can be corrupted if one plays with cross tools and install wrong file by mistake in /usr/include, in this case a reinstallation of binutils usually fix the bug. But sometime it's better to start over with a new chroot. That said, I dont think you corruped binutils (yet :-), just an info! If my suppostion are correct:

# tazpkg get-install slitaz-toolchain

And run ./configure again.

UPDATE: ok no configure in source but you used: buildgcc.pl ?

Offline

#4 2011-05-31 14:50:33

totoetsasoeur
Moderator
Registered: 2011-03-29
Posts: 247

Re: need help to compile mspgcc4

Thx Trixar and Pankso,

First of all my initial post was not clear enough (sorry about that).

Anyway, installing slitaz-toolchain solved partially the issue.

What I installed:

#tazpkg get-install texinfo

#tazpkg get-install subversion

#tazpkg get-install gcc

#tazpkg get-install patch

#tazpkg get-install libusb-dev

#tazpkg get-install ncurse-dev

#tazpkg get-install perl

#tazpkg get-install git

#tazpkg get-install zlib

#tazpkg get-install slitaz-toolchain

Then, I used the buildgcc.sh script (it calls buildgcc.pl perl script. Does not use ./configure):

#bunzip2 -c mspgcc4-20110312.tar.bz2 | tar xvf -

#cd mspgcc4-20110312

#sh buildgcc.sh

Now it starts compiling (around 20 minutes on my old P3-500MHz) and stops with the following:

Unpacking GCC...

tar: can't open'gcc-g++-4.4.5.tar.bz2': No such file or directory

sh do-gcc.sh "/opt/msp430-gcc-4.4.5" "4.4.5" "http://ftp:uni-lk.de" "build" "gcc-4.x" "4.3.1" 2.4.2" exited with status code 1.

I guess something is missing, but what??

Any idea?

Offline

#5 2011-05-31 16:28:04

mojo
Administrator
Registered: 2011-03-29
Posts: 2,174

Re: need help to compile mspgcc4

tar: can't open'gcc-g++-4.4.5.tar.bz2': No such file or directory

sh do-gcc.sh "/opt/msp430-gcc-4.4.5" "4.4.5" "http://ftp:uni-lk.de" "build" "gcc-4.x" "4.3.1" 2.4.2" exited with status code 1.

I see reference to /opt which doesn't exist on slitaz by default.

Maybe mkdir /opt and copy gcc-g++-4.4.5.tar.bz2 into it so it can be found by tar?

Offline

#6 2011-05-31 20:03:29

totoetsasoeur
Moderator
Registered: 2011-03-29
Posts: 247

Re: need help to compile mspgcc4

Thx Mojo,

Actually directory /opt is created by the perl script during binutils compilation.

I downloaded gcc-g++-4.4.5.tar.bz2 and moved it in /opt , but did not change anything. The same error rose:

Unpacking GCC...

tar: can't open'gcc-g++-4.4.5.tar.bz2': No such file or directory

sh do-gcc.sh "/opt/msp430-gcc-4.4.5" "4.4.5" "http://ftp:uni-lk.de" "build" "gcc-4.x" "4.3.1" 2.4.2" exited with status code 1.

Any idea?

Offline

#7 2011-06-01 12:42:05

erjo
Administrator
Registered: 2011-03-28
Posts: 86

Re: need help to compile mspgcc4

Hi,

I don't know if this thread still still openend. In case of...

It May be a wget applet problem.

The script do-gcc.sh failed to download gcc-g++-4.4.5 so tar cant find the file. Try to install wget or change wget command in the script.

Note after a long time build the script failed with:

Running ls -ldq "/home/slitaz/build/mspgcc4-20110312/msp430-gcc-4.4.5_gdb_7.2.tar.bz2"

-q option is not supported by ls.

line 216 in buildgcc.pl. Fix-it before running buildgcc.pl.

Offline

#8 2011-06-01 15:02:17

totoetsasoeur
Moderator
Registered: 2011-03-29
Posts: 247

Re: need help to compile mspgcc4

yeap, the thread is still open.

I will try your advices and post results here.

Thx

Offline

Registered users online in this topic: 0, guests: 1
[Bot] ClaudeBot

Board footer

Powered by FluxBB
Modified by Visman

[ Generated in 0.016 seconds, 7 queries executed - Memory usage: 1.55 MiB (Peak: 1.77 MiB) ]