LinuxQuestions.org
Help answer threads with 0 replies.
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 09-01-2016, 02:40 AM   #121
nobodino
Senior Member
 
Registered: Jul 2010
Location: Near Bordeaux in France
Distribution: slackware, slackware from scratch, LFS, slackware [arm], linux Mint...
Posts: 1,564

Rep: Reputation: 892Reputation: 892Reputation: 892Reputation: 892Reputation: 892Reputation: 892Reputation: 892

back to slackware-current:
-new sfs-tools for current
-sfsinit adapted to current: not much differences.
-sfsbuild1 is unchanged
- build it up to build2_s.list only.
Attached Files
File Type: txt sfs-tools-current.sh.txt (19.9 KB, 15 views)
File Type: txt sfsinit.sh.txt (173.4 KB, 21 views)
 
Old 09-26-2016, 12:46 AM   #122
nobodino
Senior Member
 
Registered: Jul 2010
Location: Near Bordeaux in France
Distribution: slackware, slackware from scratch, LFS, slackware [arm], linux Mint...
Posts: 1,564

Rep: Reputation: 892Reputation: 892Reputation: 892Reputation: 892Reputation: 892Reputation: 892Reputation: 892
updated:
- sfs-tools-current.sh to slackware-current tree
Created a script to prepare the tools environment:
- pre-sfs-tools.sh
If you want to build sfs, just create /mnt/sfs/{sources} and mount it, transfer the different scripts (pre-sfs-tools, sfs-tools-current, sfs-init and sfsbuild1) in it and play with it.
Attached Files
File Type: txt prep-sfs-tools.txt (1.8 KB, 18 views)
File Type: txt sfs-tools-current.txt (19.8 KB, 25 views)
 
Old 09-26-2016, 09:34 PM   #123
worsel
Member
 
Registered: Feb 2008
Location: Washington State, USA
Distribution: Slackware 14.2, Slackware-from-Scratch
Posts: 241

Original Poster
Rep: Reputation: 45
Nicely done, Nobodino.

The only comment I have is: Assuming a trusted repository
is not necessary to move the sources.
For example:

Quote:
tar xvf $SRCDIR/binutils-2.27.tar.xz && cd binutils-2.27
would accomplish the same task for binutils pass 1 and save the time of moving
at testing the md5sum.

I know LFS moves the files. They do it to provide a set environment for
troubleshooting. Actually, I think they untar everything before starting,
although I don't know that this really accomplishes anything.

As I said above "Nice work" Keep it up.
 
Old 10-25-2016, 04:30 PM   #124
hendrickxm
Member
 
Registered: Feb 2014
Posts: 344

Rep: Reputation: Disabled
Hi guys. I have had some earlier experiments with a chroot I tried to rebuild, now I finally got to try from a LFS-build.
So I chose slackware 14.1 and LFS 7.3/7.4 mainly. My toolchain is
Code:
kernel-headers 3.10.104
zlib 1.2.7
glibc 2.17
gcc 4.7.1
mpc 1.0.3
mpfr 3.1.2
gmp 5.1.3
binutils 2.23.2
Every other package is slackware 14.1 version.
Building the tools (ch5) and adding which (2.20) and tar-1.13 was no problem.
But getting installpkg to work, some other thing.
I followed the stripped-lfs instructions including symlink for du.
I got messages that rev was missing, part of util-linux. So I had to improvise.
I was using a livecd so I added the installpkg and tar-1.13 binaries from slackware 14.1 to my live host.
I added cruxports4slack to build util-linux 2.21.2 on my live host using a Pkgfile from Nutyx/CRUX I edited to match LFS instructions on util-linux 2.21.2.
Next step was installing pkgtools, util-linux, cruxports4slack to my LFS.
installpkg --root /mnt/lfs *.t?z on the host did the trick.
Then I added from man-pages up to gcc using LFS-instructions and reinstalling it with a rebuild package using cruxports4slack and a Pkgfile.
I rebuild man-pages, zlib with the Slackbuild but file and util-linux failed so I used Pkgfiles as per LFS-book for those.
I continued with Slackbuilds up to perl at the moment of writing using order from LFS 7.3.
For libtool I used a Pkgfile as well. Perl is built with only XML-Parser as well. Grep has pcre removed as dependency. Shadow was built without acl, attr.
I did not build aaa_base, etc, pkgtools and cruxports4slack but used the binaries from slackware and connochaetos for cruxports4slack.

