LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 05-10-2007, 12:47 PM   #61
gnashley
Amigo developer
 
Registered: Dec 2003
Location: Germany
Distribution: Slackware
Posts: 4,928

Original Poster
Rep: Reputation: 612Reputation: 612Reputation: 612Reputation: 612Reputation: 612Reputation: 612

Try adding -m='make -i' to see if it will skip the error.
Usally building toolchains requires special instructions whixh might best be handled by commenting out the steps which are causing trouble and inserting code to perform the steps.
You might also try passing STD_FLAGS='-O2'
 
Old 05-10-2007, 01:16 PM   #62
jowa45
Member
 
Registered: Apr 2007
Location: Stockholm, Sweden
Distribution: Slackware11&14.1
Posts: 119

Rep: Reputation: 15
Hi,
Sorry no luck and the STD_FLAGS='-02' switch told me unrecognized option.

John
 
Old 05-11-2007, 01:12 AM   #63
jowa45
Member
 
Registered: Apr 2007
Location: Stockholm, Sweden
Distribution: Slackware11&14.1
Posts: 119

Rep: Reputation: 15
Hi,
I have built the toolchain 3 times now on Slackware 11. No special instructions were used. Only gnu make as outlined above for every tool in the chain. There is however a special order to install them in. It is binutils, compiler, library, programmer then anything extra you want like gdb. Of course you have to set your paths and maybe do a bit of ldconfing but that is not special either. I succeeded in making a package for binutils but that is first in the chain and so has no dependencies on the others. As installation proceeds all tools add a little to the directory structure.

John
 
Old 05-11-2007, 07:14 AM   #64
gnashley
Amigo developer
 
Registered: Dec 2003
Location: Germany
Distribution: Slackware
Posts: 4,928

Original Poster
Rep: Reputation: 612Reputation: 612Reputation: 612Reputation: 612Reputation: 612Reputation: 612
You should pass STD_FLAGS like this:
STD_FLAGS='O2' src2pkg ,etc,etc

Still, you probably should use a script. Generate one with the options more or less like you want with src2pkg with the -A flag. Then comment out the configure, make and make install steps. Insert the code you need to configure, compile and install into a side directory like /opt/gcc-4.1.xx or /usr/local/gcc-4.1.xx. Copy the whole directory into the PKG_DIR structure and let the script proceed as needed.
 
Old 05-11-2007, 07:25 AM   #65
piete
Member
 
Registered: Apr 2005
Location: Havant, Hampshire, UK
Distribution: Slamd64, Slackware, PS2Linux
Posts: 465

Rep: Reputation: 44
I concur, try to empty your CFLAGS a bit, drop the -mtune and -march options by setting STD_FLAGS to -O2.

STD_FLAGS='-02' is close, but not quite, STD_FLAGS='-O2' - the O is like the O in "Optimise" instead of the digit 0.

Have you installed your packaged binutils? I assume yes, my build is failing because we can't find the assembler at /usr/local/avr/bin/avr-as but it's good to know for sure. GCC is just another autotools package, so once the correct flags are set at ./configure you should be good to go.

As gnashley suggested, you might want to make a script with src2pkg and then comment out the lines that are causing problems and put them in manually (like configure_sources).

- Piete.

To gnashley: do we mean STD_FLAGS?

I see STD_FLAGS gets used in the src2pkg script as part of the help, but I don't see it get written to the script with -N . A feature?

[Edit]
You and your fast posting! *huffs*
 
Old 05-11-2007, 08:20 AM   #66
jowa45
Member
 
Registered: Apr 2007
Location: Stockholm, Sweden
Distribution: Slackware11&14.1
Posts: 119

Rep: Reputation: 15
Hi,
Many thanks for all the help I am getting.
I have not tried my binutils package yet. I need to install Slackware 11 to another computer which I hope to do early next week.
The assembler /usr/local/avr/bin/avr-as is installed as part of the first package binutils.
Packages have to be installed in the correct order as outlined above.
I used digit 0 wich might explain a little. Was wondering about that late last night.


piete. I did try to send you an email via the forum. If you get it and reply I will be able to reply and attach my binutils installation package.

This is all very interesting and useful but starting to get a little deep for me so I would appreciate any help on exactly what do I enter at the command line. What order is the flags switch put in.

John
 
Old 05-11-2007, 09:08 AM   #67
jowa45
Member
 
Registered: Apr 2007
Location: Stockholm, Sweden
Distribution: Slackware11&14.1
Posts: 119

Rep: Reputation: 15
Hi,
With STD_FLAGS='O2' src2pkg etc etc etc

The famous last words are :-

checking whether the C compiler (gcc O2) works ...... no

configure : error : installation or configuration problem : C compiler cannot create executables

John
 
Old 05-11-2007, 10:21 AM   #68
tuxdev
Senior Member
 
Registered: Jul 2005
Distribution: Slackware
Posts: 2,012

