Slackware This Forum is for the discussion of Slackware Linux.
|
| Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
 |
GNU/Linux Basic Guide
This 255-page guide will provide you with the keys to understand the philosophy of free software, teach you how to use and handle it, and give you the tools required to move easily in the world of GNU/Linux. Many users and administrators will be taking their first steps with this GNU/Linux Basic guide and it will show you how to approach and solve the problems you encounter.
Click Here to receive this Complete Guide absolutely free. |
|
 |
11-19-2005, 01:29 PM
|
#1
|
|
LQ Newbie
Registered: Mar 2005
Distribution: Slackware
Posts: 22
Rep:
|
Broken toolchain
Hi guys,
I'm used to work under Windows, and have done some AVR-developing.
I recently installed Slackware and have with it quite a bit, however, when I wanted to do developing for an Atmel microcontroller (Atmega16) I needed to do some updating & building. However, I did not do enough reading before, and realized only afterwards that updating native gcc, libc & binutils is a BAD idea, unless you know what you are doing.
So basically I'm asking about the possibilities of going back to the toolchain-setup that the Slackware 10.1 comes with. Or do I need to reinstall the distro?
If it's possible to fix, I'd rather do that instead of a reinstall to learn some valuable tricks.
Thanks for your time,
/ Me
|
|
|
|
11-19-2005, 01:55 PM
|
#2
|
|
Moderator
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 22,916
|
Insert and mount CD1
upgradepkg --reinstall /mnt/cdrom/slackware/d/*tgz
Possibly some tools from the a/ap series may be affected
to - upgradepkg those individually.
Cheers,
Tink
|
|
|
|
11-19-2005, 01:56 PM
|
#3
|
|
Senior Member
Registered: Oct 2004
Location: Luxemburg
Distribution: Slackware, OS X
Posts: 1,507
Rep:
|
You just have to reinstall the original packages using "upgradepkg --reinstall".
The packages should be gcc-*.tgz, binutils-*.tgz and glibc-*.tgz I presume.
|
|
|
|
11-20-2005, 07:12 AM
|
#4
|
|
LQ Newbie
Registered: Mar 2005
Distribution: Slackware
Posts: 22
Original Poster
Rep:
|
Thanks guys,
Allthough after doing that,
# gcc -v
..still claimed that I was running 4.x.x though. Also that it was configured with path-to-my-ATMEL-stuff, thus it seems that either my PATHS makes sure that I'm using the wrong versions, or that even after using upgradepkg --reinstall, I'd need to configure the whole toolchain and rebuild them, to finish the installation?
Anyhow, I seem to have gcc in a couple of different directories
(/usr/bin/ and /usr/local/bin/ ).
I noticed that the one in /usr/bin/ was gcc 3.3.4. so I copied it to /usr/local/bin/ and now ' gcc -v ' tells me that I'm running the right version.. .
I did manage to atleast compile a tiny gtk app, so something is working as it should..
Anyway, my question is:
In the Slackware distro, should the gcc (and other relevant) binaries be in /usr/bin or /usr/local/bin , is it my paths that are messed aswell?
*trying to get the hang of the structure with the files*
I've made a mess *sobs*
Thanks for your input, I appreciate it,
/Me
|
|
|
|
11-20-2005, 07:56 AM
|
#5
|
|
Senior Member
Registered: Oct 2004
Location: Luxemburg
Distribution: Slackware, OS X
Posts: 1,507
Rep:
|
It should be in /usr/bin, you can see that by looking into the relevant packages (either in /var/log/packages/ or by doing a less on a *.tgz package).
I'd clean the /usr/local stuff to get rid of gcc4.
|
|
|
|
11-20-2005, 08:20 AM
|
#6
|
|
LQ Newbie
Registered: Mar 2005
Distribution: Slackware
Posts: 22
Original Poster
Rep:
|
uselpa:
The thing is, if I remove /usr/local/bin/gcc , then gcc cannot be found at all. Even though /usr/bin/ is also in the PATH..
*scratches head*
|
|
|
|
11-20-2005, 09:53 AM
|
#7
|
|
Senior Member
Registered: Oct 2004
Location: Luxemburg
Distribution: Slackware, OS X
Posts: 1,507
Rep:
|
Maybe you can compare your system to this:
Code:
root@slackw:~$ echo $PATH
/usr/local/sbin:/usr/sbin:/sbin:/usr/local/bin:/usr/bin:/bin:/usr/X11R6/bin:/usr/games:/opt/www/htdig/bin:/usr/lib/java/bin:/usr/lib/java/jre/bin:/opt/kde/bin:/usr/lib/qt/bin:/usr/share/texmf/bin
root@slackw:~$ which gcc
/usr/bin/gcc
root@slackw:~$ gcc -v
Reading specs from /usr/lib/gcc-lib/i486-slackware-linux/3.3.6/specs
Configured with: ../gcc-3.3.6/configure --prefix=/usr --enable-shared --enable-threads=posix --enable-__cxa_atexit --disable-checking --with-gnu-ld --verbose --target=i486-slackware-linux --host=i486-slackware-linux
Thread model: posix
gcc version 3.3.6
Any differences?
|
|
|
|
11-20-2005, 10:17 AM
|
#8
|
|
LQ Newbie
Registered: Mar 2005
Distribution: Slackware
Posts: 22
Original Poster
Rep:
|
LOL, got to love the "humorous" (a la "It's funny because it's true") unix/linux commands 
Did not know of the 'which' command, but the selected name for that one is so spot-on that it's hillarious .. or maybe it's just me
Anyway, the PATHS are exactly the same. However, as expected:
# which gcc
/usr/local/bin/gcc
..yields that.
And naturally, if /usr/local/bin/gcc is removed,
# gcc -v
..is not possible, as the file doesn't exist.
However, copying /usr/bin/gcc to /usr/local/bin/ and then running it, I get (of course) the same result as you, except my version is 3.3.4 and not 3.3.6. I assume you have a more recent version of the distro or so.
So, somehow gcc wants to execute from /usr/local/bin and not /usr/bin/, and the PATH has nothing to do with it, then what has?
EDIT:
CORRECTION:
When the gcc is missing from /usr/local/bin/
# gcc -v
Does not work as the file does not exist,
HOWEVER:
# which gcc
/usr/bin/gcc <<------ !!!
which gcc says /usr/bin/gcc is the one, but still it's not working.
But when I copy /usr/bin/gcc to /usr/local/bin/ , gcc is found, and I can use it, and ' which gcc ' points to /usr/local/bin/gcc also..
this makes more sense, but still I wonder why gcc cannot be found from /usr/bin/ even though 'which' points to that
Last edited by Camino; 11-20-2005 at 10:40 AM.
|
|
|
|
11-20-2005, 10:49 AM
|
#9
|
|
LQ Newbie
Registered: Mar 2005
Distribution: Slackware
Posts: 22
Original Poster
Rep:
|
It occured to me while talking to myself here, that the PATHs are "local" during a session, thus deleting a file might not be enough even though the command "which" states that the PATH has changed. A new session comfirmed this
Trying to remove the rest of the files from /local.. hopefully it will work out
Thanks all 
Last edited by Camino; 11-20-2005 at 11:05 AM.
|
|
|
|
11-22-2005, 09:38 AM
|
#10
|
|
LQ Newbie
Registered: Mar 2005
Distribution: Slackware
Posts: 22
Original Poster
Rep:
|
Yeaap!
Did some cleaning all over the place and all seems to be working fine. Also installed the tool chain for AVR devving FAR away from the native stuff (according to a nice book about Embedded Linux that I'm reading), and that too works just fine.
Thanks a lot guys 
|
|
|
|
| Thread Tools |
Search this Thread |
|
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -5. The time now is 11:51 PM.
|
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|