EDIT:
I managed to complete chapter 6.
Some notes. I could rebuild file with the SlacBuild after automake and autoconf.
After groff util-linux did build with the SlackBuild.
I had to use a sed (from LFS 7.3) for iproute2 so no need for Berkeley DB and a sed from LFS 7.3 for tar as well.
I added help2man (small package) so libtool also did build with the SlackBuild. I used --disable-manpages for kmod.
I had to disable some configure options for udev.
I ended up with a small Slackware from scratch.
Compared to LFS 7.3 the only added packages are help2man, pkgtools, cruxports4slack, etc, aaa_base and the sysv-scripts and functions.
Man instead of man-db.

I saw util-linux was added to later versions of LFS in chapter 5 so that would fix the problems I had.
Since I used a few Pkgfiles instead of SlackBuilds for binutils, glibc, kernel-headers, mpc, mpfr, gmp and gcc, I will rebuild everything and try gcc-4.8.2 and binutils from slackware.
I did learn some things .

Great work.
I know you guys are building current but since slackware stable is not moving, I prefer to experiment with that.

Another EDIT:
I finished a new tools and I can confirm I am able to use installpkg after adding util-linux to chapter 5 with instructions from LFS 7.5 and util-linux 2.21.2.
Glibc is for later.
I am unable to find a SlackBuild for kernel-headers, so I either build it as per LFS book or with a Pkgfile using LFS instructions.

Last edited by hendrickxm; 10-26-2016 at 06:23 PM.
 
Old 10-26-2016, 08:37 PM   #125
worsel
Member
 
Registered: Feb 2008
Location: Washington State, USA
Distribution: Slackware 14.2, Slackware-from-Scratch
Posts: 241

Original Poster
Rep: Reputation: 45
Nice progress, Hendrickxm.

Quote:
I know you guys are building current but since slackware stable is not moving, I prefer to experiment with that.
Actually, Nobodino is working on -current. I'm sticking with 14.2 (64 bit) for now. Got tired of aiming at a moving target.

Quote:
I am unable to find a SlackBuild for kernel-headers,
I think this is deliberate to discourage users from playing with new headers. Attached is my subroutine for building the
kernel headers. It takes two arguments, "d" and "kernel-headers". It could easily be converted to a SlackBuild.

Keep up the good work.
Attached Files
File Type: txt kernel-headers.txt (1.1 KB, 24 views)
 
Old 10-27-2016, 07:50 AM   #126
hendrickxm
Member
 
Registered: Feb 2014
Posts: 344

Rep: Reputation: Disabled
I managed to build up to glibc. In the instructions there is mentioning of glibc-zoneinfo after glibc, is there need to build glibc twice? Or do I need to use an adapted SlackBuild?
What I did was build the original patches/glibc.SlackBuild of 14.1, installed glibc, tried a rebuild and went into an infinite loop. That is something that happened before and explained here http://www.linuxquestions.org/questi...-a-4175468936/ as well.
So you are building 14.2, nobodino does current and I will try 14.1.
My goal is to use unmodified SlackBuilds as much as possible but at the same time avoid extra dependencies compared to LFS.

EDIT:
zlib builds fine after glibc, keeping the order from the book as much as possible using original SlackBuilds.
binutils failed with syslex_wrap, so I thought of finding a patch. Seems bison and flex are needed before binutils would build.

I checked your kernel-headers buildfile, almost identical to using a Pkgfile. That way of building packages makes cruxports4slack unneeded. But I find it easy to use, Pkgfiles and PKGBUILDS are not hard to find and try.

Another edit:
I continued with gmp, mpfr and libmpc. For libmpc I used 14.2's SlackBuild as 14.1 uses a very old version.
GCC is not really working out, editing the SlackBuild is a pain. I checked the sfs-patches but I still cannot manage to translate to gcc-4.8.2. Would someone be so kind to upload a modified gcc.SlackBuild to only build gcc and gcc-g++? Thanks!
Until then I will use a Pkgfile with LFS-instructions so I can continue building.
Included as attachment.

EDIT: Stuck with procps after ncurses.
I had similar problems years ago with libtermcap. Had no issues when I used LFS-instructions for ncurses but did now. I am going to revert to using gcc-4.7.1 and using LFS instructions for gcc and needed libs. Continue with LFS-instructions up to util-linux and swithcing to SlackBuilds with procps to find out where the problems manifests.
Back to building another tools first. Pff, perhaps I can better to to script the process.

Some thought:
seems that using lfs-instructions for a few programs instead of slackbuilds can get you into problems here after building the tools.
Slackware ncurses has termcap disabled. Slackware has mktemp in package bin and not in coreutils, it has mktemp renamed to mktemp-gnu. All with good reasons but it does not help to build it from scratch as per LFS-book.
I just finished the tools/ch5 with binutils-2.23.2, gcc-4.7.1 and mpc-1.0.3. Everything else is slackware 14.1 versioning. I will continue after more inspection.

Getting there:
So I did a rebuild of ch5 with gcc-4.7.1 and binutils 2.23.2.
I used SlackBuilds for all but kernel-headers and gcc. I used the unmodified Pkgfile from here http://downloads.nutyx.org/ports/sek...se/gcc/Pkgfile
(I did use version 4.7.1 instead of 4.7.4) so it was modified after all.
I could use the SlackBuild for binutils, had to delete a patch but that was it. No problems with procps in ch6, curious about a rebuild when I remove tools. I decided to add bin and libtermcap to keep things less complicated. I guess I will finish my build tomorrow, so I will keep you guys up2date. It has been fun so far .
Next step is creating SlackBuilds for kernel-headers and fixing a gcc.SlackBuild so no more need for Pkgfiles.

Still building:
I learned that running exec /bin/bash should not be done after building bash . Reinstalled te packages I just build and now up to perl. Seems XML-Parser needs expat, so I added that. Not much more to build. Only a handfull packages are build with non-original Slackbuilds so far.
I could trim a few in the future. Udev will be altered as well. I will still end up with 10 or less packags with non-original buildscripts, very nice.
My build order so far:
Code:
install binaries for aaa_base, pkgtools, etc and cruxports
kernel-headers*
glibc and adjust toolchain
zlib
help2man, libtool, autoconf, automake, file
binutils*
gmp, mpfr, libmpc, gcc*
sed
bzip2
pkg-config
libtermcap, ncurses
shadow
procps/psmisc
bin, coreutils
m4
grep*
readline
bash
gdbm
expat, perl*
Attached Files
File Type: txt Pkgfile.txt (1.5 KB, 20 views)

Last edited by hendrickxm; 10-30-2016 at 04:40 PM. Reason: nicer
 
Old 11-01-2016, 01:21 PM   #127
hendrickxm
Member
 
Registered: Feb 2014
Posts: 344

Rep: Reputation: Disabled
A new entry, my last post was getting bloated.
I managed to get a bootable system, there were some issues.
I decided to skip expat and XML-Parser and used a modified buildscript for perl.
Compared to a LFS 7.4 system, the added packages for slackware are:
libtermcap, bin, help2man, devs and which (VERY IMPORTANT).
There are seperate packages for sysV functions and scripts.
net-tools replaces inetutils, gettext and gettext-tools are split.
etc replaces iana-etc (I guess).
I replaced vim with nano. Libtermcap and helpman can be skipped with some changes to buildscripts for libtool and ncurses.
I removed pcre as dependency for grep. I removed Berkeley DB as dependency for iproute2.
Since I used a binary for the kernel, no need for bc and you can build up to 3.9 kernels without bc anyway.
I still need to test a lot.
For now I will continue in a chroot.
I noticed util-linux does build but with issues (term-utils fails etc).
I followed the order of LFS but with some changes. I noticed e2fsprogs needs util-linux to build.
Util-linux needs groff, binutils needs flex and best to build bison first.
The SlackBuild for file needs autoconf and automake.
Beware of building libtool before gcc final.

What was modded compared to 14.1?
GCC, build as http://downloads.nutyx.org/ports/sek...se/gcc/Pkgfile
binutils-2.23.2, build using slightly modded SlackBuild.
libmpc-1.0.3 build with 14.2 SlackBuild.
grep without pcre.
perl with modified Pkgfile.
net-tools needs the patch!
iproute2 without Berkely DB.
tar needed a sed command to fix issue with glibc-2.17.
For now, I have uses binaries for:
etc, aaa_base, devs, pkgtools, util-linux and kernel+modules. I also added cruxports and sbbdep.
I will investigate further and try to extent my base system.

I saw the versioning of lfs 6.6 is very similar to slackware 13.1. That screams for a trial.
 
1 members found this post helpful.
Old 11-01-2016, 08:58 PM   #128
worsel
Member
 
Registered: Feb 2008
Location: Washington State, USA
Distribution: Slackware 14.2, Slackware-from-Scratch
Posts: 241

Original Poster
Rep: Reputation: 45
Okay, hendrickxm

Finally I can get to your previous post. If anyone ever tells you that you'll have plenty of time for everything
after you retire, turn and run! They'll probably lie about other things also.

Quote:
is there need to build glibc twice?
The reason Nobodino and I build glibc (and several other) programs twice is to get rid of embedded references to "tools/bin"
See the following post for details.

http://www.linuxquestions.org/questi...ml#post5554303

Don't know about the infinite loop thingy. Never ran across it. Lucky, maybe?
 
Old 11-02-2016, 02:27 AM   #129
hendrickxm
Member
 
Registered: Feb 2014
Posts: 344

Rep: Reputation: Disabled
The glibc-2.17 problem seems to be related to gcc-4.8.X.
I wanted to build slackware 14.0 first but because I could no longer find a patch I needed and was still in ch5, I decided to go for 14.1.
Now I found the patch ofcourse.
I noticed that findutils needs to be installed twice before the find error to disappear.
I am going to rebuild again anyway to try and fix the issues I was having.

I should also mention that I did not add the binaries for the chroot for the packages needed to boot properly. I build using a ch5 tools with added which and tar-1.13.
Then added pkgtools from within the host using installpkg --root /mnt/lfs pkgtools*.txz but copying the files in the chroot as documented works to and doing the installpkg inside the chroot afterwards. It would be interesting to test this method to find out what is really needed to build slack from scratch.

Last edited by hendrickxm; 11-02-2016 at 02:35 AM.
 
Old 11-02-2016, 12:22 PM   #130
nobodino
Senior Member
 
Registered: Jul 2010
Location: Near Bordeaux in France
Distribution: slackware, slackware from scratch, LFS, slackware [arm], linux Mint...
Posts: 1,564

Rep: Reputation: 892Reputation: 892Reputation: 892Reputation: 892Reputation: 892Reputation: 892Reputation: 892
I have updated the memo to build the first part of sfs. It's be done for slackware-current, but it can be applicable to 14.2 or 14.1, by adjusting the version of the packages needed to achieve sfs.
It's not as complete as the scripts (sfsbuild1.sh...), but it can help you understand what you build.
Attached Files
File Type: txt sfs-v10102016-first.txt (38.8 KB, 22 views)
 
Old 11-02-2016, 12:32 PM   #131
hendrickxm
Member
 
Registered: Feb 2014
Posts: 344

Rep: Reputation: Disabled
Thanks nobodino, it is very well documenented again.
I am going to investigate the method I used with a 14.0 sfs-build and see if I get the same issues as before.
I noticed you build mc and gpm, slang and rsync for vim, I would trim those for example. Or are they needed for other packages later on?
 