Rep: Reputation: 115Reputation: 115
-O2, not just O2. The dash is important
 
Old 05-15-2007, 02:21 AM   #69
jowa45
Member
 
Registered: Apr 2007
Location: Stockholm, Sweden
Distribution: Slackware11&14.1
Posts: 119

Rep: Reputation: 15
Hi,
Many thanks. I have packages for binutils, compiler and programmer. I have tested the binutils and compiler packages on a new Slackware 11 installation and they worked. That is I got an installation which looks the same as a source code installation but I do not know yet if I can use that installation.
The remaining problem is that of the library. This has always looked a bit odd when installing from source. Here is the procedure.

tar -jxvf avr-libc-1.4.5.tar.bz2
cd avr-libc-1.4.5
./configure --prefix=/usr/local/avr --build=`./config.guess` --host=avr
make
make install

It is the --build=`./config.guess` that causes a problem. What should I do with it in src2pkg ?

This package is somewhat different to the others. I think it has its roots in freeBSD but has always installed well in Slackware 11.

John
 
Old 05-15-2007, 04:00 AM   #70
piete
Member
 
Registered: Apr 2005
Location: Havant, Hampshire, UK
Distribution: Slamd64, Slackware, PS2Linux
Posts: 465

Rep: Reputation: 44
Try a line like:

src2pkg -p='/usr/local/avr' -e="--build=`./config.guess` --host=avr" avr-libc-1.4.5.tar.bz2

Or replace `./config.guess` with the result of ./config.guess (it'll return something like i686). I did get your email, sorry for the delay in responding to it! It seems you've had some success though =)

- Piete.
 
Old 05-15-2007, 06:01 AM   #71
jowa45
Member
 
Registered: Apr 2007
Location: Stockholm, Sweden
Distribution: Slackware11&14.1
Posts: 119

Rep: Reputation: 15
Hi peite,
No luck with that one in double quotes. Dont know why.

John
 
Old 05-15-2007, 10:34 AM   #72
gnashley
Amigo developer
 
Registered: Dec 2003
Location: Germany
Distribution: Slackware
Posts: 4,928

Original Poster
Rep: Reputation: 612Reputation: 612Reputation: 612Reputation: 612Reputation: 612Reputation: 612
You need to use single quotes with src2pkg, although double quotes work in a src2pkg script.
To piete, note that generating a script with the -A option may give a different result than using the -N option. Since it gets written as-it-goes, it may contain details not available with the -N option which doesn't unpack the sources and hence knows nothing about what's in them.
 
Old 05-15-2007, 12:51 PM   #73
piete
Member
 
Registered: Apr 2005
Location: Havant, Hampshire, UK
Distribution: Slamd64, Slackware, PS2Linux
Posts: 465

Rep: Reputation: 44
Duly noted, thanks guys!
 
Old 05-16-2007, 05:01 AM   #74
jowa45
Member
 
Registered: Apr 2007
Location: Stockholm, Sweden
Distribution: Slackware11&14.1
Posts: 119

Rep: Reputation: 15
Hi,
Not much luck with single quotes either.

In order to reduce the output in an attempt to see what is going on I tried the following :-

src2pkg -p'/usr/local/avr' -VV avr-libc-1.4.5.tar.bz2

Here are the famous last words :-

configure : WARNING : AVR-LIBC must be built using an avr cross-compiler
configure : WARNING : Try configuring with : "/tmp/avr-libc-1.4.5-src-1/configure
--build=`config.guess` --host=avr"
configure : error : aborting configure

But what does all this mean? Does it mean that my previously packaged avr-gcc compiler must be invoked and not gcc ? How do I invoke another compiler from src2pkg?

peite - The output of config.guess was i686-pc-linux-gnu which you probably guessed anyway and direct substitution did not improve matters.

John

Last edited by jowa45; 05-16-2007 at 07:16 AM.
 
Old 05-16-2007, 08:46 AM   #75
tuxdev
Senior Member
 
Registered: Jul 2005
Distribution: Slackware
Posts: 2,012

Rep: Reputation: 115Reputation: 115
A nice chicken-and-egg problem is what you've got. It wants your gcc-avr before it will compile avr-libc.

I suggest that you look at the LFS docs to see how you're supposed to break this.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
smart package manager bad magic cpio error matticus SUSE / openSUSE 5 04-10-2012 10:41 AM
Using Partition Magic and Boot Magic to install Linux zathrus MEPIS 4 01-14-2006 08:24 PM
Partition Magic/Boot magic and Slackware. adam1835 Linux - Newbie 5 01-11-2006 11:46 AM
Can't get Age of Empires II: Age of Kings started (I've could it before !!!) vegetassj2 Linux - Games 44 08-28-2005 04:59 PM
Java does "age" or "Age" matter when declaring an Int?? Laptop2250 Programming 3 10-13-2003 12:34 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 12:27 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration