The 'Magic Package Maker' comes of age and changes its' name
SlackwareThis 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.
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.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Hi,
I have installed src2pkg. Would someone be as kind as to help me get started with it.
I would like to make Slackware installation packages for the GNU Tool Chain used for AVR microcontroller programming. The idea behind this being to install the tool chain in older computers with a minimal Slackware installation and use those only for this application.
I would just like to go through how the installation is normally carried out using the compiler as an example.
tar -jxvf gcc-core-4.1.1.tar.bz2
cd gcc-4.1.1
mkdir obj-avr
cd obj-avr
../configure --target=avr --prefix=/usr/local/avr --enable-languages=c \
--disable-nls --disable-libssp
make
make install
The computer that I will be making the packages on is an i686 and the ones that I will be installing are i486. The i686 has the toolchain installed already which I do not want changing in any way.
Gratefull for any help but please bear in mind that I have never made a Slackware package before.
I had the same problems, but they went away when I built installwatch by hand (LDFLAGS="-fPIC -O2" ./configure).
As far as I can tell, i installed the 32 bit src2pkg package, then rebuilt installwatch and copied the lib (installwatch.so) to /usr/libexec/src2pkg/ over the top of the one provided. I suppose I meant to fix the problem at some point by rebuilding the source, but so far haven't gotten around to it.
- Piete.
Edit: For what it's worth, I'm using installwatch 0.6.3, but I'd bet someone elses leg that just rebuilding the library will fix the problem regardless of the lib version (API allowing, of course).
Thanks for chipping in with that Piete -I was wondering if you had worked that issue out?
Did you have to compile that under the 64bit system, or can it be done on the regular 32bit system?
I think the problem comes from the way relocation (-fPIC - position independant code) and shared objects work and the differences between x86 and x86_64 - likely register sizes. I don't know enough about the way libraries work to tell you the details, although I daresay a few searches will give you the necessary information on .so and PIC to draw your own conclusions.
Quote:
I was wondering if you had worked that issue out?
In terms of quick fix, recompile installwatch and shazzam. Did you mean something else? I've not built a slamd64 package for it, I imagine I was thinking about it when I copied the .so over, but I don't seem to have done it heh.
Quote:
Did you have to compile that under the 64bit system, or can it be done on the regular 32bit system?
Ahh, now we're talking about cross-compilation. If you can get a cross toolchain built for the target arch, it'll work just the same as building it under that arch. I built it using the native slamd64 11.0 toolchain, which is mono-arch x86_64 (not bi-arch, like the versions in 10.0), but if you had an x86 to x86_64 toolchain, you'd get the same result.
It comes down to installwatch being a shared object and thus architecture dependant (which I know you know =D ). Again, did I misunderstand?
Good luck with the building, hoofer =)
Gilbert: I'll happily provide you with any information you need for x86_64, feel free to give me an email (can you use the email form from LQ, or fish around in my profile for my old site, which should still have contact details on it) if there's anything I can do.
Hi,
My package making failed. It failed on two different computers both with successful installations and the exact tarball used for installation was used for src2pkg.
Here is my attempt to get a read out:-
root@slackbox_1:/install/src2pkg/avr-gcc# \
> src2pkg -p='/usr/local/avr' -e='--target=avr --enable-languages=c \
> --disable-nls --disable-libssp' gcc-core-4.1.1.tar.bz2
[1;34mFound source archive: [0;39mgcc-core-4.1.1.tar.bz2
[1;34mDeleting old build files - [0;39m[1;32mDone[0;39m
[1;34mCreating working directories - [0;39mPKG_DIR SRC_DIR [1;32mOkay[0;39m
[1;34mUnpacking source archive - [0;39m[1;32mDone[0;39m
[1;34mFound sources: [0;39mgcc-4.1.1[0;39m
[1;34mMoving into SRC_DIR: [0;39mgcc-core-4.1.1-src-1
[1;34mCorrecting file permissions - [0;39m[1;32mDone[0;39m
[1;34mFound configure script - [0;39mConfiguring sources using:
CFLAGS=-O2 -march=i486 -mtune=i686 ./configure --prefix=/usr/local/avr
--target=avr --enable-languages=c --disable-nls --disable-libssp
[1;34mConfiguration has been - [1;32mSuccessful![0;39m
[1;34mCompiling sources - [0;39mUsing: 'make'
[1;31mERROR! [0;39mCompiling source code has failed.
This usually happens because of missing libraries, or
badly written Makefiles or configure scripts.
[1;34mSorry! [0;39mNo Dependency or Requirements information found.
Re-run that command with the -VV switch (man src2pkg), to show the output of the steps then post the failure message from make. Not knowing avr-gcc off the top of my head, I can't explain what's going wrong yet =)
- Piete.
[Edit]
Oh, you may want to add -A as well, to make you a script with all the right options in when it succeeds. Alternatively, use -N and hack the resultant script accordingly.
Hi piete,
The output is truly enormous to put on a web site. I am only putting the first and last part.
If you would like the complete file I will send it to you by email and you can put the relevant part on this forum. Backslashes at the end of lines were added by me to make the output more readable.
[1;34mFound source archive: [0;39mgcc-core-4.1.1.tar.bz2
[1;34mRemoving existing package build directory from previous build - [0;39m
[1;34mRemoving existing source build directory from previous build - [0;39m
[1;34mCreating working directories - [0;39mPKG_DIR SRC_DIR [1;32mOkay[0;39m
[1;34mUnpacking source archive - [0;39m
gcc-4.1.1/
gcc-4.1.1/gcc/
gcc-4.1.1/gcc/diagnostic.def
gcc-4.1.1/gcc/cstamp-h.in
gcc-4.1.1/gcc/doc/
~
~
~
make[3]: Entering directory `/tmp/gcc-core-4.1.1-src-1/host-i686-pc-linux-gnu/gcc'
for d in libgcc avr3 libgcc/avr3 avr4 libgcc/avr4 avr5 libgcc/avr5; do \
if [ -d $d ]; then true; else /bin/sh ../.././gcc/../mkinstalldirs $d; fi; \
done
mkdir -p -- libgcc
mkdir -p -- avr3
mkdir -p -- libgcc/avr3
mkdir -p -- avr4
mkdir -p -- libgcc/avr4
mkdir -p -- avr5
mkdir -p -- libgcc/avr5
if [ -f stmp-dirs ]; then true; else touch stmp-dirs; fi
/tmp/gcc-core-4.1.1-src-1/host-i686-pc-linux-gnu/gcc/xgcc -B/tmp/gcc-core-4.1.1-src-1/ \
host-i686-pc-linux-gnu/gcc/ -B/usr/local/avr/avr/bin/ -B/usr/local/avr/avr/lib/ \
-isystem /usr/local/avr/avr/include -isystem /usr/local/avr/avr/sys-include -O2 \
-O2 -O2 -march=i486 -mtune=i686 -DIN_GCC -DCROSS_COMPILE \
-W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition \
-isystem ./include -DDF=SF -Dinhibit_libc -mcall-prologues -g \
-DIN_LIBGCC2 -D__GCC_FLOAT_NOT_NEEDED -Dinhibit_libc -I. -I. -I../.././gcc -I../.././gcc/.\
-I../.././gcc/../include -I../.././gcc/../libcpp/include -DL_mulqi3 -xassembler-with-cpp -c \
../.././gcc/config/avr/libgcc.S -o libgcc/./_mulqi3.o
make[3]: Leaving directory `/tmp/gcc-core-4.1.1-src-1/host-i686-pc-linux-gnu/gcc'
make[2]: Leaving directory `/tmp/gcc-core-4.1.1-src-1/host-i686-pc-linux-gnu/gcc'
make[1]: Leaving directory `/tmp/gcc-core-4.1.1-src-1'
[1;31mERROR! [0;39mCompiling source code has failed.
This usually happens because of missing libraries, or
badly written Makefiles or configure scripts.
[1;34mSorry! [0;39mNo Dependency or Requirements information found.
Hi tuxdev,
Is this likely to corrupt the installation in any way ?. I am using the two computers I have the installation on. If there is any chance of such I would prefer to install slack 11 on another. Might do that anyway.
Hi,
Just thought of something. I have used src2pkg to make a package for another link in the toolchain the binutils package. This is normally installed with the same mkdir obj-avr cd obj-avr ../configure proceedure as all the other packages in the chain. When I say I made a package I mean a package was produced I have not yet tested that I can use the package.
You can enclose code with [code.][/code.] tags (take out the . to make the BB code work) which will sort out wrapping and give you nice formatting and so on.
Anyway, to the problem at hand!
So, I got a hold of the gcc-core package you're using and ran the same line ... half way through compilation it occured to me that it wouldn't work, because I'm not using Slack 11 stock! Anyway, long story short the build failed for me too =)
Ok, so looking at the output you have, things are a bit wierd. Mine errored like so (emphasis added):
Code:
else true; fi; \
echo timestamp > include/fixed; \
fi
echo timestamp > stmp-fixproto
make[2]: *** No rule to make target `/usr/local/avr/bin/avr-as', needed by `stamp-as'. Stop.
make[2]: Leaving directory `/tmp/gcc-core-4.1.1-src-1_pes_slamd64_11/host-x86_64-unknown-linux-gnu/gcc'
make[1]: *** [all-gcc] Error 2
make[1]: Leaving directory `/tmp/gcc-core-4.1.1-src-1_pes_slamd64_11'
make: *** [all] Error 2
ERROR! Compiling source code has failed.
This usually happens because of missing libraries, or
badly written Makefiles or configure scripts.
Sorry! No Dependency or Requirements information found.
Which is pretty obviously some compile problem, and this is verified by cd /tmp/gcc-core and running make directly. I get the same error.
Anyway, with your output there is clearly no make failure so, could I ask you to run make directly in the source ( /tmp/gcc-core-4.1.1-src-1/ ) and see what happens?
Basically what we're seeking is if this is a src2pkg bug, a compilation bug or if it's something else.
Feel free to email me (you can use the forum tools in my profile) logs if you can't find the relevant parts.
And finally, congratulations on using src2pkg and getting your feet wet with package making!
- Piete.
Edit:
I never learn to refresh the thread before I post, having been called away to do something else ... *sigh*
And it's only just occured to me what you're actually trying to do! In general terms, I have found that making cross-toolchains is a PITA but the ones I have made I always built the whole toolchain with:
./configure --prefix=/opt/crosschain/<target> <options>
You may be best off building and installing everything with --prefix=/opt/avr (or similar) and then package the resultant directory up with appropriate /etc/profile.d/ setup scripts (to add /opt/avr/bin to PATH, for example) instead of trying to do each piece.
FWIW I can bet your left leg that --prefix=/opt/avr won't overwrite your native toolchain *nod*
Hi,
Well I got some interesting results. Perhaps though you could help me and tell me how I should have captured the output from make. Redirection did not reproduce what I saw and again this is manually adjusted. Is there a man to explain how to accurately capture output you see on the screen. I am doing this by looking at one screen and typing on another.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.