Old 11-02-2016, 03:33 PM   #132
nobodino
Senior Member
 
Registered: Jul 2010
Location: Near Bordeaux in France
Distribution: slackware, slackware from scratch, LFS, slackware [arm], linux Mint...
Posts: 1,564

Rep: Reputation: 892Reputation: 892Reputation: 892Reputation: 892Reputation: 892Reputation: 892Reputation: 892
my first post on that subject was built with slackware-14.1, you can see was I used.
It may be useful too.
Nota: I add the gcc.SlackBuild I used to build gcc-4.9.2 (only gcc and g++)
Attached Files
File Type: txt Slackware from scratch -v17062015-first.txt (14.6 KB, 21 views)
File Type: txt gcc.SlackBuild.txt (27.9 KB, 16 views)

Last edited by nobodino; 11-03-2016 at 01:35 AM. Reason: add gcc.SalckBuild to build gcc-4.9.2
 
Old 11-03-2016, 04:25 PM   #133
hendrickxm
Member
 
Registered: Feb 2014
Posts: 344

Rep: Reputation: Disabled
Thanks nobodino. I found the issue with util-linux. I did not have all entries in /etc/group f.e. tty was missing.
I also found some hints in the LFS-books. If I am correct, it should be able to build sfs without rebuilding a single package in chapter 6. At the moment the only package I build twice in ch6 is libtool.
Since the toolchain of 14.0 is failing to build on my host/live cd, I will redo 14.1 and re-test to confirm my idea. With our gcc buildscript I should also be able to build entirely with slackbuilds and most untouched.

EDIT:
I did a complete rebuild with slightly changed order and some fixes.
I tried to stay as close to LFS-order and packages.
I added which, libtermcap, pkgtools, bin, sysv-scripts and functions and cruxports.
I did use a gcc Pkgfile, linux-headers and a perl Pkgfile. I changed the CFLAGS to match slackware's. A few slackbuilds were modified.

Order as LFS 7.6 minus bc, acl, attr, licap, expat, XML-Parser, intltool, gperf, libpipeline.
Man instead of man-db; gettext is split into tools/gettext.
Udev instead of eudev.

Buildorder:
- autoconf and automake before file
- bison before binutils
- findutils before shadow and --reinstall findutils to install twice
- libtermcap just before ncurses
- bin after flex
- sysv-scripts and functions just after sysv
- nano instead of vim but that is a personal choice

I used binaries for kernel-huge and modules.
Somehow I did not need help2man to build libtool, did not think of it but it did build fine.
No package has been build twice this time in ch6.

I am going to document this a little bit better so others can try.

PROGRESS:
I am trying my method on 14.2 as well.
So far I could use all slack-14.2 packages in the tools (except for ncurses, 5.9 failed and I followed the 7.9 book there).
I finished ch5 with added tar-1.13 and which-2.21. I can upload the tools tarball.

I made it to libtool, I used the build order from LFS-7.9 without libcap, acl, attr. I have build autoconf/automake before file and modded the file.SlackBuild to not call libtool.
Libtool builds without help2man using: https://gitweb.gentoo.org/repo/gento...138b7ed5676354
Earlier versions of libtool like 2.4.2 used in slackware 14.1 build fine without help2man even with an unmodified SlackBuild.
I still used a Pkgfile for gcc-5.3.0 because I do not like gcc being split in gcc and gcc-g++.
If I make it through, I am going to start documenting all the details. I figure slackware 14.2 is a better release to focus on.
I am tempting to add acl, attr and libcap. I will add gperf for (e)udev this time.

Last edited by hendrickxm; 11-08-2016 at 07:58 AM.
 
Old 11-11-2016, 02:25 AM   #134
nobodino
Senior Member
 
Registered: Jul 2010
Location: Near Bordeaux in France
Distribution: slackware, slackware from scratch, LFS, slackware [arm], linux Mint...
Posts: 1,564

Rep: Reputation: 892Reputation: 892Reputation: 892Reputation: 892Reputation: 892Reputation: 892Reputation: 892
I have completely updated the memo (hand made) to build Slackware From Scratch.

I have mixed the previous memos (first and second) in just one.
It is now self sufficient to build from the 'tools' part, up to the graphical environment (xfce)
and all the d set of slackware packages.
I have optimized the order of building packages with the tool 'depfinder',
it helped greatly. There are very few packages which are built twice now.
No weird message with : grep 'tools/bin' * in tools directory.

I added a real light browser (netsurf from SBo) at the end of SFS.

Enclosed are the updated sfsinit and sfbuild1 scripts.
Attached Files
File Type: txt sfs-v11112016.txt (70.9 KB, 30 views)
File Type: txt sfsbuild1.sh.txt (73.1 KB, 15 views)
File Type: txt sfsinit1.sh.txt (164.0 KB, 22 views)
 
1 members found this post helpful.
Old 11-11-2016, 07:40 AM   #135
hendrickxm
Member
 
Registered: Feb 2014
Posts: 344

Rep: Reputation: Disabled
I really like your documentation. To get a complete slackware system, it could not be better.

I have finished my 14.2-build. My goal was to get a LFS-like system but using slackware buildscripts as much as possible.
I started with a tools/ch5 using slackware 14.2 sources, except for ncurses-6.0 as 5.9 failed to build. I did not try your patch but since ncurses 5.9 builds fine in the chroot, I don't think it is a problem.
My first step was the tools with the added tar-1.13 and which-2.21. Second step was building slackware packages.
I added installpkg and makepkg from the official slackware package and started building.
I followed the same order as LFS-7.9, except for:

-glibc-zoneinfo after glibc
-automake and autoconf before file (modified to not call libtool)
-bison before binutils
-libtermcap after/before ncurses
-NO acl, attr or libcap
-NO bc as I will use binaries for the kernel
-findutils before shadow AND use --reinstall to install twice
-net-tools instead of inetutils
-NO intltool
-NO libpipeline (needed for man-db)
-man instead of man-db
-nano instead of vim (personal choice)
-added bin after coreutils
-gettext is split in gettext and tools
-added which

Modified slackbuilds or alternative buildscripts:

-kernel-headers from LFS-book (there are alternatives)
-gcc (Pkgfile from Nutyx saravane)
-perl-5.22.2 and perl-xml-parser (Pkgfile from Nutyx saravane)
-file no longer calls on libtool in the slackbuild (uncommented)
-pkg-config --with-internal-glib or you could use pkg-config-lite
-net-tools needs a patch, util-linux needs the same patch as net-tools is build there as well
-grep without pcre
-iproute2 build without arpd
-removed python as a dependency for a few packages
-eudev --disable-introspection

There where a few LFS-commands I used in buildscripts like eudev to make sure binaries do not link to stuff in tools and e2fsprogs to use stuff in tools.

File calls on autoreconf but it's after a patch that moves a file, this can be achieved by a simple mv $PKG/usr/ $PKG/etc kind of command so that would make autoconf and automake no longer needed at this point in the build.
I added which after all other packages, I guess this does not matter.
Tar, sed and shadow all build fine without acl and attr but I might add them.

I have much testing and documenting to do. Building 14.2 with LFS-tools is even easier then 14.1.
I use sbbdep to find dependencies. I tried creating a chroot with official packages before and noticed many packages link to other stuff but by using the LFS-tools, you get packages that do not link to that.
F.e. I was unable to build a working make-4.1 from a chroot with slackware binaries without guile, only a make-4.0. But guile is not included in ch5 and builds fine in the chrooted tools.
 
1 members found this post helpful.
  


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
[SOLVED] /usr/bin/X11/X11/....... 10 X11 subsets & counting walter74 Linux - General 2 06-07-2015 12:36 AM
How do I get the /etc/X11/X file rebuilt from scratch rickh Debian 4 05-07-2006 11:06 PM
ali aladdin v agp stinks :scratch: :scratch: :scratch: Mr Marmmalade Linux - Hardware 1 07-08-2003 05:11 AM

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

All times are GMT -5. The time now is 04:49 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